var $ = jQuery.noConflict();

//Gallery
jQuery(document).ready(function($){ 
	$('#slider').cycle({ fx: 'fade', speed:'300', timeout: 5000, next: '#next2', prev: '#prev2', easing: 'easeout' });
	$('#quotes').cycle({ fx: 'fade', speed:'500', timeout: 30000, easing: 'easeout' });
});

//Pretty
jQuery(document).ready(function($){
    $(".leaderboard")
        .prepend('<div class="overlay"></div>');
});

//Tog
$(document).ready(function(){

	//Hide (Collapse) the toggle containers on load
	$(".toggle_container").hide(); 

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

	//Slide up and down on click
	$(".trigger").click(function(){
		$(this).next(".toggle_container").slideToggle("medium");
	});

});

//Fancybox
$(document).ready(function() { 
	 $("a.fb").fancybox(); 
	 $("a#inline").fancybox({ 'hideOnContentClick': true }); 
	 $("a.fbg").fancybox({ 'zoomSpeedIn': 300, 'zoomSpeedOut': 300, 'overlayShow': false }); 
}); 


//Open in external windows
function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "external")
     anchor.target = "_blank";
 }
}
window.onload = externalLinks;

/*-------------------------------------------------------------------- 
 * JQuery Plugin: "EqualHeights"
 * by:	Scott Jehl, Todd Parker, Maggie Costello Wachs (http://www.filamentgroup.com)
 * Copyright (c) 2008 Filament Group
 * Licensed under GPL (http://www.opensource.org/licenses/gpl-license.php)
 *
--------------------------------------------------------------------*/
jQuery(document).ready(function($){ 	
	function equalHeight(group) {
		tallest = 0;
		group.each(function() {
			thisHeight = $(this).height();
			if(thisHeight > tallest) {
				tallest = thisHeight;
			}
		});
		group.height(tallest);
	}

	equalHeight($ ( "add stuff" ) );
	
});

