var D=YAHOO.util.Dom;var E=YAHOO.util.Event;YAHOO.util.DDM.mode=YAHOO.util.DDM.INTERSECT;Squarespace.Orderable={};Squarespace.Orderable.__isDragging=false;Squarespace.Orderable.Boundary=Class.extend(YAHOO.util.DDTarget,{initialize:function(F,C,H,A){if(F.containerOk){return ;}this.sGroup=new String(C)+H;this.typeCheck=A||"content";this.groupName=H;var G=Squarespace.Orderable.ItemManager.getLastDraggable(F);var B=document.createElement("li");B.className=this.typeCheck+"-draggable-boundary";B.innerHTML="&nbsp;";B.id="__boundary"+Math.floor(Math.random()*1000000000);if(G&&G.nextSibling){F.insertBefore(B,G.nextSibling);}else{F.appendChild(B);}F.containerOk=true;this.init(B.id,this.sGroup);this.isBoundary=true;}});Squarespace.Orderable.Item=Class.extend(YAHOO.util.DDProxy,{initialize:function(F,B,C,A){this.sGroup=new String(B)+C;if(F){this.init(F,this.sGroup);this.initFrame();}this.id=F;this.groupName=C;this.moduleId=B;this.typeCheck=A||"content";if(C=="widgets"){this.addToGroup("xxmodules");}else{if(C=="modules"){this.addToGroup("xxwidgets");}}Squarespace.Orderable.ItemManager.loadQueue.push(this);},attach:function(){this.orientation=(D.getStyle(this.getEl(),"float")=="left"?"horizontal":"vertical");D.setStyle(this.getDragEl(),"border","0px");this.getDragEl().innerHTML="&nbsp;";D.addClass(this.getEl(),this.typeCheck+"-draggable-element");},getContainerEl:function(){return(this.getEl()!=null?this.getEl().parentNode:null);},clickValidator:function(){return(!Squarespace.EditingEnvironment||Squarespace.EditingEnvironment.checkMode(this.typeCheck));},remove:function(){this.removeFromGroup(this.sGroup);},startDrag:function(A,C){if(Squarespace.SectionEditingStripManager){Squarespace.SectionEditingStripManager.hideOpenStrip();}Squarespace.Orderable.__isDragging=true;var B=this.lookupObjectType(this.id);D.addClass(this.getEl(),this.typeCheck+"-dragged-element");this.startIndex=this.findElementIndex(this.getEl());this.startContainer=this.findElementContainer(this.getEl());this.startList=this.getEl().parentNode;this.objType=this.lookupObjectType(this.id);this.beforeDrag();},endDrag:function(B){Squarespace.Orderable.__isDragging=false;this.endIndex=this.findElementIndex(this.getEl());this.endContainer=this.findElementContainer(this.getEl());this.endList=this.getEl().parentNode;D.removeClass(this.getEl(),this.typeCheck+"-dragged-element");if(this.startIndex!=this.endIndex||this.startContainer!=this.endContainer){this.afterDrag();}if(Squarespace.SectionEditingStripManager){Squarespace.SectionEditingStripManager.reposition();var A=D.getElementsByClassName("folder-wrapper","div",this.getEl());if(A!=null){D.setStyle(A[0],"position","static");D.setStyle(A[0],"height","auto");D.setStyle(A[0],"width","auto");}}},containsNode:function(B){var A=B.parentNode;while(A!=null){A=A.parentNode;if(A==this.getEl()){return(true);}}return(false);},getBestMatch:function(C){var B=C.length;if(B==1){if(typeof C[0]._domRef.parentNode.firstDD=="undefined"){return C[0];}if(this.sGroup!=C[0]._domRef.parentNode.firstDD.sGroup){return false;}}else{var G=null;for(var F=0;F<B;++F){var A=C[F];if(this.sGroup!=A.sGroup){return false;}if(this.containsNode(A.getEl())&&(A.getEl()!=this.getEl())){continue;}else{if(A.id.startsWith("__boundary")&&A.getEl().parentNode.className=="folder"){G=A;break;}else{if(this.mode==this.INTERSECT&&A.cursorIsOver){G=A;}else{if(!G||!G.overlap||(A.overlap&&G.overlap.getArea()<A.overlap.getArea())){G=A;}}}}}return G;}},onDragOver:function(H,I){var C=this.getBestMatch(I);var G;if(!C){return ;}else{C=C.getEl();}if(this.orientation=="horizontal"){var B=YAHOO.util.DDM.getPosX(C)+(Math.floor(C.offsetWidth/2));if(E.getPageX(H)<B||C.id.startsWith("__boundary")){var A=this.getEl();G=C.parentNode;G.insertBefore(A,C);}else{if(E.getPageX(H)>B&&C.nextSibling!=null){var A=this.getEl();G=C.parentNode;G.insertBefore(A,C.nextSibling);}}}else{var B=YAHOO.util.DDM.getPosY(C)+(Math.floor(C.offsetHeight/2));if(E.getPageY(H)<B||C.id.startsWith("__boundary")){var A=this.getEl();G=C.parentNode;G.insertBefore(A,C);}else{if(E.getPageY(H)>B&&C.nextSibling!=null){var A=this.getEl();G=C.parentNode;G.insertBefore(A,C.nextSibling);}}}Squarespace.Orderable.ItemManager.containerNotificiationCheck(this.startList);Squarespace.Orderable.ItemManager.containerNotificiationCheck(this.lastList);this.lastList=G;if(this.objType.type=="section"&&Squarespace.Constants.VERSION_6_LAYOUT){this.startNavigationId=this.findElementContainerIdByPrefix(this.startList,"sidebar");this.endNavigationId=this.findElementContainerIdByPrefix(this.lastList,"sidebar");var F;if(!this.lastTargetedList){this.lastTargetedList=this.startNavigationId;}if(this.lastTargetedList!=this.endNavigationId){if(D.hasClass("sidebar"+this.lastTargetedList+"Wrapper","horizontalWidgetContainer")){D.removeClass("sidebar"+this.lastTargetedList+"Wrapper","widgetContainer"+(SIDEBAR_SECTION_COUNTS[this.lastTargetedList])+"Count");D.addClass("sidebar"+this.lastTargetedList+"Wrapper","widgetContainer"+(SIDEBAR_SECTION_COUNTS[this.lastTargetedList]-1)+"Count");}if(D.hasClass("sidebar"+this.endNavigationId+"Wrapper","horizontalWidgetContainer")){D.removeClass("sidebar"+this.endNavigationId+"Wrapper","widgetContainer"+(SIDEBAR_SECTION_COUNTS[this.endNavigationId])+"Count");D.addClass("sidebar"+this.endNavigationId+"Wrapper","widgetContainer"+(SIDEBAR_SECTION_COUNTS[this.endNavigationId]+1)+"Count");}SIDEBAR_SECTION_COUNTS[this.lastTargetedList]-=1;SIDEBAR_SECTION_COUNTS[this.endNavigationId]+=1;this.applyPartitionedClasses(this.lastTargetedList);}else{}this.applyPartitionedClasses(this.endNavigationId);this.lastTargetedList=this.endNavigationId;}},applyPartitionedClasses:function(B){var C=D.getElementsByClassName("sectionWrapper","div","sidebar"+B);var F=D.get("sidebar"+B+"Wrapper");if(D.hasClass(F,"horizontalWidgetContainer")){if(C.length==1){D.addClass(F,"horizontalNavigationBar");}else{D.removeClass(F,"horizontalNavigationBar");}for(var A=0;A<C.length;++A){C[A].className="structure-draggable-element sectionWrapper sectionWrapperCount"+(A+1);}}else{for(var A=0;A<C.length;++A){C[A].className="structure-draggable-element sectionWrapper";}}},findElementIndex:function(B){var A=0;var C=B.previousSibling;while(C){if(C.tagName==B.tagName){++A;}C=C.previousSibling;}return(A);},findElementContainer:function(A){var B=A.parentNode;while(B&&B.tagName){if((B.tagName.toLowerCase()=="li"||B.tagName.toLowerCase()=="ul"||B.tagName.toLowerCase()=="div")&&B.id){return(B.id);}B=B.parentNode;}return(null);},beforeDrag:function(){var objType=this.lookupObjectType(this.id);switch(objType.type){case"formField":eval("theForm"+this.moduleId).closeField();break;}},findElementContainerIdByPrefix:function(B,F){var G=D.get(B);while(G&&G.tagName){if((G.tagName.toLowerCase()=="li"||G.tagName.toLowerCase()=="ul"||G.tagName.toLowerCase()=="div")&&G.id){var A=G.id.indexOf(F);if(A!=-1){var C=G.id.substring(A+F.length);return(C.length>0?C:"1");}}G=G.parentNode;}return(null);},afterDrag:function(){var objType=this.objType;var f=null;var data=null;switch(objType.type){case"section":this.startNavigationId=this.findElementContainerIdByPrefix(this.startContainer,"sidebar");this.endNavigationId=this.findElementContainerIdByPrefix(this.endContainer,"sidebar");f="/process/admin/MoveSectionAsync";data="sectionId="+objType.id+"&fromIndex="+this.startIndex+"&toIndex="+this.endIndex+"&fromNavigationBar="+this.startNavigationId+"&toNavigationBar="+this.endNavigationId+"&SS_AUTHKEY="+Squarespace.Constants.SS_AUTHKEY;break;case"module":this.startFolderId=this.findElementContainerIdByPrefix(this.startContainer,"folderContent");this.endFolderId=this.findElementContainerIdByPrefix(this.endContainer,"folderContent");this.startSectionId=this.findElementContainerIdByPrefix(this.startContainer,"sectionContent");this.endSectionId=this.findElementContainerIdByPrefix(this.endContainer,"sectionContent");f="/process/admin/MoveModuleAsync";data="id="+objType.id+(this.startFolderId!=null?"&fromFolderId="+this.startFolderId:"")+(this.endFolderId?"&toFolderId="+this.endFolderId:"")+"&fromSectionId="+this.startSectionId+"&toSectionId="+this.endSectionId+"&fromIndex="+this.startIndex+"&toIndex="+this.endIndex+"&SS_AUTHKEY="+Squarespace.Constants.SS_AUTHKEY;break;case"linkGroup":f="/process/admin/MoveLinkGroupAsync";data="moduleId="+this.moduleId+"&groupId="+objType.id+"&fromIndex="+this.startIndex+"&toIndex="+this.endIndex+"&SS_AUTHKEY="+Squarespace.Constants.SS_AUTHKEY;break;case"link":if(this.startContainer.indexOf("linkGroup")==0){this.startContainer=this.startContainer.substring(9);}if(this.endContainer.indexOf("linkGroup")==0){this.endContainer=this.endContainer.substring(9);}f="/process/admin/MoveLinkAsync";data="moduleId="+this.moduleId+"&linkId="+objType.id+"&fromGroup="+this.startContainer+"&toGroup="+this.endContainer+"&fromIndex="+this.startIndex+"&toIndex="+this.endIndex+"&SS_AUTHKEY="+Squarespace.Constants.SS_AUTHKEY;break;case"faqCategory":f="/process/admin/MoveFaqCategoryAsync";data="moduleId="+this.moduleId+"&categoryId="+objType.id+"&fromIndex="+this.startIndex+"&toIndex="+this.endIndex+"&SS_AUTHKEY="+Squarespace.Constants.SS_AUTHKEY;break;case"faqEntry":if(this.startContainer.indexOf("faqCategory")==0){this.startContainer=this.startContainer.substring(11);}if(this.endContainer.indexOf("faqCategory")==0){this.endContainer=this.endContainer.substring(11);}f="/process/admin/MoveFaqEntryAsync";data="moduleId="+this.moduleId+"&entryId="+objType.id+"&fromGroup="+this.startContainer+"&toGroup="+this.endContainer+"&fromIndex="+this.startIndex+"&toIndex="+this.endIndex+"&SS_AUTHKEY="+Squarespace.Constants.SS_AUTHKEY;break;case"amazonItem":f="/process/admin/MoveAmazonItemAsync";data="moduleId="+this.moduleId+"&itemId="+objType.id+"&fromIndex="+this.startIndex+"&toIndex="+this.endIndex+"&SS_AUTHKEY="+Squarespace.Constants.SS_AUTHKEY;break;case"gallery":f="/process/admin/MovePictureGalleryAsync";data="moduleId="+this.moduleId+"&itemId="+objType.id+"&fromIndex="+this.startIndex+"&toIndex="+this.endIndex+"&SS_AUTHKEY="+Squarespace.Constants.SS_AUTHKEY;break;case"picture":if(this.startContainer.indexOf("gallery")==0){this.startContainer=this.startContainer.substring(7);}f="/process/admin/MovePictureAsync";data="moduleId="+this.moduleId+"&itemId="+objType.id+"&galleryId="+this.startContainer+"&fromIndex="+this.startIndex+"&toIndex="+this.endIndex+"&SS_AUTHKEY="+Squarespace.Constants.SS_AUTHKEY;break;case"formField":f="/process/admin/MoveFormFieldAsync";data="moduleId="+this.moduleId+"&itemId="+eval("theForm"+this.moduleId).getDatabaseIdByFieldId(objType.id)+"&fromIndex="+this.startIndex+"&toIndex="+this.endIndex+"&SS_AUTHKEY="+Squarespace.Constants.SS_AUTHKEY;eval("theForm"+this.moduleId).positionFlyout();break;case"socialLink":f="/process/admin/MoveCredentialAsync";data="moduleId="+this.moduleId+"&credentialId="+objType.id+"&fromIndex="+this.startIndex+"&toIndex="+this.endIndex+"&SS_AUTHKEY="+Squarespace.Constants.SS_AUTHKEY;break;case"postElement":saveChunks();break;}if(f){YAHOO.util.Connect.resetDefaultHeaders();YAHOO.util.Connect.setDefaultPostHeader(false);YAHOO.util.Connect.initHeader("Content-Type","application/x-www-form-urlencoded");YAHOO.util.Connect.asyncRequest("POST",f,{timeout:10000,success:function(o){eval(o.responseText);if(objType.type=="module"&&window.location.pathname=="/display/configuration/Modules"){window.location="/display/configuration/Modules?SSScrollPosition="+D.getDocumentScrollTop(window.parent.document);}},failure:function(o){alert(Squarespace.Constants.NO_SAVE_WARNING);}},data+"&var="+Math.round(Math.random()*9999999));}},lookupObjectType:function(A){var B={type:null,id:null};if(A.indexOf("linkGroup")==0){B.id=A.substring(9);B.type="linkGroup";}else{if(A.indexOf("link")==0){B.id=A.substring(4);B.type="link";}else{if(A.indexOf("amazonItem")==0){B.id=A.substring(10);B.type="amazonItem";}else{if(A.indexOf("gallery")==0){B.id=A.substring(7);B.type="gallery";}else{if(A.indexOf("picture")==0){B.id=A.substring(7);B.type="picture";}else{if(A.indexOf("formField")==0){B.id=A.substring(9);B.type="formField";}else{if(A.indexOf("faqCategory")==0){B.id=A.substring(11);B.type="faqCategory";}else{if(A.indexOf("faqEntry")==0){B.id=A.substring(8);B.type="faqEntry";}else{if(A.indexOf("moduleContentWrapper")==0){B.id=A.substring(20);B.type="module";}else{if(A.indexOf("navigationTop-moduleContentWrapper")==0){B.id=A.substring(34);B.type="module";}else{if(A.indexOf("navigationBottom-moduleContentWrapper")==0){B.id=A.substring(37);B.type="module";}else{if(A.indexOf("moduleContentWrapper")==0){B.id=A.substring(20);B.type="module";}else{if(A.indexOf("sectionContent")==0){B.id=A.substring(14);B.type="section";}else{if(A.indexOf("socialLink")==0){B.id=A.substring(10);B.type="socialLink";}else{if(A.indexOf("post-element")==0){B.id=0;B.type="postElement";}}}}}}}}}}}}}}}return(B);}});Squarespace.Orderable.ItemManager={EMPTY_MESSAGES:{"content-navigation":"<strong>This section does not contain any pages.</strong>  Add one using the links to the left, or drag a new one into place.","section-modules":"<strong>This section does not contain any pages.</strong>  Add one using the links to the left, or drag a new one into place.","section-widgets":"<strong>This section does not contain any widgets.</strong>  Add one using the links to the left, or drag a new one into place.","folder":"<strong>This folder does not contain any pages.</strong>  To add a page, drag it into this folder.","journal-tag-items":"<span><strong>This area does not contain any components.</strong>  To add a component, drag it to this container.</span>","journal-tag-items":"<span><strong>This area does not contain any components.</strong>  To add a component, drag it to this container.</span>","form-body":"","other":"This container does not contain any items."},checkBoundary:function(G,F,A,B){var C=G.lastChild;if(!G.containerOk||C==null||C.id==null||C.id.indexOf("__boundary")!=0){new Squarespace.Orderable.Boundary(G,F,A,B);Squarespace.Orderable.ItemManager.containerNotificiationCheck(G);}},getLastDraggable:function(A){var B=A.lastChild;while(B!=null){if(B.className&&(D.hasClass(B,"structure-draggable-element")||D.hasClass(B,"content-draggable-element"))){break;}B=B.previousSibling;}return(B);},containerNotificiationCheck:function(A){if(!A){return ;}if(Squarespace.Constants.LEGACY_LAYOUT){return ;}var F=A.firstChild;while(F!=null&&!F.id){F=F.nextSibling;}if(F==null||!F.id){return ;}if(F.id.startsWith("__boundary")&&!A.emptyNotice){var C=(this.EMPTY_MESSAGES[A.className]!=null?this.EMPTY_MESSAGES[A.className]:this.EMPTY_MESSAGES["other"]);if(C.length==0){return ;}var B;if(A.tagName=="UL"){B=document.createElement("li");}else{B=document.createElement("div");}B.className="empty-list-notice";B.innerHTML=C;A.appendChild(B);A.emptyNotice=B;return ;}if(!F.id.startsWith("__boundary")&&A.emptyNotice){A.removeChild(A.emptyNotice);A.emptyNotice=null;return ;}},initialize:function(){var I={};var G=[];for(var F=0;F<Squarespace.Orderable.ItemManager.loadQueue.length;++F){var B=Squarespace.Orderable.ItemManager.loadQueue[F];B.attach();var H=B.getContainerEl();if(H&&H.className&&!H.firstDD){G.push(H);H.firstDD=B;I[H.className]=B;}}Squarespace.Orderable.ItemManager.loadQueue=[];for(var F=0;F<G.length;++F){var H=G[F];Squarespace.Orderable.ItemManager.checkBoundary(H,H.firstDD.moduleId,H.firstDD.groupName,H.firstDD.typeCheck);}for(className in I){var B=I[className];var A=D.getElementsByClassName(className);for(var C=0;C<A.length;++C){Squarespace.Orderable.ItemManager.checkBoundary(A[C],B.moduleId,B.groupName,B.typeCheck);}}var A=D.getElementsByClassName("folder");for(var F=0;F<A.length;++F){Squarespace.Orderable.ItemManager.checkBoundary(A[F],"xx","modules","structure");}},loadQueue:[]};function openGuide(B,C,F){var A=0,G=0;if(F=="small"){A=400;G=560;}else{if(F=="medium"){A=500;G=660;}else{if(F=="large"){A=765;G=660;}else{if(F=="video"){A=910;G=660;}}}}window.open(B.href,C,"width="+A+",height="+G+",scrollbars=yes,resizable=yes,titlebar=yes,menubar=no,toolbar=no");}function copyToClipboard(B,C,A){if(!A){B="'"+B+"'";}if(YAHOO.env.ua.ie>0){window.clipboardData.setData("text",C);}else{showObject(document.getElementById("clipboardTextContainer"));document.getElementById("clipboardTextFilename").innerHTML=B+" ";document.getElementById("clipboardTextContent").innerHTML=C;}}Squarespace.Overlay={overlay:null,overlayVisible:false,closeCallback:null,speedIn:0.6,speedOut:0.2,hideBadObjects:function(){var A=document.getElementsByTagName("object");for(var B=0;B<A.length;++B){D.setStyle(A[B],"visibility","hidden");}var F=document.getElementsByTagName("iframe");for(var B=0;B<F.length;++B){D.setStyle(F[B],"visibility","hidden");}var C=document.getElementsByTagName("embed");for(var B=0;B<F.length;++B){D.setStyle(C[B],"visibility","hidden");}},showBadObjects:function(){var A=document.getElementsByTagName("object");for(var B=0;B<A.length;++B){D.setStyle(A[B],"visibility","visible");}var F=document.getElementsByTagName("iframe");for(var B=0;B<F.length;++B){D.setStyle(F[B],"visibility","visible");}var C=document.getElementsByTagName("embed");for(var B=0;B<C.length;++B){D.setStyle(C[B],"visibility","visible");}},enableClose:function(){if(this.closeCallback){E.addListener(this.overlay,"click",this.closeCallback);}return ;},disableClose:function(){if(this.closeCallback){E.removeListener(this.overlay,"click",this.closeCallback);}return ;},initialize:function(){if(!this.overlay){var A=document.getElementsByTagName("body").item(0);this.overlay=document.createElement("div");this.overlay.setAttribute("title","Click to Close");D.setStyle(this.overlay,"background","#000");D.setStyle(this.overlay,"width",D.getViewportWidth()+"px");D.setStyle(this.overlay,"height",D.getDocumentHeight()+"px");D.setStyle(this.overlay,"position","fixed");D.setStyle(this.overlay,"top","0px");D.setStyle(this.overlay,"left","0px");D.setStyle(this.overlay,"z-index","10000");D.setStyle(this.overlay,"display","none");D.setStyle(this.overlay,"cursor","pointer");D.setStyle(this.overlay,"opacity","0");A.appendChild(this.overlay);E.addListener(window,"resize",this.reposition.bind(this));E.addListener(window,"scroll",this.reposition.bind(this));}},show:function(A,B,C,F){this.initialize();if(!this.overlayVisible){this.overlayVisible=true;this.targetingElement=(B?D.get(B):null);D.setStyle(this.overlay,"position","fixed");D.setStyle(this.overlay,"display","block");Squarespace.Degraded.filterOpacity(this.overlay,"0");this.reposition();if(this.targetingElement){this.overlayAnimation=new YAHOO.util.Anim(this.overlay,{opacity:{to:A},left:{from:(D.getViewportWidth()-this.targetingElement.offsetWidth),to:0},top:{from:D.getDocumentScrollTop(),to:D.getDocumentScrollTop()},height:{from:this.targetingElement.offsetHeight,to:D.getViewportHeight()},width:{from:this.targetingElement.offsetWidth,to:D.getViewportWidth()}},this.speedIn,YAHOO.util.Easing.easeOutStrong);}else{D.setStyle(this.overlay,"height",D.getViewportHeight()+"px");D.setStyle(this.overlay,"width",D.getViewportWidth()+"px");D.setStyle(this.overlay,"top","0px");D.setStyle(this.overlay,"left","0px");this.overlayAnimation=new YAHOO.util.Anim(this.overlay,{opacity:{to:A}},this.speedIn,YAHOO.util.Easing.easeOutStrong);}this.hideBadObjects();if(C){this.overlayAnimation.onComplete.subscribe(C);}this.overlayAnimation.animate();if(F){this.closeCallback=F;E.addListener(this.overlay,"click",this.closeCallback);}}},hide:function(){if(this.overlayVisible){if(this.closeCallback){E.removeListener(this.overlay,"click",this.closeCallback);}if(this.targetingElement){this.overlayAnimation=new YAHOO.util.Anim(this.overlay,{opacity:{to:0.1},left:{to:D.getX(this.targetingElement)},top:{to:D.getY(this.targetingElement)+D.getDocumentScrollTop()},height:{to:this.targetingElement.offsetHeight},width:{to:this.targetingElement.offsetWidth}},this.speedOut,YAHOO.util.Easing.easeOutStrong);}else{this.overlayAnimation=new YAHOO.util.Anim(this.overlay,{opacity:{to:0.1}},this.speedOut,YAHOO.util.Easing.easeOutStrong);}this.overlayAnimation.onComplete.subscribe(function(B,A,C){D.setStyle(C.overlay,"display","none");C.overlayVisible=false;C.showBadObjects();},this);this.overlayAnimation.animate();}},isVisible:function(){return(this.overlayVisible);},reposition:function(){if(this.overlayAnimation!=null&&!this.overlayAnimation.isAnimated()){D.setStyle(this.overlay,"height",D.getViewportHeight()+"px");D.setStyle(this.overlay,"width",D.getViewportWidth()+"px");}},fastHide:function(){D.setStyle(this.overlay,"display","none");},fastShow:function(){D.setStyle(this.overlay,"display","block");}};Squarespace.EditingEnvironment={CURRENT_EDITING_MODE:null,initialize:function(C){Squarespace.Help.initialize();Squarespace.TutorialEnvironment.initialize();if(!C){C=Squarespace.Cookie.get("ADMIN_EDITING_MODE");}if(!C){C="content";}if(C!="initial"){this.updateAdminBar(C);var J=D.get("noticeAreaMode-"+C);D.addClass(J,"active-mode");this.LAST_EDITING_MODE=C;}this.CURRENT_EDITING_MODE=C;if(C=="content"){Squarespace.CSS.appendCss(".adminLinkTable, .adminLinkTableWrapper { display: block; } .structureLinkTable, .structureLinkTableWrapper { display: none; }  .floatingLinkContainer { display: none; }");}else{if(C=="structure"){Squarespace.CSS.appendCss(".adminLinkTable, .adminLinkTableWrapper { display: none; }  .structureLinkTable, .structureLinkTableWrapper { display: block; } .floatingLinkContainer { display: block; }");}}var I=(C=="preview"||C=="style"||C=="initial"||C=="help");if(I){Squarespace.CSS.appendCss(".adminLinkTable, .adminLinkTableWrapper { display: block; }");}var F={};for(root in {"sidebar1":true,"sidebar2":true}){F[root]=D.getElementsByClassName("sectionWrapper","div",root);}for(container in F){var B=F[container];for(var G=0;G<B.length;++G){B[G].lastDisplay=D.getStyle(B[G],"display");D.setStyle(B[G],"display","block");D.setStyle(B[G],"overflow","hidden");if(I&&D.hasClass(B[G],"conditionallyVisibleContainer")){B[G].contentHeight=(B[G].offsetHeight);}}}if(I){Squarespace.CSS.appendCss(".adminLinkTable, .adminLinkTableWrapper { display: none; }");}for(container in F){var B=F[container];var A=0;for(var G=0;G<B.length;++G){var H=D.getStyle(B[G],"padding");B[G].heightBoost=A;if(D.hasClass(B[G],"conditionallyVisibleContainer")){D.setStyle(B[G],"padding","2px");B[G].structureHeight=parseInt(B[G].offsetHeight+8);B[G].structureY=parseInt(D.getY(B[G]));D.setStyle(B[G],"padding",H);if(I){D.setStyle(B[G],"height","0px");}A+=B[G].structureHeight+4;}D.setStyle(B[G],"display","");}}if(I){Squarespace.CSS.appendCss(".structureLinkTable, .structureLinkTableWrapper { display: none; }  .floatingLinkContainer { display: none; }");}E.addListener(document.body,"mousedown",this.gestureBegin,null,this);E.addListener(document.body,"mouseup",this.gestureEnd,null,this);Squarespace.ConfigurationTray._construct();Squarespace.StyleEditor._construct();if(C=="style"){Squarespace.StyleEditor.show(true);}else{if(C=="help"){Squarespace.Help.show();}}if(C=="preview"||C=="style"){Squarespace.GalleryPreview.showPreviewMode(true);}else{Squarespace.GalleryPreview.showPreviewMode(false);}},gestureBegin:function(A){this.startXY=new YAHOO.util.Point(E.getXY(A));},gestureEnd:function(B){var A=80,C=null;this.endXY=new YAHOO.util.Point(E.getXY(B));if(B.which){rightclick=(B.which==3);}else{if(B.button){rightclick=(B.button==2);}}if(rightclick){if((this.endXY[0]-this.startXY[0])>A){C="style";}else{if((this.endXY[0]-this.startXY[0])<-A){C="content";}else{if((this.endXY[1]-this.startXY[1])>A){C="preview";}else{if((this.endXY[1]-this.startXY[1])<-A){C="structure";}}}}if(C){D.get("noticeAreaMode-"+C).focus();this.transitionToEditingMode(C);E.stopEvent(B);}}},updateAdminBar:function(C){if(C=="content"){D.addClass(document.body,"content-editable");D.removeClass(document.body,"structure-editable");D.removeClass(document.body,"site-preview");}else{if(C=="structure"){D.addClass(document.body,"structure-editable");D.removeClass(document.body,"content-editable");D.removeClass(document.body,"site-preview");}else{if(C=="preview"||C=="style"||C=="help"){D.addClass(document.body,"site-preview");D.removeClass(document.body,"content-editable");D.removeClass(document.body,"structure-editable");}}}if(this.CURRENT_EDITING_MODE){var A=D.get("noticeAreaMode-"+C);D.addClass(A,"active-mode");new YAHOO.util.ColorAnim(A,{backgroundColor:{from:"#353535",to:"#252525"}},0.5,YAHOO.util.Easing.easeOutStrong).animate();var B=D.get("noticeAreaMode-"+this.CURRENT_EDITING_MODE);D.removeClass(B,"active-mode");new YAHOO.util.ColorAnim(B,{backgroundColor:{from:"#252525",to:"#353535"}},0.5,YAHOO.util.Easing.easeOutStrong).animate();}},checkMode:function(A){return(!this.CURRENT_EDITING_MODE||this.CURRENT_EDITING_MODE==A);},transitionToEditingMode:function(H,K){if(H=="tutorial"){YAHOO.lang.later(200,this,function(){Squarespace.TutorialEnvironment.start();return ;});}Squarespace.Management.hide();Squarespace.MembershipManagement.hide();if(!K&&this.CURRENT_EDITING_MODE=="preview"&&H=="preview"&&this.LAST_EDITING_MODE!="initial"&&this.LAST_EDITING_MODE!="preview"){H=this.LAST_EDITING_MODE;}if(this.CURRENT_EDITING_MODE==H){return ;}var B=false;if(H=="template"){H="style";B=true;}if(H=="preview"||H=="style"||H=="help"){var I=D.getElementsByClassName("helptip-container-fixed","div");for(var G=0;G<I.length;++G){if(H=="preview"||I[G].innerHTML.indexOf("Design Preview")==-1){new YAHOO.util.Anim(I[G],{opacity:{to:0}},0.3,YAHOO.util.Easing.easeOutStrong).animate();}}for(root in {"sidebar1":true,"sidebar2":true}){var I=D.getElementsByClassName("conditionallyVisibleContainer","div",root);for(var G=0;G<I.length;++G){D.setStyle(I[G],"display","block");D.setStyle(I[G],"overflow","hidden");if(!I[G].originalHeight){I[G].originalHeight=(I[G].offsetHeight);}var F=new YAHOO.util.Anim(I[G],{height:{to:0},marginBottom:{to:0}},0.3,YAHOO.util.Easing.easeOutStrong);F.animate();}}}else{var I=D.getElementsByClassName("helptip-container-fixed","div");for(var G=0;G<I.length;++G){new YAHOO.util.Anim(I[G],{opacity:{to:1}},0.3,YAHOO.util.Easing.easeOutStrong).animate();}var I=D.getElementsByClassName("conditionallyVisibleContainer","div");for(var G=0;G<I.length;++G){if(H=="content"&&I[G].contentHeight){I[G].originalHeight=I[G].contentHeight;}if(H=="structure"&&I[G].structureHeight){I[G].originalHeight=I[G].structureHeight;}if(I[G].originalHeight){var J=new YAHOO.util.Anim(I[G],{height:{to:I[G].originalHeight}},0.3,YAHOO.util.Easing.easeOutStrong);J.onComplete.subscribe(function(M,L,N){D.setStyle(N,"height","auto");N.originalHeight=null;Squarespace.SectionEditingStripManager.reposition();},I[G]);J.animate();}}}this.updateAdminBar(H);if(H=="content"){var C=D.getElementsByClassName("adminLinkTable","table");for(var G=0;G<C.length;++G){if(!D.hasClass(C[G],"structureLinkTable")){this.showStrip(C[G]);}else{if(!D.hasClass(C[G],"managedLinkTable")){this.hideStrip(C[G]);}}}var A=D.getElementsByClassName("floatingLinkContainer","div");for(var G=0;G<A.length;++G){this.hideStrip(A[G],"container");}}else{if(H=="structure"){Squarespace.SectionEditingStripManager.conditionalReorient();var C=D.getElementsByClassName("adminLinkTable","table");for(var G=0;G<C.length;++G){if(D.hasClass(C[G],"structureLinkTable")){this.showStrip(C[G]);}else{if(!D.hasClass(C[G],"managedLinkTable")){this.hideStrip(C[G]);}}}var A=D.getElementsByClassName("floatingLinkContainer","div");for(var G=0;G<A.length;++G){this.showStrip(A[G],"container");}}else{if(H=="preview"||H=="style"||H=="help"){var C=D.getElementsByClassName("adminLinkTable","table");for(var G=0;G<C.length;++G){if(!D.hasClass(C[G],"managedLinkTable")){this.hideStrip(C[G]);}}var A=D.getElementsByClassName("floatingLinkContainer","div");for(var G=0;G<A.length;++G){this.hideStrip(A[G],"container");}}}}(H=="help")?Squarespace.Help.show():Squarespace.Help.hide();if(H=="preview"||H=="style"){Squarespace.GalleryPreview.showPreviewMode(true);}else{Squarespace.GalleryPreview.showPreviewMode(false);}if(H!="style"){Squarespace.StyleEditor.hide();}else{Squarespace.StyleEditor.show();}if(H!="structure"){Squarespace.SectionEditingStripManager.hideOpenStrip();Squarespace.ConfigurationTray.hide();}if(H!="content"){Squarespace.Interaction.EditingTip.hide();}if(!K){Squarespace.Cookie.set("ADMIN_EDITING_MODE",H);this.LAST_EDITING_MODE=this.CURRENT_EDITING_MODE;this.CURRENT_EDITING_MODE=H;}if(Squarespace.Interaction.StylePreviewTip){Squarespace.Interaction.StylePreviewTip.position();}if(Squarespace.Interaction.EnablePageTip){Squarespace.Interaction.EnablePageTip.position();}Squarespace.ConfirmationDialog.cancel();if(B){D.get("appearance-container-frame").src="/display/admin/Appearance?section=TemplateGroup";}},isOffScreen:function(A){return(D.getY(A)>(D.getViewportHeight()+D.getDocumentScrollTop()));},showStrip:function(F,C){if(F.tagName=="TABLE"){D.setStyle(F,"display","block");F=F.parentNode;}var A=20;var B=D.getStyle(F,"display");if(B=="none"||F.anim){if(F.anim){F.anim.stop(true);}if(C=="container"){if(!F.stripObject.containerVisible){return ;}D.setStyle(F,"display","block");F.stripObject.updateXY(F.unifiedWidth,this.CURRENT_EDITING_MODE);if(this.isOffScreen(F)){D.setStyle(F,"width","130px");D.setStyle(F,"left",(F.stripObject.lastX)+"px");}else{D.setStyle(F,"width","0px");F.anim=new YAHOO.util.Anim(F,{left:{by:-130},width:{to:130}},0.5,YAHOO.util.Easing.easeOutStrong);}}else{D.setStyle(F,"display","block");if(this.isOffScreen(F)){D.setStyle(F,"height",A+"px");}else{D.setStyle(F,"height","0px");F.anim=new YAHOO.util.Anim(F,{height:{to:A}},0.5,YAHOO.util.Easing.easeOutStrong);}}if(F.anim){F.anim.onComplete.subscribe(function(H,G,I){I.anim=null;Squarespace.EditingEnvironment.animating=false;},F);F.anim.animate();Squarespace.EditingEnvironment.animating=true;}}},hideStrip:function(F,C){var A=false;if(F.tagName=="TABLE"){D.setStyle(F,"display","block");F=F.parentNode;}var B=D.getStyle(F,"display");if(B=="block"||B=="inline"||F.anim){if(F.anim){F.anim.stop(true);}if(C=="container"){if(this.isOffScreen(F)){D.setStyle(F,"display","none");}else{F.anim=new YAHOO.util.Anim(F,{left:{by:130},width:{to:0}},0.5,YAHOO.util.Easing.easeOutStrong);}}else{if(this.isOffScreen(F)){setTimeout(function(){D.setStyle(F,"display","none");},20);A=true;}else{D.setStyle(F,"overflow","hidden");D.setStyle(F,"display","block");F.anim=new YAHOO.util.Anim(F,{height:{to:0}},0.5,YAHOO.util.Easing.easeOutStrong);}}if(F.anim){F.anim.onComplete.subscribe(function(H,G,I){D.setStyle(this.getEl(),"display","none");I.anim=null;Squarespace.EditingEnvironment.animating=false;},F);F.anim.animate();Squarespace.EditingEnvironment.animating=true;}}return(A);}};Squarespace.GalleryPreview={updatePreviewHTML:function(A,C,F){var H=window.location.href;var B=H.indexOf("?")>-1?H+"&preview=true":H+"?preview=true";var G=this;YAHOO.util.Connect.asyncRequest("GET",B,{success:function(K){A.innerHTML=K.responseText;G.updateLightboxSettings();G.updateImageThumbnails(A,F);var J=true;if(G.updateNavigationStrip()===true){J=false;}G.updateLargeFirstImage(J);var I=true;G.updateMainPictureElements(I,C,A);G.updateExifData();}});},updateLightboxSettings:function(){var K=function(N){return N==="true";};var F=[["hidden-lightbox-lightboxMode","lightboxMode",parseInt],["hidden-lightbox-fullImageViewMode","fullImageViewMode",parseInt],["hidden-lightbox-thumbnailLoading","thumbnailLoading",parseInt],["hidden-lightbox-thumbnailHover","thumbnailHover",parseInt],["hidden-lightbox-showTitles","showTitles",K],["hidden-lightbox-showDescriptions","showDescriptions",K],];for(var H=0,L,B,M,G,I;H<F.length;H++){L=F[H];if(L==null){break;}B=L[0],M=L[1],G=L[2];I=D.get(B);if(I!=null){SSLightbox[M]=G(I.value);}}var C=[["hidden-lightbox-setNavigationParameters","setNavigationParameters"]];for(var H=0,L,B,A,J;H<C.length;H++){L=C[H];if(L==null){break;}B=L[0],A=L[1];I=D.get(B);if(I!=null){J=JSON.parse(I.value);SSLightbox[A].apply(SSLightbox,J);}}},callPresentThumbnail:function(A){SSLightbox.presentThumbnail(A.getAttribute("data-setName"),A.getAttribute("id"),A.getAttribute("data-imageId"),A.getAttribute("data-pageUrl"),A.getAttribute("data-imgNavigationThumbnailUrl"),A.getAttribute("data-imgThumbnailUrl"),A.getAttribute("data-imgGalleryUrl"),A.getAttribute("data-imgFullUrl"),A.getAttribute("data-popupUrl"),A.getAttribute("data-title"),A.getAttribute("data-description"),true);},updateNavigationStrip:function(){SSLightbox.navigationContainer=document.getElementById("gallery-image-navigation");var F=D.get("gallery-image-navigation-inner-preview");if(F!=null){var A=F.getElementsByTagName("div");for(var C=0,B;C<A.length;C++){B=A[C];this.callPresentThumbnail(B);}return true;}return false;},updateLargeFirstImage:function(B){var A=D.get("main-picture");if(A!=null){currentPictureId=parseInt(A.getAttribute("data-currentpictureid"));if(B){this.callPresentThumbnail(A);}}},updateImageThumbnails:function(B,G){var A=true;this.switchLightboxImages(A,G);var H=D.getElementsByClassName("picture-gallery-thumbnail-list","ul",B);if(H.length>0){var I=H[0].getElementsByTagName("li");for(var F=0,C;F<I.length;F++){C=I[F];this.callPresentThumbnail(C);}}},switchLightboxImages:function(A,B){var C=SSLightbox;if(C.editorPhotosByLinkHref===undefined||!B){C.editorPhotosByLinkHref=C.photosByLinkHref;C.editorPhotosByIndex=C.photosByIndex;C.editorPhotosByImageId=C.photosByImageId;C.editorMaxIndex=C.maxIndex;}if(A&&!B){C.editorMainImage=C.mainImage;C.editorOriginalMainImage=C.originalMainImage;}if(A){C.photosByLinkHref={};C.photosByIndex={};C.photosByImageId={};C.maxIndex=0;C.mainImage=undefined;C.originalMainImage=undefined;}else{if(!A&&!B){}else{C.photosByLinkHref=C.editorPhotosByLinkHref;C.photosByIndex=C.editorPhotosByIndex;C.photosByImageId=C.editorPhotosByImageId;C.maxIndex=C.editorMaxIndex;C.mainImage=C.editorMainImage;C.originalMainImage=C.editorOriginalMainImage;}}},getMainImageElements:function(B,A){var C=B+"main-picture";return D.getElementsBy(function(F){return F.id.substring(0,C.length)==C;},null,A);},getElementByIdAndRoot:function(B,A){return D.getElementsBy(function(C){return C.id==B;},null,A)[0];},updateMainPictureElements:function(A,J,H){if(A){var B=this.getMainImageElements("",J);for(var I=0,C;I<B.length;I++){C=B[I];C.id="editor-"+C.id;}var G=this.getMainImageElements("preview-",H);for(var I=0,C;I<G;I++){C=G[I];C.id=C.id.slice("preview-".length);}var K=this.getElementByIdAndRoot("gallery-image-navigation",J);if(K){K.id="editor-gallery-image-navigation";}var F=this.getElementByIdAndRoot("preview-gallery-image-navigation",H);if(F){F.id="gallery-image-navigation";}}else{var B=this.getMainImageElements("editor-",J);for(var I=0,C;I<B.length;I++){C=B[I];C.id=C.id.slice("editor-".length);}var G=this.getMainImageElements("",H);for(var I=0,C;I<G;I++){C=G[I];C.id="preview-"+C.id;}var K=this.getElementByIdAndRoot("editor-gallery-image-navigation",J);if(K){K.id="gallery-image-navigation";}var F=this.getElementByIdAndRoot("gallery-image-navigation",H);if(F){F.id="preview-gallery-image-navigation";}}},updateExifTags:function(G,B){var A='<div class="exifTag"><span class="name">{{exifName}}</span>: <span class="description">{{exifDescription}}</span></div>';var H="";if(G!=undefined){for(var F=0,C;F<G.length;F++){C=G[F];H+=A.replace("{{exifName}}",C.name).replace("{{exifDescription}}",C.description);}}B.innerHTML=H;},updateExifData:function(){var A=D.get("main-picture-exif");if(!A){return ;}var C=D.get("main-picture");var G=JSON.parse(C.getAttribute("data-exif"));var I=G[currentPictureId];this.updateExifTags(I,A);var H=D.get("gallery-image-navigation");if(H){var B=H.getElementsByTagName("a");for(var F=0;F<B.length;++F){var J=this;if(B[F].rel!=null&&B[F].rel=="lightbox"){YAHOO.util.Event.addListener(B[F],"click",function(){var K=SSLightbox.photosByLinkHref[this.href].imageId;J.updateExifTags(G[K],A);});}}}},deleteFullPictures:function(A,F){var H=D.get("content");var G=D.getElementsBy(function(I){return I.className=="picture-full"&&!D.isAncestor(H,I);});for(var B=0,C;B<G.length;B++){C=G[B];if(A&&!F){D.setStyle(C,"display","none");}else{if(!A&&D.getStyle(C,"display")=="none"){D.setStyle(C,"display","block");}else{if(!A&&!F){}else{if(D.getStyle(C,"display")=="none"){}else{C.parentNode.removeChild(C);}}}}}},showPreviewMode:function(B){var A=D.get("gallery-editor-preview");var C=D.get("gallery-editor-editing");if(!A||!C){return ;}var F=D.getStyle(A,"display")=="block"?true:false;this.deleteFullPictures(B,F);if(B){this.updatePreviewHTML(A,C,F);D.setStyle(A,"display","block");D.setStyle(C,"display","none");}else{this.switchLightboxImages(B,F);D.setStyle(A,"display","none");D.setStyle(C,"display","block");this.updateMainPictureElements(B,C,A);}}};Squarespace.ConfigurationTray={updateXY:function(){if(this.properties.alignment=="center"){this.lastX=parseInt((D.getViewportWidth()/2)-(this.container.offsetWidth/2));this.lastY=parseInt(20);}else{this.lastX=parseInt(D.getViewportWidth()-this.container.offsetWidth-15);this.lastY=parseInt(20);}},showEditor:function(A){if(YAHOO.env.ua.ie<=6&&YAHOO.env.ua.ie!=0){alert(Squarespace.Constants.BROWSER_UPGRADE_ALERT);return ;}this._construct();this.properties.loadMessage="Loading Editor...";this.container.className="configuration-container configuration-container-w600";this.properties.icon="../../../universal/images/manager/configure-large-content.png";this.properties.alignment="center";this.prevWidth=600;this._show(A);},showContentEditor:function(A){if(YAHOO.env.ua.ie<=6&&YAHOO.env.ua.ie!=0){alert(Squarespace.Constants.BROWSER_UPGRADE_ALERT);return ;}if(this.loading){return ;}this._construct();this.properties.loadMessage="Loading Editor...";this.container.className="configuration-container configuration-container-w750";this.properties.icon="../../../universal/images/manager/configure-large-content.png";this.properties.alignment="center";this.prevWidth=750;this._show(A);},showConfiguration:function(A){if(this.loading){return ;}this._construct();this.properties.loadMessage="Loading Configuration...";this.container.className="configuration-container configuration-container-w600";this.properties.icon="../../../universal/images/manager/configure-large-structure.png";this.properties.alignment="upper-right";this.prevWidth=600;this._show(A);},getFrame:function(){return(D.get("configuration-container-frame"));},frameExec:function(c1,c2,c3){eval('D.get("configuration-container-frame").contentWindow.'+c1);if(c2){eval('D.get("configuration-container-frame").contentWindow.'+c2);}if(c3){eval('D.get("configuration-container-frame").contentWindow.'+c3);}},_construct:function(){if(!this.container){this.properties={className:"configuration-container",showDelay:500,hideDelay:30};this.maximized=false;this.activeAnimation=null;this.lagTimer=null;this.visible=false;this.tipVisible=false;this.loading=false;this.reloadOnHide=false;this.container=document.createElement("div");this.container.className=this.properties.className;D.setStyle(this.container,"position","fixed");document.body.appendChild(this.container);var B="/universal/configuration-tray-blank.html";E.addListener(window,"scroll",this.move.bind(this));E.addListener(window,"resize",this.move.bind(this));this.container.innerHTML='<div id="configuration-container-title-wrapper" class="configuration-container-title-loading"><div id="configuration-container-title"><div id="configuration-container-title-text"></div></div></div><div id="configuration-container-frame-wrapper"><iframe frameborder="0" id="configuration-container-frame" class="configuration-container-frame" src="'+B+'"></iframe></div><div id="configuration-container-footer" class="configuration-container-footer"><div id="configuration-container-footer-buttons">&nbsp;</div></div>';var A=D.get("configuration-container-title");this.resizeLink=document.createElement("a");this.resizeLink.id="resizeLink";this.resizeLink.href="javascript:noop();";this.resizeLink.className="appearance-container-link";this.resizeLink.style.position="absolute";this.resizeLink.style.top="5px";this.resizeLink.style.display="none";this.resizeLink.style.right="5px";this.resizeLink.innerHTML="+";A.appendChild(this.resizeLink);E.addListener(this.resizeLink,"click",function(C){this.maxmin();E.stopEvent(C);},null,this);}},_show:function(A){if(!this.tipVisible&&!this.activeAnimation){this.loading=true;this.setTitle(this.properties.loadMessage,"Please wait.");D.setStyle("configuration-container-title","background","url("+this.properties.icon+") 12px 12px no-repeat");Squarespace.Overlay.show(0.65,null,null,this.attemptHide.bind(this));Squarespace.Degraded.filterOpacity(this.container,"0");D.setStyle(this.container,"display","block");if(this.prevWidth){if(this.resizable){this.resizeLink.style.display="none";}D.setStyle("configuration-container-title-wrapper","width",this.prevWidth+"px");D.setStyle("configuration-container-frame","width",this.prevWidth+"px");D.setStyle("configuration-container-frame-wrapper","width",this.prevWidth+"px");D.setStyle(this.container,"width",this.prevWidth+"px");}this.updateXY();D.setStyle(this.container,"left",this.lastX+"px");D.setStyle(this.container,"top",this.lastY+"px");if(A.startsWith("javascript:")){this.frameExec(A.substring(11));}else{this.url=Squarespace.URL.adjustQueryParameter(A,"SSScrollPosition",D.getDocumentScrollTop());this.getFrame().src=this.url;}this.activeAnimation=new YAHOO.util.Anim(this.container,{opacity:{to:1},top:{from:this.lastY-15,to:this.lastY}},0.4,YAHOO.util.Easing.easeOutStrong);this.activeAnimation.onComplete.subscribe(function(C,B,F){F.tipVisible=true;F.activeAnimation=null;if(F.autoExec){F.ready(F.autoExec[0],F.autoExec[1]);}},this);Squarespace.Degraded.filterAnimation(this.activeAnimation);Squarespace.SectionEditingStripManager.hideOpenStrip();}else{if(this.tipVisible&&!this.url.startsWith(A)){if(A.startsWith("javascript:")){this.frameExec(A.substring(11));}else{this.url=Squarespace.URL.adjustQueryParameter(A,"SSScrollPosition",D.getDocumentScrollTop());D.get("configuration-container-frame").src=this.url;}}}},isVisible:function(){return(this.tipVisible);},ready:function(C,A){this.loading=false;if(this.tipVisible==false){this.autoExec=[C,A];return ;}this.autoExec=null;this.completionCallback=C;if(!this.maximized){if(!A){this.height=D.getViewportHeight()-175;}else{this.height=A;}this.currentHeight=this.height;D.setStyle("configuration-container-frame","height",this.height+"px");}Squarespace.Degraded.filterAnimation(new YAHOO.util.Anim("configuration-container-title-wrapper",{opacity:{to:1}},1,YAHOO.util.Easing.easeOutStrong));Squarespace.Degraded.filterAnimation(new YAHOO.util.Anim("configuration-container-footer",{opacity:{to:1}},1,YAHOO.util.Easing.easeOutStrong));Squarespace.Degraded.filterAnimation(new YAHOO.util.Anim("configuration-container-footer",{height:{to:D.get("configuration-container-footer-buttons").offsetHeight}},0.2,YAHOO.util.Easing.easeOutStrong));this.activeAnimation=new YAHOO.util.Anim("configuration-container-frame-wrapper",{height:{to:(this.maximized?this.currentHeight:this.height)}},0.2,YAHOO.util.Easing.easeOutStrong);this.activeAnimation.onComplete.subscribe(function(G,F,H){D.setStyle("configuration-container-frame","visibility","visible");if(C){C();}H.activeAnimation=null;},this);Squarespace.Degraded.filterAnimation(this.activeAnimation);if(this.tabs){for(var B=0;B<this.tabs.length;++B){Squarespace.Degraded.filterAnimation(new YAHOO.util.Anim(this.tabs[B],{opacity:{to:1}},0.5,YAHOO.util.Easing.easeOutStrong));}}this.generateToken();},generateToken:function(){this.token=Math.round(Math.random()*9999999);},getToken:function(){return this.token;},setFooterHTML:function(A){D.get("configuration-container-footer-buttons").innerHTML=A;},setTitle:function(C,B,A){if(A){D.get("configuration-container-title-text").innerHTML='<div class="configuration-container-error-text">'+C+' (Unable to Complete Request)<div class="configuration-container-subtitle">'+Squarespace.Constants.WEBSITE_TITLE+"</div></div>";D.setStyle("configuration-container-title","background","url("+this.properties.icon.replace(new RegExp(".png","g"),"-error.png")+") 12px 12px no-repeat");}else{D.get("configuration-container-title-text").innerHTML=C+'<div class="configuration-container-subtitle">'+Squarespace.Constants.WEBSITE_TITLE+"</div>";D.setStyle("configuration-container-title","background","url("+this.properties.icon.replace(new RegExp("-error.png","g"),".png")+") 12px 12px no-repeat");}},basicSetup:function(F,A,B,C){if(!B){B="Save";}this.setFooterHTML('<div style="float: right; padding-left: 8px;">'+Squarespace.HTML.createButton(B,"Squarespace.ConfigurationTray.issue('save');",true)+"</div>"+'<div style="float: right; padding-left: 8px;">'+Squarespace.HTML.createButton("Cancel","Squarespace.ConfigurationTray.hide();")+"</div>");this.ready(C,A);if(B=="Next"){this.issue=function(G){if(G=="save"){F.dataform.SSScrollPosition.value=D.getDocumentScrollTop(window.parent.document);F.dataform.submit();}};}else{this.issue=function(G){if(G=="save"){this.lock("Saving Configuration...","Please wait while we process your request.");window.setTimeout(function(){F.dataform.SSScrollPosition.value=D.getDocumentScrollTop(window.parent.document);F.dataform.submit();},100);}};}},addTabs:function(F,I){if(this.tabs){return ;}this.tabs=[];F=F.reverse();var B=D.get("configuration-container-title");var A=10;this.tabContainer=document.createElement("div");this.tabContainer.className=(I?"configuration-container-image-tabs":"configuration-container-tabs");B.appendChild(this.tabContainer);for(var C=0;C<F.length;++C){if(!F[C].icon){var H=document.createElement("a");var G=document.createElement("span");H.className="configuration-container-tab-inactive";H.frameLink=F[C].link;H.href="javascript:noop();";H.tabTitle=F[C].title;H.obj=F[C];G.innerHTML=F[C].title;H.appendChild(G);this.tabContainer.appendChild(H);E.addListener(H,"click",this._activateTabClick,F[C].title,this);E.addListener(G,"click",this._activateTabClick,F[C].title,this);}else{var H=document.createElement("a");H.className="configuration-container-image-tab-inactive";H.frameLink=F[C].link;H.href="javascript:noop();";H.tabTitle=F[C].title;H.obj=F[C];D.setStyle(H,"background-image","url("+F[C].icon+")");D.setStyle(H,"height",F[C].size+"px");D.setStyle(H,"width",F[C].size+"px");this.tabContainer.appendChild(H);E.addListener(H,"click",this._activateTabClick,F[C].title,this);}F[C].obj=H;Squarespace.Degraded.filterOpacity(H,"0");this.tabs.push(H);}for(var C=0;C<this.tabs.length;++C){Squarespace.Degraded.filterAnimation(new YAHOO.util.Anim(this.tabs[C],{opacity:{to:1}},0.5,YAHOO.util.Easing.easeOutStrong));}},clearTabs:function(){if(this.tabs){this.tabContainer.innerHTML="";this.tabs=null;this.tabContainer=null;}},_activateTabClick:function(A,B){E.stopEvent(A);this.activateTab(B);},activateTab:function(C){for(var A=0;A<this.tabs.length;++A){var B=this.tabs[A];if(B.tabTitle.indexOf(C)!=-1){B.className=(B.className.indexOf("image")!=-1?"configuration-container-image-tab":"configuration-container-tab");this._show(B.frameLink);}else{B.className=(B.className.indexOf("image")!=-1?"configuration-container-image-tab-inactive":"configuration-container-tab-inactive");}}},lock:function(C,B){this.setTitle(C,B);D.setStyle("configuration-container-frame","visibility","hidden");D.get("configuration-container-footer-buttons").innerHTML="";new YAHOO.util.Anim("configuration-container-frame-wrapper",{height:{to:0}},0.2,YAHOO.util.Easing.easeOutStrong).animate();Squarespace.Degraded.filterAnimation(new YAHOO.util.Anim("configuration-container-title",{opacity:{to:1}},0.4,YAHOO.util.Easing.easeOutStrong));Squarespace.Degraded.filterAnimation(new YAHOO.util.Anim("configuration-container-footer",{opacity:{to:1},height:{to:3}},0.2,YAHOO.util.Easing.easeOutStrong));if(this.tabs){for(var A=0;A<this.tabs.length;++A){Squarespace.Degraded.filterAnimation(new YAHOO.util.Anim(this.tabs[A],{opacity:{to:0}},0.3,YAHOO.util.Easing.easeOutStrong));}}},issue:function(A){},afterResize:function(){},maxmin:function(){if(!this.maximized){var B=D.get("configuration-container-title-wrapper").offsetHeight+D.get("configuration-container-footer").offsetHeight;this.currentHeight=D.getViewportHeight()-B;this.titleBg=D.getStyle("configuration-container-title-wrapper","background-image");this.footerBg=D.getStyle("configuration-container-footer","background-image");D.setStyle(document.body,"overflow","hidden");D.setStyle("configuration-container-title-wrapper","background","#202020");D.setStyle("configuration-container-footer","background","#202020");new YAHOO.util.Anim("configuration-container-title-wrapper",{width:{to:D.getViewportWidth()}},0.3,YAHOO.util.Easing.easeOutStrong).animate();new YAHOO.util.Anim("configuration-container-frame",{height:{to:D.getViewportHeight()-B},width:{to:D.getViewportWidth()}},0.3,YAHOO.util.Easing.easeOutStrong).animate();new YAHOO.util.Anim("configuration-container-frame-wrapper",{height:{to:D.getViewportHeight()-B},width:{to:D.getViewportWidth()}},0.3,YAHOO.util.Easing.easeOutStrong).animate();var A=new YAHOO.util.Anim(this.container,{left:{to:0},top:{to:0},height:{to:this.currentHeight},width:{to:D.getViewportWidth()}},0.3,YAHOO.util.Easing.easeOutStrong);A.onComplete.subscribe(function(F,C,G){Squarespace.Overlay.fastHide();G.afterResize();},this);A.animate();this.maximized=true;this.prevWidth=this.container.offsetWidth;this.oldXY=D.getXY(this.container);this.oldXY=[this.oldXY[0],this.oldXY[1]];if(!this.oldXY[0]){this.oldXY[0]=parseInt(D.getStyle(this.container,"left"));this.oldXY[1]=parseInt(D.getStyle(this.container,"top"));}this.resizeLink.innerHTML="-";window.scrollTo(0,0);}else{this.currentHeight=this.height;Squarespace.Overlay.fastShow();D.setStyle(document.body,"overflow","scroll");D.setStyle("configuration-container-title-wrapper","background","transparent "+this.titleBg+" top left no-repeat");D.setStyle("configuration-container-footer","background","transparent "+this.footerBg+" bottom left no-repeat");new YAHOO.util.Anim("configuration-container-title-wrapper",{width:{to:this.prevWidth}},0.3,YAHOO.util.Easing.easeOutStrong).animate();new YAHOO.util.Anim("configuration-container-frame",{height:{to:this.height},width:{to:this.prevWidth}},0.3,YAHOO.util.Easing.easeOutStrong).animate();new YAHOO.util.Anim("configuration-container-frame-wrapper",{height:{to:this.height},width:{to:this.prevWidth}},0.3,YAHOO.util.Easing.easeOutStrong).animate();A=new YAHOO.util.Anim(this.container,{left:{to:this.oldXY[0]},top:{to:this.oldXY[1]},height:{to:this.height},width:{to:this.prevWidth}},0.3,YAHOO.util.Easing.easeOutStrong);A.onComplete.subscribe(function(F,C,G){G.afterResize();},this);A.animate();this.maximized=false;this.resizeLink.innerHTML="+";}},enableResizing:function(){this.resizable=true;D.setStyle(this.resizeLink,"display","block");},move:function(B){return ;this.finalPosition=false;if(this.maximized){return ;}if(!this.tipVisible){return ;}this.updateXY();var A=new YAHOO.util.Anim(this.container,{left:{to:this.lastX}},0.3,YAHOO.util.Easing.easeOutStrong);A.onComplete.subscribe(function(F,C,G){if(!G.finalPosition){G.move();}G.animating=false;},this);A.animate();this.finalPosition=true;this.animating=true;},attemptHide:function(){if(this.tipVisible){if(!this.getFrame().contentWindow.confirmPageExit){this.getFrame().src="/universal/configuration-tray-blank.html";}}if(this.reloadOnHide){Squarespace.URL.reload();}},beforeHide:function(B,A){if(B=="sync"){Squarespace.SlideshowDAO.sync(null,this.token);}this.hide();},hide:function(){if(this.tipVisible){if(this.titleBg&&this.footerBg){D.setStyle("configuration-container-title-wrapper","background","transparent "+this.titleBg+" top left no-repeat");D.setStyle("configuration-container-footer","background","transparent "+this.footerBg+" bottom left no-repeat");this.titleBg=this.footerBg=null;}this.resizeLink.innerHTML="+";this.maximized=false;this.getFrame().contentWindow.confirmPageExit=false;if(this.activeAnimation){this.activeAnimation.stop();}if(this.tabs){for(var A=0;A<this.tabs.length;++A){this.tabs[A].parentNode.removeChild(this.tabs[A]);}this.tabs=null;}D.setStyle("configuration-container-frame","visibility","hidden");Squarespace.Overlay.hide();this.activeAnimation=new YAHOO.util.Anim(this.container,{opacity:{to:0}},0.25,YAHOO.util.Easing.easeOutStrong);this.activeAnimation.onComplete.subscribe(function(C,B,F){D.setStyle(this.getEl(),"display","none");F.tipVisible=false;D.setStyle("configuration-container-frame","visibility","hidden");D.get("configuration-container-footer-buttons").innerHTML="";D.setStyle("configuration-container-frame-wrapper","height","0px");D.setStyle("configuration-container-footer","height","3px");D.get("configuration-container-frame").src="/universal/configuration-tray-blank.html";F.activeAnimation=null;},this);Squarespace.Degraded.filterAnimation(this.activeAnimation);}}};Squarespace.SectionEditingStripManager={stripSet:[],loadQueue:[],openContainer:null,cleanAnchorTimer:null,positionDisoriented:false,conditionalReorient:function(){if(Squarespace.SectionEditingStripManager.positionDisoriented){Squarespace.SectionEditingStripManager.positionDisoriented=false;setTimeout(function(){Squarespace.SectionEditingStripManager.recalculate();Squarespace.SectionEditingStripManager.reposition(true);},1000);}},initialize:function(){E.addListener(window,"resize",Squarespace.SectionEditingStripManager.reposition);for(var A=0;A<Squarespace.SectionEditingStripManager.loadQueue.length;++A){var C=Squarespace.SectionEditingStripManager.loadQueue[A];C.attach();}for(var A=0;A<Squarespace.SectionEditingStripManager.stripSet.length;++A){var B=Squarespace.SectionEditingStripManager.stripSet[A];B.updateXY(0,"initial");if(!B.containerVisible){D.setStyle(B.container,"display","none");}}},hideOpenStrip:function(){if((Squarespace.Orderable&&Squarespace.Orderable.__isDragging)||!this.openContainer){return ;}var A=this.openContainer;if(A.anim){A.anim.stop();}A.anim=new YAHOO.util.Anim(A.stripContainer,{width:{to:0}},0.2,YAHOO.util.Easing.easeOutStrong);A.anim.animate();D.removeClass(A.targetContainer,"hovering-strip-focused");A.shown=false;this.openContainer=null;},registerStrip:function(A){this.stripSet.push(A);},reposition:function(B){if(Squarespace.EditingEnvironment.CURRENT_EDITING_MODE=="structure"){for(var A=0;A<Squarespace.SectionEditingStripManager.stripSet.length;++A){Squarespace.SectionEditingStripManager.stripSet[A].position();}if(Squarespace.SectionEditingStripManager.openContainer){Squarespace.SectionEditingStripManager.openContainer.position();}}},recalculate:function(B){for(var A=0;A<Squarespace.SectionEditingStripManager.stripSet.length;++A){Squarespace.SectionEditingStripManager.stripSet[A].updateXY(0);}},setOpenStrip:function(A){this.hideOpenStrip();this.openContainer=A;this.clearAutoHide();},isStripShowable:function(F,I){if(Squarespace.Orderable.__isDragging||Squarespace.EditingEnvironment.CURRENT_EDITING_MODE!="structure"){return(false);}if(this.openContainer){var A=this.openContainer.targetContainer;var C=D.getElementsBy(function(J){return(J==A);},null,F.targetContainer,null);if(C.length>0){var H=D.getElementsBy(function(J){return(D.hasClass(J,"structure-draggable-element"));},null,F.targetContainer,null);if(H.length>0){var B=E.getPageY(I);var G=D.getY(H[0]);if(B>G){return(false);}}}}return(true);},clearAutoHide:function(){if(this.clearAnchorTimer){window.clearTimeout(this.clearAnchorTimer);this.clearAnchorTimer=null;}},startAutoHide:function(){if(!this.clearAnchorTimer){this.clearAnchorTimer=window.setTimeout(function(){Squarespace.SectionEditingStripManager.hideOpenStrip();},1700);}},queueLoading:function(A){this.loadQueue.push(A);}};Squarespace.SectionEditingStrip=Class.create({initialize:function(F,A,C,B){this.targetContainerId=F;this.containerId=A;this.activeAnimation=null;this.lagTimer=null;this.visible=false;this.stripHTML="";this.tipVisible=false;this.containerVisible=false;if(C=="page"||C=="widget"||C=="none"){this.createStripBeginHTML();this.createStripElementHTML("remove","javascript:Squarespace.Interaction.doRemoveSection("+this.containerId+");");this.createStripElementHTML("edit","javascript:Squarespace.Interaction.doModifySection("+this.containerId+");");this.createStripEndHTML();}this.createStripBeginHTML(true);if(C=="recovery"){this.createStripElementHTML("recover","javascript:Squarespace.Interaction.doRecoverSection("+this.containerId+");");}else{if(C=="none"){this.createStripElementHTML("add page","javascript:Squarespace.Interaction.doAddComponent("+this.containerId+",'page');");this.createStripElementHTML("widget","javascript:Squarespace.Interaction.doAddComponent("+this.containerId+",'widget');");}else{if(C=="page"||C=="navigation"){this.createStripElementHTML("add page","javascript:Squarespace.Interaction.doAddComponent("+this.containerId+",'page');");}else{if(C=="widget"){this.createStripElementHTML("add widget","javascript:Squarespace.Interaction.doAddComponent("+this.containerId+",'widget');");}}}}this.createStripEndHTML();Squarespace.SectionEditingStripManager.queueLoading(this);},attach:function(){this.targetContainer=D.get(this.targetContainerId);if(this.targetContainer){this.container=document.createElement("div");D.setStyle(this.container,"position","absolute");D.setStyle(this.container,"text-align","right");D.setStyle(this.container,"overflow","hidden");D.setStyle(this.container,"width","130px");D.setStyle(this.container,"line-height","10px");D.setStyle(this.container,"z-index","10");this.container.className="floatingLinkContainer";document.body.appendChild(this.container);this.container.innerHTML='<div style="width: 130px;">'+this.stripHTML+'<br style="clear: both;"/></div>';this.container.unifiedWidth=130;this.container.stripObject=this;Squarespace.SectionEditingStripManager.registerStrip(this);}else{}},position:function(){if(!this.containerVisible){return ;}var C=D.getXY(this.container);var B=D.getXY(this.targetContainer);if(C[0]!=B[0]-this.container.unifiedWidth){this.lastX=B[0]-this.container.unifiedWidth;D.setX(this.container,this.lastX);}if(C[1]!=B[1]&&!this.container.animated){var A=new YAHOO.util.Anim(this.container,{top:{to:B[1]-2}},0.5,YAHOO.util.Easing.easeOutStrong);this.container.animated=true;A.onComplete.subscribe(function(G,F,H){H.animated=false;},this.container);A.animate();}},updateXY:function(A,C){if(!A){A=0;}this.containerVisible=true;var B=this.targetContainer;while(B!=null&&(B.tagName=="DIV"||B.tagName=="UL"||B.tagName=="LI")){if(D.getStyle(B,"display")=="none"){this.containerVisible=false;break;}B=B.parentNode;}if(this.containerVisible){this.lastX=D.getX(this.targetContainer)-this.container.unifiedWidth;this.lastY=D.getY(this.targetContainer)+this.additionalY(C);D.setXY(this.container,[this.lastX+A,this.lastY]);}this.calculated=true;},additionalY:function(I){var H=0;var B=parseInt(document.body.style.paddingTop);if(!B){B=0;}if((I=="initial"&&B==40)||document.location.href.indexOf("/configuration/")!=-1){return(H-2);}if(this.targetContainer.heightBoost&&(I=="style"||I=="preview")){H=this.targetContainer.heightBoost;}if(B<40){H+=(40-B);}var G=D.getElementsByClassName("structureLinkTable","table");for(var C=0;C<G.length;++C){if((this.targetContainer.id.startsWith("navigationTop")&&(G[C].innerHTML.indexOf("pre-header code")!=-1||G[C].innerHTML.indexOf("pre-canvas code")!=-1))||(this.targetContainer.id.startsWith("navigationBottom")&&(G[C].innerHTML.indexOf("website header")!=-1||G[C].innerHTML.indexOf("pre-header code")!=-1||G[C].innerHTML.indexOf("pre-canvas code")!=-1||G[C].innerHTML.indexOf("banner code")!=-1))||(this.targetContainer.className!="horizontalNavigationBar"&&(G[C].innerHTML.indexOf("website header")!=-1||G[C].innerHTML.indexOf("banner code")!=-1||G[C].innerHTML.indexOf("pre-header code")!=-1||G[C].innerHTML.indexOf("pre-canvas code")!=-1||G[C].innerHTML.indexOf("post-header code")!=-1||G[C].innerHTML.indexOf("pre-body code")!=-1))){H+=20;}}var A=D.getAncestorBy(this.targetContainer,function(K){return(K.id=="navigationBottom"||K.className.indexOf("verticalNavigationBar")!=-1);});if(A){var F=0;for(var C=0;C<A.childNodes.length;++C){var J=A.childNodes[C];if(J.tagName!="DIV"){continue;}if(I=="content"&&!J.containerStripVal){J.containerStripVal=((D.getElementsByClassName("adminLinkTable","table",J).length*20));}if(J==this.targetContainer){break;}if(I=="content"){H+=-J.containerStripVal;}}}return(H-2);},createStripBeginHTML:function(A){this.stripHTML+='<div style="float: right;"><table class="adminLinkTable managedLinkTable '+(A?"addIcon":"")+' " cellspacing="0" cellpadding="0" style="overflow: hidden; display: block; float: right; height: 20px;">'+'<tr nowrap="nowrap"><td class="adminSegmentBoxBegin" nowrap="nowrap">&nbsp;</td>';},createStripElementHTML:function(B,A){this.stripHTML+='<td class="adminSegmentBoxContent" nowrap="nowrap"><span class="adminLinkWrapper"><a href="'+A+'">'+B+"</a></span></td>";},createStripEndHTML:function(){this.stripHTML+='<td class="adminSegmentBoxContent" nowrap="nowrap">&nbsp;</td></tr></table></div>';}});Squarespace.ComponentEditingStrip=Class.create({initialize:function(C,B,A){this.containerId=B;this.containerData=A;this.targetContainerName=C;this.hideTimer=null;Squarespace.SectionEditingStripManager.queueLoading(this);},attach:function(){this.targetContainer=D.get(this.targetContainerName);E.addListener(this.targetContainer,"mouseover",this.showEditingStrip,0,this);E.addListener(this.targetContainer,"mouseout",this.hideEditingStrip,0,this);},hideEditingStrip:function(A){Squarespace.SectionEditingStripManager.startAutoHide();},showEditingStrip:function(C){Squarespace.SectionEditingStripManager.clearAutoHide();if(!Squarespace.SectionEditingStripManager.isStripShowable(this,C)){return ;}var F;if(!this.stripContainer){var A=this.containerData.enabled;this.stripContainer=document.createElement("div");D.setStyle(this.stripContainer,"position","absolute");D.setStyle(this.stripContainer,"text-align","left");D.setStyle(this.stripContainer,"overflow","hidden");D.setStyle(this.stripContainer,"height","20px");D.setStyle(this.stripContainer,"width","0px");D.setStyle(this.stripContainer,"z-index","10");document.body.appendChild(this.stripContainer);if(this.containerData.type=="recovery"){this.stripContainer.innerHTML='<table style="display: inline;" class="adminLinkTable managedLinkTable" cellspacing="0" cellpadding="0">'+'<tr nowrap="nowrap"><td class="adminSegmentBoxContent" nowrap="nowrap"><span class="adminLinkWrapper"><a href="javascript:Squarespace.Interaction.doRecoverComponent('+this.containerId+');">recover</a></span></td>'+'<td class="adminSegmentBoxEnd" nowrap="nowrap">&nbsp;</td> </tr>'+"</table>";}else{this.stripContainer.innerHTML='<table style="display: inline;" class="adminLinkTable managedLinkTable" cellspacing="0" cellpadding="0">'+'<tr nowrap="nowrap"><td class="adminSegmentBoxContent" nowrap="nowrap"><span class="adminLinkWrapper"><a href="javascript:Squarespace.Interaction.doModifyComponent('+this.containerId+');">configure</a></span></td>'+'<td class="adminSegmentBoxContent" nowrap="nowrap"><span class="adminLinkWrapper"><a href="javascript:noop();" id="_containerDisableLink'+this.containerId+'" onclick="javascript:Squarespace.Interaction.doToggleComponentEnabled(event, '+this.containerId+",'"+(A?"disable":"enable")+"');\">"+(A?"disable":"enable")+"</a></span></td>"+'<td class="adminSegmentBoxContent" nowrap="nowrap"><span class="adminLinkWrapper"><a href="javascript:Squarespace.Interaction.doRemoveComponent('+this.containerId+');">remove</a></span></td>'+'<td class="adminSegmentBoxEnd" nowrap="nowrap">&nbsp;</td> </tr>'+"</table>";}E.addListener(this.stripContainer,"mouseover",this.showEditingStrip,0,this);E.addListener(this.stripContainer,"mouseout",this.hideEditingStrip,0,this);}if(!this.shown){this.updateHTML();if(this.anim){this.anim.stop();}var B=D.getXY(this.targetContainer);D.setXY(this.stripContainer,[B[0]+this.targetContainer.offsetWidth,B[1]-2]);this.anim=new YAHOO.util.Anim(this.stripContainer,{width:{to:175}},0.15,YAHOO.util.Easing.easeOutStrong);this.anim.animate();Squarespace.SectionEditingStripManager.setOpenStrip(this);this.shown=true;D.addClass(this.targetContainer,"hovering-strip-focused");}E.stopEvent(C);},updateHTML:function(){if(this.containerData.type!="recovery"){D.get("_containerDisableLink"+this.containerId).innerHTML=(D.hasClass(this.targetContainer,"page-element-disabled")?"enable":"disable");}},position:function(){var C=D.getXY(this.stripContainer);var B=D.getXY(this.targetContainer);if(C[1]!=B[1]-2){var A=new YAHOO.util.Anim(this.stripContainer,{top:{to:B[1]-2}},0.5,YAHOO.util.Easing.easeOutStrong);A.animate();}}});Squarespace.Management={initializeMenu:function(){var A=Squarespace.Constants.HELP_SITE_AUTHED_URL;this.configuration=[{html:'<div style="width: 75px; float: left;"><a id="manager-return-button" href="'+(Squarespace.Constants.MANAGER_RETURN_URL?Squarespace.Constants.MANAGER_RETURN_URL:"/")+'">&nbsp;</a></div>'},{title:"Dashboard",contents:[{title:"Overview",url:"/display/configuration/Home"},{title:"Manage Comments",url:"/display/configuration/CommentManagement"},{title:"Manage Posts",url:"/display/configuration/PostManagement"}]},{title:"Structure",contents:[{title:"Architecture",url:"/display/configuration/Modules"},{title:"Website Settings",url:"/display/configuration/Basic"},{title:"Custom Domain",url:"/display/configuration/Domain"},{title:"URL Shortcuts",url:"/display/configuration/UrlMappings"}]},{title:"Members &amp; Access",contents:[{title:"Member Accounts",url:"/display/configuration/MemberAccounts"},{title:"Member Permissions",url:"/display/configuration/AudiencePermissions"},{title:"IP Access Filters",url:"/display/configuration/HostSettings"}]},{title:"Data &amp; Media",contents:[{title:"File Storage",url:"/display/configuration/GeneralStorage"},{title:"Data Snapshots",url:"/display/configuration/Snapshots"},{title:"Blog Importer",url:"/display/configuration/ImportExport"},{title:"Change Log",url:"/display/configuration/ChangeLog"}]},{title:"Statistics",contents:[{title:"Traffic Overview",url:"/display/configuration/AccessLogOverview"},{title:"Subscribers",url:"/display/configuration/AccessLogSubscribers"},{title:"Referrers",url:"/display/configuration/AccessLogReferrers"},{title:"Search Queries",url:"/display/configuration/AccessLogQueries"},{title:"Popular Content",url:"/display/configuration/AccessLogTopPages"},{title:"Detailed Activity",url:"/display/configuration/AccessLog"}]},{title:"Billing & Support",contents:[{title:"Account Center",url:"/display/configuration/AccountCenter"},{title:"Help &amp Support Center",url:A,newWindow:true},{title:"Tools &amp; Goodies",url:"/display/configuration/Tools"}]}];},show:function(A,H){this.immediate=A;if(this.animating){return ;}this.animating=true;Squarespace.MembershipManagement.hide();if(!this.container){this.container=document.createElement("div");this.container.id="management-strip";this.container.className="management-strip";if(!this.configuration){this.initializeMenu();}var G='<div class="outerWrapper"><div id="management-strip-inner" class="innerWrapper"><div id="management-strip-content" class="innerContent">';var L=Squarespace.URL.removeDirectUrlPrefix(document.location.href);var F=false;for(var C=0;C<this.configuration.length;++C){var K=this.configuration[C];if(K.html){G+=K.html;}else{G+='<div class="management-section '+(this.configuration.length-1==C?" management-section-last":"")+(K.contents.length>5?" management-section-short":"")+'"><div class="section-title">'+K.title+"</div>";for(var B=0;B<K.contents.length;++B){var I=K.contents[B];if(!I.title){continue;}if(I.newWindow){G+='<div class="section-link"><a style="background-image: url(/universal/images/open-off-site.png); width:124px; background-position: 118px 4px; background-repeat: no-repeat;" target="_blank" href="'+I.url+'">'+I.title+"</a></div>";}else{G+='<div class="section-link"><a '+((K.contents.length>5&&(B%2==1))?'style="margin-left: 5px;"':"")+" "+(L.indexOf(I.url)!=-1&&!F?'class="active-section"':"")+' href="javascript:noop();" onclick="javascript:Squarespace.Management.selectTab(\''+I.url+"', this);\">"+I.title+"</a></div>";}if(L.indexOf(I.url)!=-1){F=true;}}G+="</div>";}}G+='<br class="clearer"/></div></div></div>';this.container.innerHTML=G;document.body.appendChild(this.container);this.height=163;}if(A){D.setStyle(this.container,"width","100%");D.setStyle(this.container,"height",this.height+"px");D.setStyle(this.container,"top","58px");Squarespace.Degraded.filterOpacity(this.container,"1");if(H){new YAHOO.util.Anim("manager-top-bar",{opacity:{to:1}},0.2,YAHOO.util.Easing.easeOutStrong).animate();}else{D.setStyle("manager-top-bar","opacity","1");}}else{D.setStyle(this.container,"position","fixed");D.setStyle(this.container,"width","100%");D.setStyle(this.container,"height","0px");D.setStyle(this.container,"z-index","10000");D.setStyle(this.container,"display","block");D.setStyle(this.container,"top","58px");D.setStyle(this.container,"opacity","0");D.setStyle("management-strip-inner","margin-left","-50px");var J=new YAHOO.util.Anim(this.container,{opacity:{to:1},height:{to:this.height}},0.4,YAHOO.util.Easing.easeOutStrong);J.onComplete.subscribe(function(N,M,O){O.animating=false;if(YAHOO.env.ua.ie>0){O.container.style.filter="";}},this);J.animate();new YAHOO.util.ColorAnim(D.get("noticeAreaManagerLink-configure"),{backgroundColor:{from:"#353535",to:"#202020"}},0.4,YAHOO.util.Easing.easeOutStrong).animate();}this.visible=true;},selectTab:function(C,B){if(B){var A=new YAHOO.util.Anim(B,{opacity:{to:0.2}},0.08,YAHOO.util.Easing.easeOutStrong);A.onComplete.subscribe(function(G,F,H){var F=new YAHOO.util.Anim(H,{opacity:{to:1}},0.08,YAHOO.util.Easing.easeOutStrong);F.onComplete.subscribe(function(J,I,K){var I=new YAHOO.util.Anim(K,{opacity:{to:0.2}},0.08,YAHOO.util.Easing.easeOutStrong);I.onComplete.subscribe(function(M,L,N){new YAHOO.util.Anim(N,{opacity:{to:1}},0.08,YAHOO.util.Easing.easeOutStrong).animate();},K);I.animate();},H);F.animate();},B);A.animate();}if(this.immediate){document.location.href=C;}else{this.topMask=document.createElement("div");D.setStyle(this.topMask,"position","absolute");D.setStyle(this.topMask,"top",D.getDocumentScrollTop()+"px");D.setStyle(this.topMask,"z-index","10000");D.setStyle(this.topMask,"left","0px");D.setStyle(this.topMask,"width",D.getViewportWidth()+"px");D.setStyle(this.topMask,"height","0px");D.setStyle(this.topMask,"border-bottom","1px solid #383838");D.setStyle(this.topMask,"background","#101010");this.topMask.innerHTML="&nbsp;";document.body.appendChild(this.topMask);new YAHOO.util.Anim(this.topMask,{height:{to:58}},0.2,YAHOO.util.Easing.easeOutStrong).animate();new YAHOO.util.Anim("management-strip-inner",{marginLeft:{to:0}},0.3,YAHOO.util.Easing.easeOutStrong).animate();var A=new YAHOO.util.Anim(this.container,{marginLeft:{to:0}},0.3,YAHOO.util.Easing.easeOutStrong);A.onComplete.subscribe(function(G,F,H){document.location.href=H;},C);A.animate();}},hide:function(B){if(!this.visible){return ;}if(B){document.location.href=B;return ;}var A=new YAHOO.util.Anim(this.container,{opacity:{to:0},height:{to:0}},0.4,YAHOO.util.Easing.easeOutStrong);A.onComplete.subscribe(function(F,C,G){D.setStyle(G.container,"display","none");},this);A.animate();new YAHOO.util.ColorAnim(D.get("noticeAreaManagerLink-configure"),{backgroundColor:{from:"#151515",to:"#353535"}},0.4,YAHOO.util.Easing.easeOutStrong).animate();this.visible=false;},toggle:function(){if(this.visible){this.hide();}else{this.show();}}};Squarespace.MembershipManagement={move:function(){if(!this.visible){return ;}this.finalPosition=false;if(this.animating){return ;}this.animating=true;this.finalPosition=true;var A=new YAHOO.util.Anim(this.container,{top:{to:(D.getDocumentScrollTop()+58)}},0.25,YAHOO.util.Easing.easeOutStrong);A.onComplete.subscribe(function(C,B,F){F.animating=false;if(!F.finalPosition){F.move();}},this);A.animate();},show:function(A,H){Squarespace.Management.hide();this.immediate=A;if(this.animating){return ;}this.animating=true;if(!this.container){this.container=document.createElement("div");this.container.id="member-management-strip";this.container.className="management-strip";if(Squarespace.Constants.ADMINISTRATION_UI){this.configuration=[{title:"Membership Management",contents:[{title:"Member Profile",url:"/display/configuration/CreateOrModifyMemberAccount?accountId="+Squarespace.Constants.AUTHENTICATED_USER_ID},{title:"Subscribe to Page Updates",id:"membershipSubscriptionLink",url:"javascript:Squarespace.MembershipManagement.changeSubscription();"}]}];}else{this.configuration=[{title:"Membership Management",contents:[{title:"Edit Profile",url:"/member/"+Squarespace.Constants.AUTHENTICATED_USER_LOGIN},{title:"Subscribe to Page Updates",id:"membershipSubscriptionLink",url:"javascript:Squarespace.MembershipManagement.changeSubscription();"}]}];}var G='<div class="outerWrapper"><div id="member-management-strip-inner">';var L=Squarespace.URL.removeDirectUrlPrefix(document.location.href);var F=false;for(var C=0;C<this.configuration.length;++C){var K=this.configuration[C];if(K.html){G+=K.html;}else{G+='<div class="management-section '+(this.configuration.length-1==C?"management-section-last":"")+'"><div class="section-title">'+K.title+"</div>";for(var B=0;B<K.contents.length;++B){var I=K.contents[B];G+='<div class="section-link"><a '+(I.id?'id="'+I.id+'" ':"")+(L.indexOf(I.url)!=-1&&!F?'class="active-section"':"")+' href="'+(I.url.startsWith("javascript:")?I.url:"javascript:Squarespace.MembershipManagement.selectTab('"+I.url+"');")+'">'+I.title+"</a></div>";if(L.indexOf(I.url)!=-1){F=true;}}G+="</div>";}}G+='<br class="clearer"/></div></div>';this.container.innerHTML=G;document.body.appendChild(this.container);this.height=110;if(!A){E.addListener(document,"scroll",this.move,null,this);E.addListener(document,"resize",this.move,null,this);}}this.updateSubscriptionLink();D.setStyle(this.container,"left",D.getX("noticeAreaManagerLink-user")+"px");D.setStyle(this.container,"width",(210)+"px");D.setStyle(this.container,"height","0px");D.setStyle(this.container,"z-index","10000");D.setStyle(this.container,"display","block");D.setStyle(this.container,"top",(D.getDocumentScrollTop()+58)+"px");Squarespace.Degraded.filterOpacity(this.container,"0");D.setStyle("management-strip-inner","margin-left","-50px");var J=new YAHOO.util.Anim(this.container,{opacity:{to:1},height:{to:this.height}},0.4,YAHOO.util.Easing.easeOutStrong);J.onComplete.subscribe(function(N,M,O){O.animating=false;},this);J.animate();new YAHOO.util.ColorAnim(D.get("noticeAreaManagerLink-user"),{backgroundColor:{from:"#353535",to:"#202020"}},0.4,YAHOO.util.Easing.easeOutStrong).animate();this.visible=true;},updateSubscriptionLink:function(){if(!Squarespace.Constants.PAGE_SUBSCRIPTION_STATE){D.get("membershipSubscriptionLink").innerHTML="(No Subscription Available)";D.setStyle("membershipSubscriptionLink","color","#777");}else{if(Squarespace.Constants.PAGE_SUBSCRIPTION_STATE=="direct"){D.get("membershipSubscriptionLink").innerHTML="Remove Update Subscription";}else{if(Squarespace.Constants.PAGE_SUBSCRIPTION_STATE=="indirect"){D.get("membershipSubscriptionLink").innerHTML="(Subscribed to Parent Module)";D.setStyle("membershipSubscriptionLink","color","#777");}else{if(Squarespace.Constants.PAGE_SUBSCRIPTION_STATE=="inactive"){D.get("membershipSubscriptionLink").innerHTML="Subscribe to Page Updates &raquo;";}}}}},changeSubscription:function(){if(Squarespace.Constants.PAGE_SUBSCRIPTION_STATE=="direct"){Squarespace.Interaction.SaveTip.setHTML("Removing Subscription","Removing your subscription to email updates for this page.");Squarespace.Interaction.SaveTip.show();Squarespace.URL.fastCall("/process/admin/ModifySubscription?action=remove&moduleId="+Squarespace.Constants.PAGE_SUBSCRIPTION_MODULE_ID+(Squarespace.Constants.PAGE_SUBSCRIPTION_CONTENT_ID?"&contentId="+Squarespace.Constants.PAGE_SUBSCRIPTION_CONTENT_ID:"")+"&SS_AUTHKEY="+Squarespace.Constants.SS_AUTHKEY,function(){Squarespace.Constants.PAGE_SUBSCRIPTION_STATE="inactive";Squarespace.MembershipManagement.updateSubscriptionLink();});this.hide();}else{if(Squarespace.Constants.PAGE_SUBSCRIPTION_STATE=="inactive"){Squarespace.Interaction.SaveTip.setHTML("Creating Subscription","You will now be notified via email when this page is updated.");Squarespace.Interaction.SaveTip.show();Squarespace.URL.fastCall("/process/admin/ModifySubscription?action=create&moduleId="+Squarespace.Constants.PAGE_SUBSCRIPTION_MODULE_ID+(Squarespace.Constants.PAGE_SUBSCRIPTION_CONTENT_ID?"&contentId="+Squarespace.Constants.PAGE_SUBSCRIPTION_CONTENT_ID:"")+"&SS_AUTHKEY="+Squarespace.Constants.SS_AUTHKEY,function(){Squarespace.Constants.PAGE_SUBSCRIPTION_STATE="direct";Squarespace.MembershipManagement.updateSubscriptionLink();});this.hide();}}},selectTab:function(A){document.location.href=A;},hide:function(){if(!this.visible){return ;}var A=new YAHOO.util.Anim(this.container,{opacity:{to:0},height:{to:0}},0.4,YAHOO.util.Easing.easeOutStrong);A.onComplete.subscribe(function(C,B,F){D.setStyle(F.container,"display","none");},this);A.animate();new YAHOO.util.ColorAnim(D.get("noticeAreaManagerLink-user"),{backgroundColor:{from:"#151515",to:"#353535"}},0.4,YAHOO.util.Easing.easeOutStrong).animate();this.visible=false;},toggle:function(){if(this.visible){this.hide();}else{this.show();}}};Squarespace.StyleEditor={immediate:false,height:333,headerHeight:49,iframeHeight:284,_construct:function(){if(!this.container){this.container=document.createElement("div");this.container.id="appearance-container";this.container.className="appearance-container";document.body.appendChild(this.container);D.setStyle(this.container,"display","none");D.setStyle(this.container,"position","absolute");D.setStyle(this.container,"width",D.getViewportWidth()+"px");D.setStyle(this.container,"height",this.height+"px");E.addListener(window,"scroll",this.move.bind(this));E.addListener(window,"resize",this.move.bind(this));this.visible=false;var A;if(this.immediate){this.currentTab=Squarespace.Cookie.get("ADMIN_APPEARANCE_MODE");if(!this.currentTab){this.currentTab="Template & Styles";}A="/display/admin/Appearance?section="+encodeURIComponent(this.currentTab);}else{A="/universal/blank.html";}this.container.innerHTML='<div class="appearance-container-header" id="appearance-container-header"><div id="appearance-container-tabs"></div><iframe frameborder="0" id="appearance-container-frame" src="'+A+'" onload="Squarespace.StyleEditor.onTabContentLoaded()"></iframe></div>';D.setStyle("appearance-container-header","background","url(/universal/images/managementui/configure-style.png) 30px 6px no-repeat");D.setStyle("appearance-container-header","height",this.iframeHeight+"px");D.setStyle(this.container,"left","0px");D.setStyle("appearance-container-frame","height","100%");D.setStyle("appearance-container-frame","width",D.getViewportWidth()+"px");this.expander=document.createElement("div");this.expander.innerHTML="&nbsp;";document.body.appendChild(this.expander);this.resizeLink=document.createElement("div");this.resizeLink.href="javascript:noop();";this.resizeLink.className="appearance-container-resize-link";this.resizeLink.style.position="absolute";this.resizeLink.style.top="12px";this.resizeLink.style.right="12px";this.container.appendChild(this.resizeLink);this.aside=false;}},show:function(A){this.immediate=A;this._construct();if(!this.visible){if(this.activeAnimation){this.activeAnimation.stop();}Squarespace.Overlay.hideBadObjects();D.setStyle(this.container,"display","block");D.setStyle(this.container,"position","fixed");D.setStyle(this.container,"top",(D.getViewportHeight()-this.height)+"px");D.setStyle(this.container,"left",D.getViewportWidth()+"px");Squarespace.Degraded.filterOpacity(this.container,"0");D.setStyle("appearance-container-frame","visibility","hidden");new YAHOO.util.Anim(this.expander,{height:{to:this.height}},0.4,YAHOO.util.Easing.easeOutStrong).animate();var B=Squarespace.Cookie.get("ADMIN_APPEARANCE_MODE");if(!B){B="Template & Styles";}if(this.immediate){Squarespace.Degraded.filterOpacity(this.container,"1.0");D.setStyle(this.container,"left","0px");this.selectTab(B);}else{this.activeAnimation=new YAHOO.util.Anim(this.container,{opacity:{from:0.4,to:1},left:{from:D.getViewportWidth(),to:0}},0.4,YAHOO.util.Easing.easeOutStrong);this.activeAnimation.onComplete.subscribe(function(F,C,G){G.activeAnimation=null;},this);this.activeAnimation.animate();this.selectTab(B);}}},max:function(){if(this.aside){this.maxmin();}},min:function(){if(!this.aside){this.maxmin();}},detach:function(A){if(!D.hasClass(A,"disabled")){Squarespace.DetachedCssEditor.initialize();this.aside=false;this.maxmin(true);}},attach:function(){Squarespace.DetachedCssEditor.close();this.aside=true;this.maxmin(true);},maxmin:function(B){if(this.aside){if(B){Squarespace.Degraded.filterOpacity(this.container,"1");D.setStyle(this.container,"height",this.height+"px");D.setStyle(this.container,"top",(D.getViewportHeight()-this.height)+"px");}else{var A=new YAHOO.util.Anim(this.container,{opacity:{to:1},height:{to:this.height},top:{by:-(this.height-this.headerHeight)}},0.4,YAHOO.util.Easing.easeOutStrong);A.animate();}this.aside=false;this.setResizeLinks();}else{D.setStyle(this.container,"overflow","hidden");if(B){D.setStyle(this.container,"opacity",0.9);D.setStyle(this.container,"height",this.headerHeight+"px");D.setStyle(this.container,"top",(D.getViewportHeight()-this.headerHeight)+"px");}else{var A=new YAHOO.util.Anim(this.container,{opacity:{to:0.9},height:{to:this.headerHeight},top:{by:(this.height-this.headerHeight)}},0.4,YAHOO.util.Easing.easeOutStrong);A.animate();}this.aside=true;this.setResizeLinks();}if(!Squarespace.DetachedCssEditor.isActive()){window.parent.D.removeClass("icon-detach","disabled");}},isVisible:function(){return(this.visible);},setTabMode:function(A){this.tabMode=A;if(this.visible){this.selectTab(this.currentTab);}},selectTab:function(C,B){var A=this.currentTab;this.currentTab=C;tabs="";if(this.tabMode!="loading"){tabs+=this.addTabLink("Template & Styles");tabs+=this.addTabLink("Banner & Navigation");tabs+=this.addTabLink("Fonts, Colors & Sizes");tabs+=this.addTabLink("Custom CSS");tabs+=this.addTabLink("Settings");}D.get("appearance-container-tabs").innerHTML=tabs;Squarespace.Cookie.set("ADMIN_APPEARANCE_MODE",C);if(C!=A||B){this.loadTab();}},loadTab:function(){D.get("appearance-container-frame").src="/display/admin/Appearance?section="+encodeURIComponent(this.currentTab);this.setResizeLinks();if(Squarespace.DetachedCssEditor.isActive()&&this.currentTab=="Custom CSS"){this.aside=false;this.maxmin(true);Squarespace.DetachedCssEditor.focus();}},onTabContentLoaded:function(){if(this.aside&&this.currentTab!="Custom CSS"){YAHOO.lang.later(50,this,function(){this.maxmin();});}else{if(this.aside&&this.currentTab=="Custom CSS"&&!Squarespace.DetachedCssEditor.isActive()){this.maxmin();}}},addTabLink:function(A){return('<a class="'+(this.currentTab==A?"appearance-container-link-selected":"appearance-container-link")+'"href="javascript:Squarespace.StyleEditor.selectTab(\''+A+"',true);\">"+A+"</a> &nbsp;&nbsp;&nbsp;");},setResizeLinks:function(){var B="/universal/images/managementui/";var A="";if(this.currentTab=="Custom CSS"){if(Squarespace.DetachedCssEditor.isActive()){A="<a href='javascript:noop();' id='icon-resize' class='resize-link left' onclick='Squarespace.StyleEditor.attach();'><img src='"+B+"icon-maximized-14-light.png'/></a>"+"<a href='javascript:noop();' id='icon-detach' class='resize-link right' onclick='Squarespace.DetachedCssEditor.focus();'><img src='"+B+"icon-popout-14-light.png'/></a>";}else{if(this.aside){A="<a href='javascript:noop();' id='icon-resize' class='resize-link left' onclick='Squarespace.StyleEditor.maxmin();'><img src='"+B+"icon-maximized-14-light.png'/></a>"+"<a href='javascript:noop();' id='icon-detach' class='resize-link right disabled' onclick='Squarespace.StyleEditor.detach(this);'><img src='"+B+"icon-popout-14-light.png'/></a>";}else{A="<a href='javascript:noop();' id='icon-resize' class='resize-link left' onclick='Squarespace.StyleEditor.min();'><img src='"+B+"icon-minimized-14-light.png'/></a>"+"<a href='javascript:noop();' id='icon-detach' class='resize-link right disabled' onclick='Squarespace.StyleEditor.detach(this);'><img src='"+B+"icon-popout-14-light.png'/></a>";}}}else{if(this.aside){A="<a href='javascript:noop();' class='resize-link single' onclick='Squarespace.StyleEditor.maxmin();'><img src='"+B+"icon-maximized-14-light.png'/></a>";}else{A="<a href='javascript:noop();' class='resize-link single' onclick='Squarespace.StyleEditor.min();'><img src='"+B+"icon-minimized-14-light.png'/></a>";}}this.resizeLink.innerHTML=A;},ready:function(){D.setStyle("appearance-container-frame","visibility","visible");this.immediate=false;this.visible=true;},hide:function(){var A=D.get("appearance-container-frame");if(A&&this.visible){A.src="/universal/blank.html";D.setStyle(A,"visibility","hidden");this.activeAnimation=new YAHOO.util.Anim(this.container,{opacity:{to:0}},0.4,YAHOO.util.Easing.easeOutStrong);this.activeAnimation.onComplete.subscribe(function(C,B,F){D.setStyle(this.getEl(),"display","none");F.visible=false;F.currentTab=null;if(F.aside){F.maxmin(true);}},this);this.activeAnimation.animate();new YAHOO.util.Anim(this.expander,{height:{to:0}},0.4,YAHOO.util.Easing.easeOutStrong).animate();Squarespace.Overlay.showBadObjects();}},move:function(A){if(this.visible){if(D.getStyle(this.container,"position")!="fixed"){D.setStyle(this.container,"top",(D.getViewportHeight()+D.getDocumentScrollTop()-this.height+(this.aside?this.height-this.headerHeight:0))+"px");}else{D.setStyle(this.container,"top",(D.getViewportHeight()-this.height+(this.aside?this.height-this.headerHeight:0))+"px");}D.setStyle(this.container,"width",(D.getViewportWidth())+"px");D.setStyle("appearance-container-frame","width",(D.getViewportWidth())+"px");}}};Squarespace.DetachedCssEditor={DEFAULT_WIDTH:1024,DEFAULT_HEIGHT:740,settings:new Object(),initialize:function(){if(Squarespace.Cookie.get("SS_CSS_DETACHED_EDITOR")){this.settings=YAHOO.lang.JSON.parse(Squarespace.Cookie.get("SS_CSS_DETACHED_EDITOR"));}var A=(this.settings.width)?this.settings.width:this.DEFAULT_WIDTH;var B=(this.settings.height)?this.settings.height:this.DEFAULT_HEIGHT;var F=(this.settings.left)?this.settings.left:(screen.width/2)-(A/2);var C=(this.settings.top)?this.settings.top:(screen.height/2)-(B/2);window.parent.detached_window=window.open("/display/admin/Appearance?section=Custom%20CSS&detached=true","","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width="+A+", height="+B+", screenX="+F+", left="+F+", screenY="+C+", top="+C);window.parent.detached_window_active=true;E.addListener(window.parent.detached_window,"resize",this.resize.bind(this));E.addListener(window.parent.detached_window,"load",this.load.bind(this));window.parent.detached_window.onunload=this.unload;this.saveSettings(A,B,F,C);},unload:function(){if(this.D.hasClass("styleHolder","detached")){Squarespace.DetachedCssEditor.close();if(Squarespace.StyleEditor.currentTab=="Custom CSS"){Squarespace.StyleEditor.max();}}},isActive:function(){if(window.parent.detached_window){return(!window.parent.detached_window.closed);}else{return false;}},focus:function(){window.parent.detached_window.focus();},close:function(){var A=window.parent.detached_window;if(A){this.saveSettings(A.outerWidth,A.outerHeight,A.screenX,A.screenY);if(Squarespace.StyleEditor.currentTab=="Custom CSS"){A.opener.frames["appearance-container-frame"].Squarespace.CssEditor.refresh();}A.close();}window.parent.detached_window_active=false;window.parent.detached_window=null;},saveSettings:function(A,B,F,C){this.settings["width"]=A;this.settings["height"]=B;this.settings["left"]=F;this.settings["top"]=C;Squarespace.Cookie.set("SS_CSS_DETACHED_EDITOR",YAHOO.lang.JSON.stringify(this.settings));},load:function(){var B=window.parent.detached_window;var A=B.D.get("cssWrapper").clientHeight;B.D.setStyle("CodeMirror","height",(A-90)+"px");},resize:function(){var B=window.parent.detached_window;var A=B.D.get("cssWrapper").clientHeight;B.D.setStyle("CodeMirror","height",(A-90)+"px");}};Squarespace.CssEditor={CSS_WRAPPER_PADDING:40,CSS_ACTIONS_PADDING:40,settingsVisible:false,editor:null,settings:new Object(),initialize:function(A){this.editor=A.fromTextArea(document.getElementById("customCss"),{theme:"light",onChange:this.enableSave,onKeyEvent:this.onKeyEvent});D.addClass(this.editor.getWrapperElement(),"cm-s-light");D.addClass(this.editor.getWrapperElement(),"font-style-normal");this.editor.getWrapperElement().id="CodeMirror";this.refresh();if(Squarespace.DetachedCssEditor.isActive()){}else{window.parent.D.removeClass("icon-detach","disabled");}},refresh:function(){if(Squarespace.Cookie.get("SS_CSS_EDITOR")){this.settings=YAHOO.lang.JSON.parse(Squarespace.Cookie.get("SS_CSS_EDITOR"));(this.settings.lineNumbers)?this.toggleOption("lineNumbers"):"";(this.settings.matchBrackets)?this.toggleOption("matchBrackets"):"";if(this.settings.theme){this.setEditorOption("theme",this.settings.theme);}if(this.settings.fontStyle){this.setFontStyle(this.settings.fontStyle);}}D.get("theme-dropdown-label").innerHTML=this.getTheme();this.editor.refresh();},adjustWrapperBackground:function(){var A=this.editor.getOption("theme");var B=this.editor.getWrapperElement();B.className=B.className.replace(/cm-s-\w+/,"cm-s-"+A);},onKeyEvent:function(B,A){if(A.type=="keydown"){if(A.metaKey&&A.keyCode==191){Squarespace.CssEditor.toggleComment();}else{if(A.metaKey&&A.keyCode==83){A.stop();save();}else{if(A.metaKey&&A.keyCode==70){A.stop();toggleSearch();}}}}},enableSave:function(){Squarespace.Form.enableButton("saveButton","Save");},setFontStyle:function(A){var B=this.editor.getWrapperElement();B.className=B.className.replace(/font-style-\w+/,"font-style-"+A);this.setEditorOption("fontStyle",A);},getFontStyle:function(){var A=this.editor.getWrapperElement();if(D.hasClass(A,"font-style-small")){return"small";}else{if(D.hasClass(A,"font-style-normal")){return"normal";}else{if(D.hasClass(A,"font-style-large")){return"large";}else{return"normal";}}}},getTheme:function(){return this.editor.getOption("theme");},setEditorOption:function(A,B){this.editor.setOption(A,B);this.editor.refresh();this.settings[A]=B;Squarespace.Cookie.set("SS_CSS_EDITOR",YAHOO.lang.JSON.stringify(this.settings));if(A=="theme"){this.adjustWrapperBackground();}},toggleOption:function(A){var B=this.editor.getOption(A);this.setEditorOption(A,!B);(B)?D.removeClass(D.get("setting_"+A),"selected"):D.addClass(D.get("setting_"+A),"selected");return !B;2;},performAction:function(B,A){this.editor[B]();},performIndention:function(C){var B=this.getSelectedRange();for(var A=B.start.line;A<=B.end.line;A++){(C)?this.editor.indentLine(A,true):this.editor.indentLine(A,false);}},getSelectedRange:function(){var A=new Object();A.start=this.editor.getCursor(true);A.end=this.editor.getCursor(false);return A;},toggleComment:function(){var A=this.getSelectedRange();var C=this.editor.getLine(A.start.line);var F=this.editor.getLine(A.end.line);var B=this.ltrim(C);if(B.substring(0,2)=="/*"){if(C==F){C=C.replace("/* ","");C=C.replace("/*","");C=C.replace(" */","");C=C.replace("*/","");this.editor.setLine(A.start.line,C);}else{C=C.replace("/* ","");C=C.replace("/*","");this.editor.setLine(A.start.line,C);F=F.replace(" */","");F=F.replace("*/","");this.editor.setLine(A.end.line,F);}}else{if(B.substring(0,2)=="//"){C=C.replace("// ","");C=C.replace("//","");this.editor.setLine(A.start.line,C);}else{if(C==F){this.editor.setLine(A.start.line,"/* "+C+" */");}else{this.editor.setLine(A.start.line,"/* "+C);this.editor.setLine(A.end.line,F+" */");}}}},toggleSearch:function(B){var A=parseInt(D.getStyle(this.editor.getWrapperElement(),"height"));if(B){D.setStyle(this.editor.getWrapperElement(),"height",(A-42)+"px");}else{D.setStyle(this.editor.getWrapperElement(),"height",(A+42)+"px");}this.editor.refresh();},insertText:function(G){var F=this.editor.getCursor();var A=this.editor.getLine(F.line);var C=A.substring(0,F.ch);var B=A.substring(F.ch);this.editor.setLine(F.line,C+G+B);},saveContentToTextArea:function(){this.editor.save();},trim:function(A){return A.replace(/^\s+|\s+$/g,"");},ltrim:function(A){return A.replace(/^\s+/,"");},rtrim:function(A){return A.replace(/\s+$/,"");}};Squarespace.AnchoredSelectManager={activeControl:null,lastActiveControl:null,checkClose:function(C){if(!this.activeControl){return ;}if(C.keyCode&&C.keyCode!=9){return ;}var G=new YAHOO.util.Point(E.getXY(C));var F=E.getTarget(C);var A=D.getRegion(this.activeControl.getAnchoredField());var B=false;if((A&&A.contains(G))||D.getRegion(this.activeControl.getControlDiv()).contains(G)){return ;}if(F!=null&&((F.id&&F.id.startsWith("calPicker"))||F.tagName.toLowerCase()=="option")){return ;}if(!A){B=true;}this.close();},getActiveControl:function(){return(this.activeControl);},getLastActiveControl:function(){return(this.lastActiveControl);},close:function(){if(!this.activeControl){return ;}this.activeControl.hide(true);},focus:function(A){if(this.activeControl){this.activeControl.hide();this.lastActiveControl=this.activeControl;}this.activeControl=A;},blur:function(){this.lastActiveControl=this.activeControl;this.activeControl=null;},isActive:function(A){return(this.activeControl==A);}};Squarespace.AnchoredSelect=Class.create({initialize:function(A){this.loadProperties({clearText:"None",direction:"down"},A);},createControl:function(A,B){this.selectorSetName=A;this.widgetControlDiv=document.createElement("div");D.addClass(this.widgetControlDiv,"yui-skin-sam");D.addClass(this.widgetControlDiv,"squarespace-widgetwrapper-input");this.widgetControlDiv.innerHTML=B;document.body.appendChild(this.widgetControlDiv);this.fieldEl=D.get(A+"Selector");this.valueEl=D.get(A);if(this.getAnchoredFieldType()=="input"){E.addListener(this.fieldEl,"focus",this.show,true,this);E.addListener(this.fieldEl,"keydown",Squarespace.AnchoredSelectManager.checkClose);}else{this.fieldEl.href="javascript:noop();";E.addListener(this.fieldEl,"click",this.show,true,this);}this.fieldEl.readOnly=true;if(!this.valueEl){this.valueEl=new Object();}D.setX(this.widgetControlDiv,10);D.setY(this.widgetControlDiv,10);},getSetName:function(){return(this.selectorSetName);},getControlDiv:function(){return(this.widgetControlDiv);},getAnchoredField:function(){return(this.fieldEl);},getAnchoredFieldType:function(){return(this.fieldEl.tagName=="INPUT"?"input":"text");},onShow:function(){},onHide:function(){},setAnchoredFieldDisplay:function(A){if(this.getAnchoredFieldType()=="input"){this.getAnchoredField().value=A;}else{if(A==""){this.getAnchoredField().innerHTML=this.properties.clearText;}else{this.getAnchoredField().innerHTML=A;}}},getRealValue:function(){return(this.valueEl.value);},setRealValue:function(A){this.valueEl.value=A;},focusField:function(){if(this.getAnchoredFieldType()=="input"){D.addClass(this.getControlDiv(),"squarespace-widgetwrapper-input");D.removeClass(this.getControlDiv(),"squarespace-widgetwrapper-text");}else{D.addClass(this.getControlDiv(),"squarespace-widgetwrapper-text");D.removeClass(this.getControlDiv(),"squarespace-widgetwrapper-input");}D.addClass(this.getAnchoredField(),"input-selected-forced");},blurField:function(){D.removeClass(this.getAnchoredField(),"input-selected-forced");},show:function(C){if(Squarespace.AnchoredSelectManager.activeControl==this){return ;}if(this.anim&&this.anim.isAnimated()){this.anim.onComplete.subscribe(this.show.bind(this));}else{Squarespace.AnchoredSelectManager.focus(this);D.setStyle(this.getControlDiv(),"display","block");if(!this.finalHeight){this.finalHeight=this.getControlDiv().offsetHeight;}D.setStyle(this.getControlDiv(),"height","1px");var B=D.getXY(this.getAnchoredField());var A=(this.getAnchoredFieldType()=="input"?-2:3);if(this.properties.direction=="down"){D.setXY(this.getControlDiv(),[B[0],B[1]+this.fieldEl.offsetHeight+A]);this.focusField();anim=new YAHOO.util.Anim(this.getControlDiv(),{height:{to:this.finalHeight}},0.25,YAHOO.util.Easing.easeOutStrong).animate();}else{D.setXY(this.getControlDiv(),[B[0],B[1]-6]);this.focusField();anim=new YAHOO.util.Anim(this.getControlDiv(),{height:{to:this.finalHeight},top:{by:-this.finalHeight}},0.25,YAHOO.util.Easing.easeOutStrong).animate();}this.onShow();}},hide:function(A){if(A){D.setStyle(this.getControlDiv(),"display","none");}else{if(this.properties.direction=="down"){this.anim=new YAHOO.util.Anim(this.getControlDiv(),{height:{to:1}},0.25,YAHOO.util.Easing.easeOutStrong);}else{this.anim=new YAHOO.util.Anim(this.getControlDiv(),{height:{to:1},top:{by:this.finalHeight}},0.25,YAHOO.util.Easing.easeOutStrong);}this.anim.onComplete.subscribe(function(C,B,F){D.setStyle(F.getControlDiv(),"display","none");F.onHide();},this);this.anim.animate();}this.blurField();this.onHide();Squarespace.AnchoredSelectManager.blur();}});Squarespace.ActionJump=Class.extend(Squarespace.AnchoredSelect,{initialize:function(C,G,B){this.loadProperties({clearable:true,clearText:"None",maxHeight:null,direction:"down"},B);var F='<div class="squarespace-multiselect"><div class="title">'+G+'</div><div class="body"><div '+(this.properties.maxHeight?'style="overflow-y: auto; height: '+this.properties.maxHeight+'px"':"")+">";for(var A=0;A<this.properties.options.length;++A){if(this.properties.options[A].divider){F+='<div style="background: #999; color: #fff; text-transform: uppercase; font-size: 9px; padding: 4px 0px 4px 14px;">'+this.properties.options[A].divider+"</div>";}else{F+='<a href="'+this.properties.options[A].url+'">';F+=this.properties.options[A].title;F+="</a>";}}F+="</div></div></div>";this.createControl(C,F);}});Squarespace.Calendar=Class.extend(Squarespace.AnchoredSelect,{initialize:function(C,B){this.loadProperties({type:"datetime",clearText:"None",clearable:true,direction:"down"},B);var F='<div id="'+C+'_calPickerContainer"></div>';if(this.properties.type=="datetime"){F+='<div class="squarespace-calendar-timewrapper"><select id="'+C+'_calPickerHour" class="select" style="width: 44px; padding: 0;">';for(var A=1;A<=12;++A){F+='<option value="'+A+'">'+A+"</option>";}F+='</select> : <select id="'+C+'_calPickerMinute" class="select" style="width: 44px; padding: 0;">';for(var A=0;A<=9;++A){F+=(YAHOO.env.ua.ie?'<option value="0'+A+'">0'+A+"</option>":'<option value="'+A+'">0'+A+"</option>");}for(var A=10;A<=59;++A){F+='<option value="'+A+'">'+A+"</option>";}F+='</select> <select id="'+C+'_calPickerAMPM" class="select" style="width: 46px; padding: 0;"><option value="AM">AM</option><option value="PM">PM</option></select></div>';}F+='<div class="squarespace-calendar-buttonwrapper">';F+=Squarespace.HTML.createButton("Today","Squarespace.AnchoredSelectManager.getActiveControl().setNow();");F+=Squarespace.HTML.createButton("Clear","Squarespace.AnchoredSelectManager.getActiveControl().setTime('');",false,C+"_calPickerClearButton");F+='<div class="clearer">&nbsp;</div></div>';this.createControl(C,F);this.cal=new YAHOO.widget.Calendar(this.getSetName()+"_calPickerObject",this.getSetName()+"_calPickerContainer");this.cal.selectEvent.subscribe(this.onCalendarChange,this);this.cal.render();if(this.properties.type=="datetime"){E.addListener(this.getSetName()+"_calPickerHour","change",this.onCalendarChange,null,this);E.addListener(this.getSetName()+"_calPickerMinute","change",this.onCalendarChange,null,this);E.addListener(this.getSetName()+"_calPickerAMPM","change",this.onCalendarChange,null,this);}D.addClass(this.getAnchoredField(),"input-calendar");this.updateControlDisplay();},setTime:function(F){if(!Squarespace.AnchoredSelectManager.isActive(this)){this.focusField();setTimeout(this.blurField.bind(this),1000);}var G=null;if(typeof (F)=="string"){if(F.length>0){G=new Date();G.setTime(parseInt(F));}else{G=null;}}else{G=F;}if(G){var B=(G.getFullYear()<1900)?(G.getFullYear()+1900):G.getFullYear();this.cal.cfg.queueProperty("pagedate",(G.getMonth()+1)+"/"+B,false);this.cal.cfg.queueProperty("selected",(G.getMonth()+1)+"/"+G.getDate()+"/"+B,false);this.cal.cfg.fireQueue();this.cal.render();if(this.properties.type=="datetime"){var H=new Date(G);H.setTime(H.getTime()-H.getTimezoneOffset()*60*1000);var A=(H.getTime()%(1000*60*60*24));A=Math.floor(A/(1000*60*60));var C=(H.getTime()%(1000*60*60));C=Math.floor(C/(1000*60));if(A>=12){if(A>12){A-=12;}D.get(this.getSetName()+"_calPickerAMPM").value="PM";}else{if(A==0){A=12;}D.get(this.getSetName()+"_calPickerAMPM").value="AM";}D.get(this.getSetName()+"_calPickerHour").value=A;D.get(this.getSetName()+"_calPickerMinute").value=(YAHOO.env.ua.ie&&C<=9?"0":"")+C;}}else{this.cal.cfg.queueProperty("selected","",false);this.cal.cfg.fireQueue();this.cal.render();if(this.properties.type=="datetime"){D.get(this.getSetName()+"_calPickerHour").value="12";D.get(this.getSetName()+"_calPickerMinute").value=(YAHOO.env.ua.ie?"00":"0");D.get(this.getSetName()+"_calPickerAMPM").value="PM";}}this.setRealValue(G?new String(G.getTime()):"");this.updateControlDisplay();this.onUpdate();},onUpdate:function(){},setNow:function(){this.setTime(new Date());},onCalendarChange:function(G,B,H){if(!H){H=this;}var F=H.cal.getSelectedDates()[0];if(!F){return ;}if(H.properties.type=="datetime"){var C=D.get(H.getSetName()+"_calPickerHour").value;var J=D.get(H.getSetName()+"_calPickerMinute").value;var A=D.get(H.getSetName()+"_calPickerAMPM").value;var I=(1000*60)*parseInt(J);if(A=="AM"&&C=="12"){I+=0;}else{I+=(1000*60*60)*(parseInt(C)+(A=="PM"&&C!="12"?12:0));}F.setTime(F.getTime()+I);}H.setRealValue(new String(F.getTime()));H.updateControlDisplay();H.onUpdate();},updateControlDisplay:function(){if(this.getRealValue().length==0){this.setAnchoredFieldDisplay(this.properties.clearText);return ;}var J=new Date();J.setTime(parseInt(this.getRealValue()));var A=this.cal.cfg.getProperty("WEEKDAYS_LONG")[J.getDay()];var C=J.getDate();var H=this.cal.cfg.getProperty("MONTHS_LONG")[J.getMonth()];var G=(J.getFullYear()<1900)?(J.getFullYear()+1900):J.getFullYear();var B=A+", "+C+" "+H+" "+G;if(this.properties.type=="datetime"){J.setTime(J.getTime()-J.getTimezoneOffset()*60*1000);var F=(J.getTime()%(1000*60*60*24));F=Math.floor(F/(1000*60*60));var I=(J.getTime()%(1000*60*60));I=Math.floor(I/(1000*60));if(F>=12){if(F>12){F-=12;}ampm="PM";}else{if(F==0){F=12;}ampm="AM";}B+=" at "+F+":"+((I<=9?"0":"")+I)+" "+ampm;}this.setAnchoredFieldDisplay(B);},onShow:function(){this.setTime(this.getRealValue());D.get(this.getSetName()+"_calPickerClearButton").style.display=(this.properties.clearable?"inline":"none");}});Squarespace.MultiSelect=Class.extend(Squarespace.AnchoredSelect,{initialize:function(F,B){this.setName=F;this.loadProperties({clearable:true,options:[],controlClass:"input-categories",direction:"down"},B);this.controlHtml='<div class="squarespace-multiselect"><div class="body"><div class="multiselect-options">';this.properties.optionsByValue={};for(var A=0;A<this.properties.options.length;++A){var G=this.properties.options[A];if(!G.toggled){G.toggled=false;}this.properties.optionsByValue[G.value]=G;this.controlHtml+='<a class="';this.controlHtml+=(G.toggled?"multiselect-option-selected":"multiselect-option-none");this.controlHtml+='" id="multiselect-option-';this.controlHtml+=G.value+'" href="javascript:noop();">';this.controlHtml+=G.title;this.controlHtml+="</a>";}if(this.properties.footerHtml){this.controlHtml+='</div><div class="multiselect-footer">';this.controlHtml+=this.properties.footerHtml;}this.controlHtml+="</div></div></div>";this.createControl(this.setName,this.controlHtml);D.setStyle(this.getControlDiv(),"width","196px");var C=this.getRealValue().split(",");for(var A=0;A<C.length;++A){this.toggleOption(C[A]);}this.updateControlDisplay();E.addListener(this.getControlDiv(),"click",function(H,J){var I=E.getTarget(H);if(I&&I.id.startsWith("multiselect-option")){J.toggleOption(parseInt(I.id.substring(19)));}E.stopEvent(H);},this);D.addClass(this.getAnchoredField(),this.properties.controlClass);},addOption:function(G){if(!G.toggled){G.toggled=false;}this.properties.optionsByValue[G.value]=G;var C=document.createElement("a");C.className=(G.toggled?"multiselect-option-selected":"multiselect-option-none");C.id="multiselect-option-"+G.value;C.href="javascript:noop();";C.innerHTML=G.title;var F=null;var A=this.getControlDiv().getElementsByTagName("div");for(var B=0;B<A.length;++B){if(A[B].className.startsWith("multiselect-options")){F=A[B];}}if(F){F.appendChild(C);}},toggleOption:function(B){var A=this.properties.optionsByValue[B];if(!A){return ;}A.toggled=!A.toggled;if(A.toggled){D.addClass("multiselect-option-"+A.value,"multiselect-option-selected");D.removeClass("multiselect-option-"+A.value,"multiselect-option-none");}else{D.addClass("multiselect-option-"+A.value,"multiselect-option-none");D.removeClass("multiselect-option-"+A.value,"multiselect-option-selected");}this.updateControlDisplay();this.updateRealValue();},updateRealValue:function(){var B="";for(i in this.properties.optionsByValue){var A=this.properties.optionsByValue[i];if(A.toggled){if(B.length>0){B+=",";}B+=i;}}this.setRealValue(B);},updateControlDisplay:function(){var B="";for(i in this.properties.optionsByValue){var A=this.properties.optionsByValue[i];if(A.toggled){if(B.length>0){B+=", ";}B+=A.title;}}if(B==""){B="None";}this.setAnchoredFieldDisplay(B);}});Squarespace.Utility={removeModuleContainerClass:function(B,A){var C=D.get("moduleContentWrapper"+B);if(C){D.removeClass(C,A);}C=D.get("navigationTop-moduleContentWrapper"+B);if(C){D.removeClass(C,A);}C=D.get("navigationBottom-moduleContentWrapper"+B);if(C){D.removeClass(C,A);}},addModuleContainerClass:function(B,A){var C=D.get("moduleContentWrapper"+B);if(C){D.addClass(C,A);}C=D.get("navigationTop-moduleContentWrapper"+B);if(C){D.addClass(C,A);}C=D.get("navigationBottom-moduleContentWrapper"+B);if(C){D.addClass(C,A);}},backgroundAction:function(B,A){Squarespace.Interaction.SaveTip.setHTML(B,"Please wait while we make the requested changes.");Squarespace.Interaction.SaveTip.show();Squarespace.URL.fastCall(A+"&SSScrollPosition="+D.getDocumentScrollTop(window.parent.document),function(){Squarespace.URL.reload();});}};Squarespace.Interaction.EditingTip=new Squarespace.FixedPositionTip("Field Properties","Please wait.",{className:"helptip-style-dialog-wide",icon:"../../../universal/images/helptip-edit.png",orientation:"targeted"});Squarespace.Interaction.EnablePageTip=new Squarespace.FixedPositionTip("Page Disabled &nbsp; (Invisible to the Public)",'<div style="height: 24px">'+'<a class="button important" href="javascript:noop();" onclick="Squarespace.Interaction.doToggleComponentEnabled(null, Squarespace.Interaction.EnablePageTip.args.moduleId);"><span>Enable Page &raquo;</span></a>'+"</div>",{xMargin:15,yMargin:15,orientation:"bottom-left",viewportFixed:true});Squarespace.Interaction.StylePreviewTip=new Squarespace.FixedPositionTip("Design Preview &nbsp; (Invisible to the Public)",'<div style="height: 24px">'+'<a style="margin-left: 5px;" class="button" href="javascript:noop();" onclick="Squarespace.Interaction.StylePreviewTip.cancelPreview();"><span>Cancel</span></a>'+'<a style="margin-left: 5px;" class="button important" href="javascript:noop();" onclick="Squarespace.Interaction.StylePreviewTip.enableStyle();"><span>Enable Style &raquo;</span></a>'+"</div>",{xMargin:15,yMargin:15,orientation:"bottom-left",viewportFixed:true});Squarespace.Interaction.StylePreviewTip.enableStyle=function(){Squarespace.URL.fastCall("/process/admin/ActivateVisualStyle?styleId="+Squarespace.Interaction.StylePreviewTip.args.previewStyleId+"&SS_AUTHKEY="+Squarespace.Constants.SS_AUTHKEY);Squarespace.Interaction.StylePreviewTip.hide();var A=D.get("appearance-container-frame");if(A&&A.contentWindow&&A.contentWindow.previewStyle){A.contentWindow.updateOriginalStyleId(Squarespace.Interaction.StylePreviewTip.args.previewStyleId);}};Squarespace.Interaction.StylePreviewTip.cancelPreview=function(){if(Squarespace.Interaction.StylePreviewTip.args.reloadOnCancel){Squarespace.URL.fastCall("/process/admin/SetPreviewLayout?SS_AUTHKEY="+Squarespace.Constants.SS_AUTHKEY,function(){Squarespace.URL.reload();});}else{Squarespace.URL.fastCall("/process/admin/SetPreviewLayout?SS_AUTHKEY="+Squarespace.Constants.SS_AUTHKEY);Squarespace.Interaction.StylePreviewTip.hide();var A=D.get("appearance-container-frame");YAHOO.util.Get.css("/display/common.css?styleId="+Squarespace.Interaction.StylePreviewTip.args.originalStyleId,{onSuccess:function(){temporaryCss.purge();YAHOO.util.Get.css("/universal/styles/neutral.css");}});}};Squarespace.Interaction.SaveTip=new Squarespace.FixedPositionTip("Save Complete","Your settings have been successfully saved.",{icon:"../../../universal/images/helptip-info.png",autoHide:1200,xMargin:15,yMargin:15,viewportFixed:true,orientation:"upper-right"});Squarespace.Interaction.doEditWebsiteHeader=function(){Squarespace.ConfigurationTray.showConfiguration("/display/admin/ModifyWebsiteHeader");};Squarespace.Interaction.doEditWebsiteFooter=function(){Squarespace.ConfigurationTray.showConfiguration("/display/admin/ModifyWebsiteFooter");};Squarespace.Interaction.doEditCodeRegion=function(A){Squarespace.ConfigurationTray.showEditor("/display/admin/ModifyCodeRegion?id="+A);};Squarespace.Interaction.doAddSection=function(A,B){Squarespace.ConfigurationTray.showConfiguration("/display/admin/CreateOrModifySection?position="+A+"&navigationBar="+B);};Squarespace.Interaction.doModifySection=function(A){Squarespace.ConfigurationTray.showConfiguration("/display/admin/CreateOrModifySection?id="+A);};Squarespace.Interaction.doRemoveSection=function(A){Squarespace.ConfirmationDialog.show("Confirm Removal","Are you sure you wish to remove this section?",function(){Squarespace.Utility.backgroundAction("Deleting Section","/process/admin/RemoveSection?id="+A+"&SS_AUTHKEY="+Squarespace.Constants.SS_AUTHKEY);});};Squarespace.Interaction.doSetSectionVisibility=function(B,A){Squarespace.Utility.backgroundAction((A?"Showing":"Hiding")+" Section","/process/admin/SetSectionVisibility?id="+B+"&visible="+A+"&SS_AUTHKEY="+Squarespace.Constants.SS_AUTHKEY);};Squarespace.Interaction.doAddComponent=function(B,A){Squarespace.ConfigurationTray.showConfiguration("/display/admin/AddModule?sectionId="+B+"&type="+A);};Squarespace.Interaction.doModifyComponent=function(A){Squarespace.ConfigurationTray.showConfiguration("/display/admin/ModifyModule?id="+A);};Squarespace.Interaction.addContainer=function(G){var C;var F;var H="widgetContainerWrapper-"+G;if(G=="header"){C=20;}else{if(G=="footer"){C=30;}}var A=(C+(D.get(H).childNodes.length-1));var F="sidebar"+(A);var I=document.createElement("div");I.id=F+"Wrapper";I.className="horizontalWidgetContainer";var B='<div class="iw-vnb1"><div class="iw-vnb2"><div class="iw-vnb3"><div class="iw-vnb4"><div id="'+F+'" class="verticalNavigationBar">';B+='<div class="sidebar-title"><div style="float: left;">Widget Container</div><div style="float: right;"></div></div>';B+='<div class="clearer"></div> </div></div></div></div></div>';I.innerHTML=B;D.get(H).appendChild(I);SIDEBAR_SECTION_COUNTS[A]=0;Squarespace.Orderable.ItemManager.checkBoundary(D.get(F),"xx","sections","structure");Squarespace.SectionEditingStripManager.reposition(true);};Squarespace.Interaction.doToggleComponentEnabled=function(C,A){var B=null;if(C){B=E.getTarget(C);}YAHOO.util.Connect.asyncRequest("POST","/process/admin/ToggleModuleEnabled?id="+A+"&SS_AUTHKEY="+Squarespace.Constants.SS_AUTHKEY,{timeout:5000,failure:function(F){alert(Squarespace.NO_SAVE_WARNING);},success:function(G){var F=G.responseText;if("enable"==F){Squarespace.Interaction.SaveTip.setHTML("Enabling Component","The selected component has been enabled.");Squarespace.Interaction.SaveTip.show();Squarespace.Utility.removeModuleContainerClass(A,"page-element-disabled");if(B){B.innerHTML="disable";}if(typeof (Squarespace.Constants.CURRENT_MODULE_ID)!="undefined"&&A==Squarespace.Constants.CURRENT_MODULE_ID){Squarespace.Interaction.EnablePageTip.hide();}D.setStyle("moduleDisabledMessage"+A,"display","none");}else{if("disable"==F){Squarespace.Interaction.SaveTip.setHTML("Disabling Component","The selected component has been disabled.");Squarespace.Interaction.SaveTip.show();Squarespace.Utility.addModuleContainerClass(A,"page-element-disabled");B.innerHTML="enable";if(typeof (Squarespace.Constants.CURRENT_MODULE_ID)!="undefined"&&A==Squarespace.Constants.CURRENT_MODULE_ID){Squarespace.Interaction.EnablePageTip.show({moduleId:A});}D.setStyle("moduleDisabledMessage"+A,"display","inline");}else{if("exceeded"==F){Squarespace.ConfirmationDialog.show("Page Limit Exceeded","You have reached the page limit allowed for your current plan level.  Please upgrade your plan to enable more pages.",function(){document.location.href="/display/configuration/AccountPricing";},"Upgrade Account Plan");}else{if("feature"==F){Squarespace.ConfirmationDialog.show("Feature Not Available","This feature is not available for your current plan level.  Please upgrade your plan to enable this module type.",function(){document.location.href="/display/configuration/AccountPricing";},"Upgrade Account Plan");}else{alert(Squarespace.NO_SAVE_WARNING);}}}}}});};Squarespace.Interaction.doRemoveComponent=function(A){Squarespace.ConfirmationDialog.show("Confirm Removal","Are you sure you wish to remove this component?",function(){Squarespace.Utility.backgroundAction("Deleting Component","/process/admin/RemoveModule?id="+A+"&SS_AUTHKEY="+Squarespace.Constants.SS_AUTHKEY);});};Squarespace.Interaction.doRecoverComponent=function(A){Squarespace.ConfirmationDialog.show("Recover Component?","Are you sure you wish to restore this component to your site?",function(){Squarespace.Utility.backgroundAction("Restoring Component","/process/configuration/RecoverModule?id="+A+"&SS_AUTHKEY="+Squarespace.Constants.SS_AUTHKEY);});};Squarespace.Interaction.doRecoverSection=function(A){Squarespace.ConfirmationDialog.show("Recover Section?","Are you sure you wish to restore this section to your site?",function(){Squarespace.Utility.backgroundAction("Restoring Section","/process/configuration/RecoverSection?id="+A+"&SS_AUTHKEY="+Squarespace.Constants.SS_AUTHKEY);});};Squarespace.ProgressBar=Class.create({initialize:function(A,B,C,F){this.elementName=A;this.width=C;this.size=B;this.height=(this.size=="large"?25:10);this.initialPercent=(F!=null?parseInt(F):0);},write:function(){var A=parseInt(this.width*(this.initialPercent/100));document.write('<div style="width: '+(this.width-1)+"px; height: "+this.height+"px; background: transparent url(/universal/images/manager/progress-bar-"+this.size+'-empty.png) no-repeat top left;">'+'<div style="width: '+(this.width-1)+"px; height: "+this.height+"px; background: transparent url(/universal/images/manager/progress-bar-"+this.size+'-empty.png) no-repeat top right; margin-left: 1px;">'+'  <img id="'+this.elementName+'" src="/universal/images/manager/progress-bar-'+this.size+'-full.png" style="width: '+A+"px; height: "+this.height+'px; margin-left: -1px;"/>'+"</div>"+"</div>");},setProgress:function(B){var A=parseInt(this.width*(B/100));new YAHOO.util.Anim(this.elementName,{width:{to:A}},0.1,YAHOO.util.Easing.easeInStrong).animate();}});Squarespace.TutorialEnvironment={STATE_WELCOME:"welcome",STATE_CONTENT:"content",STATE_STRUCTURE:"structure",STATE_STYLE:"style",STATE_PREVIEW:"preview",STATE_HELP:"help",STATE_FINAL:"final",CURRENT_STATE:null,TYPE_MODAL:"modal",TYPE_CALLOUT:"callout",initialize:function(){this.overlay=document.createElement("div");this.overlay.id="tutorial-dialog-overlay";document.body.appendChild(this.overlay);this.spotlight=document.createElement("div");this.spotlight.id="tutorial-dialog-spotlight";document.body.appendChild(this.spotlight);this.dialog_container=document.createElement("div");this.dialog_container.id="tutorial-dialog-container";this.dialog_container.innerHTML='<div id="tutorial-dialog-content"></div><div id="tutorial-dialog-actionbar"></div><div id="tutorial-dialog-close"><a href="javascript:noop();" onclick="Squarespace.TutorialEnvironment.cancel()"><div></div></a></div>';document.body.appendChild(this.dialog_container);},enabled:function(){return(this.CURRENT_STATE!=null);},start:function(){Squarespace.EditingEnvironment.transitionToEditingMode(this.STATE_PREVIEW);D.setStyle(this.overlay,"display","block");D.setStyle(this.spotlight,"display","block");D.setStyle(this.dialog_container,"display","none");YAHOO.lang.later(50,this,function(){this.setType(this.TYPE_MODAL);YAHOO.lang.later(200,this,function(){this.transitionToState(this.STATE_WELCOME);});});},transitionToState:function(A){if(A==this.STATE_WELCOME){D.get("tutorial-dialog-content").innerHTML='<div class="title">Welcome to Squarespace</div>'+'<div class="body">Setting up your site is as easy as getting to know our editing modes. Let us quickly walk you through the modes to get started.</div>';D.get("tutorial-dialog-actionbar").innerHTML='<div class="close-button"><a href="javascript:noop();" onclick="Squarespace.TutorialEnvironment.cancel()">Maybe Later</a></div>'+'<div class="action-button"><a href="javascript:noop();" onclick="Squarespace.TutorialEnvironment.fadeOutDialog(\'transitionToState\', \''+this.STATE_CONTENT+"')\"><span>Start</span></div>";this.fadeInDialog(this.CURRENT_STATE,A);}else{if(A==this.STATE_CONTENT){D.get("tutorial-dialog-content").innerHTML='<div class="title">Write. Revise. Publish.</div>'+'<div class="body">Add, edit and remove content within your site. Look for buttons like <span><img src="../../../universal/images/managementui/edit-page-button.png"/></span> to insert text, pictures, video, slideshows, and more.</div>';D.get("tutorial-dialog-actionbar").innerHTML='<div class="action-button"><a href="javascript:noop();" onclick="Squarespace.TutorialEnvironment.fadeOutContent(\'transitionToState\', \''+this.STATE_STRUCTURE+"')\"><span>Next</span></div>";this.setType(this.TYPE_CALLOUT);D.setStyle(this.dialog_container,"right","288px");this.fadeInDialog(this.CURRENT_STATE,A);}else{if(A==this.STATE_STRUCTURE){D.get("tutorial-dialog-content").innerHTML='<div class="title">Build. Organize. Architect.</div>'+'<div class="body">Add, remove, and configure pages and widgets. Look for buttons like <span><img src="../../../universal/images/managementui/add-page-button.png"/></span> and <span><img src="../../../universal/images/managementui/configure-this-page-button.png"/></span> to build your site.</div>';D.get("tutorial-dialog-actionbar").innerHTML='<div class="action-button"><a href="javascript:noop();" onclick="Squarespace.TutorialEnvironment.fadeOutContent(\'transitionToState\', \''+this.STATE_STYLE+"')\"><span>Next</span></div>";this.setType(this.TYPE_CALLOUT);this.moveDialog(this.CURRENT_STATE,A,216,"fadeInContent");}else{if(A==this.STATE_STYLE){D.get("tutorial-dialog-content").innerHTML='<div class="title">Design. Style. Customize.</div>'+'<div class="body">Change your template, layout, fonts, and colors within the editor panel below, with point-and-click control over every element.</div>';D.get("tutorial-dialog-actionbar").innerHTML='<div class="action-button"><a href="javascript:noop();" onclick="Squarespace.TutorialEnvironment.fadeOutContent(\'transitionToState\', \''+this.STATE_PREVIEW+"')\"><span>Next</span></div>";this.setType(this.TYPE_CALLOUT);this.moveDialog(this.CURRENT_STATE,A,144,"fadeInContent");}else{if(A==this.STATE_PREVIEW){D.get("tutorial-dialog-content").innerHTML='<div class="title">Step back. Inspect. Consider.</div>'+'<div class="body">Preview your site without any of the editing buttons or panels getting in the way, as if you’re one of your own visitors.</div>';D.get("tutorial-dialog-actionbar").innerHTML='<div class="action-button"><a href="javascript:noop();" onclick="Squarespace.TutorialEnvironment.fadeOutContent(\'transitionToState\', \''+this.STATE_HELP+"')\"><span>Next</span></div>";this.setType(this.TYPE_CALLOUT);this.moveDialog(this.CURRENT_STATE,A,72,"fadeInContent");}else{if(A==this.STATE_HELP){D.get("tutorial-dialog-content").innerHTML='<div class="title">Ask. Learn. Get help.</div>'+'<div class="body">Have questions? Ask our 24/7 support team, watch our help videos, or search our extensive guides to get the help you need.</div>';D.get("tutorial-dialog-actionbar").innerHTML='<div class="action-button"><a href="javascript:noop();" onclick="Squarespace.TutorialEnvironment.fadeOutDialog(\'transitionToState\', \''+this.STATE_FINAL+"')\"><span>Next</span></div>";this.setType(this.TYPE_CALLOUT);this.moveDialog(this.CURRENT_STATE,A,10,"fadeInContent");}else{if(A==this.STATE_FINAL){D.get("tutorial-dialog-content").innerHTML='<div class="title">That’s it.</div>'+'<div class="body">To run through this tutorial again, or get other help with your site, open Help Mode at any time.</div>';D.get("tutorial-dialog-actionbar").innerHTML='<div class="action-button"><a href="javascript:noop();" onclick="Squarespace.TutorialEnvironment.cancel()"><span>Close</span></div>';this.setType(this.TYPE_MODAL);this.fadeInDialog(this.CURRENT_STATE,A);}}}}}}}this.CURRENT_STATE=A;this.forceEditingMode(A);},forceEditingMode:function(A){YAHOO.lang.later(500,this,function(){if(A!=this.STATE_WELCOME){var B=(A==this.STATE_FINAL)?this.STATE_PREVIEW:A;Squarespace.EditingEnvironment.transitionToEditingMode(B);if(B=="style"){Squarespace.StyleEditor.selectTab("Template & Styles",true);}}});},setType:function(A){D.removeClass(this.spotlight,this.TYPE_MODAL);D.removeClass(this.spotlight,this.TYPE_CALLOUT);D.removeClass(this.dialog_container,this.TYPE_MODAL);D.removeClass(this.dialog_container,this.TYPE_CALLOUT);D.addClass(this.spotlight,A);D.addClass(this.dialog_container,A);},fadeInDialog:function(A,C,F,B){D.removeClass(this.dialog_container,A);D.addClass(this.dialog_container,C);D.setStyle(this.dialog_container,"display","block");YAHOO.lang.later(100,this,function(){D.addClass(this.dialog_container,"visible");if(F){this[F](B);}});},fadeOutDialog:function(B,A){D.removeClass(this.dialog_container,this.CURRENT_STATE);D.removeClass(this.dialog_container,"modal");D.setStyle(this.dialog_container,"display","none");YAHOO.lang.later(50,this,function(){D.removeClass(this.dialog_container,"visible");if(B){this[B](A);}});},fadeInContent:function(B,A){YAHOO.lang.later(100,this,function(){D.removeClass(D.get("tutorial-dialog-content"),"faded");if(B){this[B](A);}});},fadeOutContent:function(B,A){D.addClass(D.get("tutorial-dialog-content"),"faded");YAHOO.lang.later(50,this,function(){if(B){this[B](A);}});},moveDialog:function(A,F,C,G,B){this.animMove=new YAHOO.util.Anim(this.dialog_container,{right:{to:C}},0.4,YAHOO.util.Easing.easeOutStrong);this.animMove.onComplete.subscribe(function(I,H,J){if(J.animMove){J.animMove=null;D.removeClass(J.dialog_container,A);D.addClass(J.dialog_container,F);if(G){J[G](B);}}},this);this.animMove.animate();},cancel:function(){this.fadeOutDialog("fadeOutOverlay");if(this.CURRENT_STATE==this.STATE_HELP){this.CURRENT_STATE=null;Squarespace.Help.show();}else{this.CURRENT_STATE=null;}},fadeOutOverlay:function(B,A){D.addClass(this.spotlight,"faded");YAHOO.lang.later(50,this,function(){D.setStyle(this.overlay,"display","none");D.setStyle(this.spotlight,"display","none");D.setStyle(this.dialog_container,"display","none");D.removeClass(this.spotlight,"faded");});}};Squarespace.Help={initialize:function(){this.container=document.createElement("div");this.container.id="help-container";document.body.appendChild(this.container);var A=Squarespace.Constants.HELP_SITE_AUTHED_URL;this.container.innerHTML="<ul>"+'<li><a href="'+A+'" target="_blank" class="help-container-item" id="help-container-item-support">'+'<div class="help-container-item-wrapper">'+'<div class="help-container-item-icon"></div>'+'<div class="help-container-item-content"><div class="help-container-item-title">Visit Our Help Site.</div><div class="help-container-description">Watch our helpful videos or search our guides.</div></div>'+"</div>"+"</a></li>"+'<li><a href="javascript:noop();" onclick="javascript:Squarespace.TutorialEnvironment.start()" class="help-container-item" id="help-container-item-tutorial">'+'<div class="help-container-item-wrapper">'+'<div class="help-container-item-icon"></div>'+'<div class="help-container-item-content"><div class="help-container-item-title">Review the Mode Walkthrough.</div><div class="help-container-description">Refresh yourself about the editing modes.</div></div>'+"</div>"+"</a></li>"+"</ul>";},show:function(){if(!Squarespace.TutorialEnvironment.enabled()){this.container.style.display="block";}},hide:function(){if(this.container){this.container.style.display="none";}}};Squarespace.Upload={fCount:1,activeNum:0,uploadBar:null,postUploadFunction:function(A){document.location.href="/display/CloseFrame";},initiateUpload:function(){var form;if(document.uploadform){form=document.uploadform;}else{form=document.dataform;}if(isDefined("clearErrors")){clearErrors();}D.get("uploadFileSelect").style.display="none";D.get("uploadProgress").style.display="block";YAHOO.util.Connect.setForm(form,true,true);var uploadObj=YAHOO.util.Connect.asyncRequest("POST",form.action,{upload:function(o){window.clearInterval(Squarespace.Upload.uploadCheckInterval);Squarespace.Upload.postUploadFunction(o);}});this.uploadCheckInterval=window.setInterval(function(){YAHOO.util.Connect.asyncRequest("GET","/process/admin/CheckUploadingStatus?SS_AUTHKEY="+Squarespace.Constants.SS_AUTHKEY,{timeout:10000,success:function(o){eval(o.responseText);},failure:function(o){}});},500);},uploadCallback:function(F,I,H,C,G,A){D.get("uploadInformationArea").style.display="block";D.get("bytesTotal").innerHTML=F;D.get("bytesUploaded").innerHTML=I;D.get("estimatedTimeRemaining").innerHTML=G;D.get("uploadSpeed").innerHTML=A;D.get("percentComplete").innerHTML=C;var B=parseInt(C.substring(0,C.length-1));if(B>0){uploadBar.setProgress(B);}},outputUploadProgressElement:function(A){uploadBar=new Squarespace.ProgressBar("uploadBar","large",350);uploadBar.write();document.write('<div style="color: #fff; font-size: 9px; padding-top: 3px;"><span id="percentComplete">0%</span> complete</div>'+'<div id="uploadInformationArea" style="color: #fff; display: none; padding-top: 16px;">'+'  <div style="padding-bottom: 4px;">'+'    <div style="width: 120px; float: left;">Upload Progress</div>'+'    <div style="font-weight: bold;"><span id="bytesUploaded"></span> of <span id="bytesTotal"></span></div>'+"  </div>"+'  <div style="padding-bottom: 4px;">'+'    <div style="width: 120px; float: left;">Upload Speed</div>'+'    <div style="font-weight: bold;" id="uploadSpeed"></div>'+"  </div>"+'  <div style="padding-bottom: 4px;">'+'    <div style="width: 120px; float: left;">Estimated Completion</div>'+'    <div style="font-weight: bold;" id="estimatedTimeRemaining"></div>'+"  </div>"+"</div>");},removeFile:function(A){D.get("fileObjectArea").removeChild(D.get("fArea"+A));--this.activeNum;if(this.activeNum==0){D.get("fileObjectArea").innerHTML='<div class="miniNoticeWrapper"><div class="managerAlertObject"><strong>No Files to Upload</strong><br/>No files have been selected for uploading. Click \'Add Another File\' below to add files for uploading.</div></div>';}},addFile:function(A){if(this.activeNum==0){D.get("fileObjectArea").innerHTML="";}++this.fCount;++this.activeNum;d=document.createElement("div");d.setAttribute("id","fArea"+this.fCount);fu=document.createElement("input");fu.setAttribute("type","file");fu.setAttribute("multiple","multiple");fu.className="file";fu.setAttribute("name","f"+this.fCount);fu.setAttribute("id","f"+this.fCount);d.appendChild(fu);if(A){rb=document.createElement("input");rb.setAttribute("type","button");rb.setAttribute("value","Remove");rb.setAttribute("id","f"+this.fCount+"RemoveButton");rb.className="fileButton";rb.setAttribute("name","rb"+this.fCount);d.appendChild(rb);}D.get("fileObjectArea").appendChild(d);if(A){D.get("f"+this.fCount+"RemoveButton").onclick=new Function("Squarespace.Upload.removeFile("+this.fCount+");");}}};Squarespace.FlashDetect=new function(){var A=this;A.installed=false;A.raw="";A.major=-1;A.minor=-1;A.revision=-1;A.revisionStr="";var B=[{"name":"ShockwaveFlash.ShockwaveFlash.7","version":function(J){return F(J);}},{"name":"ShockwaveFlash.ShockwaveFlash.6","version":function(L){var J="6,0,21";try{L.AllowScriptAccess="always";J=F(L);}catch(K){}return J;}},{"name":"ShockwaveFlash.ShockwaveFlash","version":function(J){return F(J);}}];var F=function(L){var J=-1;try{J=L.GetVariable("$version");}catch(K){}return J;};var I=function(J){var L=-1;try{L=new ActiveXObject(J);}catch(K){L={activeXError:true};}return L;};var C=function(K){var J=K.split(",");return{"raw":K,"major":parseInt(J[0].split(" ")[1],10),"minor":parseInt(J[1],10),"revision":parseInt(J[2],10),"revisionStr":J[2]};};var H=function(M){var K=M.split(/ +/);var L=K[2].split(/\./);var J=K[3];return{"raw":M,"major":parseInt(L[0],10),"minor":parseInt(L[1],10),"revisionStr":J,"revision":G(J)};};var G=function(J){return parseInt(J.replace(/[a-zA-Z]/g,""),10)||A.revision;};A.majorAtLeast=function(J){return A.major>=J;};A.minorAtLeast=function(J){return A.minor>=J;};A.revisionAtLeast=function(J){return A.revision>=J;};A.versionAtLeast=function(K){var L=[A.major,A.minor,A.revision];var J=Math.min(L.length,arguments.length);for(i=0;i<J;i++){if(L[i]>=arguments[i]){if(i+1<J&&L[i]==arguments[i]){continue;}else{return true;}}else{return false;}}};A.FlashDetect=function(){if(navigator.plugins&&navigator.plugins.length>0){var M="application/x-shockwave-flash";var L=navigator.mimeTypes;if(L&&L[M]&&L[M].enabledPlugin&&L[M].enabledPlugin.description){var J=L[M].enabledPlugin.description;var N=H(J);A.raw=N.raw;A.major=N.major;A.minor=N.minor;A.revisionStr=N.revisionStr;A.revision=N.revision;A.installed=true;}}else{if(navigator.appVersion.indexOf("Mac")==-1&&window.execScript){var J=-1;for(var K=0;K<B.length&&J==-1;K++){var O=I(B[K].name);if(!O.activeXError){A.installed=true;J=B[K].version(O);if(J!=-1){var N=C(J);A.raw=N.raw;A.major=N.major;A.minor=N.minor;A.revision=N.revision;A.revisionStr=N.revisionStr;}}}}}}();};Squarespace.FlashUpload={UPDATE_INTERVAL:500,lastUpdateTime:-1,startTime:0,elapsedTime:0,uploadBar:null,totalUploadSize:0,bytesUploaded:0,transferRateAverage:0,rateChanges:0,verboseTimeMultiHour:"#1 hours",verboseTimeOneHour:"#1 hour",verboseTimeMultiMins:"#2 minutes",verboseTimeOneMins:"#2 minute",verboseTimeMultiSecs:"#3 seconds",verboseTimeOneSec:"#3 second",shouldUpdate:function(F,C){var A=new Date();var B=A.getTime();if(B-this.lastUpdateTime<this.UPDATE_INTERVAL&&F!=-1&&C<F){return false;}this.lastUpdateTime=B;this.elapsedTime=B-this.startTime;return true;},getTargetUrl:function(){var A;if(document.uploadform){A=document.uploadform;}else{A=document.dataform;}return A.action;},replaceInsert:function(C,A,B){return(C)?C.replaceIndex(A,B):null;},formatTimeInfo:function(G){var C=parseInt(G/3600).toFixed(0);if(C>0){G-=C*3600;}var H=parseInt(G/60).toFixed(0);if(H>0){G-=H*60;}var I=(C>1)?this.verboseTimeMultiHour:(C>0)?this.verboseTimeOneHour:null;var F=(H>1)?this.verboseTimeMultiMins:(H>0)?this.verboseTimeOneMin:null;var B=(G>1||G==0)?this.verboseTimeMultiSecs:(G==1)?this.verboseTimeOneSec:null;if(I){I=this.replaceInsert(I,1,C);I=(F||B)?(I+", "):I;}if(F){F=this.replaceInsert(F,2,H);F=(B)?(F+", "):F;}if(B){B=this.replaceInsert(B,3,G);}var A="";if(I){A+=I;}if(F){A+=F;}if(B){A+=B;}return A;},initiateUpload:function(){if(isDefined("clearErrors")){clearErrors();}D.get("fileObjectArea").style.width=0;D.get("fileObjectArea").style.height=0;D.get("fileObjectArea").style.zIndex=-1;D.get("uploadFileSelect").style.display="none";D.get("uploadProgress").style.display="block";window.parent.Squarespace.Overlay.disableClose();Squarespace.FlashUpload.Widget.initiateUpload(this.getTargetUrl());this.startTime=(new Date()).getTime();return ;},finishUpload:function(){window.parent.Squarespace.Overlay.enableClose();return ;},cancelAllUploads:function(){Squarespace.FlashUpload.Widget.cancelAllUploads();Squarespace.Overlay.enableClose();return ;},uploadCallback:function(F,H,C,G,A){D.get("uploadInformationArea").style.display="block";D.get("bytesTotal").innerHTML=F;D.get("bytesUploaded").innerHTML=H;D.get("estimatedTimeRemaining").innerHTML=G;D.get("uploadSpeed").innerHTML=A;D.get("percentComplete").innerHTML=C;var B=parseInt(C.substring(0,C.length-1));if(B>0){uploadBar.setProgress(B);}return ;},outputUploadProgressElement:function(A){uploadBar=new Squarespace.ProgressBar("uploadBar","large",350);uploadBar.write();document.write('<div style="color: #fff; font-size: 9px; padding-top: 3px;"><span id="percentComplete">0%</span> complete</div>'+'<div id="uploadInformationArea" style="color: #fff; display: none; padding-top: 16px;">'+'  <div style="padding-bottom: 4px;">'+'    <div style="width: 120px; float: left;">Upload Progress</div>'+'    <div style="font-weight: bold;"><span id="bytesUploaded"></span> of <span id="bytesTotal"></span></div>'+"  </div>"+'  <div style="padding-bottom: 4px;">'+'    <div style="width: 120px; float: left;">Upload Speed</div>'+'    <div style="font-weight: bold;" id="uploadSpeed"></div>'+"  </div>"+'  <div style="padding-bottom: 4px;">'+'    <div style="width: 120px; float: left;">Estimated Completion</div>'+'    <div style="font-weight: bold;" id="estimatedTimeRemaining"></div>'+"  </div>"+"</div>");return ;},appendFileToListForIE:function(H,B,G,A){var F=H.insertRow(-1);var C=F.insertCell(-1);C.style.padding="6px";C.innerHTML="&nbsp;";C=F.insertCell(-1);C.innerHTML=G.truncate(54);C.setAttribute("nowrap","nowrap");C=F.insertCell(-1);C.setAttribute("nowrap","nowrap");C.style.textAlign="center";C.innerHTML=G;C=F.insertCell(-1);C.setAttribute("nowrap","nowrap");C.style.textAlign="center";C.innerHTML="<a href=\"javascript:Squarespace.FlashUpload.Widget.removeFileFromList('"+B+"');\">remove</a>";return ;},appendFileToList:function(H,B,G,A){if(YAHOO.env.ua.ie>0){return this.appendFileToListForIE(H,B,G,A);}var F=document.createElement("tr");H.appendChild(F);var C='<td style="padding: 6px;">&nbsp;</td>'+'<td nowrap="nowrap">'+G.truncate(54)+"</td>"+'<td style="text-align: center;" nowrap="nowrap">'+A.formatBytes()+"</td>"+'<td style="text-align: center;" nowrap="nowrap">'+"<a href=\"javascript:Squarespace.FlashUpload.Widget.removeFileFromList('"+B+"');\">remove</a>"+"</td>";F.id=B;F.innerHTML=C;return ;},onUploadProgress:function(A){var K=this.totalUploadSize;var C=this.bytesUploaded+A.bytesLoaded;if(!Squarespace.FlashUpload.shouldUpdate(K,C)){return ;}var H=K-C;var I=(C/K)*100;var B=(C*1000)/this.elapsedTime;var F=++this.rateChanges;var G=this.transferRateAverage;G=((F-1)*G+B)/F;var J=((H/G)).toFixed(0);this.uploadCallback(K.formatBytes(2),(C).formatBytes(2),I.toFixed(0)+"%",this.formatTimeInfo(J),G.formatBytes(2)+"/sec");this.transferRateAverage=G;return ;}};Squarespace.CurrentDialog=null;Squarespace.prepareDialogs=function(B){for(var A=0;A<B.length;++A){var C=B[A];if(C=="CodeEditor"&&!window.Squarespace.CodeEditor){Squarespace.CodeEditor=new Squarespace.CodeEditorDialog();}if(C=="ImageSelector"&&!window.Squarespace.ImageSelector){Squarespace.ImageSelector=new Squarespace.ImageSelectorDialog();}if(C=="FileSelector"&&!window.Squarespace.FileSelector){Squarespace.FileSelector=new Squarespace.FileSelectorDialog();}if(C=="SlideShowSelector"&&!window.Squarespace.SlideShowSelector){Squarespace.SlideShowSelector=new Squarespace.SlideShowSelectorDialog();}}};Squarespace.EditorDialog=Class.create({currentTab:null,createDialog:function(C,B){this.selectors=B;this.type="_squarespace-"+C;this.opening=false;this.visible=false;this.locked=false;this.container=document.createElement("div");this.container.className="squarespace-selector-dialog";D.setStyle(this.container,"position","fixed");this.container.id="squarespace-file-selector";if(this.selectors.length>1){var F="";for(var A=0;A<this.selectors.length;++A){F+='<div id="'+this.type+"-select-option-"+this.selectors[A].name+'-block"><a class="file-select-category-option" id="'+this.type+"-select-option-"+this.selectors[A].name+'" href="javascript:noop();">'+this.selectors[A].label+"</a></div>";}this.dialogSubmitButtonTitle="Create";this.container.innerHTML='<div class="file-select-title-strip"><div id="'+this.type+'-dialog-title" class="file-select-title">New Dialog</div></div>'+'<div class="file-select-location-strip">'+'<div class="file-select-left-column"><div class="file-options-frame">'+F+"</div></div>"+'<div class="file-select-right-column" id="'+this.type+'-right-column"></div>'+'</div><div class="file-select-button-strip">'+'<span style="padding-right: 6px; float: left;">'+Squarespace.HTML.createButton("Create","javascript:noop();",true,this.type+"-dialog-submit-button")+"</span>"+Squarespace.HTML.createButton("Cancel","javascript:noop();",false,this.type+"-dialog-submit-cancel")+'<br class="clearer"/>'+"</div>";for(var A=0;A<this.selectors.length;++A){E.addListener(this.type+"-select-option-"+this.selectors[A].name,"click",function(H,G){this.selectTab(G);E.stopEvent(H);},this.selectors[A].name,this);}E.addListener(this.type+"-dialog-submit-button","click",function(G){Squarespace.CurrentDialog.accept();E.stopEvent(G);});E.addListener(this.type+"-dialog-submit-cancel","click",function(G){Squarespace.CurrentDialog.cancel();E.stopEvent(G);});}else{this._action=this.selectors[0].onShow;this._action();}document.body.appendChild(this.container);D.setStyle(this.container,"display","none");D.setStyle(this.container,"z-index","30000");Squarespace.Degraded.filterOpacity(this.container,"0");},setTitle:function(A){D.get(this.type+"-dialog-title").innerHTML=A;},lockButtons:function(){this.locked=true;Squarespace.Form.disableButton(this.type+"-dialog-submit-button","Please Wait...");Squarespace.Form.disableButton(this.type+"-dialog-submit-cancel","Cancel");},unlockButtons:function(){this.locked=false;Squarespace.Form.enableButton(this.type+"-dialog-submit-button",this.dialogSubmitButtonTitle);Squarespace.Form.enableButton(this.type+"-dialog-submit-cancel","Cancel");},setLabels:function(A){this.dialogSubmitButtonTitle=A;D.get(this.type+"-dialog-submit-button").innerHTML="<span>"+A+"</span>";},getSelectorByName:function(A){for(var B=0;B<this.selectors.length;++B){if(this.selectors[B].name==A){return(this.selectors[B]);}}return(null);},showDialog:function(){if(this.opening){return ;}D.setStyle(this.container,"display","block");if(this.selectors.length>1){var A={};var C=this.properties.visibleSelectors;for(var B=0;B<C.length;++B){A[C[B]]=true;}for(var B=0;B<this.selectors.length;++B){D.setStyle(this.type+"-select-option-"+this.selectors[B].name+"-block","display",(A[this.selectors[B].name]?"block":"none"));}}this.lastXY=null;if(this.properties.xyTarget){var F=D.getXY(this.properties.xyTarget);this.properties.xy=[F[0]-15,F[1]-this.container.offsetHeight+this.properties.xyTarget.offsetHeight+15];}else{if(!this.properties.xy){this.properties.xy=[(D.getViewportWidth()/2-this.container.offsetWidth/2),150];}else{if(YAHOO.env.ua.webkit!=0){this.properties.xy[1]+=D.getDocumentScrollTop();}}}if(this.properties.initialSelector){this.selectTab(this.properties.initialSelector);}this.visible=true;this.opening=true;this.move(this.properties.xy,true);Squarespace.CurrentDialog=this;},accept:function(B){if(this.locked){return ;}if(this.visible){var A=this.getSelectorByName(this.currentTab);if(!B&&A&&A.onAccept){this._action=A.onAccept;this._action();}else{this.properties.actions.onAccept(this.properties.data);this.hideDialog();}}},cancel:function(){this.hideDialog();},hideDialog:function(){if(this.isVisible()){var A=new YAHOO.util.Anim(this.container,{opacity:{to:0},top:{to:this.lastXY[1]+15}},0.4,YAHOO.util.Easing.easeOutStrong);A.onComplete.subscribe(function(C,B,F){D.setStyle(F.container,"display","none");},this);Squarespace.Degraded.filterAnimation(A);this.visible=false;Squarespace.CurrentDialog=null;}},isVisible:function(){return(this.visible);},move:function(B,C){if(!this.visible){return ;}this.finalPosition=false;if(this.animating){return ;}this.animating=true;this.finalPosition=true;if(B){this.lastXY=[B[0],B[1]];}else{if(this.lastXY){B=[this.lastXY[0],this.lastXY[1]];}else{return ;}}if((B[0]+this.container.offsetWidth)>(D.getViewportWidth()-20)){B[0]=D.getViewportWidth()-20-this.container.offsetWidth;}if((B[1]+this.container.offsetHeight)>(D.getViewportHeight()-20)){B[1]=D.getViewportHeight()-20-this.container.offsetHeight;}if(B[1]<20){B[1]=20;}if(C){D.setStyle(this.container,"left",B[0]+"px");D.setStyle(this.container,"top",(B[1]-15)+"px");this.finalPosition=true;}var A=new YAHOO.util.Anim(this.container,{left:{to:(B[0])},top:{to:(B[1])},opacity:{to:1}},0.4,YAHOO.util.Easing.easeOutStrong);A.onComplete.subscribe(function(G,F,H){H.animating=false;H.opening=false;if(!H.finalPosition){H.move();}},this);Squarespace.Degraded.filterAnimation(A);this.lastXY=[B[0],B[1]];},selectTab:function(A){if(this.currentTab){D.removeClass(this.type+"-select-option-"+this.currentTab,"file-select-category-active");this._action=this.getSelectorByName(this.currentTab).onLeave;if(this._action){this._action();}}D.addClass(this.type+"-select-option-"+A,"file-select-category-active");this.currentTab=A;this._action=this.getSelectorByName(this.currentTab).onShow;this._action();}});Squarespace.FileSelectorDialog=Class.extend(Squarespace.EditorDialog,{initialize:function(){this.createDialog("file",[{name:"external",label:"Direct URL",onShow:function(){D.get(this.type+"-right-column").innerHTML='<div style="height: 206px; width: 390px;"><div class="file-select-field-title">Link Location (URL)</div><div class="file-select-field-text"><input type="text" class="text" id="squarespace-file-select-url-selector"/></div><div style="padding-top: 10px;"/><strong>Enter a URL in the field above.</strong> URLs are addresses on the Internet. You can find the URL to any page on the Web by checking your browser\'s URL bar near the top of your browsing window.'+"<br/><br/>To create an email link, just add mailto: in front of the email address (i.e. mailto:my-email@my-domain.com)</div></div>";D.get("squarespace-file-select-url-selector").value=this.properties.data["link"];if(YAHOO.env.ua.ie){setTimeout(function(){D.get("squarespace-file-select-url-selector").focus();},10);}else{D.get("squarespace-file-select-url-selector").focus();}E.addListener("squarespace-file-select-url-selector","change",function(){if(Squarespace.CurrentDialog){Squarespace.CurrentDialog.properties.data["link"]=D.get("squarespace-file-select-url-selector").value;}});E.addListener("squarespace-file-select-url-selector","keydown",function(A){Squarespace.CurrentDialog.properties.data["link"]=D.get("squarespace-file-select-url-selector").value;if(A.keyCode==13){Squarespace.CurrentDialog.accept();}});this.setLabels("Save &amp; Close");}},{name:"page",label:"Your Webpages",onShow:function(){D.get(this.type+"-right-column").innerHTML='<iframe id="squarespace-file-browser-frame" frameborder="0" style="height: 200px; width: 390px; overflow: hidden; border: 0; padding: 0; margin: 0;" src="/display/admin/ModuleSelectionComponent?height=196&width=386&type=module&R='+new Date().getTime()+'"></iframe>';if(YAHOO.env.ua.ie){setTimeout(function(){D.get("squarespace-file-browser-frame").focus();},10);}else{D.get("squarespace-file-browser-frame").focus();}this.setLabels("Save &amp; Close");}},{name:"file",label:"Your Files",onShow:function(){D.get(this.type+"-right-column").innerHTML='<iframe id="squarespace-file-browser-frame" frameborder="0" style="height: 200px; width: 390px; overflow: hidden; border: 0; padding: 0; margin: 0;" src="/display/admin/ModuleSelectionComponent?height=196&width=386&type=file&R='+new Date().getTime()+'"></iframe>';if(YAHOO.env.ua.ie){setTimeout(function(){D.get("squarespace-file-browser-frame").focus();},10);}else{D.get("squarespace-file-browser-frame").focus();}this.setLabels("Save &amp; Close");}},{name:"upload",label:"Upload a File",onShow:function(){D.get(this.type+"-right-column").innerHTML='<iframe id="squarespace-file-browser-frame" frameborder="0" style="height: 200px; width: 390px; overflow: hidden; border: 0; padding: 0; margin: 0;" src="/display/admin/ModuleSelectionComponent?height=196&width=386&type=upload&R='+new Date().getTime()+'"></iframe>';if(YAHOO.env.ua.ie){setTimeout(function(){D.get("squarespace-file-browser-frame").focus();},10);}else{D.get("squarespace-file-browser-frame").focus();}this.setLabels("Upload File");},onAccept:function(){D.get("squarespace-file-browser-frame").contentWindow.Squarespace.Upload.initiateUpload();}},{name:"extended",label:"More Options",onShow:function(){D.get(this.type+"-right-column").innerHTML='<div style="height: 206px; width: 390px;"><div class="file-select-field-title">Link Description</div><div class="file-select-field-text"><input type="text" class="text" id="squarespace-file-select-description-selector"/></div><div style="padding-top: 10px;"/>The following options also apply to links created via this dialog.<br/><br/>'+'<input type="checkbox" id="squarespace-file-selector-newwindow" style="float: left;">       <label for="squarespace-file-selector-newwindow"        style="float: left; padding-top: 4px; padding-left: 5px; cursor: pointer;" class="file-select-field-title">Open Link in New Window</label><br class="clearer"/>'+'<input type="checkbox" id="squarespace-file-selector-offsiteindicator" style="float: left;"><label for="squarespace-file-selector-offsiteindicator" style="float: left; padding-top: 4px; padding-left: 5px; cursor: pointer;" class="file-select-field-title">Show Offsite Indicator</label>'+"</div></div>";D.get("squarespace-file-select-description-selector").value=this.properties.data["description"];D.get("squarespace-file-selector-newwindow").checked=this.properties.data["newwindow"];D.get("squarespace-file-selector-offsiteindicator").checked=this.properties.data["offsiteindicator"];if(YAHOO.env.ua.ie){setTimeout(function(){D.get("squarespace-file-select-description-selector").focus();},10);}else{D.get("squarespace-file-select-description-selector").focus();}E.addListener("squarespace-file-select-description-selector","change",function(){Squarespace.CurrentDialog.properties.data["description"]=D.get("squarespace-file-select-description-selector").value;});E.addListener("squarespace-file-selector-newwindow","change",function(){Squarespace.CurrentDialog.properties.data["newwindow"]=D.get("squarespace-file-selector-newwindow").checked;});E.addListener("squarespace-file-selector-offsiteindicator","change",function(){Squarespace.CurrentDialog.properties.data["offsiteindicator"]=D.get("squarespace-file-selector-offsiteindicator").checked;});this.setLabels("Save &amp; Close");}}]);},show:function(A){this.loadProperties({link:"",description:"",newwindow:false,offsiteindicator:false,newlink:false,initialSelector:this.selectors[0].name},A);this.properties.originalData={};for(i in this.properties.data){this.properties.originalData[i]=this.properties.data[i];}this.setTitle(this.properties.title);this.selectTab(this.properties.initialSelector);this.showDialog();},getCurrentSelectorNode:function(){return(this.properties.data.link);},onSelectFile:function(F,C,G,B,A){this.properties.data.link=C;this.properties.data.fileId=A;},onAcceptUpload:function(A){this.properties.data.link=A.targetFileUrl;this.properties.data.fileId=A.targetFileId;this.accept(true);},cancel:function(A){if(this.isVisible()){if(this.properties.actions.onCancel){this.properties.actions.onCancel(A?this.properties.data:this.properties.originalData);}this.hideDialog();}}});Squarespace.ImageSelectorDialog=Class.extend(Squarespace.EditorDialog,{getElementWidth:function(){return(Squarespace.ImageSelector.properties.data["previewWidth"]?Squarespace.ImageSelector.properties.data["previewWidth"]:(this.elementWidth!=null?this.elementWidth:""));},render:function(){this.properties.actions.onChange(this.properties.data);},updateImageSize:function(A){this.elementWidth=A;Squarespace.ImageSelector.properties.data["previewWidth"]="";var B=D.get("squarespace-image-select-resizeto");if(B){if(typeof A==="string"){A=A.replace("px","");}B.value=A;}},clearPreview:function(){if(this.properties.data["previewWidth"]){this.properties.data["previewWidth"]="";}},resize:function(){if(isNaN(parseInt(D.get("squarespace-image-select-resizeto").value))){alert("Please enter a value, in pixels, to resize this image to.");return ;}D.get("image-resize-options").style.display="none";D.get("image-resize-progress").style.display="block";this.lockButtons();YAHOO.util.Connect.asyncRequest("POST","/process/admin/QueueImageProcessingRequest",{timeout:10000,success:function(B){var A=Squarespace.URL.getObjectFromXML(B);if(A.processingId){Squarespace.ImageSelector.currentProcessingId=A.processingId;Squarespace.ImageSelector.checkCount=0;window.setTimeout(Squarespace.ImageSelector.processingCompletionCheck,2000);}else{alert("Unable to queue image transformation:\n\n "+A.error);}},failure:function(A){alert("Unable to queue image transformation:\n\n "+message);leaveProcessingState();}},Squarespace.URL.constructUrlParameters({url:unescape(Squarespace.ImageSelector.properties.data["src"]),makeThumbnail:D.get("squarespace-image-selector-createthumbnail").checked,width:parseInt(D.get("squarespace-image-select-resizeto").value),SS_AUTHKEY:Squarespace.Constants.SS_AUTHKEY}));},processingCompletionCheck:function(){YAHOO.util.Connect.asyncRequest("POST","/process/admin/CheckForImageProcessingCompletion",{timeout:10000,success:function(B){var A=Squarespace.URL.getObjectFromXML(B);if(A.status=="processed"){if(D.get("squarespace-image-selector-createthumbnail").checked){D.get("image-resize-progress").innerHTML="<strong>Thumbnail processing completed.</strong>  Your thumbnail has been created and linked to a full version of your image.";Squarespace.ImageSelector.properties.data["linkUrl"]="javascript:showFullImage('/display/ShowImage?imageUrl="+encodeURIComponent(Squarespace.URL.adjustQueryParameter(Squarespace.ImageSelector.properties.data["src"],"__SQUARESPACE_CACHEVERSION",(new Date().getTime())))+"',"+A.height+","+A.width+");";Squarespace.ImageSelector.properties.data["linkNewWindow"]=false;Squarespace.ImageSelector.properties.data["thumbnailStyle"]=true;Squarespace.ImageSelector.properties.data["src"]=Squarespace.URL.adjustQueryParameter(A.fileUrl,"__SQUARESPACE_CACHEVERSION",(new Date().getTime()));}else{D.get("image-resize-progress").innerHTML="<strong>Image resizing completed.</strong>  Your image has been resized.";Squarespace.ImageSelector.properties.data["src"]=Squarespace.URL.adjustQueryParameter(Squarespace.ImageSelector.properties.data["src"],"__SQUARESPACE_CACHEVERSION",(new Date().getTime()));}Squarespace.ImageSelector.clearPreview();Squarespace.ImageSelector.render();Squarespace.ImageSelector.unlockButtons();}else{if(A.status=="failed"){alert("Image Processing Failed:\n\n"+A.message+"\n\nYou may wish to try your request again later.");D.get("image-resize-options").style.display="block";D.get("image-resize-progress").style.display="none";Squarespace.ImageSelector.unlockButtons();}else{if(A.status=="queued"){++Squarespace.ImageSelector.checkCount;if(Squarespace.ImageSelector.checkCount==30){alert("There seems to be a problem related to processing the image you've uploaded.\n\nPlease ensure that you're uploading a valid image file with a valid extension (.JPG, .GIF, .PNG).\n\nIf you believe this problem is related to our processing application, and not your picture, you should send your image to support@squarespace.com.");D.get("image-resize-options").style.display="block";D.get("image-resize-progress").style.display="none";Squarespace.ImageSelector.unlockButtons();}else{window.setTimeout(Squarespace.ImageSelector.processingCompletionCheck,2000);}}}}},failure:function(A){D.get("image-resize-options").style.display="block";D.get("image-resize-progress").style.display="none";Squarespace.ImageSelector.unlockButtons();alert("Operation Failed:\n\n "+message);}},Squarespace.URL.constructUrlParameters({SS_AUTHKEY:Squarespace.Constants.SS_AUTHKEY,processingId:Squarespace.ImageSelector.currentProcessingId}));},initialize:function(){this.createDialog("image",[{name:"image",label:"Your Images",onShow:function(){D.get(this.type+"-right-column").innerHTML='<iframe id="squarespace-image-browser-frame" frameborder="0" style="height: 200px; width: 390px; overflow: hidden; border: 0px; padding: 0; margin: 0;" src="/display/admin/ModuleSelectionComponent?height=196&width=386&type=image&R='+new Date().getTime()+'"></iframe>';if(YAHOO.env.ua.ie){setTimeout(function(){D.get("squarespace-image-browser-frame").focus();},10);}else{D.get("squarespace-image-browser-frame").focus();}this.setLabels("Save &amp; Close");}},{name:"upload",label:"Upload an Image",onShow:function(){D.get(this.type+"-right-column").innerHTML='<iframe id="squarespace-image-browser-frame" frameborder="0" style="height: 200px; width: 390px; overflow: hidden; border: 0px; padding: 0; margin: 0;" src="/display/admin/ModuleSelectionComponent?height=196&width=386&type=upload&R='+new Date().getTime()+'"></iframe>';if(YAHOO.env.ua.ie){setTimeout(function(){D.get("squarespace-image-browser-frame").focus();},10);}else{D.get("squarespace-image-browser-frame").focus();}this.setLabels("Upload File");},onAccept:function(){D.get("squarespace-image-browser-frame").contentWindow.Squarespace.Upload.initiateUpload();}},{name:"external",label:"Direct URL",onShow:function(){D.get(this.type+"-right-column").innerHTML='<div style="height: 206px; width: 390px;"><div class="file-select-field-title">Image Location (URL)</div><div class="file-select-field-text"><input type="text" class="text" id="squarespace-image-select-url-selector"/></div><div style="padding-top: 10px;"/><strong>Enter a URL to an image in the field above.</strong> URLs are addresses on the Internet. You can find the URL to any image on the Web by checking the page source or right clicking on an image and copying the image location. If you want to reference a website other than your own, you must include <strong>http://</strong> before the domain name.</div></div>';D.get("squarespace-image-select-url-selector").value=(this.properties.data["src"].indexOf("wysiwyg-image.png")!=-1?"":this.properties.data["src"]);if(YAHOO.env.ua.ie){setTimeout(function(){D.get("squarespace-image-select-url-selector").focus();},10);}else{D.get("squarespace-image-select-url-selector").focus();}E.addListener("squarespace-image-select-url-selector","change",function(){Squarespace.ImageSelector.properties.data["src"]=D.get("squarespace-image-select-url-selector").value;Squarespace.ImageSelector.properties.data["newfile"]=true;Squarespace.ImageSelector.render();});this.setLabels("Save &amp; Close");}},{name:"resize",label:"Resize",onShow:function(){if(this.properties.data["src"].startsWith("/")&&!this.properties.data["src"].startsWith("/universal/")){D.get(this.type+"-right-column").innerHTML='<div style="height: 206px; width: 390px;"><div id="image-resize-options"><div class="file-select-field-title">New Image Width</div><div class="file-select-field-text"><input type="text" class="text" id="squarespace-image-select-resizeto" maxlength="4" value="'+this.getElementWidth()+'" style="width: 40px; float: left;"/><div style="float: left; color: white; font-size: 22px; padding-top: 3px; padding-left: 8px;">px</div></div>'+'<div style="float: left; padding-left: 10px; margin-top: -5px;"><input type="checkbox" id="squarespace-image-selector-createthumbnail" style="float: left;">       <label for="squarespace-image-selector-createthumbnail"        style="float: left; padding-top: 4px; padding-left: 5px; cursor: pointer;" class="file-select-field-title">Create a Thumbnail (Don\'t Modify Original Image)</label><br class="clearer"/></div>'+'<div style="padding-top: 15px; clear: both;">By creating a thumbnail of this image, the original image will remain available when clicking on the generated thumbnail.  If you do not specify to create a thumbnail, the original image will be resized.</div>'+'<div style="padding-top: 15px;">'+Squarespace.HTML.createButton("Resize Original Image","Squarespace.ImageSelector.resize();",false,"squarespace-image-resize-button")+"</div>"+'</div><div id="image-resize-progress" style="display: none;"><strong>Resizing in progress.</strong>  Please wait!</div></div>';if(YAHOO.env.ua.ie){setTimeout(function(){D.get("squarespace-image-select-resizeto").focus();},10);}else{D.get("squarespace-image-select-resizeto").focus();}E.addListener("squarespace-image-selector-createthumbnail","change",function(){D.get("squarespace-image-resize-button").innerHTML="<span>"+(D.get("squarespace-image-selector-createthumbnail").checked?"Create Thumbnail":"Resize Original Image")+"</span>";if(D.get("squarespace-image-selector-createthumbnail").checked){D.get("squarespace-image-select-resizeto").value="150";Squarespace.ImageSelector.properties.data["previewWidth"]=150;Squarespace.ImageSelector.render();}else{D.get("squarespace-image-select-resizeto").value="";Squarespace.ImageSelector.properties.data["previewWidth"]="";Squarespace.ImageSelector.render();}});E.addListener("squarespace-image-select-resizeto","keyup",function(A){if(A.keyCode==13){Squarespace.ImageSelector.resize();return ;}if(D.get("squarespace-image-select-resizeto").value!=""){Squarespace.ImageSelector.properties.data["previewWidth"]=parseInt(D.get("squarespace-image-select-resizeto").value);setTimeout(function(){Squarespace.ImageSelector.render();},600);}});}else{D.get(this.type+"-right-column").innerHTML='<div style="height: 206px; width: 390px;"><strong>This image does not appear to be hosted in your Squarespace account.</strong>  We can only resize images that are in your General Storage or other Squarespace module.</div>';}this.setLabels("Save &amp; Close");}},{name:"align",label:"Alignment",onShow:function(){D.get(this.type+"-right-column").innerHTML='<div style="height: 206px; width: 390px;">Alignment controls how this image is presented with relation to surrounding text.<br/><br/>'+'<div style="float: left; padding-right: 25px; cursor: pointer;"><img id="squarespace-image-align-float-left" src="../../../universal/images/manager/image-align-float-left.png"/></div>'+'<div style="float: left; padding-right: 25px; cursor: pointer;"><img id="squarespace-image-align-inline"  src="../../../universal/images/manager/image-align-inline.png"/></div>'+'<div style="float: left; padding-right: 25px; cursor: pointer;"><img id="squarespace-image-align-block" src="../../../universal/images/manager/image-align-block.png"/></div>'+'<div style="float: left; padding-right: 25px; cursor: pointer;"><img id="squarespace-image-align-float-right" src="../../../universal/images/manager/image-align-float-right.png"/></div>'+"</div>";D.get("squarespace-image-align-"+this.properties.data["align"]).src="/universal/images/manager/image-align-"+this.properties.data["align"]+"-active.png";E.addListener(["squarespace-image-align-float-left","squarespace-image-align-float-right","squarespace-image-align-block","squarespace-image-align-inline"],"click",function(B){var C=E.getTarget(B);var A=C.id.substring(24);D.get("squarespace-image-align-"+Squarespace.ImageSelector.properties.data["align"]).src="/universal/images/manager/image-align-"+Squarespace.ImageSelector.properties.data["align"]+".png";Squarespace.ImageSelector.properties.data["align"]=A;D.get("squarespace-image-align-"+Squarespace.ImageSelector.properties.data["align"]).src="/universal/images/manager/image-align-"+Squarespace.ImageSelector.properties.data["align"]+"-active.png";Squarespace.ImageSelector.render();});this.setLabels("Save &amp; Close");}},{name:"link",label:"Link / Caption",onShow:function(){D.get(this.type+"-right-column").innerHTML='<div style="height: 206px; width: 390px;">'+'<div><div class="file-select-field-title">Link Location (URL)</div><div class="file-select-field-text"><input type="text" class="text" id="squarespace-image-select-url"/></div><div style="padding-top: 10px;"/></div>'+'<div><div class="file-select-field-title">Image Caption</div><div class="file-select-field-text"><input type="text" class="text" id="squarespace-image-select-caption"/></div><div style="padding-top: 10px;"/></div>'+'<input type="checkbox" id="squarespace-image-select-url-newwindow" style="float: left;">       <label for="squarespace-image-select-url-newwindow"        style="float: left; padding-top: 4px; padding-left: 5px; cursor: pointer;" class="file-select-field-title">Open Link in New Window</label><br class="clearer"/>'+'<input type="checkbox" id="squarespace-image-select-thumbnailstyle" style="float: left;">      <label for="squarespace-image-select-thumbnailstyle"       style="float: left; padding-top: 4px; padding-left: 5px; cursor: pointer;" class="file-select-field-title">Use Thumbnail Stylings</label><br class="clearer"/>'+"</div></div>";D.get("squarespace-image-select-url").value=this.properties.data["linkUrl"];D.get("squarespace-image-select-caption").value=this.properties.data["caption"];if(this.properties.data["linkUrl"].trim().indexOf("javascript")==0){D.get("squarespace-image-select-url-newwindow").setAttribute("DISABLED","");}else{D.get("squarespace-image-select-url-newwindow").checked=this.properties.data["linkNewWindow"];}D.get("squarespace-image-select-thumbnailstyle").checked=this.properties.data["thumbnailStyle"];if(YAHOO.env.ua.ie){setTimeout(function(){D.get("squarespace-image-select-url").focus();},10);}else{D.get("squarespace-image-select-url").focus();}E.addListener("squarespace-image-select-url","change",function(){Squarespace.ImageSelector.properties.data["linkUrl"]=D.get("squarespace-image-select-url").value;Squarespace.ImageSelector.properties.data["linkRefresh"]=true;if(D.get("squarespace-image-select-url").value.trim().indexOf("javascript")==0){D.get("squarespace-image-select-url-newwindow").checked=false;D.get("squarespace-image-select-url-newwindow").setAttribute("DISABLED","");Squarespace.ImageSelector.properties.data["linkNewWindow"]=false;}else{D.get("squarespace-image-select-url-newwindow").removeAttribute("DISABLED");}Squarespace.ImageSelector.render();});E.addListener("squarespace-image-select-caption","change",function(){Squarespace.ImageSelector.properties.data["caption"]=D.get("squarespace-image-select-caption").value;Squarespace.ImageSelector.properties.data["captionRefresh"]=true;Squarespace.ImageSelector.render();});E.addListener("squarespace-image-select-url-newwindow","change",function(){Squarespace.ImageSelector.properties.data["linkNewWindow"]=D.get("squarespace-image-select-url-newwindow").checked;Squarespace.ImageSelector.render();});E.addListener("squarespace-image-select-thumbnailstyle","change",function(){Squarespace.ImageSelector.properties.data["thumbnailStyle"]=D.get("squarespace-image-select-thumbnailstyle").checked;Squarespace.ImageSelector.render();});this.setLabels("Save &amp; Close");}}]);},show:function(A){this.loadProperties({src:"",linkUrl:"",caption:"",align:"block",linkNewWindow:false,thumbnailStyle:false,initialSelector:A.data["initialSelector"]},A);this.properties.originalData={};for(i in this.properties.data){this.properties.originalData[i]=this.properties.data[i];}this.setTitle(this.properties.title);this.showDialog();this.selectTab(this.properties.initialSelector);},onSelectFile:function(F,C,G,B,A){this.properties.data.src=C;this.properties.data.newfile=true;this.render();},getCurrentSelectorNode:function(){return(this.properties.data.src);},onAcceptUpload:function(A){this.onSelectFile(null,A.targetFileUrl);this.selectTab("resize");},cancel:function(A){if(this.isVisible()){if(A){this.properties.actions.onChange(this.properties.data);this.properties.actions.onCancel(this.properties.data,false);}else{this.properties.actions.onChange(this.properties.originalData);this.properties.actions.onCancel(this.properties.originalData,true);}this.hideDialog();}}});Squarespace.CodeEditorDialog=Class.extend(Squarespace.EditorDialog,{initialize:function(){this.createDialog("code",[{name:"code",label:"Code",onShow:function(){this.container.innerHTML='<div class="file-select-title-strip"><div id="'+this.type+'-dialog-title" class="file-select-title">Edit Script</div></div>'+'<div class="file-select-location-strip"><div style="height: 206px; width: 390px; padding-left: 20px;">'+'<div><div class="file-select-field-title">HTML Code (include enclosing tags)</div><div class="file-select-field-text"><textarea style="height: 190px; width: 500px;" type="text" class="text" id="squarespace-code-editor-html"></textarea></div></div>'+"</div></div>"+'<div class="file-select-button-strip">'+'<span style="padding-right: 6px; float: left;">'+Squarespace.HTML.createButton("Save &amp; Close","Squarespace.CurrentDialog.accept();",true,"squarespace-code-editor-button")+"</span>"+Squarespace.HTML.createButton("Cancel","Squarespace.CurrentDialog.cancel();")+'<br class="clearer"/>'+"</div>";E.addListener("squarespace-code-editor-html","change",function(){Squarespace.CurrentDialog.properties.data["code"]=D.get("squarespace-code-editor-html").value;});}}]);},show:function(A){this.loadProperties({},A);this.properties.originalData={};for(i in this.properties.data){this.properties.originalData[i]=this.properties.data[i];}this.setTitle(this.properties.title);this.showDialog();D.get("squarespace-code-editor-html").value=this.properties.data["code"];D.get("squarespace-code-editor-html").focus();},cancel:function(A){if(this.isVisible()){if(this.properties){if(A){this.properties.actions.onAccept(this.properties.data);}else{this.properties.actions.onAccept(this.properties.originalData);}}this.hideDialog();}}});Squarespace.SlideShowSelectorDialog=Class.extend(Squarespace.EditorDialog,{initialize:function(){this.createDialog("slideshow",[{name:"slideShow",label:"slideShow",onShow:function(){this.container.innerHTML='<div class="file-select-title-strip"><div id="'+this.type+'-dialog-title" class="file-select-title">Edit Script</div></div>'+'<div class="slideshow-config-strip" style="height:435px">'+'<iframe id="squarespace-image-browser-frame" frameborder="0" style="height:435px; width: 550px; overflow: hidden; visibility:visible !important; border: 0px; padding: 0; margin: 0;" src="/display/admin/ModuleSlideShowComponent?type=module&R='+new Date().getTime()+'"></iframe>'+"</div>"+'<div class="file-select-button-strip">'+'<span style="padding-right: 6px; float: left;">'+Squarespace.HTML.createButton("Save &amp; Close","if (!YAHOO.util.Dom.hasClass(this, 'button-disabled')) { Squarespace.CurrentDialog.accept(); }",true,"squarespace-slideshow-editor-button")+"</span>"+Squarespace.HTML.createButton("Cancel","Squarespace.CurrentDialog.cancel();")+'<br class="clearer"/>'+"</div>";E.addListener("squarespace-code-editor-html","change",function(){Squarespace.CurrentDialog.properties.data["code"]=D.get("squarespace-code-editor-html").value;});}}]);},show:function(B){this.loadProperties({},B);this.properties.originalData={};for(i in this.properties.data){this.properties.originalData[i]=this.properties.data[i];}this.setTitle(this.properties.title);this.showDialog();var C=this.properties.data["params"];var A=this.properties.data["gallery"];var F=this.properties.data["configId"];if(this.properties.forceUpdate){Squarespace.SlideShowPreview.showForceUpdate(C,A);}else{Squarespace.SlideShowPreview.initialize(C,A);}},cancel:function(A){if(this.isVisible()){if(this.properties.actions.onCancel){this.properties.actions.onCancel(A?this.properties.data:this.properties.originalData);}this.hideDialog();}}});Squarespace.SelectableTable={itemInformation:{},markedCount:0,noShowPeriod:null,baseBackgroundColor:"#ffffff",selectedBackgroundColor:"#e9efe6",initialize:function(){var B=YAHOO.util.Dom.getElementsByClassName("markableRow","tr");for(var A=0;A<B.length;++A){var F=B[A];var C=F.getElementsByTagName("td");Squarespace.SelectableTable.itemInformation[F.id]=new Object();Squarespace.SelectableTable.itemInformation[F.id].elementId=Squarespace.SelectableTable.getIdFromSource(F);Squarespace.SelectableTable.itemInformation[F.id].rowElement=F;Squarespace.SelectableTable.itemInformation[F.id].lastTd=C[C.length-1];Squarespace.SelectableTable.itemInformation[F.id].markLinkElement=document.getElementById("MarkLink-"+Squarespace.SelectableTable.itemInformation[F.id].elementId);Squarespace.SelectableTable.itemInformation[F.id].marked=false;E.addListener(C,"mouseup",function(I){var H=E.getTarget(I);while(H!=null){if(H.tagName=="A"||H.tagName=="SELECT"){return ;}H=H.parentNode;}if(window.getSelection&&window.getSelection()){if(window.getSelection().toString().length>0){return ;}}Squarespace.SelectableTable.toggleItem(this.parentNode.id);var G=E.getTarget(I);while(G!=null&&G.tagName!="TR"){G=G.parentNode;}var J=Squarespace.SelectableTable.itemInformation[G.id].lastTd;YAHOO.util.Dom.setStyle(J,"background-image","none");});E.addListener(C,"mouseout",function(H){var G=E.getTarget(H);while(G!=null&&G.tagName!="TR"){G=G.parentNode;}var I=Squarespace.SelectableTable.itemInformation[G.id].lastTd;YAHOO.util.Dom.setStyle(I,"background-image","none");});E.addListener(C,"mouseover",function(H){var G=E.getTarget(H);while(G.tagName!="TR"){G=G.parentNode;}if(!YAHOO.util.Dom.hasClass(G,"markedRow")){var I=Squarespace.SelectableTable.itemInformation[G.id].lastTd;YAHOO.util.Dom.setStyle(I,"background-position",(I.offsetWidth-100)+"px "+(I.offsetHeight-25)+"px");YAHOO.util.Dom.setStyle(I,"background-repeat","no-repeat");YAHOO.util.Dom.setStyle(I,"background-image","url('../../../universal/images/manager/row-click-to-select-background.png')");}});}},setBaseBackgroundColor:function(A){this.baseBackgroundColor=A;},setSelectedBackgroundColor:function(A){this.selectedBackgroundColor=A;},toggleItem:function(G,B){Squarespace.SelectableTable.beforeToggle();var F=Squarespace.SelectableTable.itemInformation[G];var C=(B!=null?B:!F.marked);if(F.marked&&!C){--Squarespace.SelectableTable.markedCount;}else{if(!F.marked&&C){++Squarespace.SelectableTable.markedCount;}}F.marked=C;if(F.marked){F.rowElement.className="markedRow";new YAHOO.util.ColorAnim(F.rowElement.getElementsByTagName("td"),{backgroundColor:{from:this.baseBackgroundColor,to:this.selectedBackgroundColor}},0.15,YAHOO.util.Easing.easeOutStrong).animate();}else{F.rowElement.className="unmarkedRow";new YAHOO.util.ColorAnim(F.rowElement.getElementsByTagName("td"),{backgroundColor:{from:this.selectedBackgroundColor,to:this.baseBackgroundColor}},0.15,YAHOO.util.Easing.easeOutStrong).animate();}if(F.markLinkElement){F.markLinkElement.innerHTML=(F.marked?"deselect":"select");}if(Squarespace.SelectableTable.markedCount>0){document.getElementById("itemCountTextTop").innerHTML=Squarespace.SelectableTable.markedCount+(Squarespace.SelectableTable.markedCount==1?" item":" items");document.getElementById("itemCountTextBottom").innerHTML=Squarespace.SelectableTable.markedCount+(Squarespace.SelectableTable.markedCount==1?" item":" items");var A=new YAHOO.util.Anim(["multiItemActionTop","multiItemActionBottom"],{height:{to:77}},0.2,YAHOO.util.Easing.easeOut);A.onStart.subscribe(function(){YAHOO.util.Dom.setStyle(this.getEl(),"display","block");YAHOO.util.Dom.setStyle(this.getEl(),"overflow","hidden");});A.animate();}else{var A=new YAHOO.util.Anim(["multiItemActionTop","multiItemActionBottom"],{height:{to:1}},0.2,YAHOO.util.Easing.easeOut);A.onComplete.subscribe(function(){YAHOO.util.Dom.setStyle(this.getEl(),"display","none");});A.animate();}if(!B){Squarespace.SelectableTable.updateFormValues();}Squarespace.SelectableTable.afterToggle();},selectAll:function(){for(id in Squarespace.SelectableTable.itemInformation){Squarespace.SelectableTable.toggleItem(id,true);}Squarespace.SelectableTable.updateFormValues();},selectNone:function(){for(id in Squarespace.SelectableTable.itemInformation){Squarespace.SelectableTable.toggleItem(id,false);}Squarespace.SelectableTable.updateFormValues();},updateFormValues:function(){var A=[];for(id in Squarespace.SelectableTable.itemInformation){if(Squarespace.SelectableTable.itemInformation[id].marked){A.push(Squarespace.SelectableTable.itemInformation[id].elementId);}}document.getElementById("updateList").value=A.join(",");},getIdFromSource:function(F){var B=(F.id!=null?F.id:F);var A=B.indexOf("-");var C=B.substring(A+1);A=C.indexOf("-");if(A!=-1){return(C.substring(0,A));}else{return(C);}},beforeToggle:function(){},afterToggle:function(){}};Squarespace.HelpScriptInterpreter={EDIT_ENTRY:{name:"Edit Entry",description:"Editing a Journal Entry",steps:[{elementViaId:"noticeAreaMode-content",type:"directed-click",title:"Switch to Editing Mode",text:"Editing mode lets you adjust content on your site."},{elementViaId:"testlink",type:"directed-click",title:"Switch to Editing Mode",text:"Editing mode lets you adjust content on your site."},{elementViaId:"testlink2",type:"directed-click",title:"Do Something Else",text:"Editing mode lets you adjust content on your site."},{elementViaText:{type:"a",text:"modify"},type:"directed-click",title:"Click Edit Entry",text:"Bleh."},{type:"open-state",title:"Edit Your Entry",text:"Bleh."},{elementViaText:{type:"a",text:"Save & Close"},type:"directed-click",title:"Save You Entry",text:"Bleh."}]},init:false,currentStep:0,initialize:function(){if(!this.init){this.gridDivs=[];for(var A=0;A<9;++A){var B=document.createElement("div");B.innerHTML="&nbsp;";D.setStyle(B,"position","absolute");D.setStyle(B,"display","block");D.setStyle(B,"background-color","#303030");D.setStyle(B,"z-index","20000");Squarespace.Degraded.filterOpacity(B,"0");document.body.appendChild(B);this.gridDivs.push(B);}B=document.createElement("div");D.setStyle(B,"position","absolute");D.setStyle(B,"display","block");D.setStyle(B,"color","#ffffff");D.setStyle(B,"z-index","20002");Squarespace.Degraded.filterOpacity(B,"0");document.body.appendChild(B);this.textDiv=B;B=document.createElement("div");D.setStyle(B,"position","absolute");D.setStyle(B,"display","block");D.setStyle(B,"padding","20px");D.setStyle(B,"z-index","20001");D.setStyle(B,"background-color","#000000");Squarespace.Degraded.filterOpacity(B,"0");document.body.appendChild(B);this.faderDiv=B;this.init=true;}},viewScript:function(A){this.currentStep=0;this.currentScript=A;this.initialize();this.executeStep();},executeStep:function(){var I=Squarespace.HelpScriptInterpreter;var C=I.currentScript.steps[I.currentStep];var B=null;if(C.elementViaId){B=D.get(C.elementViaId);}else{if(C.elementViaText){}}if(!B){alert("SCRIPT ERROR: Unable to find step target.");}var A=D.getXY(B);var F=[B.offsetWidth,B.offsetHeight];A[0]=parseInt(A[0]);A[1]=parseInt(A[1]);F[0]=parseInt(F[0]);F[1]=parseInt(F[1]);var H=20;console.dir(A);console.dir(F);D.setXY(I.gridDivs[0],[0,0]);D.setStyle(I.gridDivs[0],"width",A[0]+"px");D.setStyle(I.gridDivs[0],"height",(A[1]-H)+"px");D.setXY(I.gridDivs[1],[A[0],0]);D.setStyle(I.gridDivs[1],"width",F[0]+"px");D.setStyle(I.gridDivs[1],"height",(A[1]-H)+"px");D.setXY(I.gridDivs[2],[A[0]+F[0],0]);D.setStyle(I.gridDivs[2],"width",(D.getViewportWidth()-A[0]+F[0])+"px");D.setStyle(I.gridDivs[2],"height",(A[1]-H)+"px");D.setXY(I.gridDivs[3],[0,A[1]-H]);D.setStyle(I.gridDivs[3],"width",(A[0]-H)+"px");D.setStyle(I.gridDivs[3],"height",(F[1]+H*2)+"px");D.setXY(I.gridDivs[5],[A[0]+F[0]+H,A[1]-H]);D.setStyle(I.gridDivs[5],"width",(D.getViewportWidth()-A[0]+F[0]-H)+"px");D.setStyle(I.gridDivs[5],"height",(F[1]+H*2)+"px");D.setXY(I.gridDivs[6],[0,A[1]+F[1]+H]);D.setStyle(I.gridDivs[6],"width",A[0]+"px");D.setStyle(I.gridDivs[6],"height",(D.getViewportHeight()-A[1]+F[1]-H*2)+"px");D.setXY(I.gridDivs[7],[A[0],A[1]+F[1]+H]);D.setStyle(I.gridDivs[7],"width",F[0]+"px");D.setStyle(I.gridDivs[7],"height",(D.getViewportHeight()-A[1]+F[1]-H*2)+"px");D.setXY(I.gridDivs[8],[A[0]+F[0],A[1]+F[1]+H]);D.setStyle(I.gridDivs[8],"width",(D.getViewportWidth()-A[0]+F[0])+"px");D.setStyle(I.gridDivs[8],"height",(D.getViewportHeight()-A[1]+F[1]-H*2)+"px");new YAHOO.util.Anim(I.gridDivs,{opacity:{to:0.4}},0.5,YAHOO.util.Easing.easeOutStrong).animate();var G='<div style="font-size: 22px; color: white; [v]">'+C.title+'<span style="padding-left: 10px; font-size: 10px; [v]">Step '+(I.currentStep+1)+'</span></div><div style="font-size: 14px; padding-top: 10px; [v]">'+C.text+"</div>";D.setXY(I.faderDiv,[A[0],A[1]+F[1]+H*3]);I.faderDiv.innerHTML=G.replace(new RegExp("\\[v\\]","g"),"visibility: hidden");D.setXY(I.textDiv,[A[0]+20,A[1]+F[1]+H*3+20]);I.textDiv.innerHTML=G.replace(new RegExp("\\[v\\]","g"),"");new YAHOO.util.Anim(I.faderDiv,{opacity:{to:0.8}},0.5,YAHOO.util.Easing.easeOutStrong).animate();new YAHOO.util.Anim(I.textDiv,{opacity:{to:1}},0.5,YAHOO.util.Easing.easeOutStrong).animate();E.addListener(B,"click",this.stepComplete,null,this);},stepComplete:function(){var A=Squarespace.HelpScriptInterpreter;new YAHOO.util.Anim(A.gridDivs,{opacity:{to:0}},0.5,YAHOO.util.Easing.easeOutStrong).animate();new YAHOO.util.Anim([A.faderDiv,A.textDiv],{opacity:{to:0}},0.5,YAHOO.util.Easing.easeOutStrong).animate();++A.currentStep;setTimeout(function(){A.executeStep();},600);}};Squarespace.Dom.fastLoad(function(){E.addListener(document,"click",Squarespace.AnchoredSelectManager.checkClose,false,Squarespace.AnchoredSelectManager);setTimeout(function(){var B=document.getElementsByTagName("iframe");for(var A=0;A<B.length;++A){E.addListener(B[A].contentWindow,"click",Squarespace.AnchoredSelectManager.checkClose,false,Squarespace.AnchoredSelectManager);}},2000);});var __oldContent=null;var __managerAnim=null;Squarespace.Interaction.managerAbout=function(){if(__managerAnim&&__managerAnim.isAnimated()){return ;}if(!__oldContent){__oldContent=D.get("management-strip-content").innerHTML;__managerAnim=new YAHOO.util.Anim("management-strip-content",{opacity:{to:0}},0.3,YAHOO.util.Easing.easeOutStrong);__managerAnim.onComplete.subscribe(function(B,A,C){D.get("management-strip-content").innerHTML='<div style="background: url(/universal/images/v5-about.png) no-repeat scroll 0 0; height: 155px; margin-top: -25px;"><div style="font-size: 12px; color: #ddd; padding: 90px 0 0 196px;">Hand crafted by <a target="_blank" style="color: #fff; border-bottom: 1px dotted #ccc;" href="http://www.squarespace.com/about/">Squarespace Inc.</a> in New York City.&nbsp;  <a style="color: #fff; border-bottom: 1px dotted #ccc;" href="javascript:Squarespace.Interaction.managerAbout();">Return to the manager &rarr;</a></div></div>';new YAHOO.util.Anim("management-strip-content",{marginLeft:{from:-10,to:0},opacity:{to:1}},0.4,YAHOO.util.Easing.easeOutStrong).animate();});__managerAnim.animate();}else{__managerAnim=new YAHOO.util.Anim("management-strip-content",{marginLeft:{from:0,to:10},opacity:{to:0}},0.3,YAHOO.util.Easing.easeOutStrong);__managerAnim.onComplete.subscribe(function(B,A,C){D.setStyle("management-strip-content","margin-left","0px");D.get("management-strip-content").innerHTML=__oldContent;new YAHOO.util.Anim("management-strip-content",{opacity:{to:1}},0.4,YAHOO.util.Easing.easeOutStrong).animate();__oldContent=null;});__managerAnim.animate();}};Squarespace.InputBox=Class.extend(Squarespace.AnchoredSelect,{initialize:function(B,A){this.loadProperties({type:"inputbox",clearText:"None",clearable:true,direction:"down"},A);this.inputBoxValue=A.value;var C='<div class="squarespace-inputbox-wrapper">';C+='<div style="padding: 10px">'+A.description+'</div><div style="padding: 0 10px"><span style="float: left;"><input type="text" id="'+B+'_inputBox" value="'+A.value+'" size="12" maxlength="'+A.maxlength+'" onkeydown="if (event.keyCode == 13) { Squarespace.AnchoredSelectManager.getActiveControl().setInputValue(); '+A.url+' }" /></span>';C+='<span style="float: left; padding: 0 0 10px 10px;">'+Squarespace.HTML.createButton("&raquo;","Squarespace.AnchoredSelectManager.getActiveControl().setInputValue(); "+A.url)+"</span></div></div>";this.createControl(B,C);D.addClass(this.getAnchoredField(),"input-box");},setInputValue:function(){this.inputBoxValue=D.get(this.getSetName()+"_inputBox").value;},getInputValue:function(){return this.inputBoxValue;},onUpdate:function(){},onShow:function(){},onHide:function(){}});if(isDefined("window.SSQUICKPOST")){Squarespace.ConfigurationTray.showContentEditor("http://"+window.SSQUICKPOST[0]+"/display/admin/CreateOrModifyJournalEntry?moduleId="+window.SSQUICKPOST[1]+"&quickpost=true");}Squarespace.HorizontalConfigSlider=Class.create({initialize:function(properties){this.loadProperties(properties);this.horizontalSlider=YAHOO.widget.Slider.getHorizSlider(this.properties.backgroundImage,this.properties.sliderImage,this.properties.leftMovement,this.properties.rightMovement);var valueRange=this.properties.maxValue-this.properties.minValue;var pixelRange=this.properties.rightMovement-this.properties.leftMovement;this.horizontalSlider.scaleFactor=pixelRange/valueRange;this.horizontalSlider.scaleConstant=this.properties.minValue;this.horizontalSlider.updateableDisplayValue=this.properties.updateableDisplayValue;this.horizontalSlider.updateableFormValue=this.properties.updateableFormValue;var onChangeEventCallback=this.properties.onChangeEventCallback;var unitLabel=this.properties.unitLabel;var multiplier=this.properties.valueMultiplier;var roundDisplayToEven=this.properties.roundDisplayToEven;this.horizontalSlider.onChange=function(offset){var normalizedOffset=offset/this.scaleFactor;var actualValue=Math.round(normalizedOffset)+this.scaleConstant;if(multiplier){actualValue*=multiplier;}if(roundDisplayToEven){if(unitLabel!=null){D.get(this.updateableDisplayValue).innerHTML=(actualValue*2)+unitLabel;}else{D.get(this.updateableDisplayValue).innerHTML=actualValue*2;}}else{if(unitLabel!=null){D.get(this.updateableDisplayValue).innerHTML=actualValue+unitLabel;}else{D.get(this.updateableDisplayValue).innerHTML=actualValue;}}D.get(this.updateableFormValue).value=actualValue;if(onChangeEventCallback){eval(onChangeEventCallback);}};},setValue:function(A){this.horizontalSlider.setValue((A-this.horizontalSlider.scaleConstant)*this.horizontalSlider.scaleFactor);}});