$(document).ready(function() { // initialize dropdown menu $('ul.sf-menu').superfish(); // initialize 'For Healthcare Professionals' overlay menu if ($.browser.msie && $.browser.version < 7) // Because IE6 screws up the horizontal positioning. { $("#hcp_trigger").tooltip({ effect: 'toggle', position: "bottom left", offset: [-20, 210], delay: 1, tip: "#hcp_overlay", events: { def: "click,mouseout", tooltip: "mouseenter" } }); } else { $("#hcp_trigger").tooltip({ effect: 'toggle', position: "bottom left", offset: [-20, 25], delay: 1, tip: "#hcp_overlay", events: { def: "click,mouseout", tooltip: "mouseenter" } }); } // Code to enable close buttons for 'For Healthcare Professionals' overlay menu $("img.hcp_close").click(function(){ $("#for_HCP").find("#hcp_trigger").tooltip().hide(); }); // Code for Click to Expand sections $("div.slidepanel").children(".slideheader").click(function(){ $(this).parent().children("#slidebody").slideToggle("slow"); $(this).toggleClass("slideheader_active"); }); // Rollovers for Callouts on homepage. Will eventually be replaced by flash. $("img.rollover").hover( function() { this.src = this.src.replace("_off","_over"); }, function() { this.src = this.src.replace("_over","_off"); } ); }); function fontUp(num){ $('body').removeClass(); if (num!=0) $('body').addClass('font'+num); $('.full').each(function(){ if ($(this).is(':visible')) $(this).removeAttr('style').show(); else $(this).removeAttr('style').hide(); }); }