$(document).ready(function(){$("#page-container").fadeIn(1500);var c=function(){var d=Math.abs(window.orientation)==90?"landscape":"portrait";$("body").removeClass("portrait").removeClass("landscape").addClass(d)};c();$(window).bind("orientationchange",function(){c();setTimeout(function(){$(".scroller").each(function(d,e){$(e).data("isc").refresh()})},250)});var a=navigator.userAgent.toLowerCase();var b=a.match(/(iphone|ipod|android|webos)/);if(!b){$("#large-carousel").jcarousel({size:3,scroll:1,itemVisibleInCallback:{onBeforeAnimation:function(g,e,d,f){},onAfterAnimation:function(g,e,d,f){switch(d){case 1:$("#hero-headline").html("<h1>Cannes Lions Touchwall Wins Media Post Award</h1>");break;case 2:$("#hero-headline").html("<h1>FreshDirect App Featured in App Store Staff Pics</h1>");break;case 3:$("#hero-headline").html("<h1>ABC's Emmy Award Winning Full-Episode Player</h1>");break}}}})}else{$("#carousel").css({display:"none"});$("#hero-headline.home").html("<h1>Tiny Screen Version</h1>")}});$(function(){setTimeout(function(){document.addEventListener("touchmove",function(i){i.preventDefault()},false);var h=$("body"),c=$(window).height(),d=h.hasClass("landscape"),f=h.hasClass("portrait"),g=(d&&(c==640||c==610))||(f&&(c==896||c==866)),e=(d&&(c==660||c==610))||(f&&(c==916||c==866));if(g){h.addClass("debugbar")}if(e){h.addClass("favoritebar")}$(".scroller").each(function(i,j){if($(j).hasClass("x-axis")){$(this).data("isc",new iScroll(this,"x"))}else{$(this).data("isc",new iScroll(this,"y"))}})},100);navAnimating=false;var a=navigator.userAgent.toLowerCase();var b=a.match(/(iphone|ipod|android|webos)/);if(!b){$("#projects-tab").click(function(h){h.preventDefault();if(!navAnimating){navAnimating=true;var g=$(this),c=$("#projects-menu"),d=$("body"),f=$("#dropdown");c.stop();if(g.hasClass("open")){c.animate2({top:-(1446)},600,function(){navAnimating=false;g.removeClass("open");d.removeClass("projects-menu-open");f.removeClass("open")})}else{g.addClass("open");d.addClass("projects-menu-open");f.addClass("open");c.animate2({top:0},700,function(){navAnimating=false})}}})}});$.fn.animate2=function(b,e,d){if(e===0){this.css(b);window.setTimeout(d,0)}else{if($.browser.safari){var c=[];for(var a in b){c.push(a)}this.css({webkitTransitionProperty:c.join(", "),webkitTransitionDuration:e+"ms"});window.setTimeout(function(f,g){f.css(g)},0,this,b);window.setTimeout(d,e)}else{this.animate(b,e,d)}}};