// JavaScript Document
$(function () {

	$('#jquery_slider').boutique({
		starter:			1,
		speed:				800,
		hoverspeed:			270,
		hovergrowth:		0.10,
		container_width:	1000,
		front_img_width:	640,
		front_img_height:	250,
		behind_opac:		0.5,
		back_opac:			0.2,
		behind_size:		0.6,
		back_size:			0.3,
		autoplay:			true,
		autointerval:		4000,
		freescroll:			true,
		easing:				'easeOutQuart',
		move_twice_easein:	'easeInQuart',
		move_twice_easeout:	'easeOutQuart',
		text_front_only:	false
	});

	$('.page').hide();
	$('#navigation li:first').addClass('active').show();
	$('.page:first').show();
	
	$('#navigation li').click(function(){
		$('#navigation li').removeClass('active');
		$(this).addClass('active');
		
		$('.page').hide();
		var activeTab = $(this).find('a').attr('href');
		$(activeTab).fadeIn('slow');
		return false;
	});

	$('#s1').cycle({ 
		fx:   'shuffle', 
		shuffle: { 
			top:  -230, 
			left:  230 
		}, 
		easing: 'easeInOutBack', 
		delay: -2000 
	});
	
	$('#s2').cycle({
		fx:      'custom', 
		cssBefore: {  
			left: 115,  
			top:  115,  
			width: 0,  
			height: 0,  
			opacity: 1, 
			display: 'block' 
		}, 
		animOut: {  
			opacity: 0  
		}, 
		animIn: {  
			left: 0,  
			top: 0,  
			width: 420,  
			height: 200  
		}, 
		cssAfter: {  
			zIndex: 0 
		}, 
		delay: -3000 
	});
	
	$('#s3').cycle({ 
		fx: 'custom', 
		cssBefore: {  
			top:  0, 
			left: 0, 
			width: 0, 
			height: 0,  
			display: 'block' 
		}, 
		animIn:  {  
			width: 420, 
			height: 200  
		}, 
		animOut: {  
			top:  200, 
			left: 420, 
			width: 0, 
			height: 0 
		}, 
		cssAfter: {  
			zIndex: 0  
		}, 
		delay: -1000 
	});
	
	$('#carouselhAuto').jsCarousel({ onthumbnailclick: function(src) { alert(src); }, autoscroll: true, circular: true, masked: false, itemstodisplay: 3, orientation: 'h' });
	
});
