function slideShow(){
	var speed = 200;
	$(".slide_img")
		.animate({'opacity':'0'},speed,function(){
			var obj =this;
			this.c = this.c === undefined ? 1 : ((this.c + 1) % imgArr.length);
			this.src = imgArr[this.c][0];				
			$(obj).animate({'opacity':'1'},speed,function(){
				setTimeout(slideShow,4000);
			});	
		})
}
setTimeout(slideShow,4000);


function mycarousel_initCallback(carousel)
{
	// Disable autoscrolling if the user clicks the prev or next button.
	carousel.buttonNext.bind('click', function() {
		carousel.startAuto(0);
	});

	carousel.buttonPrev.bind('click', function() {
		carousel.startAuto(0);
	});

	// Pause autoscrolling if the user moves with the cursor over the clip.
	carousel.clip.hover(function() {
		carousel.stopAuto();
	}, function() {
		carousel.startAuto();
	});
};

function chooseVideo(e,obj,title){
	
	var i = "<div class='view_video'>"+title+"</div>"+"<embed id='myplayer' width='258' height='202' flashvars='file="+videoArr[e][0]+"&image="+videoArr[e][2]+"&playlistsize=0&autoplay=0&playlist=bottom&backcolor=#F6F6F7&lightcolor=#555555&frontcolor=#000000' autoplay='0' allowfullscreen='true' src='"+_rootURL+"/media/player.swf' allowscriptaccess='always' wmode='transparent'/></embed>";
	$("#video_js").html(i);
	$('ul.list_video li').removeClass('videoactive');
	$(obj).addClass('videoactive');
}
$(document).ready(function() {
	$('li.big_menu').each(function(){
		$(this).mouseenter(function(){
			$(this).children('ul').slideDown(250);	
		});
		$(this).mouseleave(function(){
			$(this).children('ul').slideUp(200);	
		});
	})
	
	$('.jcarousel-skin-tango').jcarousel({
		auto: 3,
		scroll: 2,
		wrap: 'last',
		initCallback: mycarousel_initCallback
	});
});


			
			

