$(document).ready(function () {  

    // $("ul.subnav").parent().append("<span></span>"); //Only shows drop down trigger when js is enabled (Adds empty span tag after ul.subnav*)  
   
     $("#archives").mouseover(function() { //When trigger is moused over...  
   
         //Following events are applied to the subnav itself (moving subnav up and down)  
         $("#subnav").slideDown('slow').show(); //Drop down the subnav on click  
   		
        $("#subnav").hover(function() {  
         }, function(){  
             $("#subnav").slideUp('slow'); //When the mouse hovers out of the subnav, move it back up  
         });  
   
         //Following events are applied to the trigger (Hover events for the trigger)  
         }).hover(function() {  
            $("#subnav").addClass("subhover"); //On hover over, add class "subhover"  
         }, function(){  //On Hover Out  
             $("#subnav").removeClass("subhover"); //On hover out, remove class "subhover"  
     });  


   $("#search").hover(function() { //When trigger is moused over...  
   
         //Following events are applied to the subnav itself (moving subnav up and down)  
         $("#subnav2").slideDown('slow').show(); //Drop down the subnav on click  
   		
        $("#subnav2").hover(function() {  
         }, function(){  
             $("#subnav2").slideUp('slow'); //When the mouse hovers out of the subnav, move it back up  
         });  
   
         //Following events are applied to the trigger (Hover events for the trigger)  
         }).hover(function() {  
            $("#subnav2").addClass("subhover"); //On hover over, add class "subhover"  
         }, function(){  //On Hover Out  
             $("#subnav2").removeClass("subhover"); //On hover out, remove class "subhover"  
     });  
});


