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



$(document).ready(function() {


	$('#carousel_catalog').jcarousel({
	        auto: 3,
	        wrap: 'last',
	        scroll: 1,
		initCallback: carousel_initCallback
	});


	$("ul.thumb li").hover(function() {
		$(this).css({'z-index': '10'});
		$(this).find('img').addClass("hover").stop()
			.animate({
				marginTop: '-50px', 
				marginLeft: '-70px', 
				top: '50%', 
				left: '50%', 
				width: '115px', 
				height: '76px',
				padding: '0px' 
			}, 200);
		} , function() {
		$(this).css({'z-index': '0'});
		$(this).find('img').removeClass("hover").stop()
			.animate({
				marginTop: '0', 
				marginLeft: '0',
				top: '0', 
				left: '0', 
				width: '100px', 
				height: '66px', 
				padding: '0px'
			}, 400);
	});
	 
	$("ul.thumb li a").click(function() { //Swap Image on Click	
		var mainImage = $(this).attr("href"); //Find Image Name
		$("#viewer img").attr({ src: mainImage });
		var mainImage = $(this).attr("rel"); //Find Image Name
		$("#viewer").attr({ href: mainImage });
		$(this).colorbox({ href: mainImage });
		return false;		
	});


	$("a.flowplayer").flowembed("/js/flowplayer/FlowPlayer.swf", {
		autoPlay: true,
		autoBuffering: false,
		initialScale: 'scale',
		controlsOverVideo: 'ease',
		showFullScreenButton: false,
		showVolumeSlider: false,
		showMuteVolumeButton: false,
		showMenu: false,
		loop: false,
		usePlayOverlay: true
	});


	$(".box").colorbox();

	$("^#cbox").pngFix();

});


