var width = 0;
var lft = 0;
var stat = 1;
var step = 0;

var timer1 = null;
var ob1 = null;

function addn(){
 $(".next").click();
}

function addp(){
 $(".prev").click();
}


$().ready( function() {
    $(".anyclass").jCarouselLite({
        btnNext: ".next",
        btnPrev: ".prev",
        speed: "0",
        visible: 4
	
        
    });
 

	$(".title").hover(
		function(){
			$(this).addClass('hover');
		},
		function(){
			$(this).removeClass('hover');
		}
	);
 $("#pr").mouseover(function(){  addp();  addpi = setInterval("addp();",90);  });
$("#nx").mouseover(function(){  addn(); addni = setInterval("addn();",90);  }); 
$("#nx").mouseout(function(){ clearInterval(addni); });
$("#pr").mouseout(function(){ clearInterval(addpi); });
});  

/*function moveCloudRight() {
	var cn = 1;
	ob1 = $("#panbg img:first-child");
	ob1.animate({"marginLeft":"-=100px"}, 600, "linear", function() {
		var mor = parseInt($(this).css("marginLeft"));
		if (mor < lft) {
			var mor2 = 458 + mor;
			$(this).appendTo("#panbg").css("marginLeft","0px");
			ob1 = $("#panbg img:first-child");
			ob1.css("marginLeft",mor2+"px");
		}	
	});
	
	timer1 = setTimeout("moveCloudRight()",605);
}

function stopCloudRight() {
	clearTimeout(timer1);
	ob1.stop();
	ob1 = null;
}

/*function moveCloudLeft() {
	if (sCount==-2)
		return false;
		
	if (!stat)
		return false;
	
	stat = 0;
	$("#panmain").animate({"left":"+="+step+"px"},600,function(){stat = 1; sCount--});

}

function moveCloudRight() {
	if (sCount==2)
		return false;

	if (!stat)
		return false;
	
	stat = 0;
	$("#panmain").animate({"left":"-="+step+"px"},600,function(){stat = 1; sCount++});
	return false;
}*/

