function showLightBox(type) { var searchString = "'" + type + ":first'"; $(searchString).trigger("click"); return false; } function doLoad() { // set menu behavior $('#menu').accordion({ collapsible:true, autoHeight:false, active:false }); // $('#menu').slideUp(0); $('#menu h3 a').click(function(){ var linkLabel = $(this).html() _gaq.push(['_trackEvent', 'MainMenu', 'Click', linkLabel]); }); $('#menu p a').click(function(){ var linkLabel = $(this).html() //_gaq.push(['_trackEvent', 'SubMenu', 'Click', linkLabel]); }); $('#world div').click(function(){ var linkLabel = $(this).html() _gaq.push(['_trackEvent', 'AnimatedMenu', 'Click', linkLabel]); }); $("a[rel^='prettyPhoto']").prettyPhoto({theme:'facebook'}); $('#brochureMenuLink').click(function() { showLightBox('.brochure'); return false; }); $('#brochure').click(function() { showLightBox('.brochure'); }); $('#cdMenuLink').click(function() { showLightBox('.cd'); return false; }); $('#cd').click(function() { showLightBox('.cd'); }); $('#logoMenuLink').click(function() { showLightBox('.logo'); return false; }); $('#logo').click(function() { showLightBox('.logo'); }); $('#publicationMenuLink').click(function() { showLightBox('.publication'); return false; }); $('#publication').click(function() { showLightBox('.publication'); }); $('#printMenuLink').click(function() { showLightBox('.print'); return false; }); $('#print').click(function() { showLightBox('.print'); }); $('#promoMenuLink').click(function() { showLightBox('.promo'); return false; }); $('#promo').click(function() { showLightBox('.promo'); }); $('#signageMenuLink').click(function() { showLightBox('.signage'); return false; }); $('#signage').click(function() { showLightBox('.signage'); }); $('#stationeryMenuLink').click(function() { showLightBox('.stationery'); return false; }); $('#stationery').click(function() { showLightBox('.stationery'); }); $('#webMenuLink').click(function() { showLightBox('.web'); return false; }); $('#web').click(function() { showLightBox('.web'); }); $('#adMenuLink').click(function() { showLightBox('.ad'); return false; }); $('#ad').click(function() { showLightBox('.ad'); }); $('#webMenuLink').click(function() { showLightBox('.design'); return false; }); $('#design').click(function() { showLightBox('.design'); }); $('#stmMenuLink').click(function() { showLightBox('.stm'); return false; }); $('#stm').click(function() { showLightBox('.stm'); }); $('#stmPromoLink').click(function() { showLightBox('.stmPromo'); return false; }); $('#photoMenuLink').click(function() { showLightBox('.photo'); return false; }); $('#photo').click(function() { showLightBox('.photo'); }); $("#dialog").dialog({ autoOpen: false }); $('#dialogLink').click(function() { $("#dialog").dialog('open'); }); //finally, check request for permalink param and open requested folio var requestParam = $.url.param("folio"); if (requestParam != "") { showLightBox('.' + requestParam); } $('#curtain').fadeOut(600); }; function startUniverse() { var UNIVERSE_FRAME_RATE=50; if ($.browser.mozilla) { UNIVERSE_FRAME_RATE = 30; } //set the balls rolling, as they say var universe = $('#world'); universe.world({frameRate:UNIVERSE_FRAME_RATE,gravity:3,bounce:1.0}); universe.children().draggable(); if ($.browser.msie == false) { universe.start(); } } // startup $(document).ready(function() { doLoad(); setTimeout(startUniverse, 15); });