var curclicked = 0;


$(document).ready(function(){

	
	setInterval(function(){
	
	if( curclicked < 10 )
	{
		$(".line1 .dugmesag").ready(function(){$(".line1 ul").animate({left: '-=33px'}, 5000);});
	}
	else if( curclicked < 20 )
	{
		$(".line1 .dugmesol").ready(function(){$(".line1 ul").animate({left: '+=33px'}, 5000);});
	}
	else if( curclicked < 30)
	{
		$(".line2.dugmesag").ready(function(){$(".line2 ul").animate({left: '-=33px'}, 5000);});
	}else
	{
		$(".line2.dugmesol").ready(function(){$(".line2 ul").animate({left: '+=33px'}, 5000);});
	}
	
		curclicked++;

		if( 40 == curclicked )
        curclicked = 0;

		
	}, 2000);
	
	
	$(".line1 .dugmesol").click(function(){$(".line1 ul").animate({left: '+=121px'}, 2000);});
	$(".line1 .dugmesag").click(function(){$(".line1 ul").animate({left: '-=121px'}, 2000);});
    $(".line2 .dugmesol").click(function(){$(".line2 ul").animate({left: '+=121px'}, 2000);});
	$(".line2 .dugmesag").click(function(){$(".line2 ul").animate({left: '-=121px'}, 2000);});	
	
	
	$(".line1 ul li a").hover(function(e){
 	
	    bsl = "#" + $(this).attr("name");
		
		$(bsl).html("<div valign='center' align='center' style='width:120px'> <br><br><br> <font color='#dc2525'>" + $(this).attr("title") + " <br><br> " + $(this).attr("rel") + "</font> <br><br><font color='darkblue'><strong>" + $(this).attr("rev") + " TL </strong></font><br><br><br><br></div>")
				.fadeIn("slow");
		}, function(){
			$(bsl).fadeOut("slow");

	});

	$(".line2 ul li a").hover(function(e){
 
	    bsl = "#" + $(this).attr("name");
		
		$(bsl).html("<div valign='center' align='center' style='width:120px'> <br> <font color='#dc2525'>" + $(this).attr("title") + " <br><br> " + $(this).attr("rel") + "</font> <br><br><font color='darkblue'><strong>" + $(this).attr("rev") + " TL </strong></font><br><br><br><br></div>")
				.fadeIn("slow");
		}, function(){
			$(bsl).fadeOut("slow");
	});

	
});
