$.noConflict();

jQuery(document).ready(function ($) {

    /***************** MAIN NAVIGATION START ***********************/
    $(".outerListItem div").hide();

    $(".outerListItem").hover(
        function () {
            $(this).children("a").addClass("hover");
            if (inPageEditorMode() == "False")
                $(this).children("div").show();
        },
        function () {
            $(this).children("a").removeClass("hover");
            if (inPageEditorMode() == "False")
                $(this).children("div").hide();
        }
    );

    $(".innerListItem").hover(
        function () {
            $(this).addClass("hover");
        },
        function () {
            $(this).removeClass("hover");
        }
    );


    $("#pipedNavigation li:first").addClass("first");

    $("#pipedNavigation li").hover(
        function () {
            $(this).children("a").addClass("hover");
        },
        function () {
            $(this).children("a").removeClass("hover");
        }
    );

    $("#tabbedNavigation li").not(".selected").hover(
        function () {
            $(this).children("a").addClass("hover");
        },
        function () {
            $(this).children("a").removeClass("hover");
        }
    );

    /***************** MAIN NAVIGATION END ***********************/

    /***************** TOP NAVIGATION START ***********************/

    jQuery(document).ready(function () {

        jQuery("#languageSelector li ul").hide();

        jQuery("#languageSelector li.selector").hover(
                function () {
                    jQuery(this).addClass("hover");
                    jQuery(this).children("ul").show();
                }, function () {
                    jQuery(this).removeClass("hover");
                    jQuery(this).children("ul").hide();
                });

    });

    /***************** TOP NAVIGATION END ***********************/




});


function inPageEditorMode() {

    return jQuery("#hfPageEditMode").val();
}

function openSubmenu(menu, img, expandUrl, collapseUrl) {
    // close all sub menus...
    jQuery("img[name=subMenuImage]").each(function () {
        jQuery(this).attr("src", expandUrl);
    });
    jQuery("div[name=subMenuItems]").each(function () {
        jQuery(this).css("display", "none");
    });
    jQuery(img).attr("src", collapseUrl);
    jQuery(menu).css("display", "block");
}

function getFirstImage(e) {
    if (!e) return;

}
