",{class:"exit-message"}).html("
Press ESC to exit
").appendTo($("body")).delay(2e3).animate({opacity:0},500,function(){$(this).remove()}))},zoomOut:function(){$(".exit-message").hide(),$(".thumbnails").fadeIn(),$(".made").fadeIn(),$(".zoom-icon").removeClass("zoom-icon-out").addClass("zoom-icon-in"),setTimeout(function(){$(".magazine").addClass("animated").removeClass("zoom-in"),resizeViewport()},0)}}}),$.isTouch?$(".magazine-viewport").bind("zoom.doubleTap",zoomTo):$(".magazine-viewport").bind("zoom.tap",zoomTo),$(document).keydown(function(o){switch(o.keyCode){case 37:$(".magazine").turn("previous"),o.preventDefault();break;case 39:$(".magazine").turn("next"),o.preventDefault();break;case 27:$(".magazine-viewport").zoom("zoomOut"),o.preventDefault()}}),Hash.on("^page/([0-9]*)$",{yep:function(o,n){var e=n[1];void 0!==e&&$(".magazine").turn("is")&&$(".magazine").turn("page",e)},nop:function(o){$(".magazine").turn("is")&&$(".magazine").turn("page",1)}}),$(window).resize(function(){resizeViewport()}).bind("orientationchange",function(){resizeViewport()}),$(".thumbnails").click(function(o){var n;o.target&&(n=/page-([0-9]+)/.exec($(o.target).attr("class")))&&$(".magazine").turn("page",n[1])}),$(".thumbnails li").bind($.mouseEvents.over,function(){$(this).addClass("thumb-hover")}).bind($.mouseEvents.out,function(){$(this).removeClass("thumb-hover")}),$.isTouch?$(".thumbnails").addClass("thumbanils-touch").bind($.mouseEvents.move,function(o){o.preventDefault()}):$(".thumbnails ul").mouseover(function(){$(".thumbnails").addClass("thumbnails-hover")}).mousedown(function(){return!1}).mouseout(function(){$(".thumbnails").removeClass("thumbnails-hover")}),$.isTouch?$(".magazine").bind("touchstart",regionClick):$(".magazine").click(regionClick),$(".next-button").bind($.mouseEvents.over,function(){$(this).addClass("next-button-hover")}).bind($.mouseEvents.out,function(){$(this).removeClass("next-button-hover")}).bind($.mouseEvents.down,function(){$(this).addClass("next-button-down")}).bind($.mouseEvents.up,function(){$(this).removeClass("next-button-down")}).click(function(){$(".magazine").turn("next")}),$(".previous-button").bind($.mouseEvents.over,function(){$(this).addClass("previous-button-hover")}).bind($.mouseEvents.out,function(){$(this).removeClass("previous-button-hover")}).bind($.mouseEvents.down,function(){$(this).addClass("previous-button-down")}).bind($.mouseEvents.up,function(){$(this).removeClass("previous-button-down")}).click(function(){$(".magazine").turn("previous")}),resizeViewport(),$(".magazine").addClass("animated")):setTimeout(loadApp,10)}$(".zoom-icon").bind("mouseover",function(){$(this).hasClass("zoom-icon-in")&&$(this).addClass("zoom-icon-in-hover"),$(this).hasClass("zoom-icon-out")&&$(this).addClass("zoom-icon-out-hover")}).bind("mouseout",function(){$(this).hasClass("zoom-icon-in")&&$(this).removeClass("zoom-icon-in-hover"),$(this).hasClass("zoom-icon-out")&&$(this).removeClass("zoom-icon-out-hover")}).bind("click",function(){$(this).hasClass("zoom-icon-in")?$(".magazine-viewport").zoom("zoomIn"):$(this).hasClass("zoom-icon-out")&&$(".magazine-viewport").zoom("zoomOut")}),$("#canvas").hide(),yepnope({test:Modernizr.csstransforms,yep:["lib/turn.js"],nope:["lib/turn.html4.min.js"],both:["lib/zoom.min.js","js/magazine.js","css/magazine.css"],complete:loadApp})