var hideSubnav; var subnavhtml; var oldColor; var oldSubColor; $(document).ready(function() { subnavhtml = $('.subNavItems').html(); Cufon.replace('h2'); Cufon.replace('.navItem'); Cufon.replace('.subnavItem'); if($('#program_table').height() > 0){ //$('.mainContainer').height($('#program_table').height()+400); } /* $('.socialmediaicon').hover(function(){ var str = $(this).attr('alt'); str = str.toLowerCase(); $(this).attr('src',"http://www.goshort.nl/lib/images/socialMediaIcons/"+str+"_hi.png"); },function(){ var str = $(this).attr('alt'); str = str.toLowerCase(); $(this).attr('src',"http://www.goshort.nl/lib/images/socialMediaIcons/"+str+".png"); }); */ $(".navItem").hover( function () { oldColor = $(this).css("color"); $(this).css("color","#DADADA"); Cufon.replace(this); navItemOn(this); }, function () { $(this).css("color",oldColor); Cufon.replace(this); hideSubnav = setTimeout("navItemOff()",1000); } ); $('.subNav').mouseover(function(){ try{ clearTimeout(hideSubnav); } catch(err){ //nothing } }); $('.subNav').mouseout(function(){ hideSubnav = setTimeout("navItemOff()",1000); }); }); function popupShow(unId,wich){ $("#popup").slideDown(function(){ $.post("/lib/ajax/getpopupContent.php", {uId:unId,name:wich}, function(data){ $('#popupMainContent').html(data); $("#popupContent").fadeIn(); }); }); $("object").css("visibility","hidden"); } function popupLoadContent(unId){ $.post("/lib/ajax/popupLoadContent.php", {uId:unId}, function(data){ $('.popupItem').css("color","#000000"); $('#popupItem_'+unId).css("color","#FF0000"); $("#popupRight").html(data); }); } function popupHide(){ $('embed').css('visibility','hidden'); $("#popupContent").fadeOut(function(){ $("#popup").slideUp(function(){ $("object").css("visibility","visible"); }),200 }); } function navItemOn(el){ try{ clearTimeout(hideSubnav); } catch(err){ //nothing } var a = $(el).attr('id'); a = a.split("navItem_"); $.post("/lib/ajax/getSubMenu.php", {uId:a[1]}, function(data){ $('.subNavItems').html(data); Cufon.replace('.subnavItem'); }); } function navItemOff(){ $('.subNavItems').html(subnavhtml); Cufon.replace('.subnavItem'); }