var D=YAHOO.util.Dom;var E=YAHOO.util.Event;Squarespace.Social={WIDGET_LOAD_COUNTER:0};Squarespace.Social.TwitterWidget=Class.create({initialize:function(B,A){this.moduleId=B;this.twitterers=[];this.tweets=[];this.currentPage=0;this.retryCount=0;this.loading=false;this.loadProperties({preset:"basic-preset",pageSize:2,followMeText:"Follow @username",filter:"",filterType:"any",filterAtReplies:true,filterRetweets:true,maxRetries:8,loadingAnim:"fadeIn",pagingAnim:true},A);Squarespace.Social.WIDGET_LOAD_COUNTER++;},show:function(){var A=this;var B={handleResponse:function(F){var C=YAHOO.lang.JSON.parse(F.getResponse());A.clearError();if(C.statusCode==200){A.tweets=C.data.tweets;A.twitterers=C.data.twitterers;if(A.tweets.length>0){A.loadTwitterers();A.loadTweets(false,false);if(A.loading){A.clearLoading("data");}else{A.showWidget();}}}else{if(C.statusCode==102){if(!A.loading&&A.properties.maxRetries>0){A.showLoading();}if(A.retryCountFLICKR_SIZE_THUMBNAIL&&sidebarWidth<=FLICKR_SIZE_SQUARE){imageDataArray.push(eval("imageData."+FLICKR_URL_SQUARE));}else{if(sidebarWidth>FLICKR_SIZE_SQUARE&&sidebarWidth<=FLICKR_SIZE_SMALL){imageDataArray.push(eval("imageData."+FLICKR_URL_SMALL));}else{if(sidebarWidth>FLICKR_SIZE_SMALL){imageDataArray.push(eval("imageData."+FLICKR_URL_MEDIUM));}}}}if(thisWidget.properties.showSlideTransition){if(thisWidget.properties.slideTransitionFade){var firstSlideElement=D.get("flickr-container-"+thisWidget.moduleId+"-1");D.addClass(firstSlideElement,"selected-slide");transitionType="fade";}else{if(thisWidget.properties.slideTransitionSwipe){transitionType="swipe";}}}else{var firstSlideElement=D.get("flickr-container-"+thisWidget.moduleId+"-1");D.addClass(firstSlideElement,"selected-slide");transitionType="none";}}}var preloader2=new Squarespace.Social.Preloader();preloader2.setModule(thisWidget.moduleId,transitionType,thisWidget.properties.autoCrop,sidebarWidth,thisWidget.properties.preset,null,null);preloader2.add(imageDataArray);preloader2.load();}Squarespace.Social.WIDGET_LOAD_COUNTER--;if(Squarespace.SectionEditingStripManager&&Squarespace.Social.WIDGET_LOAD_COUNTER==0){Squarespace.SectionEditingStripManager.reposition();}}else{if(response.statusCode==102||response.statusCode==204){if(thisWidget.retryCount==0&&thisWidget.properties.maxRetries>0){thisWidget.showLoading();}if(thisWidget.retryCountO){this.sbWidth=O;}var L=Math.floor(this.sbWidth/this.thumbsPerRow);var J;D.setStyle("flickr-grid-wrapper-"+this.moduleId,"width",(L*this.thumbsPerRow)+"px");D.setStyle("flickr-grid-list-item-"+this.moduleId+"-"+(F+1),"width",L+"px");D.setStyle("flickr-grid-list-item-"+this.moduleId+"-"+(F+1),"height",L+"px");D.setStyle("flickr-grid-link-item-"+this.moduleId+"-"+(F+1),"width",(L-(this.thumbPadding*2))+"px");D.setStyle("flickr-grid-link-item-"+this.moduleId+"-"+(F+1),"height",(L-(this.thumbPadding*2))+"px");D.setStyle("thumb-img-wrap-"+this.moduleId+"-"+(F+1),"width",(L-(this.thumbPadding*2))+"px");D.setStyle("thumb-img-wrap-"+this.moduleId+"-"+(F+1),"height",(L-(this.thumbPadding*2))+"px");D.setStyle(K,"position","absolute");if(M0){A.loadRssItems();if(A.loading){A.clearLoading("data");}else{A.showWidget();}}}else{if(C.statusCode==102){if(!A.loading&&A.properties.maxRetries>0){A.showLoading();}if(A.retryCount0){A.loadDeliciousItems();if(A.loading){A.clearLoading("data");}else{A.showWidget();}}}else{if(C.statusCode==102){if(!A.loading&&A.properties.maxRetries>0){A.showLoading();}if(A.retryCount':">";result+='";if(B!=this.deliciousItems[C-1].tags.length-1){result+=this.properties.delimiter;}}}F.innerHTML=result;}}else{D.setStyle("deli-item-"+this.moduleId+"-"+C,"display","none");}}}});Squarespace.Social.LocationWidget=Class.create({initialize:function(B,A){this.moduleId=B;this.checkinItems=[];this.retryCount=0;this.loading=false;this.loadProperties({map:null,mapStyle:null,pageSize:2,dateStyle:0,maxRetries:8,newWindow:true,loadingAnim:"fadeIn",username:"",feedsource:0,newWindow:false,showDate:true},A);Squarespace.Social.WIDGET_LOAD_COUNTER++;},show:function(){var A=this;var B={handleResponse:function(G){var C=YAHOO.lang.JSON.parse(G.getResponse());A.clearError();if(C.statusCode==200){A.checkinItems=C.data.checkins;if(A.checkinItems.length>0){if(A.loading){D.setStyle("lw-wrapper-"+A.moduleId,"display","block");D.setStyle("lw-loading-wrapper-"+A.moduleId,"display","none");A.setupMap();A.loadCheckinItems();A.showWidget();}else{A.setupMap();A.loadCheckinItems();A.showWidget();}}}else{if(C.statusCode==102){if(!A.loading&&A.properties.maxRetries>0){A.showLoading();}if(A.retryCount0){A.showLoading();A.retryCount++;YAHOO.lang.later(3000,A,"show",null,false);}else{if(A.retryCount'+this.checkinItems[Y-1].venueName+"";}else{if(this.properties.feedsource==1){R=" http://www.foursquare.com/venue/"+this.checkinItems[Y-1].venueId;H=X+R+'">'+this.checkinItems[Y-1].venueName+"";}else{if(this.properties.feedsource==2){R="http://www.facebook.com/pages/"+this.checkinItems[Y-1].venueName.replace(/ /gi,"-")+"/"+this.checkinItems[Y-1].venueId;H=X+R+'">'+this.checkinItems[Y-1].venueName+"";}else{R="";H=this.checkinItems[Y-1].venueName;}}}this.links[Y-1]=H;if(U){U.innerHTML=H;}var P;var W=this.checkinItems[Y-1].venueCity;var B=this.checkinItems[Y-1].venueState;if(W.length>0&&B.length>0){P="in "+W+", "+B;}else{if(W.length==0&&B.length==0){P="";}else{P="in "+(W.length>0?W:"")+(B.length>0?B:"");}}var U=D.get("lw-location-"+this.moduleId+"-"+Y);if(U){U.innerHTML=P;}if(this.properties.map){var F=this.checkinItems[Y-1].venueLat;var A=this.checkinItems[Y-1].venueLon;var K=new google.maps.LatLng(F,A);G.extend(K);var S=new google.maps.Marker({position:K,map:this.properties.map,icon:V});var T=new google.maps.InfoWindow({content:'
'+this.links[Y-1]+'
'+c+"
"});c="";this.infowins[Y-1]=T;this.markers[Y-1]=S;var O=this.properties.map;var J=this;var Q=function(i,e){return function(){for(m in J.infowins){if(J.infowins[m]!=i){J.infowins[m].close();}}for(k in J.markers){if(J.markers[k]!=e){J.markers[k].setIcon(V);J.markers[k].setZIndex(900);}else{J.markers[k].setIcon(N);J.markers[k].setZIndex(1000);}}i.open(O,e);};};google.maps.event.addListener(S,"click",Q(T,S));var Z=D.get("lw-item-"+this.moduleId+"-"+Y);if(Z){Z.lat=F;Z.lon=A;Z.onclick=Q(T,S);}}var U=D.get("lw-venue-icon-img-"+this.moduleId+"-"+Y);if(U){if(this.checkinItems[Y-1].iconUrl.length>0){U.src=this.checkinItems[Y-1].iconUrl;}else{D.setStyle(U,"display","none");}}var U=D.get("lw-venue-icon-"+this.moduleId+"-"+Y);if(U){U.href=R;}var U=D.get("lw-desc-"+this.moduleId+"-"+Y);if(U){U.innerHTML=this.checkinItems[Y-1].checkinMessage;}}else{D.setStyle("lw-item-"+this.moduleId+"-"+Y,"display","none");}}if(this.properties.map){this.properties.map.fitBounds(G);}}});