//DISJOINTED ROLLOVERS USING BUTTON NAVIGATION AND IMAGES FADING IN AND OUT
// jQuery fadeToggle plugin
jQuery.fn.fadeToggle = function(s, fn){
	return (this.is(":visible"))
		? this.fadeOut(s, fn)
		: this.fadeIn(s, fn);
};


jQuery(function($){
	var labelHide = 'Click to hide content!';
	var labelShow = 'Click to show content!';
	$(".toggler").text(labelHide);
	$(".toggler").click(function(){
		var copy = $(".content").is(":visible") ?  labelShow : labelHide;
		$(".content").fadeToggle();
		$(this).text(copy);
	});
});


$(document).ready(function(){
//disjointed rollover function starting point
	
	$("#logo_main .alberta, #logo_sponsors .alberta, #bottom_container .alberta").hide();
	$("#logo_main .bc, #logo_sponsors .bc, #bottom_container .bc").hide();
	$("#logo_main .ontario, #logo_sponsors .ontario, #bottom_container .ontario").hide();
	$("#logo_main .quebec, #logo_sponsors .quebec, #bottom_container .quebec").hide();
		
	$(".menu .alberta").mouseover(function(){
		$("#logo_main .alberta, #logo_sponsors .alberta, #bottom_container .alberta").hide();
		$("#logo_main .bc, #logo_sponsors .bc, #bottom_container .bc").hide();
		$("#logo_main .ontario, #logo_sponsors .ontario, #bottom_container .ontario").hide();
		$("#logo_main .quebec, #logo_sponsors .quebec, #bottom_container .quebec").hide();
		$("#logo_main .home, #logo_sponsors .home, #bottom_container .home").hide();
		$("#logo_main .alberta, #logo_sponsors .alberta, #bottom_container .alberta").fadeToggle();
	});
	$(".menu .bc").mouseover(function(){
		$("#logo_main .alberta, #logo_sponsors .alberta, #bottom_container .alberta").hide();
		$("#logo_main .ontario, #logo_sponsors .ontario, #bottom_container .ontario").hide();
		$("#logo_main .quebec, #logo_sponsors .quebec, #bottom_container .quebec").hide();
		$("#logo_main .home, #logo_sponsors .home, #bottom_container .home").hide();
		$("#logo_main .alberta, #logo_sponsors .alberta, #bottom_container .alberta").hide();
		$("#logo_main .bc, #logo_sponsors .bc, #bottom_container .bc").fadeToggle();
	});
	$(".menu .ontario").mouseover(function(){
		$("#logo_main .alberta, #logo_sponsors .alberta, #bottom_container .alberta").hide();
		$("#logo_main .ontario, #logo_sponsors .ontario, #bottom_container .ontario").fadeToggle();
		$("#logo_main .quebec, #logo_sponsors .quebec, #bottom_container .quebec").hide();
		$("#logo_main .home, #logo_sponsors .home, #bottom_container .home").hide();
		$("#logo_main .alberta, #logo_sponsors .alberta, #bottom_container .alberta").hide();
		$("#logo_main .bc, #logo_sponsors .bc, #bottom_container .bc").hide();
	});
	$(".menu .quebec").mouseover(function(){
		$("#logo_main .alberta, #logo_sponsors .alberta, #bottom_container .alberta").hide();
		$("#logo_main .ontario, #logo_sponsors .ontario, #bottom_container .ontario").hide();
		$("#logo_main .quebec, #logo_sponsors .quebec, #bottom_container .quebec").fadeToggle();
		$("#logo_main .home, #logo_sponsors .home, #bottom_container .home").hide();
		$("#logo_main .alberta, #logo_sponsors .alberta, #bottom_container .alberta").hide();
		$("#logo_main .bc, #logo_sponsors .bc, #bottom_container .bc").hide();
	});
	$("#logo_main, #logo_sponsors, #bottom_container, #menu_2009, #nav_right").mouseover(function(){
		$("#logo_main .alberta, #logo_sponsors .alberta, #bottom_container .alberta").hide();
		$("#logo_main .bc, #logo_sponsors .bc, #bottom_container .bc").hide();
		$("#logo_main .ontario, #logo_sponsors .ontario, #bottom_container .ontario").hide();
		$("#logo_main .quebec, #logo_sponsors .quebec, #bottom_container .quebec").hide();
		$("#logo_main .alberta, #logo_sponsors .alberta, #bottom_container .alberta").hide();
		$("#logo_main .home, #logo_sponsors .home, #bottom_container .home").fadeIn();
	});

	$("ul#dropdown_2009").hide();

	$(".quebec_2009, .alberta_2009, .ontario_2009, .bc_2009").mouseover( function() {
		$("ul#dropdown_2009").show();
	});
	
	$(".quebec_2009, .alberta_2009, .ontario_2009, .bc_2009").mouseout( function() {
		$("ul#dropdown_2009").hide();
	});
	
	$(".other_2009").mouseover( function() {
		$("ul#dropdown_2009").toggle();
	});
	
	$(".other_2009").mouseout( function() {
		$("ul#dropdown_2009").toggle();
	});
});