jQuery(document).ready(function() {

// Credits: Robert Penners easing equations (http://www.robertpenner.com/easing/).
jQuery.easing['BounceEaseOut'] = function(p, t, b, c, d) {
	if ((t/=d) < (1/2.75)) {
		return c*(7.5625*t*t) + b;
	} else if (t < (2/2.75)) {
		return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
	} else if (t < (2.5/2.75)) {
		return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
	} else {
		return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
	}
};

//Slides
$('#slides').slides({
				preload: true,
				generateNextPrev: false,
				autoHeight: true,
				next: 'next'
			});


//Superfish

$("ul.sf-menu")

.supersubs({ 
minWidth:    12,   // minimum width of sub-menus in em units 
maxWidth:    20,   // maximum width of sub-menus in em units 
extraWidth:  1     // extra width can ensure lines don't sometimes turn over 
})

.superfish({ 
delay:       300,                            // one second delay on mouseout 
speed:       'fast',                          // faster animation speed 
autoArrows:  true,                           // disable generation of arrow mark-up 
dropShadows: false                            // disable drop shadows 

});


// Sticklr
$('#social').sticklr({
animate     : true,
stickTo		: 'right',
showOn		: 'click'
});

// Toggle Shortcode
	jQuery(".toggle_content").hide(); 

	//Switch the "Open" and "Close" state per click
	jQuery("h3.toggle").toggle(function(){
		jQuery(this).addClass("active");
		}, function () {
		jQuery(this).removeClass("active");
	});

	//Slide up and down on click
	jQuery("h3.toggle").click(function(){
		jQuery(this).next(".toggle_content").slideToggle();
	});

//////////////////////////////////////////////////////// Isotope


var $container = $('#isotope2');
      var $isoID = $('#filters .active').attr('data-filter');

	  $container.isotope({
		itemSelector: '.ga',
		animationEngine: 'jquery',
		animationOptions: {
			duration: 350,
			easing: 'linear',
		queue: true
		}
	  });
	  $container.isotope({ filter: $isoID });

	$('#filters li a').click(function() {
		$('#filters li a').removeClass('active');
		$(this).addClass('active');
		$isoID = $(this).attr('data-filter');
		$container.isotope({ filter: $isoID });
		return false;
	});


           

$('#ca-container').contentcarousel();

 
//End
});	
