// JavaScript Document
$(document).ready(function(){
						  
$('div.right_btn').each(function()
	{
		$(this).mousehold(function(event){
			id = $(this).attr("title");
			var position = $("#in_"+ id ).position();
			var links = position.left;
			var negative_links = - links;
			
			var inWidth = $("#in_"+ id ).width();
			var frameWidth = $("#frame_" + id ).width();
			
			var difference = inWidth - frameWidth;
			
			$("#info").empty();
			$("#info").append(negative_links);
			
			if(negative_links <= difference){
				var new_position = links - 100;
				$("#in_" + id).css({left: new_position });	
			}
		});
	});
$('div.left_btn').each(function()
{
		$(this).mousehold(function(event){
			id = $(this).attr("title");
			var position = $("#in_" + id).position();
			var rechts = position.left;
			if(rechts < 0){
				var new_position = rechts + 100;
				$("#in_" + id).css({left: new_position });
			}
		});
	});
});
function scroll_right(id){
	var position = $("#in_" + id).position();
	var rechts = position.left;
	if(rechts < 0){
		var new_position = rechts + 40;
		$("#in_" + id).css({left: new_position });
	}
}


