﻿$(document).ready(function() {
    $(document).pngFix();

    // Create drop down menus
    //$("ul.subnav").siblings("a").append("<span></span>"); //Only shows drop down trigger when js is enabled
    $(".navBar ul li a").hover(function() {
        $(this).parent().find("ul.subnav").stop().slideDown('fast').show('slow', function() {
            $(this).height("auto");
        }); //Drop down the subnav on click

        $(this).parent().hover(function() { //Hover events for the parent
        }, function() {
            $(this).parent().find("ul.subnav").stop().slideUp('slow');
        }); //When the mouse hovers out of the subnav, move it back up       
    }).hover(function() { //Hover events for the trigger
        //$(this).children("span:first").addClass("subhover"); //On hover over, add class "subhover"
    }, function() {	//On Hover Out
        //$(this).children("span:first").removeClass("subhover"); //On hover out, remove class "subhover"
    });

});
// -----

$.urlParam = function(name) {
    var results = new RegExp('[\\?&]' + name + '=([^&#]*)').exec(window.location.href);
    if (!results) { return 0; }
    return results[1] || 0;
}

