// remap jQuery to $
(function($){})(window.jQuery);

/* trigger when page is ready */
$(document).ready(function (){
	
	$(".tabs").organicTabs();
	
	//Hide (Collapse) the toggle containers on load	
	$(".more-content").hide();
	
	$.fn.slideFadeToggle  = function(speed, easing, callback) {
        return this.animate({opacity: 'toggle', height: 'toggle'}, speed, easing, callback);
	}; 

	$(".more-link").click(function() {
   		$(this).toggleClass("active").next(".more-content").slideFadeToggle();
   		return false; //Prevent the browser jump to the link anchor
	});
	
		$(".fancybox-vimeo").click(function() {
		$.fancybox({
			'padding'		: 0,
			'autoScale'		: false,
			'transitionIn'	: 'elastic',
			'transitionOut'	: 'elastic',
			'title'			: this.title,
			'width'			: 600,
			'height'		: 400,
			'href'			: this.href.replace(new RegExp("([0-9])","i"),'moogaloop.swf?clip_id=$1'),
			'type'			: 'swf'
		});

		return false;
	});

	$("a.fancybox-photos").fancybox();
	
	
    $('#banner').dynamic_slider({
		className: 'dynamic-slider',
		sliderClassName: 'slider_item',	             
		easeType: 'fadeInLeft',
		slideShow: true,
		showButton: true,
		showArrow: true,
		slideShowDelay: 15000
	});  

});
