$(document).ready(function() { $(".content").hide(); $("#home_image").one("load", function() { $("#home").fadeIn(1000); }) .each(function() { if(this.complete || (jQuery.browser.msie && parseInt(jQuery.browser.version) == 6)) $(this).trigger("load"); }); $("a#artwork").click(function() { var label = String(this.href.match(/[^\/]+$/)); _gaq.push(['_trackEvent', 'Artwork', 'Enlarge', label]); }); $("#navlist > li").click(function() { $(".content").hide(); if (this.id == "menu_home") { $("#home").fadeIn(1000); } else if (this.id == "menu_bio") { $("#bio").slideDown(); } else if (this.id == "menu_commissions") { $("#commissions").slideDown(); } else if (this.id == "menu_events") { $("#events").slideDown(1100); } else if (this.id == "menu_volunteer") { $("#volunteer").slideDown(); } else if (this.id == "menu_contact") { $("#contact").slideDown(); } else if (this.id == "menu_abstract") { $("#artwork_abstract").slideDown(); } else if (this.id == "menu_animals") { $("#artwork_animals").slideDown(); } else if (this.id == "menu_floral") { $("#artwork_floral").slideDown(); } else if (this.id == "menu_landscapes") { $("#artwork_landscapes").slideDown(700); } else if (this.id == "menu_other") { $("#artwork_other").slideDown(); } else if (this.id == "menu_portraits") { $("#artwork_portraits").slideDown(); } else if (this.id == "menu_mixed") { $("#artwork_mixed").slideDown(); } else if (this.id == "menu_pets") { $("#artwork_pets").slideDown(); } var label = this.id; _gaq.push(['_trackEvent', 'Section', 'View', label]); }); $("#header").click(function() { $(".content").hide(); $("#home").fadeIn(1000); var label = this.id; _gaq.push(['_trackEvent', 'Section', 'View', label]); }); });