﻿;var cookieStatus=Cookie.read("interactive");if((Browser.Engine.version==4&&Browser.Engine.name=="trident")||(window.screen.height<=768)){Cookie.write("interactive","no",{duration:365,domain:window.location.hostname,path:"/"});if(cookieStatus==null){window.showMessage=true}}else{if(cookieStatus==null){Cookie.write("interactive","yes",{duration:365,domain:window.location.hostname,path:"/"});cookieStatus="yes"}}if(cookieStatus=="yes"){var tLoc=window.location;if(tLoc.pathname.length>1){tLoc.replace("http://"+tLoc.hostname+"#"+tLoc.pathname)}else{window.addEvent("domready",function(){utils.checkRes();interactive.init()})}}else{window.addEvent("domready",function(){if(window.showMessage){utils.showAlert();Cufon.replace("#lofi_alert h4")}utils.checkRes();utils.setCufon();whatsnew.init();utils.ranHome();utils.injectEmail();utils.loadMap();utils.accordianInit();utils.fixIETeam();if($("client_list")){$("client_list").addEvent("mouseover",function(){this.style.height="auto"});$("client_list").addEvent("mouseout",function(){this.style.height="0"})}utils.clearLoginForm("add");if($("mediaspace")){$("mediaspace").addEvent("click",function(){if(!window.temp){window.temp=true;var a=new SWFObject("http://www.sequence.com/wp-content/general_assets/player.swf","mpl","768","456","9");a.addParam("allowfullscreen","true");a.addParam("allowscriptaccess","always");a.addParam("wmode","transparent");a.addVariable("file","http://www.sequence.com/wp-content/general_assets/UFC_Sequence_Website.flv");a.addVariable("autostart","true");a.addVariable("screencolor","transparent");a.write("mediaspace")}});$("page_shh").addEvents({mousedown:function(a){a.stopPropagation()},click:function(a){a.stopPropagation()}})}if((Browser.Engine.version!=4&&Browser.Engine.name!="trident")&&!Browser.Platform.ipod){utils.createHifi(false)}})}var interactive={shade:null,body:null,bodyInfo:null,mapContainer:null,map:null,textView:null,xConstant:null,yConstant:70,dragMe:null,dragging:false,init:function(){var d=window.interactive;d.body=$(document.body);d.bodyInfo=d.body.getSize();var b=new Element("div",{id:"shade"});b.inject(d.body);d.shade=new Fx.Elements([b,$("mast_head")],{duration:500,fps:1000,link:"cancel",transition:"sine:out",onStart:function(){interactive.animating=true},onComplete:function(){interactive.animating=false}});$("footer").destroy();d.mapContainer=new Element("div",{id:"mapContainer"});var e=new Element("div",{id:"map"});e.inject(d.mapContainer);d.textView=new Element("div",{id:"text_view"});data.preLoad=new Element("div",{id:"pre_load"});$("page_home").inject(data.preLoad);dialogue.container=new Element("div",{id:"dialogue"});dialogue.container.style.display="none";dialogue.loaderObj=new Element("div",{id:"loader"});dialogue.projectObj=new Element("div",{id:"project_info_window"});var c=new Element("div",{id:"spinner"});c.inject(dialogue.loaderObj);dialogue.loaderObj.inject(dialogue.container);dialogue.projectObj.inject(dialogue.container);d.mapContainer.inject(b,"before");dialogue.container.inject(b,"after");d.textView.inject(b,"after");data.preLoad.inject(dialogue.container,"after");presentation.load();d.map=new Fx.Morph(e,{duration:1500,fps:1000,transition:"quad:out",onStart:function(){interactive.animating=true},onComplete:function(){interactive.map.options.duration=1000;interactive.map.options.transition="quad:in:out";interactive.animating=false;nav.interpret()}});d.shade.set({0:{width:d.bodyInfo.x,height:d.bodyInfo.y},1:{position:"fixed",margin:"0",top:-94}});if(window.IE7){window.IE7.recalc()}d.resize();var a=window.getSize();interactive.map.set({top:a.y+20});window.addEvent("resize",interactive.resize);data.get("load")},resize:function(){var c=window.interactive;var b=window.getSize();var d=c.body.getSize();c.xConstant=parseInt(d.x/2,10);c.xConstant=c.xConstant-440;c.mapContainer.style.width=d.x+"px";c.mapContainer.style.height=b.y+"px";presentation.container.style.width=d.x+"px";presentation.container.style.height=b.y+"px";presentation.toolbar.style.left=c.xConstant+"px";presentation.viewer.style.width=d.x-40+"px";presentation.viewer.style.height=b.y-210+"px";var a=utils.getSet(loc.current.coords[0],loc.current.coords[1]);c.map.set(a);c.shade.set({0:{width:d.x,height:b.y},1:{left:c.xConstant}});if(window.IE7){window.IE7.recalc()}},setZoneState:function(b){var c=interactive;if(b=="reset"){loc.zones.each(function(d){d.obj.className="zone dragging"})}else{var a=loc.current.zone_id;loc.zones.each(function(d){if(d.obj.id==a&&d.obj.className!="zone"){d.obj.className="zone"}else{if(d.obj.className!="zone secondary"&&d.obj.id!=a){d.obj.className="zone secondary"}}});interactive.dragging=false}},setupDragDrop:function(){interactive.dragMe=new Drag($(interactive.map.element),{onStart:function(){if(loc.current.list[0]=="team"&&loc.current.list[1]){team.currentSubPage=loc.current.list[1]}if(interactive.animating==true){interactive.dragMe.stop();return}if(interactive.dragging==true){interactive.dragging=false;interactive.dragMe.stop()}else{clearInterval(nav.timer);interactive.dragging=true;interactive.setZoneState("reset");document.body.style.cursor="move"}},onComplete:function(){var d=this.element;var c=utils.determineLocation(d.style.top,d.style.left);var a=utils.gridToString(c[0],c[1]);if(loc.current.list[0]=="team"&&a=="team"&&team.currentSubPage){a+="/"+team.currentSubPage;team.currentSubPage=null}interactive.map.options.duration=400;interactive.map.options.transition="back:out";document.body.style.cursor="auto";if(window.location.hash!="#/"+a+"/"){window.location.hash="/"+a+"/";nav.detect(window.location.hash)}else{var b=utils.getSet(c[0],c[1]);interactive.map.start(b)}}})}};var loc={current:{hash:"/load/",list:["load"],view:null,zone_id:null,coords:[0,1]},stored:{hash:null,list:[],view:null,zone_id:null,coords:[null,null]},zones:[{name:"whatwedo",coords:[0,0],obj:null},{name:"home",coords:[0,1],obj:null},{name:"whoweare",coords:[0,2],obj:null},{name:"careers",coords:[1,0],obj:null},{name:"ourwork",coords:[1,1],obj:null},{name:"contact",coords:[1,2],obj:null}],set:function(d,e,b){if(d){loc.current.hash=utils.rebuildHash(d)}if(e){loc.current.list.length=0;for(var a=0;a<e.length;a++){loc.current.list[a]=e[a]}var c=utils.getZoneIndex(loc.current.list[0]);loc.current.coords=loc.zones[c].coords;loc.current.zone_id=loc.zones[c].obj.id}if(b){loc.current.view=b}}};var data={job_email:'<n uers="znvygb:wbof\100frdhrapr\056pbz">wbof\100frdhrapr\056pbz<\057n>'.replace(/[a-zA-Z]/g,function(a){return String.fromCharCode((a<="Z"?90:122)>=(a=a.charCodeAt(0)+13)?a:a-26)}),contact_email:'<n uers="znvygb:vasb\100frdhrapr\056pbz">vasb\100frdhrapr\056pbz<\057n>'.replace(/[a-zA-Z]/g,function(a){return String.fromCharCode((a<="Z"?90:122)>=(a=a.charCodeAt(0)+13)?a:a-26)}),content:null,contentCount:0,type:null,homeURLs:["whatwedo/","whoweare/","careers/","ourwork/","contact/"],ajax:new Request.HTML({method:"get",link:"chain",url:"http://"+window.location.host+"/",onRequest:function(){dialogue.show("loader")},onSuccess:function(b,e,a){var c=window.data;c.preLoad.innerHTML+=a;c.content=c.preLoad.getChildren();var d=c.content.getElements("a");utils.setAnchorIntercept(d);c.inject()},onFailure:function(){console.log("whoops!")}}),get:function(a,c){var b=window.data;b.type=a;switch(a){case"load":b.contentTotal=b.homeURLs.length;b.homeURLs.each(function(d){new Request.HTML({method:"get",url:"http://"+window.location.host+"/",onSuccess:function(f,i,e){var g=window.data;g.preLoad.innerHTML+=e;g.contentCount++;if(g.contentCount==g.homeURLs.length){g.content=g.preLoad.getChildren(".zone");var h=g.content.getElements("a");utils.setAnchorIntercept(h);g.inject()}}}).get(d+"?min=true")});break;case"team-member":b.ajax.get(c+"?min=true");break;default:break}},inject:function(){var a=window.data;if(a.type=="load"){a.content.each(function(c){c.inject(interactive.map.element);var d=utils.convertId(c.id);d=utils.getZoneIndex(d);loc.zones[d].obj=c});utils.ranHome();utils.injectEmail();utils.loadMap();utils.setCufon();utils.accordianInit();utils.fixIETeam();utils.loadPhotoSpin();utils.clearLoginForm("add");interactive.setupDragDrop();utils.createHifi(true);whatsnew.init();var b=window.getSize();dialogue.hide("loader");interactive.shade.chain(function(){this.start({0:{top:b.y/2,height:0},1:{top:0}})},function(){this.set({0:{top:0,display:"none"}});if(window.IE7){window.IE7.recalc()}nav.init()});if($("mediaspace")){$("mediaspace").addEvent("click",function(){if(!window.temp){window.temp=true;window.temp=true;var c=new SWFObject("http://www.sequence.com/wp-content/general_assets/player.swf","mpl","768","456","9");c.addParam("allowfullscreen","true");c.addParam("allowscriptaccess","always");c.addParam("wmode","transparent");c.addVariable("file","http://www.sequence.com/wp-content/general_assets/UFC_Sequence_Website.flv");c.addVariable("autostart","true");c.addVariable("screencolor","transparent");c.write("mediaspace");$("page_shh").addEvents({mousedown:function(d){d.stopPropagation()},click:function(d){d.stopPropagation()}})}})}interactive.shade.callChain()}if(a.type=="team-member"){a.content[0].getElement("h2").destroy();a.content[0].style.visibility="hidden";a.content[0].inject(loc.zones[2].obj.getElement(".content"));a.content=null;dialogue.hide("loader");team.show()}}};var nav={timer:null,zoneObjects:{},view:null,init:function(){var c=window.nav;if(!window.location.hash){c.view="view-zone";loc.current.view="view-zone";window.location.replace("http://"+window.location.hostname+"#/home/")}else{var b=utils.rebuildHash(window.location.hash);c.view=c.determineView(b);loc.current.view="view-zone";window.location.replace("http://"+window.location.hostname+"#"+b)}var a=$$("#mast_head a");utils.setAnchorIntercept(a);c.timer=setInterval(function(){nav.detect(window.location.hash)},100)},determineView:function(c){var b=nav.convert(c);var a="view-zone";if(b[1]){switch(b[0]){case"ourwork":a="view-presentation";break;case"whoweare":a="view-sub_zone";break;default:break}}return a},clickIntercept:function(c){var b=this.href;if(this.rel){var a=this.rel}else{var a="view-zone"}var f=this.getParent(".zone");if((f==null&&interactive.dragging==false)||(f&&f.className=="zone"&&interactive.dragging==false)){c.preventDefault();if(b.test(utils.isHome)){var d=b.replace(utils.isHome,"");if(d.length<3){a="view-zone";nav.view=a;window.location.hash="/home/"}else{d=utils.rebuildHash(d);nav.view=a;window.location.hash=d}}else{if(b=="http://blog.sequence.com/"){window.location=b}else{window.open(this.href)}}}else{c.preventDefault()}},detect:function(b){var a=window.nav;b=utils.rebuildHash(b);if(b!=loc.current.hash){clearInterval(a.timer);window.location.replace("http://"+window.location.hostname+"#"+b);loc.stored.hash=b;loc.stored.list=a.convert(b);if(!nav.view){loc.stored.view=a.determineView(b)}else{loc.stored.view=nav.view}nav.view=null;a.interpret()}},interpret:function(){var c=window.nav;if((loc.current.hash==loc.stored.hash)||loc.stored.hash==null){clearInterval(nav.timer);interactive.setZoneState();utils.resetStored();nav.setNavBar();nav.setTitle();if(loc.current.list[0]=="whoweare"&&team.currentSubPage!=null){window.location.replace("http://"+window.location.hostname+"/#/whoweare/"+team.currentSubPage+"/");loc.current.list[1]=team.currentSubPage;loc.set("/whoweare/"+team.currentSubPage+"/",[loc.current.list[0],team.currentSubPage],"view-sub_zone");team.currentSubPage=null}nav.timer=setInterval(function(){nav.detect(window.location.hash)},100);return}if(loc.current.list[0]!=loc.stored.list[0]&&loc.current.view=="view-presentation"){var d=loc.current.view;loc.set(loc.current.list[0],[loc.current.list[0]],"view-zone");var b=[d,loc.current.list[0]];c.execute("remove",b);return}if(loc.current.list[0]!=loc.stored.list[0]&&loc.current.view=="view-sub_zone"){team.currentSubPage=loc.current.list[1];loc.set(loc.stored.list[0],[loc.stored.list[0]],"view-zone");var a=utils.getZoneIndex(loc.stored.list[0]);c.execute("move",loc.zones[a].coords);return}if(loc.current.list[0]!=loc.stored.list[0]&&loc.current.view=="view-zone"){loc.set(loc.stored.list[0],[loc.stored.list[0]]);var a=utils.getZoneIndex(loc.stored.list[0]);c.execute("move",loc.zones[a].coords);return}if(loc.current.list[0]==loc.stored.list[0]&&loc.current.view!=loc.stored.view&&loc.current.list.length>loc.stored.list.length){var d=loc.current.view;loc.set(window.location.hash,loc.stored.list,loc.stored.view);var b=[d,loc.stored.list[0]];c.execute("remove",b);return}if(loc.current.list[0]==loc.stored.list[0]&&loc.current.view!=loc.stored.view&&loc.current.list.length<loc.stored.list.length){loc.set("/"+loc.stored.list[0]+"/"+loc.stored.list[1]+"/",[loc.stored.list[0],loc.stored.list[1]],loc.stored.view);var b=[loc.stored.view,"/"+loc.stored.list[0]+"/"+loc.stored.list[1]+"/"];if(loc.current.list[0]=="team"&&team.currentSubPage){return nav.interpret()}else{c.execute("show",b)}}else{if(loc.current.view=="view-presentation"){if(!window.loc.stored.list[2]){loc.stored.list[2]=0;var e="/"+loc.stored.list[0]+"/"+loc.stored.list[1]+"/"+loc.stored.list[2]+"/";loc.stored.hash=e;window.location.replace("http://"+window.location.hostname+"#"+loc.stored.hash)}loc.set(window.location.hash,loc.stored.list);c.execute("change",[loc.current.view,loc.current.list[1],loc.current.list[2]]);return}if(loc.current.view=="view-sub_zone"){loc.set(window.location.hash,loc.stored.list);c.execute("change",[loc.current.view,loc.current.hash])}}},execute:function(c,b){switch(c){case"move":interactive.setZoneState("reset");var a=utils.getSet(b[0],b[1]);interactive.map.start(a);break;case"remove":if(b[0]=="view-presentation"){presentation.hide(b[1])}if(b[0]=="view-sub_zone"){team.remove()}break;case"show":if(b[0]=="view-presentation"){presentation.show(b[1])}if(b[0]=="view-sub_zone"){team.get(b[1])}break;case"change":if(b[0]=="view-presentation"){presentation.location=[loc.current.list[2],loc.current.list[1]];presentation.placeImage()}if(b[0]=="view-sub_zone"){team.get(b[1])}break;default:console.log("not sure what to do with: "+c);break}},convert:function(a){var b=a.split("/");b.each(function(e,d,c){if(e=="#"||e==""){c.splice(d,1)}});return b},setNavBar:function(){var a="nav_"+loc.current.list[0];var b=$("navigation").getElements("li");b.each(function(c){if(c.id==a){c.className="current_page"}else{c.className=""}})},setTitle:function(){var a="";switch(loc.current.list[0]){case"whatwedo":a="sequence :: what we do";break;case"whoweare":a="sequence :: who we are";break;case"ourwork":a="sequence :: our work";break;case"careers":a="sequence :: careers";break;case"contact":a="sequence :: contact";break;default:a="sequence :: brand experience strategy and design";break}if(loc.current.list[1]){switch(loc.current.list[1]){case"chipotle":a+=" :: chipotle";break;case"sonos":a+=" :: sonos";break;case"chevron":a+=" :: chevron";break;case"nclr":a+=" :: nclr";break;case"souldaddy":a+=" :: souldaddy";break;case"lytro":a+=" :: lytro";break;case"other":a+=" :: other great peeps";break;default:break}}document.title=a}};var whatsnew={blogContainer:null,blogPos:null,blogNext:null,blogPrev:null,blogEntries:null,init:function(){var b=whatsnew;if($("blog_entries")){b.blogContainer=$("blog_entries");var a=b.blogContainer.getElements(".blog_entry");b.blogEntries=new Fx.Elements(a,{duration:500,fps:1000});b.blogEntries.set({0:{position:"absolute",opacity:1,left:0},1:{position:"absolute",opacity:0,left:0},2:{position:"absolute",opacity:0,left:0}});b.blogNext=new Element("div",{id:"btn_blog_next",html:"next"});b.blogPrev=new Element("div",{id:"btn_blog_prev",html:"previous"});b.blogNext.addEvent("click",function(){whatsnew.cycle("next")});b.blogPrev.addEvent("click",function(){whatsnew.cycle("prev")});b.blogNext.addEvent("mouseover",function(){this.className="hovered"});b.blogNext.addEvent("mouseout",function(){this.className=""});b.blogPrev.addEvent("mouseover",function(){this.className="hovered"});b.blogPrev.addEvent("mouseout",function(){this.className=""});$("page_whatsnew").getElement(".content").adopt(b.blogNext,b.blogPrev);b.blogPos=0}},cycle:function(e){var d=whatsnew;var c={};var a={};if(e=="next"){var b=d.blogPos;d.blogPos++;if(d.blogPos==d.blogEntries.elements.length){d.blogPos=0}c[d.blogPos]={opacity:0,left:300};a[d.blogPos]={opacity:1,left:0};a[b]={opacity:0,left:-800}}if(e=="prev"){var b=d.blogPos;d.blogPos--;if(d.blogPos<0){d.blogPos=d.blogEntries.elements.length-1}c[d.blogPos]={opacity:0,left:-300};a[d.blogPos]={opacity:1,left:0};a[b]={opacity:0,left:800}}d.blogEntries.set(c);d.blogEntries.start(a)}};var team={currentSubPage:null,currentMember:null,get:function(a){data.get("team-member",[a])},show:function(){var b=team;var a=$("page_whoweare").getElements(".sub_zone");b.currentMember=new Fx.Elements(a,{duration:500,fps:1000});if(a.length==1){b.currentMember.set({0:{opacity:0,visibility:"hidden"}});b.currentMember.chain(function(){this.start({0:{opacity:1}})},function(){nav.interpret()})}if(a.length==2){b.currentMember.set({1:{opacity:0,visibility:"visible"}});b.currentMember.chain(function(){this.start({1:{opacity:1}})},function(){this.elements[0].destroy();nav.interpret()})}b.currentMember.callChain()},remove:function(){var b=team;var a=$("page_whoweare").getElement(".sub_zone");b.currentMember=new Fx.Morph(a,{duration:500,fps:1000});b.currentMember.chain(function(){this.start({opacity:0})},function(){this.element.destroy();nav.interpret()});b.currentMember.callChain()}};var utils={zWidth:880,zHeight:540,lowRes:false,checkRes:function(){var a=utils;a.lowRes=[screen.width,screen.height]},showAlert:function(){var a=utils;a.lofiAlert=new Element("div",{id:"lofi_alert",html:'<h4>Welcome!</h4><p>Based on the settings we are able to detect from your computer, we have customized our site to best match your browser and monitor configuration. You’ll still get all the same information and images, but if you get a chance, check it out with a more recent browser and/or a larger screen for a higher-fidelity, more dynamic user-experience.</p><div id="lofi_close_button" onclick="$(\'lofi_alert\').destroy();">Continue</div>'});a.lofiAlert.inject($(document.body))},clearLoginForm:function(a){if(a=="username"&&$("username").value=="username"){$("username").value="";$("username").removeEvents("focus")}if(a=="pword"&&$("pword").value=="password"){$("pword").value="";$("pword").removeEvents("focus")}if(a=="add"){$("username").addEvent("focus",function(){utils.clearLoginForm("username")});$("pword").addEvent("focus",function(){utils.clearLoginForm("pword")})}},injectEmail:function(){if($("careers_job_email")){$("careers_job_email").innerHTML=data.job_email}if($("contact_email")){$("contact_email").innerHTML=data.contact_email}},ranHome:function(){if($("page_home")){$("page_home").getElement(".content").style.backgroundImage="url(/wp-content/themes/sequence/images/home/zone0.jpg)"}},createHifi:function(c){var d=new Element("div",{id:"hifi_container"});var b=new Element("label",{"for":"hifi",html:"hi-fi"});var a=new Element("input",{type:"checkbox",checked:c,id:"hifi"});d.adopt(a,b);a.addEvent("click",function(){setTimeout(utils.refreshLocation,1)});d.style.display="none";window.addEvent("keydown",function(e){if(e.code==192&&e.shift==true){e.preventDefault();if($("hifi_container").style.display=="none"){$("hifi_container").style.display="block"}else{$("hifi_container").style.display="none"}}});d.inject($("mast_head").getElement(".content"))},determineLocation:function(f,b){b=parseInt(b,10);f=parseInt(f,10);f-=interactive.yConstant;if(f>100){f=0}else{if(f<(-1080)){f=-(1080)}}b-=interactive.xConstant;if(b>0){b=0}else{if(b<-(1620+interactive.xConstant)){b=1620+interactive.xConstant}}b=Math.abs(b);f=Math.abs(f);var c=b%utils.zWidth;var d=f%utils.zHeight;var e=(b-c)/utils.zWidth;var a=(f-d)/utils.zHeight;if(c>440){e++}if(d>270){a++}return[a,e]},setCufon:function(){Cufon.replace(".title_blurb h3");if(Browser.Engine.name!="trident"){Cufon.replace("h2");Cufon.replace(".blurb");Cufon.replace(".blog_entry h3");Cufon.replace(".accordian_handle")}},getSet:function(b,a){return{top:-(b*utils.zHeight)+interactive.yConstant,left:-(a*utils.zWidth)+interactive.xConstant-4}},gridToString:function(d,b){var c;for(var a=0;a<loc.zones.length;a++){if(loc.zones[a].coords[0]==d&&loc.zones[a].coords[1]==b){c=loc.zones[a].name;break}}return c},stripHash:function(a){return a.replace(/#/,"")},convertId:function(a){return a.replace(/page_/,"")},rebuildHash:function(a){a=a.split("/");var b="/";a.each(function(c,e,d){if(c!="#"&&c!=""){b+=a[e]+"/"}});return b},getZoneIndex:function(c){var b;for(var a=0;a<loc.zones.length;a++){if(loc.zones[a].name==c){b=a;break}}return parseInt(b,10)},setAnchorIntercept:function(a){a.each(function(b){b.addEvent("click",nav.clickIntercept)})},isHome:new RegExp("http://"+window.location.hostname),resetStored:function(){loc.stored.hash=null;loc.stored.list.length=0;loc.stored.coords=[null,null];loc.stored.view=null;loc.stored.zone_id=null},getPresIndex:function(b){var a=0;presentation.galleries.each(function(d,c,e){if(e[c].client==b){a=c}});return a},refreshLocation:function(){var c=$("hifi").checked;if(c==true){Cookie.write("interactive","yes",{duration:365,domain:window.location.hostname,path:"/"});var d=window.location;if(d.pathname.length>1){d.replace("http://"+d.hostname+"#"+d.pathname)}else{window.location.reload()}}else{Cookie.write("interactive","no",{duration:365,domain:window.location.hostname,path:"/"});var b="/";for(var a=0;a<loc.current.list.length;a++){b+=loc.current.list[a]+"/"}if(loc.current.list[0]=="home"){window.location="http://"+window.location.hostname}else{window.location="http://"+window.location.hostname+b}}},loadMap:function(){if(GBrowserIsCompatible()&&$("location_map")){var f=new GMap2($("location_map"));var e=new GClientGeocoder();var a=new GLatLng(37.763762,-122.398689);var c="<strong>Sequence </strong><br />1501 Mariposa Street, Suite 200<br />San Francisco, CA 94107<br />415-489-4480";c+="<br /><br />";c+='<a href="http://maps.google.com/maps?daddr=1501%20Mariposa%20Street,%20San%20Francisco,%20CA%2094107" target="_new">Get directions</a>';var d=new GIcon();d.image="http://www.sequence.com/wp-content/themes/sequence/images/sequence_icon.png";d.shadow="http://www.sequence.com/wp-content/themes/sequence/images/sequence_icon_shadow.png";d.iconSize=new GSize(19,40);d.shadowSize=new GSize(37,40);d.iconAnchor=new GPoint(15,25);d.infoWindowAnchor=new GPoint(5,1);f.addControl(new GSmallMapControl());f.addControl(new GMapTypeControl());f.addControl(new GScaleControl());f.setCenter(a,16);var b=new GMarker(a,d,{clickable:true});f.addOverlay(b);b.openInfoWindowHtml(c)}},fixIETeam:function(){if(Browser.Engine.name=="trident"&&$("page_team")){var a=$$(".team_location");a.each(function(b){b.addEvent("mouseover",function(){this.style.zIndex=5});b.addEvent("mouseout",function(){this.style.zIndex=1})})}},accordianInit:function(){if($("page_whatwedo")){$("page_whatwedo").getElement(".content").style.height="520px";interactive.accordion=new Fx.Accordion($$(".accordian_handle"),$$(".accord_el"),{display:0,alwaysHide:false,initialDisplayFx:false,duration:360,transition:"sine:out",onActive:function(a){$$(".accordian_handle").each(function(b){b.className="accordian_handle"});a.className="accordian_handle open"}})}},loadPhotoSpin:function(){$$(".photo_spin").each(function(a){new PhotoSpin(a)})}};var presentation={location:{},galleries:null,container:null,toolbar:null,casestudies:null,viewer:null,presFx:null,imgFx:null,busy:false,load:function(){var a=window.presentation;a.container=new Element("div",{id:"presentation_view"});a.viewer=new Element("div",{id:"pview_viewer"});a.toolbar=new Element("div",{id:"pview_toolbar",html:'<h2>Our Work</h2><ul class="alt_menu" id="client_list2"><li id="ourwork_home_link" class="parent_link"><a href="#/ourwork/">Our Work</a></li><li><h4>Case Studies</h4></li><li><a href="#/ourwork/chipotle/" rel="view-presentation">Chipotle</a></li><li><a href="#/ourwork/sonos/" rel="view-presentation">Sonos</a></li><li><a href="#/ourwork/opentable/" rel="view-presentation">OpenTable</a></li><li><a href="#/ourwork/souldaddy/" rel="view-presentation">Soul Daddy</a></li><li><a href="#/ourwork/google/" rel="view-presentation">Google</a></li><li><a href="#/ourwork/lytro/" rel="view-presentation">Lytro</a></li><li><a href="#/ourwork/zinio/" rel="view-presentation">Zinio</a></li><li><a href="#/ourwork/chevron/" rel="view-presentation">Chevron</a></li><li><a href="#/ourwork/mincom/" rel="view-presentation">Mincom</a></li><li><a href="#/ourwork/nclr/" rel="view-presentation">NCLR</a></li><li><a href="#/ourwork/teambeachbody/" rel="view-presentation">Team Beachbody</a></li><li><a href="#/ourwork/bottlenotes/" rel="view-presentation">Bottlenotes</a></li><li><a href="#/ourwork/vontu/" rel="view-presentation">Vontu</a></li><li><a href="#/ourwork/turnhere/" rel="view-presentation">TurnHere</a></li></ul> <h3 id="pres_client"></h3> <div id="pres_info">Overview</div> <p id="pres_description"></p> <div id="close_button"><a href="#/ourwork/">close</a></div> '});a.casestudies=new Element("ul",{id:"pview_casestudies",html:'<li id="cstudy_shortcut_chipotle"><a href="#/ourwork/chipotle/" rel="view-presentation">Chipotle</a></li><li id="cstudy_shortcut_sonos"><a href="#/ourwork/sonos/" rel="view-presentation">Sonos</a></li><li id="cstudy_shortcut_opentable"><a href="#/ourwork/opentable/" rel="view-presentation">OpenTable</a></li><li id="cstudy_shortcut_souldaddy"><a href="#/ourwork/souldaddy/" rel="view-presentation">Soul Daddy</a></li><li id="cstudy_shortcut_google"><a href="#/ourwork/google/" rel="view-presentation">Google</a></li><li id="cstudy_shortcut_lytro"><a href="#/ourwork/lytro/" rel="view-presentation">Lytro</a></li>'});a.btn_next=new Element("div",{id:"btn_next"});a.btn_prev=new Element("div",{id:"btn_prev"});a.btn_zone_next=new Element("div",{id:"btn_zone_next"});a.btn_zone_prev=new Element("div",{id:"btn_zone_prev"});a.btn_zone_next.addEvent("click",function(b){if(presentation.busy==false){presentation.nav("next")}else{b.preventDefault()}});a.btn_zone_prev.addEvent("click",function(b){if(presentation.busy==false){presentation.nav("prev")}else{b.preventDefault()}});a.navBtnLogic.elFx=new Fx.Elements([a.btn_next,a.btn_prev],{duration:500,fps:1000,link:"cancel",transition:"sine:out"});a.btn_zone_next.addEvent("mouseover",function(){if(Browser.Engine.name=="trident"){presentation.navBtnLogic.elFx.set({0:{visibility:"visible"},1:{visibility:"hidden"}})}else{presentation.navBtnLogic.elFx.start({0:{opacity:1},1:{opacity:0}})}});a.btn_zone_next.addEvent("mouseout",function(){if(Browser.Engine.name=="trident"){presentation.navBtnLogic.elFx.set({0:{visibility:"hidden"},1:{visibility:"hidden"}})}else{presentation.navBtnLogic.elFx.start({0:{opacity:0},1:{opacity:0}})}});a.btn_zone_prev.addEvent("mouseover",function(){if(Browser.Engine.name=="trident"){presentation.navBtnLogic.elFx.start({0:{visibility:"hidden"},1:{visibility:"visible"}})}else{presentation.navBtnLogic.elFx.start({0:{opacity:0},1:{opacity:1}})}});a.btn_zone_prev.addEvent("mouseout",function(){if(Browser.Engine.name=="trident"){presentation.navBtnLogic.elFx.set({0:{visibility:"hidden"},1:{visibility:"hidden"}})}else{presentation.navBtnLogic.elFx.start({0:{opacity:0},1:{opacity:0}})}});a.container.adopt([a.viewer,a.toolbar,a.casestudies,a.btn_prev,a.btn_next,a.btn_zone_next,a.btn_zone_prev]);a.presFx=new Fx.Morph(a.container,{duration:500,fps:1000,transition:"sine:out",onStart:function(){presentation.busy=true},onComplete:function(){presentation.busy=false}});a.imgFx=new Fx.Elements([],{duration:300,fps:1000,transition:"quad:out",onStart:function(){presentation.busy=true},onComplete:function(){presentation.busy=false}});a.presFx.set({opacity:0});a.container.inject($("shade"),"after");$("pres_info").addEvent("click",function(){dialogue.show("project-info")})},init:function(){var b=presentation;if(!window.loc.stored.list[2]){loc.stored.list[2]=0;loc.stored.hash+="0/";window.location.replace("http://"+window.location.hostname+"#"+loc.stored.hash)}var a=utils.getPresIndex(loc.current.list[1]);if(!b.galleries[a].imgs){dialogue.show("loader");b.galleries[a].imgs=new Asset.images(b.galleries[a].urls,{onComplete:function(){dialogue.hide("loader");presentation.create()}})}else{presentation.create()}},show:function(c){var b=utils.getZoneIndex(loc.current.list[0]);var a=loc.zones[b].obj.getCoordinates();interactive.shade.set({0:{top:a.top+9,left:a.left+9,width:a.width-18,height:a.height-18,opacity:0,display:"block"}});if(window.IE7){window.IE7.recalc()}interactive.shade.options.duration=300;interactive.shade.options.transition="sine:in:out";interactive.shade.chain(function(){this.start({0:{opacity:1}})},function(){interactive.shade.options.duration=500;interactive.shade.options.transition="quad:in:out";var d=window.getSize();interactive.shade.start({0:{top:0,left:0,width:d.x,height:d.y},1:{top:-94}})},function(){$("mapContainer").style.display="none";if(!presentation.galleries){new Request.JSON({noCache:true,url:"http://"+window.location.hostname+"/galleries/galleries.json",onComplete:function(d){presentation.galleries=$A(d);presentation.galleries.each(function(f,e,h){presentation.galleries[e].urls=[];for(var g=0;g<presentation.galleries[e].imageInfo.length;g++){presentation.galleries[e].urls[g]=presentation.galleries[e].imageFolder+"/"+g+".jpg"}});presentation.init()}}).get()}else{presentation.init()}});interactive.shade.callChain()},hide:function(c){var d=presentation;$("mapContainer").style.display="block";var b=utils.getZoneIndex(c);var a=loc.zones[b].obj.getCoordinates();interactive.shade.chain(function(){this.start({0:{top:a.top+9,left:a.left+9,width:a.width-18,height:a.height-18},1:{top:0}})},function(){this.options.duration=300;this.options.transition="sine:in:out";this.start({0:{opacity:0}})},function(){if(window.IE7){window.IE7.recalc()}nav.interpret()});d.presFx.chain(function(){this.start({opacity:0})},function(){presentation.container.style.display="none";presentation.viewer.innerHTML="";interactive.shade.callChain()});d.presFx.callChain()},create:function(){var a=window.presentation;a.presFx.set({opacity:0,display:"block"});a.presFx.chain(function(){this.start({opacity:1})},function(){dialogue.hide("loader");nav.interpret()});a.presFx.callChain()},placeImage:function(){var a=window.presentation;var g=utils.getPresIndex(a.location[1]);if(!a.galleries[g].imgs){dialogue.show("loader");a.galleries[g].imgs=new Asset.images(a.galleries[g].urls,{onComplete:function(){dialogue.hide("loader");presentation.placeImage()}});return}var n=$$("#pview_casestudies li");for(var p=0;p<n.length;p++){var f="cstudy_shortcut_"+a.location[1];if(n[p].id==f){n[p].className="current"}else{n[p].className=""}}var d=a.galleries[g].imgs[a.location[0]].clone(true);d.style.visibility="hidden";a.viewer.adopt(d);var b=d.getSize();var o=d.width;var m=d.height;var l=o/m;var c=a.viewer.getSize().x;var j=parseInt(a.viewer.style.height,10);var i=parseInt(c/2,10);if(o>c){o=c;m=parseInt(c/l,10)}if(m>j){m=j;o=parseInt(j*l,10)}d.width=o;d.height=m;d.style.marginTop="-"+parseInt(m/2,10)+"px";d.style.marginLeft="-"+parseInt(o/2,10)+"px";d.style.left=i+"px";$("pres_description").innerHTML=a.galleries[g].imageInfo[loc.current.list[2]];$("pres_client").innerHTML=a.galleries[g].clientString;var e=a.viewer.getElements("img");a.imgFx.elements=e;if(e.length==1){var k={0:{opacity:1}};a.imgFx.set({0:{opacity:0,visibility:"visible"}});a.imgFx.start({0:{opacity:1}}).chain(function(){nav.interpret()})}else{if(e.length==2){var k={0:{opacity:0}};var h={1:{opacity:1}};a.imgFx.set({1:{opacity:0,visibility:"hidden"}});a.imgFx.chain(function(){this.options.transition="quad:in";this.start(k)},function(){this.options.transition="quad:out";this.start(h)},function(){this.elements[0].destroy();nav.interpret()});a.imgFx.callChain()}}},nav:function(f){var e=presentation;var a=e.location[0];var c=utils.getPresIndex(e.location[1]);var g=e.galleries[c].urls.length;if(f=="next"){a++;if(a>=g){a=0;c++;if(c>=e.galleries.length){c=0}}}else{a--;if(a<0){c--;if(c<0){c=e.galleries.length-1}a=e.galleries[c].urls.length-1}}var b=e.galleries[c].client;var d="/"+loc.current.list[0]+"/"+b+"/"+a+"/";window.location.hash=d;clearInterval(nav.timer);nav.interpret()},navBtnLogic:{elFx:null}};var dialogue={container:null,loaderObj:null,projectObj:null,show:function(a){var b=dialogue;switch(a){case"loader":b.loader("show");break;case"project-info":b.project("show");break;default:break}},hide:function(a){var b=dialogue;switch(a){case"loader":b.loader("hide");break;case"project-info":b.project("hide");break;default:break}},loader:function(b){var a=dialogue;if(b=="show"){a.container.style.display="block";a.loaderObj.style.display="block";a.loaderObj.style.visibility="visible"}else{a.container.style.display="none";a.loaderObj.style.display="none";a.loaderObj.style.visibility="hidden"}},project:function(a){var b=dialogue;if(a=="show"){var d=presentation;var c=utils.getPresIndex(d.location[1]);b.projectObj.innerHTML='<div class="project_info_close" onclick="dialogue.hide(\'project-info\')">close</div><h3>'+d.galleries[c].clientString+"</h3>"+d.galleries[c].info;b.projectObj.style.display="block";b.container.style.display="block";b.container.addEvent("click",dialogue.tempRemove);Cufon.replace("#project_info_window h3")}if(a=="hide"){b.projectObj.innerHTML="";b.container.style.backgroundColor="";b.projectObj.style.display="none";b.container.style.display="none"}},tempRemove:function(){var a=dialogue;dialogue.hide("project-info");a.container.removeEvents("click")}};var PhotoSpin=function(a,h){var d=$merge({delay:150},h),k=$(a),i=k.getElement("img"),f=k.getStyle("height").toInt(),g=false,c=null,j=0,e=0,l=new Image(),b=function(){j=(j>=e)?0:j+1;k.setStyle("background-position","0px "+(-1*j*f)+"px")};$(l).addEvent("load",function(m){e=Math.floor(l.height/f)-1});l.src=i.src;i.setStyle("visibility","hidden");k.setStyles({"background-image":"url("+i.src+")",cursor:"pointer"});this.start=function(){if(!g){c=b.periodical(d.delay);g=true}};this.stop=function(){if(g){clearInterval(c);c=null;g=false}};k.addEvents({mouseover:function(m){this.start()}.bind(this),mouseout:function(m){this.stop()}.bind(this)})};
