/*
 var RecaptchaOptions = {
    theme : 'custom'
 }
*/
jQuery.noConflict();
function rotate() {  
	jQuery('#nextArrow').click();  
}  
jQuery(document).ready(function(){
	var totalImages = 0;
	var imageWidth = 969;
	//rotation speed and timer  
	var speed = 5000;  
	var run = setInterval('rotate()', speed);     

	jQuery("#sliderBar").css("width", imageWidth*jQuery("#sliderBar > ul > li").length);
	//grab the width and calculate left value  
	var left_value = imageWidth * (-1);	
	//move the last item before first item, just in case user click prev button  
	jQuery('#sliderBar > ul > li:first').before(jQuery('#sliderBar > ul > li:last'));  
	//set the default item to the correct position   
	jQuery('#sliderBar').css({'left' : left_value});  
	
	jQuery('#prevArrow').click(function() {  
		//get the right position              
		var left_indent = parseInt(jQuery('#sliderBar').css('left')) + imageWidth;  
		jQuery('#sliderBar').animate({'left' : left_indent}, 200,function(){      
			//move the last item and put it as first item                 
			jQuery('#sliderBar > ul > li:first').before(jQuery('#sliderBar > ul > li:last'));             
			//set the default item to correct position  
			jQuery('#sliderBar').css({'left' : left_value});  
		});  
		return false;  
	});  

	jQuery('#nextArrow').click(function() {  
		//get the right position  
		var left_indent = parseInt(jQuery('#sliderBar').css('left')) - imageWidth;  
		jQuery('#sliderBar').animate({'left' : left_indent}, 200, function () {  
			//move the first item and put it as last item  
			jQuery('#sliderBar > ul > li:last').after(jQuery('#sliderBar > ul > li:first'));                    
			//set the default item to correct position  
			jQuery('#sliderBar').css({'left' : left_value});  
		});  
		return false;  	
	});          
	
	jQuery('#homeSlider').hover(function() {  
		clearInterval(run); 
	}, function() {
		run = setInterval('rotate()', speed);     
	});
	
	
});