//Video Slider Index ....
jQuery.videoSlider=function() {
	var scrollTrack=Math.ceil(parseInt(jQuery('#carousel_ul li').length*(jQuery('#carousel_ul li').outerWidth() + 10))/parseInt(jQuery("#"+jQuery('#carousel_ul').parent().attr('id')).width()));	
	if(scrollTrack>1) {		
		var auto_slide = 1; var hover_pause = 1; var key_slide = 1; var auto_slide_seconds = 2000;		
		jQuery('#Prev').click(function() { slideVideo("left") }); jQuery('#Next').click(function() { slideVideo("right") });
		jQuery('#carousel_ul li:first').before(jQuery('#carousel_ul li:last')); 
		if(auto_slide == 1) {
			var timer = setInterval('slideVideo("right")', auto_slide_seconds); 
			jQuery('#hidden_auto_slide_seconds').val(auto_slide_seconds);
		}
		if(hover_pause == 1){
			jQuery('#carousel_ul').hover(function(){
					clearInterval(timer)
			},function(){
					timer = setInterval('slideVideo("right")', auto_slide_seconds); 
			}); 		
		}
	}
}
slideVideo=function(where) {
	var item_width = jQuery('#carousel_ul li').outerWidth() + 10;
	if(where == 'left'){
		var left_indent = parseInt(jQuery('#carousel_ul').css('left')) + item_width;
	}else{
		var left_indent = parseInt(jQuery('#carousel_ul').css('left')) - item_width;
	}

	jQuery('#carousel_ul:not(:animated)').animate({'left' : left_indent},500,function(){    
		if(where == 'left'){
			jQuery('#carousel_ul li:first').before(jQuery('#carousel_ul li:last'));
		}else{
			jQuery('#carousel_ul li:last').after(jQuery('#carousel_ul li:first')); 
		}
		jQuery('#carousel_ul').css({'left' : '-210px'});
	});
}
//END OF VIDEO SLIDER ....
