$(document).ready(function(){ // Media Gallery $(".colorbox").colorbox(); $(".youtube").colorbox({iframe:true, innerWidth:640, innerHeight:480}); // Check Modernizer and patch older browsers for placeholder support if(!Modernizr.input.placeholder){ $("input").each( function(){ if($(this).val()=="" && $(this).attr("placeholder")!=""){ $(this).val($(this).attr("placeholder")); $(this).focus(function(){ if($(this).val()==$(this).attr("placeholder")) $(this).val(""); }); $(this).blur(function(){ if($(this).val()=="") $(this).val($(this).attr("placeholder")); }); } }); } $('#nav-main a#n-welcome').mouseover(function() { $('.sub-nav-wrapper').stop(true, true).hide(); $('.sub-nav-wrap-welcome').stop(true, true).slideDown(400); }); $('#nav-main a#n-ip').mouseover(function() { $('.sub-nav-wrapper').stop(true, true).hide(); $('.sub-nav-wrap-ip').stop(true, true).slideDown(400); }); $('#nav-main a#n-ct').mouseover(function() { $('.sub-nav-wrapper').stop(true, true).hide(); $('.sub-nav-wrap-ct').stop(true, true).slideDown(400); }); $('#nav-main a#n-ic').mouseover(function() { $('.sub-nav-wrapper').stop(true, true).hide(); $('.sub-nav-wrap-ic').stop(true, true).slideDown(400); }); $('#nav-main a#n-about').mouseover(function() { $('.sub-nav-wrapper').stop(true, true).hide(); $('.sub-nav-wrap-about').stop(true, true).slideDown(400); }); $('#nav-main a#n-contact').mouseover(function() { $('.sub-nav-wrapper').stop(true, true).hide(); $('.sub-nav-wrap-contact').stop(true, true).slideDown(400); }); // hide $('.sub-nav-wrapper').mouseleave(function() { $('.sub-nav-wrapper').stop(true, true).slideUp(400); }); });