﻿var $j = jQuery.noConflict();

$j(document).ready(function() {
    // Top Menu
    $j("ul.submenu1").parent().append("<span></span>"); //Only shows drop down trigger when js is enabled (Adds empty span tag after ul.submenu1*)
    $j("ul.topmenu li span").click(function() { //When trigger is clicked...
        //Following events are applied to the submenu1 itself (moving submenu1 up and down)
        $j(this).parent().find("ul.submenu1").slideDown('fast').show(); //Drop down the submenu1 on click
        $j(this).parent().hover(function() {
        }, function() {
            $j(this).parent().find("ul.submenu1").slideUp('slow'); //When the mouse hovers out of the submenu1, move it back up
        });
        //Following events are applied to the trigger (Hover events for the trigger)
    }).hover(function() {
        $j(this).addClass("hover"); //On hover over, add class "hover"
    }, function() {	//On Hover Out
        $j(this).removeClass("hover"); //On hover out, remove class "hover"
    });

    $j("ul.topmenu li ul.submenu1 li").hover(function() {
        $j(this).find("ul.submenu11:first").show("slow");
    }, function() {
        $j(this).find("ul.submenu11:first").hide("fast");
    });
});