/*
 * Global.js
 * Javascript control for the global content on ALL pages
 * Uses the juery library on majority of functions
 * Includes Javascript dropdowns on the Global Nav(s)
 * Doesn't include the homepage scroller for the parks. Refer myfuncomau.js 
 *
 * Last Updated 10/06/2010
 * Author: GF
 */


// Switches to No-Conflict mode by re-writing all '$' as 'j' to avoid conflict with other Javascript libraries.
var j = jQuery.noConflict();


//Flag al pages only when JS is enabled
j('html').addClass("js-enabled");



/* ---------------------------------------------------- */
/* Set equal heights on the fotter columns */
/* ---------------------------------------------------- */
j(document).ready(function() {					   
	j(".footerCol").equalHeights();
});


/* ---------------------------------------------------- */
/* Initiate Drop downs for the GlobalNav Topbar lonks */
/* ---------------------------------------------------- */
j(document).ready(function() {	
	/*j("#selectRegion").msDropDown();*/
	j("#globalNav select").msDropDown();
});



/* --------------------------------------------------------- */
/* TopNav Dropdowns */
/* --------------------------------------------------------- */

j(document).ready(function() {
	j("#globalNav .rightNav div.dropBox").hide();
	
    j("#globalNav .rightNav li a.hasDrop").click(function() {
		j(".dropBox").hide();
		j(this).parents("li").find(".dropBox").toggle();
		return false;
	});
	
	j("#globalNav .rightNav li a.closeBox").click(function() {
		j(".dropBox").hide();
		return false;
	});
	
	j("#globalNav li.has-child a").hover(function() {
		j("ul.allAtractions").show();
	}, function() {
        j("ul.allAtractions").hide();
	});
});

