var arr=arr||{};arr={options:{sectionchangespeed:2e3,menulinkulineslide:250,curblockselected:0,currmenubg:0,setbgoffset:0,scrolltop:0},init:function(){this.scrollto(),this.menu.init(),this.page.init(),this.home.init(),this.clients.init(),this.cases.init(),this.designing.init(),this.portfolio.init(),this.contact.actions(),this.awards.init()},smoothscroll:function(){var e=50,t=$("html").hasclass("chrome")?900:750,n=$(window).height(),r=$("html").hasclass("ie")?$("body").height():$(document).height(),i=$("body, html, document"),s=!1,o,u},scrollto:function(){$.fn.extend({})},menu:{init:function(){this.buttons()},view:{show:function(){$("nav").fadein()},hide:function(){$("nav").fadeout()}},buttons:function(){var e=$('nav a:not(".fb, .mail")'),t=400;e.bind("click",function(t){t.preventdefault(),e.not($(this)).removeclass("selected");var n=e.index($(this));arr.page.keyboard.hide();switch(n){case 0:$("#home").scrollto(arr.options.sectionchangespeed,"easeoutquart");break;case 1:$("#designing").scrollto(arr.options.sectionchangespeed,"easeoutquart");break;case 2:$("#about").scrollto(arr.options.sectionchangespeed,"easeoutquart");break;case 3:$("#awards").scrollto(arr.options.sectionchangespeed,"easeoutquart");break;case 4:$("#portfolio").scrollto(arr.options.sectionchangespeed,"easeoutquart"),arr.portfolio.sort("mobile, web, interface, other");break;case 5:$("#case").scrollto(arr.options.sectionchangespeed,"easeoutquart");break;case 6:$("#clients").scrollto(arr.options.sectionchangespeed,"easeoutquart");break;case 7:$("#contact").scrollto(arr.options.sectionchangespeed,"easeoutquart");break;case 8:window.open($(this).attr("href"))}})},setbg:function(e){var t=new array("#08233e","#f8823c","#2c5379","#eb2142","#08233e","#f8823c","#eb2142","#2c5379"),n=$("header");n.css("background-color",t[e])},settransparent:function(){$("header").css("background-color","transparent")},setselected:function(e){var t=$("nav a");t.removeclass("selected"),t.eq(e).addclass("selected"),arr.menu.view.show(),this.changebgstatus=!1}},page:{init:function(){this.browser(),this.setsubsheight(),this.keyboard.keysevent(),this.onscroll(),this.buttons()},res:{width:document.documentelement.clientwidth,height:document.documentelement.clientheight},browser:function(){var e;$.browser.mozilla&&(e="ff"),$.browser.webkit&&(e="safari"),$.browser.chrome&&(e="chrome"),$.browser.opera&&(e="opera"),$.browser.msie&&(e="ie"),$("html").addclass(e)},buttons:function(){$("header h1 a").bind("click",function(e){e.preventdefault(),$("#home").scrollto(arr.options.sectionchangespeed,"easeoutquart")})},setsubsheight:function(){var e=$("#container .sub"),t=$("#portfolio .projects-wrapper");e.height(arr.page.res.height),t.height(arr.page.res.height-241)},keyboard:{pressed:new string,keysevent:function(){var e=$(".keyboard"),t=new array(38,40,37,39),n={},r=150,i=$("#container .sub").length,s=$("nav a");$(document).bind("keydown",function(n){var o=n.keycode?n.keycode:n.which,u=arr.page.keyboard.pressed;$.inarray(o,t)!=-1&&o!=u&&(n.preventdefault(),arr.page.keyboard.pressed=o,e.find(".btn .pressed").fadeout(r));switch(o){case 38:e.find(".up .pressed").stop(!0,!0).fadein(r).css("display","block"),arr.options.curblockselected-1>=0&&(arr.options.curblockselected=arr.options.curblockselected-1,s.eq(arr.options.curblockselected).click());break;case 40:e.find(".down .pressed").stop(!0,!0).fadein(r).css("display","block"),arr.options.curblockselected+1750?arr.page.keyboard.show():arr.page.keyboard.hide());break;case 5:$("#cases").hasclass("animated")?arr.page.keyboard.show():arr.cases.run();break;case 6:$("#clients").hasclass("animated")?arr.page.keyboard.show():arr.clients.run();break;case 7:$("#contact").hasclass("animated")?arr.page.keyboard.show():arr.contact.run()}},pagescroll:function(){$("#container").mcustomscrollbar({scrolleasing:"easeoutquart",autodraggerlength:!1})},cufon:{check:function(){$.browser.chrome&&web.page.cufon.execute()},execute:function(){cufon.replace(".we-are-working p, #main h2, #about-us .subtitle, #portfolio .subtitle, #portfolio h2, #portfolio .info, #portfolio dl dt, #portfolio dl dd, #portfolio-menu a, #portfolio .counter span, #offer .addition, #offer .subtitle, #offer .title, #offer .description, #offer .see-more, #contact .details, #contact h2, #contact label, #contact .validation, #send-question-popup label",{fontfamily:"frutigerpl"}),cufon.replace("nav a",{fontfamily:"frutigerb",color:"#edf6ed",hover:{color:"#ead8b2"}}),cufon.replace("nav a.selected",{fontfamily:"frutigerb",color:"#ead8b2"}),cufon.replace("#offer .see-more",{fontfamily:"frutigerb",color:"#454232",hover:{color:"#8f898d"}})}}},about:{animate:!1,actions:function(){var e=70;$("#about .point").bind("mouseenter",function(){$(this).find(".circle").stop(!0,!0).transition({scale:1.2},e,"linear")}).bind("mouseleave",function(){$(this).find(".circle").stop(!0,!0).transition({scale:1},e,"linear")})},animation:function(){var e=300,t=130,n=320,r=$("#about"),i=r.find(".point").length,s=0;r.find("h2").fadein(e,function(){arr.page.keyboard.show(),r.addclass("animated"),r.find(".bottom").css("display","block"),r.find(".line-1").animate({width:0},n,"linear",function(){r.find(".curve-1 .current").transition({rotate:"180deg"},n,"linear",function(){r.find(".line-2").animate({width:0},n,"linear",function(){r.find(".curve-2 .current").transition({rotate:"-180deg"},n,"linear",function(){r.find(".line-3").animate({width:0},n,"linear",function(){r.find(".curve-3 .current").transition({rotate:"91deg"},n,"linear",function(){r.find(".line-4").animate({top:1e3},n,"linear")})})})})})});var o=setinterval(function(){s0?(s.find(".achievement").eq(u).fadein(e/3).animate({left:"0",opacity:1},e/3,"easeoutquad"),s.find(".number").eq(u).delay(e/4).animate({opacity:1},e/2),arr.awards.countdown(u,s.find(".number").eq(u).attr("data-hidden-number")),s.find(".number").eq(u).text("0")):clearinterval(f),u--},r)})})}),s.find(".line").delay(e/1.3).animate({width:114},e,"easeoutquad")},run:function(){arr.awards.animation()},waveinterval:new string,waverun:function(){var e=1800,t=$(".mask-wave .wave");arr.awards.waveinterval=setinterval(function(){t.animate({left:"-150px"},e/2,"easeoutquad",function(){$(this).animate({left:"0px"},e/2,"easeoutquad")})},e)},countdown:function(e,t){var n=0,r=1200,i=$("#awards").find(".achievement").eq(e);speed=parseint(r/t),wave=$(".mask-wave .wave"),details=$(".mask-wave .details");var s=setinterval(function(){n-1-1?$(this).css("display","block"):$(this).css("display","none"),r++,r==n&&arr.portfolio.grid()})},grid:function(){var e=arr.portfolio.settings.rows,t=arr.portfolio.settings.cols,n=$("#portfolio .project").filter(":visible"),r=$(".n-banner2"),i=arr.page.res.width/t,s=(arr.page.res.height-r.innerheight())/e;n.css({width:i,height:s});var o=n.length,u=0,a=0,f=math.ceil(parseint(o)/e),l;n.each(function(){var e=i*u,t=s*a;$(this).css({left:e,top:t}).attr({"data-left":e,"data-top":t,"data-width":i,"data-height":s}),uarr.portfolio.settings.cols?l=f:l=arr.portfolio.settings.cols,$("#portfolio .projects-wrapper").css("width",l*i)},actions:function(){var e=$("#portfolio .project").filter(":visible"),t=$("#portfolio .left span"),n=$("#portfolio .right span"),r=$("#portfolio .full-size");fadespeed=300,e.bind("mouseenter",function(){$(this).children(".overlay").stop(!0,!0).fadeout(fadespeed,"easeoutquad")}).bind("mouseleave",function(){$(this).children(".overlay").stop(!0,!0).fadein(fadespeed,"easeinquad")}),t.bind("mouseenter",function(){$(this).stop(!0,!0).animate({opacity:1},500)}).bind("mouseleave",function(){$(this).animate({opacity:.4},500)}).bind("click",function(e){e.preventdefault(),arr.portfolio.moveprojects("left")}),n.bind("mouseenter",function(){$(this).stop(!0,!0).animate({opacity:1},500)}).bind("mouseleave",function(){$(this).animate({opacity:.4},500)}).bind("click",function(e){e.preventdefault(),arr.portfolio.moveprojects("right")}),r.click(function(e){e.preventdefault(),e.stoppropagation(),$(this).parent().animate({left:$(this).parent().attr("data-left"),top:$(this).parent().attr("data-top"),width:$(this).parent().attr("data-width"),height:$(this).parent().attr("data-height")},300),arr.portfolio.mousemouvment=!1,$(this).fadeout(350)})},moveprojects:function(e){var t=math.ceil(parseint($("#portfolio .project").filter(":visible").length)/2),n=$("#portfolio .projects-wrapper"),r=500,i;t>arr.portfolio.settings.cols?i=t-arr.portfolio.settings.cols:i=0,e=="right"&&arr.portfolio.currentpos0&&(arr.portfolio.currentpos=arr.portfolio.currentpos+1),e=="left"&&arr.portfolio.currentpos>0&&i>0&&(arr.portfolio.currentpos=arr.portfolio.currentpos-1),n.animate({left:-$("#portfolio .project:first").width()*arr.portfolio.currentpos},r,"easeoutquad")},showfullproject:function(e){var t=$("#portfolio .project"),n=t.eq(e).offset().left,r=350;t.eq(e).animate({top:0,left:arr.portfolio.currentpos*(arr.page.res.width/arr.portfolio.settings.cols),width:arr.page.res.width,height:arr.page.res.height-$(".n-banner2").innerheight()},r,"easeoutquad").fadein(r)},loader:{fadespeed:100,show:function(e){$(".project .loader").eq(e).fadein(arr.portfolio.loader.fadespeed)},hide:function(e){$(".project .loader").eq(e).fadeout(arr.portfolio.loader.fadespeed)}},mousemouvment:!1,mouseevent:function(){$("#portfolio .full-size").bind("mousemove",function(e){arr.portfolio.mousemouvment&&arr.portfolio.movement(e.pagex-$(this).offsetparent().offset().left,e.pagey-$(this).offsetparent().offset().top,!0)})},movement:function(e,t,n){var r=$("#portfolio .full-size .project-img").filter(":visible"),i=$("#portfolio .projects-wrapper"),t=n==1?i.height()-t:t,s=(i.height()-t)/i.height()*100,o=math.abs((i.height()-r.height())/2),u=s/100*o*2;r.stop().animate({top:-u},500,"easeoutcirc")}},designing:{init:function(){arr.designing.slider(),arr.designing.actions()},actions:function(){var e=$("#designing .type a");e.bind("mouseenter",function(){$(this).stop(!0,!0).animate({"margin-top":0},300,"easeoutbounce")}).bind("mouseleave",function(){$(this).animate({"margin-top":5},300,"easeoutbounce")}).bind("click",function(){$("#portfolio").scrollto(arr.options.sectionchangespeed,"easeoutquart");switch($(this).attr("data-type")){case"web":arr.portfolio.sort("web");break;case"mobile":arr.portfolio.sort("mobile");break;case"interface":arr.portfolio.sort("interface")}})},animation:function(){var e=1e3,t=$("#designing"),n=550,r=t.find(".type").length,i=0;t.find("h2").fadein(e,function(){arr.page.keyboard.show()}),t.find(".line").delay(e/1.3).animate({width:114},e,"easeoutquad"),t.find("#slider-designing").delay(e/1).animate({opacity:1},function(){t.addclass("animated")});var s=setinterval(function(){i0&&(arr.designing.slideramout--,$("#slider-designing").mcustomscrollbar("scrollto",arr.designing.slideramout*t)),e=="right"&&arr.designing.slideramoutparseint(t.width()/3)&&s