FwpConnect={init:function(){FwpConnect.adapters={};var A=FwpConnect.networks.facebook;if(A){FwpConnect.adapters.facebook=new FwpConnect.FacebookAdapter(A);}},connect:function(A,B){FwpConnect.adapters[A].connect(B);},logout:function(C){var B=0;for(name in FwpConnect.adapters){B++;}var A=0;for(name in FwpConnect.adapters){FwpConnect.adapters[name].logout(function(D){A++;if(A==B){C();}});}},logoutInternal:function(){for(name in FwpConnect.adapters){FwpConnect.adapters[name].logoutInternal();}},getLinkStatus:function(A,B){this.adapters[A.toLowerCase()].getLinkStatus(B);},logError:function(B,C,A){FwpConnect.handler.logError(B,C,A);},setCookie:function(B,F,A,H,E,G,D){var C=B+"="+((D)?escape(F):F)+((A)?";expires="+A.toGMTString():"")+((H)?";path="+H:"")+";domain="+FwpConnect.cookieDomain+((G)?";secure":"");document.cookie=C;},deleteCookie:function(A){FwpConnect.setCookie(A,"",new Date(),"/");}};FwpConnect.FacebookAdapter=function(B){this.networkName="Facebook";for(var A in B){this[A]=B[A];}var D=this;try{FB.init(this.apiKey,this.xdReceiverUri,{ifUserConnected:function(E){FB.Facebook.get_sessionState().waitUntilReady(function(){if(!D.loggedIn){D.login(E);}});},ifUserNotConnected:function(){if(FwpConnect.product=="iwon"){}else{if(D.loggedIn){D.logoutInternal();D.onDisconnect(D.networkName);}}}});}catch(C){FwpConnect.logError("Facebook","init",C.message||C);}};FwpConnect.FacebookAdapter.prototype.connect=function(B){this.tempOnLogin=B;try{FB.ensureInit(function(D){if(D){FwpConnect.logError("Facebook","FB.connect:ensureInit",D);}try{FB.Connect.requireSession();}catch(C){FwpConnect.logError("Facebook","requireSession",C.message||C);}});}catch(A){FwpConnect.logError("Facebook","connect:ensureInit",A.message||A);}};FwpConnect.FacebookAdapter.prototype.login=function(C){var B="birthday,sex,name,first_name,last_name,pic_square_with_logo,pic";var D=this;try{FB.Facebook.apiClient.users_getInfo(C,B,function(E,G){if(G){FwpConnect.logError("Facebook","FB.login:usersGetInfo",G);}else{D.loggedIn=FwpConnect.networks.facebook.loggedIn=true;var F=E[0];var I={product:FwpConnect.product,network:D.networkName,networkUserId:C,birthday:F.birthday,gender:F.sex.toUpperCase(),displayName:F.name,firstName:F.first_name,lastName:F.last_name,photoUrlSmall:F.pic_square_with_logo,photoUrl:F.pic};FwpConnect.fbUserInfo=I;var H=D.tempOnLogin;if(H){D.tempOnLogin=null;}else{H=D.onLogin;}if(FwpConnect.product!="zwinky"){FwpConnect.handler.networkLogin(I,function(J){H(I,J);});}else{H();}if(FwpConnect.product=="iwon"){if(typeof launchGameObject!="undefined"){urchinTracker("/clicks/fbconnect/gameplayer/login/"+launchGameObject.gameId+"/"+launchGameObject.signedIn);}else{urchinTracker("/clicks/fbconnect/pick7Invite/login");}}}});}catch(A){FwpConnect.logError("Facebook","login:usersGetInfo",A.message||A);}};FwpConnect.FacebookAdapter.prototype.logoutInternal=function(){this.loggedIn=false;FwpConnect.handler.networkLogout(this.networkName);};FwpConnect.FacebookAdapter.prototype.logout=function(C){var B=this;try{FB.ensureInit(function(E){if(E){FwpConnect.logError("Facebook","FB.logout:ensureInit",E);}if(B.loggedIn){try{FB.Connect.logout(function(F,G){if(G){FwpConnect.logError("Facebook","FB.logout",G);}if(F){B.logoutInternal();C(B.networkName);}});}catch(D){FwpConnect.logError("Facebook","logout",D.message||D);}}else{C(B.networkName);}});}catch(A){FwpConnect.logError("Facebook","logout:ensureInit",A.message||A);}};FwpConnect.FacebookAdapter.prototype.getLinkStatus=function(B){if(FwpConnect.product!="zwinky"){if(this.loggedIn){B();}else{if(this.isLinked){B(this.isLinked);}else{var A=this;FwpConnect.handler.getLinkStatus(this.networkName,function(C){A.isLinked=C;B(C);});}}}else{var A=this;FwpConnect.handler.getLinkStatus(this.networkName,function(C){A.isLinked=C.isLinked;A.hasMatch=C.hasMatch||false;A.isZwinkyLinked=C.isZwinkyLinked||false;A.linkedNetworkId=C.linkedNetworkId||0;B(C);});}};FwpConnect.RemoteHandler=function(){this.remoteHost="";};FwpConnect.RemoteHandler.prototype.networkLogin=function(params,onLogin){var thisRef=this;if(FwpConnect.product!="iwon"){$.post(this.remoteHost+"/networkLogin.jhtml",params,function(data,status){if(status=="success"){if(FwpConnect.product=="zwinky"){var dataObj=eval("("+data+")");thisRef.setCookies(dataObj);try{if(zwinkyPage&&zwinkyPage=="zwinkychatv2"){sUsername=dataObj.linkedUserName;}setDataController("1");}catch(e){}}else{var dataObj=eval("("+data+")");thisRef.setCookies(dataObj);}onLogin(dataObj.firstTime);}});}else{onLogin(params);}};FwpConnect.RemoteHandler.prototype.networkLogout=function(A){FwpConnect.deleteCookie(A+"UserInfo");};FwpConnect.RemoteHandler.prototype.getLinkStatus=function(networkName,callback){var thisRef=this;if(FwpConnect.product!="zwinky"){$.post(this.remoteHost+"/getLoggedOutCookie.jhtml",{network:networkName},function(data,status){if(status=="success"){var dataObj=eval("("+data+")");thisRef.setCookies(dataObj);callback(dataObj.isLinked);}});}else{if(typeof (FwpConnect.fbUserInfo)=="object"){$.post(this.remoteHost+"/getLinkStatus.jhtml",{network:networkName,networkId:FwpConnect.fbUserInfo.networkUserId},function(data,status){if(status=="success"){var dataObj=eval("("+data+")");callback(dataObj);}});}else{var linkedNetworkID='"linkedNetworkId":'+FwpConnect.adapters.facebook.linkedNetworkId;var isZwinkyLinked='"isZwinkyLinked":'+FwpConnect.adapters.facebook.isZwinkyLinked;var isLinked='"isLinked":'+FwpConnect.adapters.facebook.isLinked;var hasMatch='"hasMatch":'+FwpConnect.adapters.facebook.hasMatch;var tempObj=eval("({"+linkedNetworkID+","+isZwinkyLinked+","+isLinked+","+hasMatch+"})");callback(tempObj);}}};FwpConnect.RemoteHandler.prototype.setCookies=function(A){this.isLinked=A.isLinked;for(var B in A.cookies){var D=A.cookies[B];var C=new Date(new Date().getTime()+D.expiry*1000);FwpConnect.setCookie(D.name,D.value,C,"/",null,null,false);}};FwpConnect.RemoteHandler.prototype.logError=function(B,C,A){if(FwpConnect.product!="iwon"){$.post(this.remoteHost+"/logError.jhtml",{network:B,action:C,message:A},function(E,D){});}else{if(typeof launchGameObject!="undefined"){urchinTracker("/clicks/fbconnect/gameplayer/error/"+C.toLowerCase().replace(" ","_")+"/"+A.toLowerCase().replace(" ","_"));}else{urchinTracker("/clicks/fbconnect/pick7Invite/error/"+C.toLowerCase().replace(" ","_")+"/"+A.toLowerCase().replace(" ","_"));}}};FwpConnect.handler=new FwpConnect.RemoteHandler();FbPublish={templateBundleIds:{love:137441520211,tag:137441520211,createLayout:137441520211,friendsWall:139035750211,ownWall:137441520211,otherWall:189150965211,selfWall:189150965211,fShareGame:105111718460,fPostScore:105112833460,fPostChallengeWin:105114643460,fPostChallengeLoose:105114193460,fSharePick7:127223608460,ZwinkyDefaultPostAvatar:128323086975,ZwinkyHalloweentPostAvatar:158443051975},partnerIds:{love:"Zkzeb842",tag:"Zkzeb842",createLayout:"Zkzeb842",friendsWall:"Zkzeb841",ownWall:"Zkzeb840",selfWall:"ZKzeb920",otherWall:"ZKzeb921",notify:"Zkzeb843",local:"ZLzeb001",global:"ZVzeb001",zwinky:"ZJzeb031"},getPartnerId:function(A){var B=(parentPtnrVal!=null&&parentPtnrVal.length>0)?parentPtnrVal:"ZKxdm030";if(FwpConnect.product=="iwon"){return"partner="+FbPublish.partnerIds[A]+(B!="ZKxdm030"?"_"+B:"");}else{return"partner="+FbPublish.partnerIds[A]+"_"+B;}},verbs:{love:"loved",tag:"tagged",createLayout:"made",ownWall:"posted",friendsWall:"sent",selfWall:"took",otherWall:"took"},checkFeedSettings:function(A){return true;},publishFeed:function(F,C,G,E,A,I){var H=F.action=="ownWall"?"love":F.action;if(FbPublish.checkFeedSettings(H)){if(FbPublish.isWithinAllowedPublishCount()){var D=FbPublish.getTemplateData(F);try{if(FwpConnect.product=="iwon"){$("#fbPostModal").dialog("close");$("#replyPostModal").dialog("close");if(F.action=="fSharePick7"){urchinTracker("/clicks/fbconnect/pick7Invite/post");}else{urchinTracker("/clicks/fbconnect/gameplayer/post/"+launchGameObject.gameId+"/"+launchGameObject.signedIn);}}FB.Connect.showFeedDialog(FbPublish.templateBundleIds[F.action],D,C,G,E,A,function(J){if(J){FwpConnect.logError("Facebook","FB.publish:"+F.action,J);}else{FbPublish.updatePublishCount();}I(F);});}catch(B){FwpConnect.logError("Facebook","publish:"+F.action,B.message||B);}}else{if(("ownWall|friendsWall|selfWall|otherWall").match(F.action)!=-1){alert("Sorry, you have exceeded the daily Facebook feed posting limits.");}}}else{I();}},getTemplateData:function(D){var H;var C;var B;if(FwpConnect.product=="iwon"){H=getDownloadPath();B=H;if(D.action=="fSharePick7"){C={"play-href":H,"action-link-text":"Play Pick 7 Now!"};D.imageHref=H;}else{A=(D.action=="fPostChallengeWin"||D.action=="fPostChallengeLoose")?"Play now":launchGameObject.gameName;C={"game":"<a href='"+H+"' target='_blank'>"+launchGameObject.gameName+"</a>","score":finalScore,"score2":challengerScore,"click-here":"<a href='"+H+"' target='_blank'>"+A+"</a>","action-link":B,"action-link-text":"IWON Games"};}}else{if(FwpConnect.product=="zwinky"){if(D.type=="zwinkyImage"){var H=getZwinkyDownloadPath();var B=H;var A="Click Here";if(D.imageSrc.indexOf("dev")!=-1){alert("----- The Link: "+D.imageSrc+" \n\n --has a dev reference, so we are using a non dev reference.");D.imageSrc="http://assets.zwinky.com/facebook/fbTestImage/zwinkyTestFBImage.jpg";}else{D.imageSrc=D.imageSrc;}try{if(D.campaign&&D.campaign=="halloween"){C={"click-here":"<a href='"+H+"' target='_blank'>"+A+"</a>","click-html":"<a href='"+H+"' target='_blank'>"+A+"</a>","action-link":B,"action-link-text":"Halloween Yourself!","images":[{"src":D.imageSrc,"href":B}]};}else{C={"click-here":"<a href='"+H+"' target='_blank'>"+A+"</a>","click-html":"<a href='"+H+"' target='_blank'>"+A+"</a>","action-link":B,"action-link-text":"Create Your Cartoon!","images":[{"src":D.imageSrc,"href":B}]};}}catch(F){C={"click-here":"<a href='"+H+"' target='_blank'>"+A+"</a>","click-html":"<a href='"+H+"' target='_blank'>"+A+"</a>","action-link":B,"action-link-text":"Create Your Cartoon!","images":[{"src":D.imageSrc,"href":B}]};}return C;}}else{if(D.type!="Quiz"){H="<a href='"+D.topCatUrl+((D.topCatUrl.indexOf("?")!=-1)?"&"+FbPublish.getPartnerId(D.action):"?"+FbPublish.getPartnerId(D.action))+"&theme=fcbk'>Click here</a>";var E="<a href='"+D.assetUrl+((D.assetUrl.indexOf("?")!=-1)?"&"+FbPublish.getPartnerId(D.action):"?"+FbPublish.getPartnerId(D.action))+"&theme=fcbk'>Click here</a>";B=D.assetUrl+((D.assetUrl.indexOf("?")!=-1)?"&"+FbPublish.getPartnerId(D.action):"?"+FbPublish.getPartnerId(D.action))+"&theme=fcbk";C={"verb":FbPublish.verbs[D.action],"noun":D.type,"where":(D.action=="ownWall")?"to their wall":"at <a href='http://www.webfetti.com/home.jhtml?theme=fcbk&"+FbPublish.getPartnerId(D.action)+"'>Webfetti</a>","superfetti":"at <a href='http://apps.facebook.com/superfetti/'>Superfetti</a>","click-here":H,"click-here-one-liner":E,"do-what":(D.action=="createLayout")?"make":"post","image-section":D.imageSection,"action-link-text":"Get this "+D.typeForActionLink+" at Webfetti.com!","action-link":B};}else{if(D.type=="Quiz"){var G=D.assetUrl+"?"+FbPublish.getPartnerId(D.action)+"&ref=fb";H=" <a href='"+G+"'>Click here</a>";B=D.assetUrl;C={"noun":"<a href='"+G+"'>"+D.quizName+"</a>","result":"<a href='"+G+"'>"+D.quizResult+"</a>","blurb":D.quizBlurb,"action-link":G,"click-here":H};}}}}if(D.imagesRequired){C["images"]=[{"src":D.imageSrc.replace(" ",""),"href":B}];}else{C["video"]={"video_src":D.swfSrc,"preview_img":D.imageSrc};}return C;},publishIfPending:function(){var C=getCookie("fb_publish");if(C&&C.length>0){if(FbPublish.isWithinAllowedPublishCount()){var B=C.parseJSON();if(B.friendsWall){var A=ObjectToJSONString(B.assetData);window[B.friendsWallCallback].apply(this,new Array(A));FwpConnect.deleteCookie("fb_publish");}else{if(FwpConnect.networks.facebook.loggedIn){FbPublish.publishFeed(B,null,null,FB.FeedStorySize.full,FB.RequireConnect.promptConnect,function(){FwpConnect.deleteCookie("fb_publish");});}}}else{alert("Sorry, you have exceeded the daily Facebook post limits.");FwpConnect.deleteCookie("fb_publish");}}},getFriends:function(B){try{FB.ensureInit(function(D){if(D){FwpConnect.logError("Facebook","FB.ensureInit",D);}try{FB.Facebook.apiClient.friends_get(null,function(F,E){if(E){FwpConnect.logError("Facebook","FB.friendsGet",E);}B(F);});}catch(C){FwpConnect.logError("Facebook","friendsGet",C.message||C);}});}catch(A){FwpConnect.logError("Facebook","ensureInit",A.message||A);}},getInfo:function(C,A,D){try{FB.Facebook.apiClient.users_getInfo(C,A,function(F,E){if(E){FwpConnect.logError("Facebook","FB.getInfo",E);}D(F);});}catch(B){FwpConnect.logError("Facebook","getInfo",B.message||B);}},isWithinAllowedPublishCount:function(){var A=getCookie("fb_pub_counter");if(A&&A.length>0&&FwpConnect.product!="iwon"){var B=A.parseJSON();return B.count<10;}return true;},updatePublishCount:function(){var B=getCookie("fb_pub_counter");var A;if(B&&B.length>0){var C=B.parseJSON();A={count:(C.count)+1};}else{A={count:1};}},notifyFriends:function(C,B,D){try{FB.Facebook.apiClient.notifications_send(C,B,function(E,F){if(F){FwpConnect.logError("Facebook","FB.notify",F);}D();});}catch(A){FwpConnect.logError("Facebook","notify",A.message||A);}},inviteFriends:function(I,A,G,E,B,D,F){var C="<fb:fbml>"+'<fb:request-form method="post" type="'+I+'" action="'+A+'" invite="true" '+'content="'+G+" <fb:req-choice url='http://www.facebook.com/add.php?api_key="+E+"' label='"+B+"'/>\">"+'<fb:multi-friend-selector showborder="false" actiontext="'+D+'" cols="4">'+"</fb:multi-friend-selector>"+"</fb:request-form>"+"</fb:fbml>";var H=new FB.UI.FBMLPopupDialog(F,C);H.set_placement(FB.UI.PopupPlacement.center);H.setContentWidth(650);H.setContentHeight(600);H.show();},sendEmail:function(E,B,D,C,F){try{FbPublish.checkPermission("email",false,function(H){if(H!=0){try{FB.Facebook.apiClient.notifications_sendEmail(E,B,D,C,function(I,J){if(J){FwpConnect.logError("Facebook","FB.notifications_sendEmail",J);}F(I);});}catch(G){FwpConnect.logError("Facebook","notifications_sendEmail",G.message||G);}}});}catch(A){FwpConnect.logError("Facebook","checkPermission",A.message||A);}},checkPermission:function(A,B,D){try{FB.Facebook.apiClient.users_hasAppPermission(A,function(E){if(B&&E==0){try{FB.Connect.showPermissionDialog(A,D);}catch(F){FwpConnect.logError("Facebook","promptPermission",F.message||F);}}else{D(E);}});}catch(C){FwpConnect.logError("Facebook","FB.Facebook.apiClient.users_hasAppPermission",C.message||C);}}};var asset_for_fb_post={};var reload_after_post=false;var notificationMsg_part1="is using Webfetti to send ";var notificationMsg_part2=' to friends on Facebook. You can too, <a href="http://www.webfetti.com/home.jhtml?';var notificationMsg_part3='">click here!</a>';function extractAssetData(P){var B=true;var M="Custom Layouts";var J="Custom Layout";if(P=="createLayout"){var D="http://ak.webfetti.com/assets/layouts/tn/v1/my/1053/1053121.jpg";return{"imageSection":"<a href='"+window.location.href+"'><img src='"+D+"' /></a>","imageSrc":D,"type":M,"typeForActionLink":J,"assetUrl":"http://"+document.location.host+"/user-layouts/MySpace/"+urUserId+".jhtml","topCatUrl":window.location.href,"action":P,"imagesRequired":B};}var U="";var C="";var I;var V;if(dataSection=="quizzes"){var F=$("#FbQuizResult").val().split("|");U=F[2];M="Quiz";C=document.location.host+A+"Quizzes.jhtml";I=F[0];V=F[4];}else{var E="asset_display_placeholder_hidden_"+asset_for_fb_post.id;var A=$("#asset_display_placeholder_hidden_"+asset_for_fb_post.id).val().split("|")[1];U=$("#"+E).val().split("|")[2];U=U.substring(1,U.length);M=U.indexOf("/")!=-1?U.substring(0,U.indexOf("/")):U;if(A.charAt(0)!="/"){A="/"+A;}C="http://"+document.location.host+A+"/"+M+".jhtml";J=M.replace(/s$/,"");var A=$("#"+E).val().split("|")[1];var R=asset_for_fb_post.id;var L="";var G="";if(A.charAt(0)!="/"){A="/"+A;}V=$("#asset_display_placeholder_hidden_"+asset_for_fb_post.id).val().split("|")[0];I=$("#asset_display_placeholder_"+asset_for_fb_post.id+" a").attr("href");if(!I||I.length<0){var O=$("#asset_display_placeholder_hidden_"+asset_for_fb_post.id).val().split("|")[2];I="http://"+document.location.host+A+O;if(O.indexOf(".jhtml")==-1){I+=".jhtml";}}else{I="http://"+document.location.host+I;}}if(M=="Gidgets"||(M=="Graphics"&&V.indexOf(".swf")!=-1)){if($(".asset_rating :hidden").val()&&$(".asset_rating :hidden").val().split("|")[3]&&$(".asset_rating :hidden").val().split("|")[3]=="true"){L="<fb:swf swfsrc='"+V+"' "+"imgsrc='"+V.replace(".swf","p.gif")+"' "+"imgstyle='float:left' quality='high' loop='false' height='244' width='325'/>";G=V;V=V.replace(".swf","p.gif");}else{L="<fb:swf swfsrc='"+V.replace("p.gif",".swf")+"' "+"imgsrc='"+V+"' "+"imgstyle='float:left' quality='high' loop='false' height='244' width='325'/>";G=V.replace("p.gif",".swf");}if(I.indexOf("Gidgets/Gifts")!=-1){V="http://ak.webfetti.com/assets/toys/surpriseGift_preview.gif";}B=false;}else{if(M=="Smileys"&&V.indexOf(".swf")!=-1){if(!$.browser.msie){V="http://smileys.smileycentral.com/cat/"+$("#div_"+asset_for_fb_post.id+" object embed").attr("id")+"p.gif";if(document.location.href.indexOf("/favorites.jhtml")!=-1){I="http://"+document.location.host+$("#asset_display_placeholder_"+asset_for_fb_post.id+" a").attr("href");}}else{V="http://smileys.smileycentral.com/cat/"+$("#div_"+asset_for_fb_post.id+" object").attr("name")+"p.gif";if(document.location.href.indexOf("/favorites.jhtml")!=-1){I="http://"+document.location.host+$("#asset_display_placeholder_"+asset_for_fb_post.id).parent().attr("href");}}var N="";if(!$.browser.msie){N=$("#div_"+asset_for_fb_post.id+" object embed").attr("flashvars").replace(/'/g,"");}else{N=$("#div_"+asset_for_fb_post.id+" object > param[name='flashvars']").val().replace(/'/g,"");}L+="<fb:swf swfsrc='http://smileys.smileycentral.com/cat/F/uitransport_wf2.swf' "+"imgsrc='"+V+"' flashvars='auto=1&"+N+"' "+"imgstyle='float:left;width:154;height:110' quality='high' loop='false' height='182' width='130'/>";if(I.indexOf("?selectedPath=")==-1){I=window.location.href+"?selectedPath="+$("#assetPath_"+asset_for_fb_post.id).val();}G="http://smileys.smileycentral.com/cat/F/uitransport_wf2.swf?auto=1&"+N;B=false;}else{if(M=="Quiz"||M=="Glitter"||(M=="Smileys"&&V.indexOf(".gif")!=-1)||(M=="Graphics"&&V.indexOf(".gif")!=-1)){G="http://ak.webfetti.com/assets/gifLoader.swf?assetUrl="+encodeURIComponent(V);B=false;if(M=="Smileys"){if(I.indexOf("?selectedPath=")==-1){I=window.location.href+"?selectedPath="+$("#assetPath_"+asset_for_fb_post.id).val();}}}else{var H=((I.indexOf("?")!=-1)?"&":"?")+FbPublish.getPartnerId(P);var T=(I+H).replace(/'/g,"%27").replace(/,/g,"%2C").replace(/\!/g,"%21").replace(/#/g,"%23");T=T.replace(/\$/g,"%24").replace(/\?/g,"%3F");L="<a href='"+T+"'><img src='"+V+"' /></a>";if(M=="Cursors"){if(I.indexOf("?selectedPath=")==-1){I=window.location.href+"?selectedPath="+$("#assetPath_"+asset_for_fb_post.id).val();}}}}}asset_for_fb_post={};if(M=="Quiz"){if(P=="ownWall"){P="selfWall";}else{if(P=="friendsWall"){P="otherWall";}}var Q=F[1];var K=F[2];var S=F[3];return{"assetId":quizId,"imageSrc":V,"type":M,"quizName":Q,"quizResult":K,"quizBlurb":S,"assetUrl":I,"topCatUrl":C,"action":P,"imagesRequired":true};}else{return{"assetId":R,"imageSection":L,"imageSrc":V,"swfSrc":G,"type":M,"typeForActionLink":J,"assetUrl":I,"topCatUrl":C,"action":P,"imagesRequired":B};}}function fbHeaderUpdate(){$.ajax({type:"POST",url:permBaseUrl+"include/facebook_header.jhtml?returnUrl="+window.location.href,data:"html",success:function(A){$("#fbContainer").html(A);completeFB();}});}function fb_init(){$(".fb_post_btn, .fb_post_post_wall_btn, .fb_post_send_wall_btn, .fb_post_add_prof_btn").hover(function(){var A=$(this).attr("src");$(this).attr("src",A.replace(".gif","_over.gif"));},function(){var A=$(this).attr("src");$(this).attr("src",A.replace("_over.gif",".gif"));});$(".fb_post_btn").click(function(){log.once("fbpostmodal").profile(false);var K=(dataSection=="quizzes")?$("#FbQuizResult").val().split("|"):"";var B=(dataSection=="quizzes")?K[5]:($(this).parent().find(":hidden").val().split("|")[0]);var N=(dataSection=="quizzes")?K[2]:$(this).parent().find(":hidden").val().split("|")[2];if(B.length==0){B=s_cur_asset_id;N=$("#smiley_"+B).attr("title");}load_asset_click(B,false);log("FB Post Modal for %s (#%d)",N,B);var D=Number($("#assetHeight_"+B).val());var A=Number($("#assetWidth_"+B).val());var J=-1;if(D==0){J=0;}else{J=A/D;}log("Asset height, width, aspect from product.xml:",D,A,J);var C=$("#asset_"+B).height();var O=$("#asset_"+B).width();var G=-1;var F=false;if(C==0){G=0;}else{G=O/C;}log("Detected height, width, aspect:",C,O,G);if((D==0&&A==0)||(D.toString()=="NaN"&&A.toString()=="NaN")){log("Asset height, width not set in product.xml, using detected height, width");D=C;A=O;F=true;}else{if((J>1&&G<1)||(J<1&&G>1)){log.error("Asset height, width set in product.xml are inverted;  swapping them");var M=D;D=A;A=M;}}if(A>190&&D<=A){log("Width is excessive, scaling down");D=Math.round((190/A)*D);A=190;}else{if(D>190&&A<=D){log("Height is excessive, scaling down");A=Math.round((190/D)*A);D=190;}else{if((window.assetType!=21||F)&&window.assetType!=2){log("Asset is undersized, scaling up");if(A>=D){log("Width is largest dimension");D=Math.round((190/A)*D);A=190;}else{log("Height is largest dimension");A=Math.round((190/D)*A);D=190;}}}}log("Scaled height, width",D,A);var L;var I;if(dataSection=="quizzes"){L=K[0];I="Quiz";}else{L=$("#asset_display_placeholder_hidden_"+B).val().split("|")[2];L=L.substring(1,L.length);I=L.indexOf("/")!=-1?L.substring(0,L.indexOf("/")):L;var E=$("#asset_display_placeholder_hidden_"+B).val().split("|")[0];}if(I=="Smileys"&&E.indexOf(".swf")!=-1){if(!$.browser.msie){E="http://smileys.smileycentral.com/cat/tn/"+$("#div_"+B+" object embed").attr("id")+".jpg";}else{E="http://smileys.smileycentral.com/cat/tn/"+$("#div_"+B+" object").attr("name")+".jpg";}$("#fb_post_asset_display").attr("width",100);$("#fb_post_asset_display").attr("height",140);}else{if(I=="Gidgets"||(I=="Graphics"&&E.indexOf(".swf")!=-1)){if($(".asset_rating :hidden").val()&&$(".asset_rating :hidden").val().split("|")[3]&&$(".asset_rating :hidden").val().split("|")[3]=="true"){E=E.replace(".swf","p.gif");}if(A>0){$("#fb_post_asset_display").attr("width",A);}else{$("#fb_post_asset_display").removeAttr("width");}if(D>0){$("#fb_post_asset_display").attr("height",D);}else{$("#fb_post_asset_display").removeAttr("height");}}else{if(I=="Quiz"){E=K[4];$("#fb_post_asset_display").attr("width",188);$("#fb_post_asset_display").removeAttr("height");}else{if(A>0){$("#fb_post_asset_display").attr("width",A);}else{$("#fb_post_asset_display").removeAttr("width");}if(D>0){$("#fb_post_asset_display").attr("height",D);}else{$("#fb_post_asset_display").removeAttr("height");}}}}$("#fb_post_asset_display").attr("src",E);log("Showing modal");asset_for_fb_post={id:B,assetName:N};try{$("#fbPostModal").dialog("open");}catch(H){}ckTrk("/clicks/fbpostmodal/open/"+ratings_urchin_path);});$(".fb_post_post_wall_btn").click(function(){if(tbCheck("fb","",true)){ckTrk("/clicks/fbposttowall/"+(dataSection=="quizzes"?"q_":"")+s_cur_asset_id);$("#fbPostModal").dialog("close");var A=extractAssetData("ownWall");if(FwpConnect.networks.facebook.loggedIn){FbPublish.publishFeed(A,null,null,FB.FeedStorySize.full,FB.RequireConnect.promptConnect,function(B){if(FwpConnect.networks.facebook.loggedIn){invokeFriendsChooser(B);}else{FwpConnect.connect("facebook",function(){reload_after_post=true;invokeFriendsChooser(B);});}});}else{FwpConnect.connect("facebook",function(){reload_after_post=true;FbPublish.publishFeed(A,null,null,FB.FeedStorySize.full,FB.RequireConnect.promptConnect,function(){if(reload_after_post){reload_after_post=false;}});});}}});$(".fb_post_send_wall_btn").click(function(){if(dataSection=="quizzes"){ckTrk("/clicks/fbposttofriendswall/q_"+s_cur_asset_id);}else{ckTrk("/clicks/fbposttofriendswall/"+s_cur_asset_id);}if(tbCheck("fb","",true)){$("#fbPostModal").dialog("close");var A=extractAssetData("friendsWall");if(FwpConnect.networks.facebook.loggedIn){invokeFriendsChooser(A);}else{FwpConnect.connect("facebook",function(){reload_after_post=true;invokeFriendsChooser(A);});}}});createFbPostModal();createFriendsListModal();createFeedSettingsModal();}function alreadyPublished(C){var A=getCookie("fb_pub_track");if(A&&A.length>0){var B=A.parseJSON();if(B[C]&&(B[C]=="love"||B[C]=="tag")){return true;}}return false;}function saveUserActionOnAsset(C){var A=getCookie("fb_pub_track");var B={};if(A&&A.length>0){B=A.parseJSON();}var D=C;B[D.assetId]=D.action;setCookie("fb_pub_track",ObjectToJSONString(B),new Date(new Date().getTime()+(24*60*60*1000)),"/",null,null,false);}function onNetworkLogin(A,B){$(".regDisplayName").text(A.displayName);$(".facebookPhotoUrl").css("background","url("+A.photoUrl+") no-repeat bottom center");fbHeaderUpdate();}function onNetworkDisconnect(A){fbHeaderUpdate();}function showPromptConnectDialog(C,A,E,B){$("#promptConnectModal").dialog("destroy").dialog({autoOpen:false,draggable:true,resizable:false,modal:true,overlay:{opacity:0,background:"black"},dialogClass:"wf_fb_modal",position:"center",height:"auto",width:369,show:{effect:"fade",speed:500},hide:{effect:"fade",speed:250},close:A||function(){}}).show();$(".wf_fb_modal .ui-resizable-handle").hide();if($.browser.msie){$(".wf_fb_modal .ui-dialog-titlebar").hide();}$("#promptConnectModal #promptConnectButton").click(function(){if(B){B();}FwpConnect.connect("facebook",function(F,G){C(F,G);});});$("#promptConnectNoButton, #promptConnectModal .fb_dialog_cancel_button").click(function(){if(E){E();}$("#promptConnectModal").dialog("close");});try{$("#promptConnectModal").dialog("open");$("#regDisplayNameModal").html($(".regDisplayName").html());}catch(D){if(D.message=="Invalid argument."){}else{throw D;}}}function createFeedSettingsModal(){$("#feedSettingsModal").dialog({autoOpen:false,draggable:true,resizable:false,modal:true,overlay:{opacity:0,background:"black"},dialogClass:"wf_fb_modal",position:"center",height:"auto",width:369,show:{effect:"fade",speed:500},hide:{effect:"fade",speed:250},close:function(){saveFeedSettings(true,true,true);window.location.reload();}}).show();$(".wf_fb_modal .ui-resizable-handle").hide();if($.browser.msie){$(".wf_fb_modal .ui-dialog-titlebar").hide();}$("#feedSettingsModal input.ok").click(function(){$("#feedSettingsModal").dialog("close");});$("#feedSettingsModal .fb_dialog_cancel_button").click(function(){$("#feedSettingsModal").dialog("close");});}function createFbPostModal(){$("#fbPostModal").dialog({autoOpen:false,draggable:true,resizable:false,modal:true,overlay:{opacity:0,background:"black"},dialogClass:"wf_fb_modal",position:"center",height:"auto",width:416,show:{effect:"fade",speed:500},hide:{effect:"fade",speed:250},open:function(){},close:function(){ckTrk("/clicks/fbpostmodal/close/"+ratings_urchin_path);}}).show();$(".wf_fb_modal .ui-resizable-handle").hide();if($.browser.msie){$(".wf_fb_modal .ui-dialog-titlebar").hide();}$("#fbPostModal .fb_dialog_cancel_button").click(function(){$("#fbPostModal").dialog("close");});}function createFriendsListModal(){$("#friendsListModalExpanded").dialog({autoOpen:false,draggable:true,resizable:false,modal:true,overlay:{opacity:0,background:"black"},dialogClass:"wf_fb_modal",position:"center",height:"auto",width:600,show:{effect:"fade",speed:500},hide:{effect:"fade",speed:250},open:function(){ckTrk("/clicks/friendsListModal/open/"+ratings_urchin_path);},close:function(){ckTrk("/clicks/friendsListModal/close/"+ratings_urchin_path);}}).show();$(".wf_fb_modal .ui-resizable-handle").hide();if($.browser.msie){$(".wf_fb_modal .ui-dialog-titlebar").hide();}$("#friendsListModalExpanded .fb_dialog_cancel_button").click(function(){$("#friendsListModalExpanded").dialog("close");});$("#friends_list_send_btn").click(function(){var A=new Array();var D=0;$("#friends_chooser_div li.selected").each(function(){A[D++]=Number($(this).attr("id").split("_")[1]);});var C=notificationMsg_part1+asset_for_fb_post.type+notificationMsg_part2+FbPublish.getPartnerId("notify")+notificationMsg_part3;var B=function(){if(A.length>0){var E=new Array(1);E[0]=A.shift();FbPublish.publishFeed(asset_for_fb_post,E,null,FB.FeedStorySize.full,FB.RequireConnect.promptConnect,B);FbPublish.notifyFriends(E,C,function(){});}else{if(reload_after_post){reload_after_post=false;}}};B();$("#friendsListModalExpanded").dialog("close");});$("#friends_list_cancel_btn").click(function(){$("#friendsListModalExpanded").dialog("close");});}var invokeFriendsChooser=function(C){asset_for_fb_post=C;var A="name,pic_square,current_location";$("#friends_chooser_div").empty().append("<img src='http://ak.webfetti.com/fb/ajax-loader.gif' alt='loading...' style='margin:91px 0 0 217px;'/>");$("#asset_container").html($('img[id*="'+asset_for_fb_post.assetId+'"]').parent().html());FbPublish.getFriends(function(D){FbPublish.getInfo(D,A,showFriendsChooserDialog);});try{$("#friendsListModalExpanded").dialog("open");}catch(B){}};function showFriendsChooserDialog(A){var B="";if(A.length>1){A.sort(function(D,C){if(D.name>C.name){return 1;}else{if(D.name<C.name){return -1;}else{return 0;}}});B+=getFriendsChooser(A);}$("#friends_chooser_div").empty().append(B);$("#friends_chooser_div li").click(function(){if($(this).hasClass("selected")){$(this).removeClass("selected");}else{if($("#friends_chooser_div li.selected").length<3){$(this).addClass("selected");}else{var C=this;$(C).addClass("error");setTimeout(function(){$(C).removeClass("error");},1500);}}});$("#fb_friend_search").val("Start Typing a Friends' Name");$("#fb_friend_search").focus(function(){if($("#fb_friend_search").val().indexOf("Typing")!=-1){$("#fb_friend_search").val("");$("#friends_chooser_div li").show();}});$("#fb_friend_search").blur(function(){if($("#fb_friend_search").val().length==0){$("#fb_friend_search").val("Start Typing a Friends' Name");}});$.expr[":"].contains=function(D,E,C){return $(D).text().toUpperCase().indexOf(C[3].toUpperCase())>=0;};$("#fb_friend_search").keyup(function(){var C=$(this).val();if(C.length>0){$("#friends_chooser_div li").hide();$("#friends_chooser_div li:contains('"+C+"')").show();}else{$("#friends_chooser_div li").show();}});}function getFriendsChooser(A){var B="";$(A).each(function(E,C){var F=(C.current_location!=null&&C.current_location.city!=undefined)?getTruncatedLoc(C.current_location.city):"Undisclosed";var D=(C.pic_square!=null&&C.pic_square.length>0)?C.pic_square:"http://static.ak.fbcdn.net/pics/q_silhouette.gif";B+="<li id='friend_"+C.uid+"'><a href='javascript:;'>"+'<span class="friend_pic_square" style="background-image: url('+D+');">'+"<span>&nbsp;&nbsp;</span>"+"</span>"+getTruncatedName(C.name)+'<span id="location_span" class="friend_location">'+F+"</span>"+"</a></li>";});return B;}function getTruncatedName(A){var D=A.split(/\s/g);var C="";if(D.length>1){for(var B=0;B<D.length;B++){if(D[B].length>12){C+=D[B].substring(0,9)+"...";}else{C+=D[B];}if(B<D.length-1){C+=" ";}}}else{if(A.length>12){C=A.substring(0,9)+"...";}else{C=A;}}return C;}function getTruncatedLoc(A){if(A.length>12){A=A.substring(0,9)+"...";}return A;}function getFeedSettings(){var cookie=getCookie("feed_settings");if(!cookie){return null;}return eval("({"+cookie+"})");}function saveFeedSettings(A,D,C){var B="tag:"+A+",";B+="love:"+D+",";B+="createLayout:"+C;setCookie("feed_settings",B,null,"/",null,null);}function checkFeedSettings(A){return true;}function shouldPromptToConnect(){return !(getCookie("shouldPromptToConnect")=="false");}function dontConnectNow(){setCookie("shouldPromptToConnect",false,new Date(new Date().getTime()+(24*60*60*1000)),"/",null,null);}function completeFB(){FB.ensureInit(function(){log.once("headerreglinks");log("Attaching FB Connect callbacks to header reg links.");log("Attaching to connect link.");$("#header_reg_links .preconnect").removeClass("preconnect").addClass("connect").add("#header_connect").click(function(){if(isUserLoggedIn){$("#promptConnectModal .body1").hide();$("#promptConnectModal .body2").show();$("#promptConnectModal #promptConnectNoButton").attr("value","Cancel");showPromptConnectDialog(onNetworkLogin,null,null,function(){$("#promptConnectModal").dialog("close");});}else{FwpConnect.connect("facebook");}return false;});log("Attaching to register/login link.");$("#header_reg_links a.registerLogin").click(FwpConnect.logoutInternal);if($(".preRegisterLogin").length>0){$(".preRegisterLogin, .registerLogin").toggle();}else{$(".preViewProfile, .viewProfile, .preLogout, #header_reg_links .logout").toggle();}log("Attaching to logout links, including a few in modals.");$("a.logout").each(function(){var A=$(this).attr("href");log.once("headerreglinks","headerreglinkhref")("Attaching to a logout link with href:\n",unescape(A));$(this).attr("href","#").click(function(){FwpConnect.logout(function(){window.location=A;});});});log("Done attaching FB Connect callbacks.");});}function string_to_array(D){var A=D.length;var C=new Array(A);for(var B=0;B<A;B++){C[B]=D.charCodeAt(B);}return C;}function array_to_hex_string(C){var B="";for(var A=0;A<C.length;A++){B+=SHA256_hexchars[C[A]>>4]+SHA256_hexchars[C[A]&15];}return B;}function SHA256_init(){SHA256_H=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225);SHA256_buf=new Array();SHA256_len=0;}function SHA256_write(B){if(typeof (B)=="string"){SHA256_buf=SHA256_buf.concat(string_to_array(B));}else{SHA256_buf=SHA256_buf.concat(B);}for(var A=0;A+64<=SHA256_buf.length;A+=64){SHA256_Hash_Byte_Block(SHA256_H,SHA256_buf.slice(A,A+64));}SHA256_buf=SHA256_buf.slice(A);SHA256_len+=B.length;}function SHA256_finalize(){SHA256_buf[SHA256_buf.length]=128;if(SHA256_buf.length>64-8){for(var B=SHA256_buf.length;B<64;B++){SHA256_buf[B]=0;}SHA256_Hash_Byte_Block(SHA256_H,SHA256_buf);SHA256_buf.length=0;}for(var B=SHA256_buf.length;B<64-5;B++){SHA256_buf[B]=0;}SHA256_buf[59]=(SHA256_len>>>29)&255;SHA256_buf[60]=(SHA256_len>>>21)&255;SHA256_buf[61]=(SHA256_len>>>13)&255;SHA256_buf[62]=(SHA256_len>>>5)&255;SHA256_buf[63]=(SHA256_len<<3)&255;SHA256_Hash_Byte_Block(SHA256_H,SHA256_buf);var A=new Array(32);for(var B=0;B<8;B++){A[4*B+0]=SHA256_H[B]>>>24;A[4*B+1]=(SHA256_H[B]>>16)&255;A[4*B+2]=(SHA256_H[B]>>8)&255;A[4*B+3]=SHA256_H[B]&255;}delete SHA256_H;delete SHA256_buf;delete SHA256_len;return A;}function SHA256_hash(B){var A;SHA256_init();SHA256_write(B);A=SHA256_finalize();return array_to_hex_string(A);}function HMAC_SHA256_init(B){if(typeof (B)=="string"){HMAC_SHA256_key=string_to_array(B);}else{HMAC_SHA256_key=new Array().concat(B);}if(HMAC_SHA256_key.length>64){SHA256_init();SHA256_write(HMAC_SHA256_key);HMAC_SHA256_key=SHA256_finalize();}for(var A=HMAC_SHA256_key.length;A<64;A++){HMAC_SHA256_key[A]=0;}for(var A=0;A<64;A++){HMAC_SHA256_key[A]^=54;}SHA256_init();SHA256_write(HMAC_SHA256_key);}function HMAC_SHA256_write(A){SHA256_write(A);}function HMAC_SHA256_finalize(){var B=SHA256_finalize();for(var A=0;A<64;A++){HMAC_SHA256_key[A]^=54^92;}SHA256_init();SHA256_write(HMAC_SHA256_key);SHA256_write(B);for(var A=0;A<64;A++){HMAC_SHA256_key[A]=0;}delete HMAC_SHA256_key;return SHA256_finalize();}function HMAC_SHA256_MAC(B,C){var A;HMAC_SHA256_init(B);HMAC_SHA256_write(C);A=HMAC_SHA256_finalize();return array_to_hex_string(A);}SHA256_hexchars=new Array("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f");SHA256_K=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298);function SHA256_sigma0(A){return((A>>>7)|(A<<25))^((A>>>18)|(A<<14))^(A>>>3);}function SHA256_sigma1(A){return((A>>>17)|(A<<15))^((A>>>19)|(A<<13))^(A>>>10);}function SHA256_Sigma0(A){return((A>>>2)|(A<<30))^((A>>>13)|(A<<19))^((A>>>22)|(A<<10));}function SHA256_Sigma1(A){return((A>>>6)|(A<<26))^((A>>>11)|(A<<21))^((A>>>25)|(A<<7));}function SHA256_Ch(A,C,B){return B^(A&(C^B));}function SHA256_Maj(A,C,B){return(A&C)^(B&(A^C));}function SHA256_Hash_Word_Block(C,A){for(var B=16;B<64;B++){A[B]=(SHA256_sigma1(A[B-2])+A[B-7]+SHA256_sigma0(A[B-15])+A[B-16])&4294967295;}var E=new Array().concat(C);for(var B=0;B<64;B++){var F=E[7]+SHA256_Sigma1(E[4])+SHA256_Ch(E[4],E[5],E[6])+SHA256_K[B]+A[B];var D=SHA256_Sigma0(E[0])+SHA256_Maj(E[0],E[1],E[2]);E.pop();E.unshift((F+D)&4294967295);E[4]=(E[4]+F)&4294967295;}for(var B=0;B<8;B++){C[B]=(C[B]+E[B])&4294967295;}}function SHA256_Hash_Byte_Block(D,B){var A=new Array(16);for(var C=0;C<16;C++){A[C]=B[4*C+0]<<24|B[4*C+1]<<16|B[4*C+2]<<8|B[4*C+3];}SHA256_Hash_Word_Block(D,A);}(function(){var _jQuery=window.jQuery,_$=window.$;var jQuery=window.jQuery=window.$=function(selector,context){return new jQuery.fn.init(selector,context);};var quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/,s;isSimple=/^.[^:#\[\.]*$/,undefined;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;return this;}if(typeof selector=="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1]){selector=jQuery.clean([match[1]],context);}else{var elem=document.getElementById(match[3]);if(elem){if(elem.id!=match[3]){return jQuery().find(selector);}return jQuery(elem);}selector=[];}}else{return jQuery(context).find(selector);}}else{if(jQuery.isFunction(selector)){return jQuery(document)[jQuery.fn.ready?"ready":"load"](selector);}}return this.setArray(jQuery.makeArray(selector));},jquery:"1.2.6",size:function(){return this.length;},length:0,get:function(num){return num==undefined?jQuery.makeArray(this):this[num];},pushStack:function(elems){var ret=jQuery(elems);ret.prevObject=this;return ret;},setArray:function(elems){this.length=0;Array.prototype.push.apply(this,elems);return this;},each:function(callback,args){return jQuery.each(this,callback,args);},index:function(elem){var ret=-1;return jQuery.inArray(elem&&elem.jquery?elem[0]:elem,this);},attr:function(name,value,type){var options=name;if(name.constructor==String){if(value===undefined){return this[0]&&jQuery[type||"attr"](this[0],name);}else{options={};options[name]=value;}}return this.each(function(i){for(name in options){jQuery.attr(type?this.style:this,name,jQuery.prop(this,options[name],type,i,name));}});},css:function(key,value){if((key=="width"||key=="height")&&parseFloat(value)<0){value=undefined;}return this.attr(key,value,"curCSS");},text:function(text){if(typeof text!="object"&&text!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text));}var ret="";jQuery.each(text||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8){ret+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this]);}});});return ret;},wrapAll:function(html){if(this[0]){jQuery(html,this[0].ownerDocument).clone().insertBefore(this[0]).map(function(){var elem=this;while(elem.firstChild){elem=elem.firstChild;}return elem;}).append(this);}return this;},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html);});},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html);});},append:function(){return this.domManip(arguments,true,false,function(elem){if(this.nodeType==1){this.appendChild(elem);}});},prepend:function(){return this.domManip(arguments,true,true,function(elem){if(this.nodeType==1){this.insertBefore(elem,this.firstChild);}});},before:function(){return this.domManip(arguments,false,false,function(elem){this.parentNode.insertBefore(elem,this);});},after:function(){return this.domManip(arguments,false,true,function(elem){this.parentNode.insertBefore(elem,this.nextSibling);});},end:function(){return this.prevObject||jQuery([]);},find:function(selector){var elems=jQuery.map(this,function(elem){return jQuery.find(selector,elem);});return this.pushStack(/[^+>] [^+>]/.test(selector)||selector.indexOf("..")>-1?jQuery.unique(elems):elems);},clone:function(events){var ret=this.map(function(){if(jQuery.browser.msie&&!jQuery.isXMLDoc(this)){var clone=this.cloneNode(true),container=document.createElement("div");container.appendChild(clone);return jQuery.clean([container.innerHTML])[0];}else{return this.cloneNode(true);}});var clone=ret.find("*").andSelf().each(function(){if(this[expando]!=undefined){this[expando]=null;}});if(events===true){this.find("*").andSelf().each(function(i){if(this.nodeType==3){return ;}var events=jQuery.data(this,"events");for(var type in events){for(var handler in events[type]){jQuery.event.add(clone[i],type,events[type][handler],events[type][handler].data);}}});}return ret;},filter:function(selector){return this.pushStack(jQuery.isFunction(selector)&&jQuery.grep(this,function(elem,i){return selector.call(elem,i);})||jQuery.multiFilter(selector,this));},not:function(selector){if(selector.constructor==String){if(isSimple.test(selector)){return this.pushStack(jQuery.multiFilter(selector,this,true));}else{selector=jQuery.multiFilter(selector,this);}}var isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!selector.nodeType;return this.filter(function(){return isArrayLike?jQuery.inArray(this,selector)<0:this!=selector;});},add:function(selector){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),typeof selector=="string"?jQuery(selector):jQuery.makeArray(selector))));},is:function(selector){return !!selector&&jQuery.multiFilter(selector,this).length>0;},hasClass:function(selector){return this.is("."+selector);},val:function(value){if(value==undefined){if(this.length){var elem=this[0];if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type=="select-one";if(index<0){return null;}for(var i=one?index:0,max=one?index+1:options.length;i<max;i++){var option=options[i];if(option.selected){value=jQuery.browser.msie&&!option.attributes.value.specified?option.text:option.value;if(one){return value;}values.push(value);}}return values;}else{return(this[0].value||"").replace(/\r/g,"");}}return undefined;}if(value.constructor==Number){value+="";}return this.each(function(){if(this.nodeType!=1){return ;}if(value.constructor==Array&&/radio|checkbox/.test(this.type)){this.checked=(jQuery.inArray(this.value,value)>=0||jQuery.inArray(this.name,value)>=0);}else{if(jQuery.nodeName(this,"select")){var values=jQuery.makeArray(value);jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,values)>=0||jQuery.inArray(this.text,values)>=0);});if(!values.length){this.selectedIndex=-1;}}else{this.value=value;}}});},html:function(value){return value==undefined?(this[0]?this[0].innerHTML:null):this.empty().append(value);},replaceWith:function(value){return this.after(value).remove();},eq:function(i){return this.slice(i,i+1);},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments));},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},andSelf:function(){return this.add(this.prevObject);},data:function(key,value){var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value===undefined){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data===undefined&&this.length){data=jQuery.data(this[0],key);}return data===undefined&&parts[1]?this.data(parts[0]):data;}else{return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value);});}},removeData:function(key){return this.each(function(){jQuery.removeData(this,key);});},domManip:function(args,table,reverse,callback){var clone=this.length>1,elems;return this.each(function(){if(!elems){elems=jQuery.clean(args,this.ownerDocument);if(reverse){elems.reverse();}}var obj=this;if(table&&jQuery.nodeName(this,"table")&&jQuery.nodeName(elems[0],"tr")){obj=this.getElementsByTagName("tbody")[0]||this.appendChild(this.ownerDocument.createElement("tbody"));}var scripts=jQuery([]);jQuery.each(elems,function(){var elem=clone?jQuery(this).clone(true)[0]:this;if(jQuery.nodeName(elem,"script")){scripts=scripts.add(elem);}else{if(elem.nodeType==1){scripts=scripts.add(jQuery("script",elem).remove());}callback.call(obj,elem);}});scripts.each(evalScript);});}};jQuery.fn.init.prototype=jQuery.fn;function evalScript(i,elem){if(elem.src){jQuery.ajax({url:elem.src,async:false,dataType:"script"});}else{jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"");}if(elem.parentNode){elem.parentNode.removeChild(elem);}}function now(){return +new Date;}jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options;if(target.constructor==Boolean){deep=target;target=arguments[1]||{};i=2;}if(typeof target!="object"&&typeof target!="function"){target={};}if(length==i){target=this;--i;}for(;i<length;i++){if((options=arguments[i])!=null){for(var name in options){var src=target[name],copy=options[name];if(target===copy){continue;}if(deep&&copy&&typeof copy=="object"&&!copy.nodeType){target[name]=jQuery.extend(deep,src||(copy.length!=null?[]:{}),copy);}else{if(copy!==undefined){target[name]=copy;}}}}}return target;};var expando="jQuery"+now(),uuid=0,windowData={},exclude=/z-?index|font-?weight|opacity|zoom|line-?height/i,defaultView=document.defaultView||{};jQuery.extend({noConflict:function(deep){window.$=_$;if(deep){window.jQuery=_jQuery;}return jQuery;},isFunction:function(fn){return !!fn&&typeof fn!="string"&&!fn.nodeName&&fn.constructor!=Array&&/^[\s[]?function/.test(fn+"");},isXMLDoc:function(elem){return elem.documentElement&&!elem.body||elem.tagName&&elem.ownerDocument&&!elem.ownerDocument.body;},globalEval:function(data){data=jQuery.trim(data);if(data){var head=document.getElementsByTagName("head")[0]||document.documentElement,script=document.createElement("script");script.type="text/javascript";if(jQuery.browser.msie){script.text=data;}else{script.appendChild(document.createTextNode(data));}head.insertBefore(script,head.firstChild);head.removeChild(script);}},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()==name.toUpperCase();},cache:{},data:function(elem,name,data){elem=elem==window?windowData:elem;var id=elem[expando];if(!id){id=elem[expando]=++uuid;}if(name&&!jQuery.cache[id]){jQuery.cache[id]={};}if(data!==undefined){jQuery.cache[id][name]=data;}return name?jQuery.cache[id][name]:id;},removeData:function(elem,name){elem=elem==window?windowData:elem;var id=elem[expando];if(name){if(jQuery.cache[id]){delete jQuery.cache[id][name];name="";for(name in jQuery.cache[id]){break;}if(!name){jQuery.removeData(elem);}}}else{try{delete elem[expando];}catch(e){if(elem.removeAttribute){elem.removeAttribute(expando);}}delete jQuery.cache[id];}},each:function(object,callback,args){var name,i=0,length=object.length;if(args){if(length==undefined){for(name in object){if(callback.apply(object[name],args)===false){break;}}}else{for(;i<length;){if(callback.apply(object[i++],args)===false){break;}}}}else{if(length==undefined){for(name in object){if(callback.call(object[name],name,object[name])===false){break;}}}else{for(var value=object[0];i<length&&callback.call(value,i,value)!==false;value=object[++i]){}}}return object;},prop:function(elem,value,type,i,name){if(jQuery.isFunction(value)){value=value.call(elem,i);}return value&&value.constructor==Number&&type=="curCSS"&&!exclude.test(name)?value+"px":value;},className:{add:function(elem,classNames){jQuery.each((classNames||"").split(/\s+/),function(i,className){if(elem.nodeType==1&&!jQuery.className.has(elem.className,className)){elem.className+=(elem.className?" ":"")+className;}});},remove:function(elem,classNames){if(elem.nodeType==1){elem.className=classNames!=undefined?jQuery.grep(elem.className.split(/\s+/),function(className){return !jQuery.className.has(classNames,className);}).join(" "):"";}},has:function(elem,className){return jQuery.inArray(className,(elem.className||elem).toString().split(/\s+/))>-1;}},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name];}callback.call(elem);for(var name in options){elem.style[name]=old[name];}},css:function(elem,name,force){if(name=="width"||name=="height"){var val,props={position:"absolute",visibility:"hidden",display:"block"},which=name=="width"?["Left","Right"]:["Top","Bottom"];function getWH(){val=name=="width"?elem.offsetWidth:elem.offsetHeight;var padding=0,border=0;jQuery.each(which,function(){padding+=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0;border+=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0;});val-=Math.round(padding+border);}if(jQuery(elem).is(":visible")){getWH();}else{jQuery.swap(elem,props,getWH);}return Math.max(0,val);}return jQuery.curCSS(elem,name,force);},curCSS:function(elem,name,force){var ret,style=elem.style;function color(elem){if(!jQuery.browser.safari){return false;}var ret=defaultView.getComputedStyle(elem,null);return !ret||ret.getPropertyValue("color")=="";}if(name=="opacity"&&jQuery.browser.msie){ret=jQuery.attr(style,"opacity");return ret==""?"1":ret;}if(jQuery.browser.opera&&name=="display"){var save=style.outline;style.outline="0 solid black";style.outline=save;}if(name.match(/float/i)){name=styleFloat;}if(!force&&style&&style[name]){ret=style[name];}else{if(defaultView.getComputedStyle){if(name.match(/float/i)){name="float";}name=name.replace(/([A-Z])/g,"-$1").toLowerCase();var computedStyle=defaultView.getComputedStyle(elem,null);if(computedStyle&&!color(elem)){ret=computedStyle.getPropertyValue(name);}else{var swap=[],stack=[],a=elem,i=0;for(;a&&color(a);a=a.parentNode){stack.unshift(a);}for(;i<stack.length;i++){if(color(stack[i])){swap[i]=stack[i].style.display;stack[i].style.display="block";}}ret=name=="display"&&swap[stack.length-1]!=null?"none":(computedStyle&&computedStyle.getPropertyValue(name))||"";for(i=0;i<swap.length;i++){if(swap[i]!=null){stack[i].style.display=swap[i];}}}if(name=="opacity"&&ret==""){ret="1";}}else{if(elem.currentStyle){var camelCase=name.replace(/\-(\w)/g,function(all,letter){return letter.toUpperCase();});ret=elem.currentStyle[name]||elem.currentStyle[camelCase];if(!/^\d+(px)?$/i.test(ret)&&/^\d/.test(ret)){var left=style.left,rsLeft=elem.runtimeStyle.left;elem.runtimeStyle.left=elem.currentStyle.left;style.left=ret||0;ret=style.pixelLeft+"px";style.left=left;elem.runtimeStyle.left=rsLeft;}}}}return ret;},clean:function(elems,context){var ret=[];context=context||document;if(typeof context.createElement=="undefined"){context=context.ownerDocument||context[0]&&context[0].ownerDocument||document;}jQuery.each(elems,function(i,elem){if(!elem){return ;}if(elem.constructor==Number){elem+="";}if(typeof elem=="string"){elem=elem.replace(/(<(\w+)[^>]*?)\/>/g,function(all,front,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:front+"></"+tag+">";});var tags=jQuery.trim(elem).toLowerCase(),div=context.createElement("div");var wrap=!tags.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!tags.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!tags.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!tags.indexOf("<td")||!tags.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!tags.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||jQuery.browser.msie&&[1,"div<div>","</div>"]||[0,"",""];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--){div=div.lastChild;}if(jQuery.browser.msie){var tbody=!tags.indexOf("<table")&&tags.indexOf("<tbody")<0?div.firstChild&&div.firstChild.childNodes:wrap[1]=="<table>"&&tags.indexOf("<tbody")<0?div.childNodes:[];for(var j=tbody.length-1;j>=0;--j){if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length){tbody[j].parentNode.removeChild(tbody[j]);}}if(/^\s/.test(elem)){div.insertBefore(context.createTextNode(elem.match(/^\s*/)[0]),div.firstChild);}}elem=jQuery.makeArray(div.childNodes);}if(elem.length===0&&(!jQuery.nodeName(elem,"form")&&!jQuery.nodeName(elem,"select"))){return ;}if(elem[0]==undefined||jQuery.nodeName(elem,"form")||elem.options){ret.push(elem);}else{ret=jQuery.merge(ret,elem);}});return ret;},attr:function(elem,name,value){if(!elem||elem.nodeType==3||elem.nodeType==8){return undefined;}var notxml=!jQuery.isXMLDoc(elem),set=value!==undefined,msie=jQuery.browser.msie;name=notxml&&jQuery.props[name]||name;if(elem.tagName){var special=/href|src|style/.test(name);if(name=="selected"&&jQuery.browser.safari){elem.parentNode.selectedIndex;}if(name in elem&&notxml&&!special){if(set){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode){throw"type property can't be changed";}elem[name]=value;}if(jQuery.nodeName(elem,"form")&&elem.getAttributeNode(name)){return elem.getAttributeNode(name).nodeValue;}return elem[name];}if(msie&&notxml&&name=="style"){return jQuery.attr(elem.style,"cssText",value);}if(set){elem.setAttribute(name,""+value);}var attr=msie&&notxml&&special?elem.getAttribute(name,2):elem.getAttribute(name);return attr===null?undefined:attr;}if(msie&&name=="opacity"){if(set){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(value)+""=="NaN"?"":"alpha(opacity="+value*100+")");}return elem.filter&&elem.filter.indexOf("opacity=")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100)+"":"";}name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase();});if(set){elem[name]=value;}return elem[name];},trim:function(text){return(text||"").replace(/^\s+|\s+$/g,"");},makeArray:function(array){var ret=[];if(array!=null){var i=array.length;if(i==null||array.split||array.setInterval||array.call){ret[0]=array;}else{while(i){ret[--i]=array[i];}}}return ret;},inArray:function(elem,array){for(var i=0,length=array.length;i<length;i++){if(array[i]===elem){return i;}}return -1;},merge:function(first,second){var i=0,elem,pos=first.length;if(jQuery.browser.msie){while(elem=second[i++]){if(elem.nodeType!=8){first[pos++]=elem;}}}else{while(elem=second[i++]){first[pos++]=elem;}}return first;},unique:function(array){var ret=[],done={};try{for(var i=0,length=array.length;i<length;i++){var id=jQuery.data(array[i]);if(!done[id]){done[id]=true;ret.push(array[i]);}}}catch(e){ret=array;}return ret;},grep:function(elems,callback,inv){var ret=[];for(var i=0,length=elems.length;i<length;i++){if(!inv!=!callback(elems[i],i)){ret.push(elems[i]);}}return ret;},map:function(elems,callback){var ret=[];for(var i=0,length=elems.length;i<length;i++){var value=callback(elems[i],i);if(value!=null){ret[ret.length]=value;}}return ret.concat.apply([],ret);}});var userAgent=navigator.userAgent.toLowerCase();jQuery.browser={version:(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(userAgent),opera:/opera/.test(userAgent),msie:/msie/.test(userAgent)&&!/opera/.test(userAgent),mozilla:/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent)};var styleFloat=jQuery.browser.msie?"styleFloat":"cssFloat";jQuery.extend({boxModel:!jQuery.browser.msie||document.compatMode=="CSS1Compat",props:{"for":"htmlFor","class":"className","float":styleFloat,cssFloat:styleFloat,styleFloat:styleFloat,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing"}});jQuery.each({parent:function(elem){return elem.parentNode;},parents:function(elem){return jQuery.dir(elem,"parentNode");},next:function(elem){return jQuery.nth(elem,2,"nextSibling");},prev:function(elem){return jQuery.nth(elem,2,"previousSibling");},nextAll:function(elem){return jQuery.dir(elem,"nextSibling");},prevAll:function(elem){return jQuery.dir(elem,"previousSibling");},siblings:function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem);},children:function(elem){return jQuery.sibling(elem.firstChild);},contents:function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes);}},function(name,fn){jQuery.fn[name]=function(selector){var ret=jQuery.map(this,fn);if(selector&&typeof selector=="string"){ret=jQuery.multiFilter(selector,ret);}return this.pushStack(jQuery.unique(ret));};});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(){var args=arguments;return this.each(function(){for(var i=0,length=args.length;i<length;i++){jQuery(args[i])[original](this);}});};});jQuery.each({removeAttr:function(name){jQuery.attr(this,name,"");if(this.nodeType==1){this.removeAttribute(name);}},addClass:function(classNames){jQuery.className.add(this,classNames);},removeClass:function(classNames){jQuery.className.remove(this,classNames);},toggleClass:function(classNames){jQuery.className[jQuery.className.has(this,classNames)?"remove":"add"](this,classNames);},remove:function(selector){if(!selector||jQuery.filter(selector,[this]).r.length){jQuery("*",this).add(this).each(function(){jQuery.event.remove(this);jQuery.removeData(this);});if(this.parentNode){this.parentNode.removeChild(this);}}},empty:function(){jQuery(">*",this).remove();while(this.firstChild){this.removeChild(this.firstChild);}}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments);};});jQuery.each(["Height","Width"],function(i,name){var type=name.toLowerCase();jQuery.fn[type]=function(size){return this[0]==window?jQuery.browser.opera&&document.body["client"+name]||jQuery.browser.safari&&window["inner"+name]||document.compatMode=="CSS1Compat"&&document.documentElement["client"+name]||document.body["client"+name]:this[0]==document?Math.max(Math.max(document.body["scroll"+name],document.documentElement["scroll"+name]),Math.max(document.body["offset"+name],document.documentElement["offset"+name])):size==undefined?(this.length?jQuery.css(this[0],type):null):this.css(type,size.constructor==String?size:size+"px");};});function num(elem,prop){return elem[0]&&parseInt(jQuery.curCSS(elem[0],prop,true),10)||0;}var chars=jQuery.browser.safari&&parseInt(jQuery.browser.version)<417?"(?:[\\w*_-]|\\\\.)":"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",quickChild=new RegExp("^>\\s*("+chars+"+)"),quickID=new RegExp("^("+chars+"+)(#)("+chars+"+)"),quickClass=new RegExp("^([#.]?)("+chars+"*)");jQuery.extend({expr:{"":function(a,i,m){return m[2]=="*"||jQuery.nodeName(a,m[2]);},"#":function(a,i,m){return a.getAttribute("id")==m[2];},":":{lt:function(a,i,m){return i<m[3]-0;},gt:function(a,i,m){return i>m[3]-0;},nth:function(a,i,m){return m[3]-0==i;},eq:function(a,i,m){return m[3]-0==i;},first:function(a,i){return i==0;},last:function(a,i,m,r){return i==r.length-1;},even:function(a,i){return i%2==0;},odd:function(a,i){return i%2;},"first-child":function(a){return a.parentNode.getElementsByTagName("*")[0]==a;},"last-child":function(a){return jQuery.nth(a.parentNode.lastChild,1,"previousSibling")==a;},"only-child":function(a){return !jQuery.nth(a.parentNode.lastChild,2,"previousSibling");},parent:function(a){return a.firstChild;},empty:function(a){return !a.firstChild;},contains:function(a,i,m){return(a.textContent||a.innerText||jQuery(a).text()||"").indexOf(m[3])>=0;},visible:function(a){return"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden";},hidden:function(a){return"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden";},enabled:function(a){return !a.disabled;},disabled:function(a){return a.disabled;},checked:function(a){return a.checked;},selected:function(a){return a.selected||jQuery.attr(a,"selected");},text:function(a){return"text"==a.type;},radio:function(a){return"radio"==a.type;},checkbox:function(a){return"checkbox"==a.type;},file:function(a){return"file"==a.type;},password:function(a){return"password"==a.type;},submit:function(a){return"submit"==a.type;},image:function(a){return"image"==a.type;},reset:function(a){return"reset"==a.type;},button:function(a){return"button"==a.type||jQuery.nodeName(a,"button");},input:function(a){return/input|select|textarea|button/i.test(a.nodeName);},has:function(a,i,m){return jQuery.find(m[3],a).length;},header:function(a){return/h\d/i.test(a.nodeName);},animated:function(a){return jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length;}}},parse:[/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,new RegExp("^([:.#]*)("+chars+"+)")],multiFilter:function(expr,elems,not){var old,cur=[];while(expr&&expr!=old){old=expr;var f=jQuery.filter(expr,elems,not);expr=f.t.replace(/^\s*,\s*/,"");cur=not?elems=f.r:jQuery.merge(cur,f.r);}return cur;},find:function(t,context){if(typeof t!="string"){return[t];}if(context&&context.nodeType!=1&&context.nodeType!=9){return[];}context=context||document;var ret=[context],done=[],last,nodeName;while(t&&last!=t){var r=[];last=t;t=jQuery.trim(t);var foundToken=false,re=quickChild,m=re.exec(t);if(m){nodeName=m[1].toUpperCase();for(var i=0;ret[i];i++){for(var c=ret[i].firstChild;c;c=c.nextSibling){if(c.nodeType==1&&(nodeName=="*"||c.nodeName.toUpperCase()==nodeName)){r.push(c);}}}ret=r;t=t.replace(re,"");if(t.indexOf(" ")==0){continue;}foundToken=true;}else{re=/^([>+~])\s*(\w*)/i;if((m=re.exec(t))!=null){r=[];var merge={};nodeName=m[2].toUpperCase();m=m[1];for(var j=0,rl=ret.length;j<rl;j++){var n=m=="~"||m=="+"?ret[j].nextSibling:ret[j].firstChild;for(;n;n=n.nextSibling){if(n.nodeType==1){var id=jQuery.data(n);if(m=="~"&&merge[id]){break;}if(!nodeName||n.nodeName.toUpperCase()==nodeName){if(m=="~"){merge[id]=true;}r.push(n);}if(m=="+"){break;}}}}ret=r;t=jQuery.trim(t.replace(re,""));foundToken=true;}}if(t&&!foundToken){if(!t.indexOf(",")){if(context==ret[0]){ret.shift();}done=jQuery.merge(done,ret);r=ret=[context];t=" "+t.substr(1,t.length);}else{var re2=quickID;var m=re2.exec(t);if(m){m=[0,m[2],m[3],m[1]];}else{re2=quickClass;m=re2.exec(t);}m[2]=m[2].replace(/\\/g,"");var elem=ret[ret.length-1];if(m[1]=="#"&&elem&&elem.getElementById&&!jQuery.isXMLDoc(elem)){var oid=elem.getElementById(m[2]);if((jQuery.browser.msie||jQuery.browser.opera)&&oid&&typeof oid.id=="string"&&oid.id!=m[2]){oid=jQuery('[@id="'+m[2]+'"]',elem)[0];}ret=r=oid&&(!m[3]||jQuery.nodeName(oid,m[3]))?[oid]:[];}else{for(var i=0;ret[i];i++){var tag=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];if(tag=="*"&&ret[i].nodeName.toLowerCase()=="object"){tag="param";}r=jQuery.merge(r,ret[i].getElementsByTagName(tag));}if(m[1]=="."){r=jQuery.classFilter(r,m[2]);}if(m[1]=="#"){var tmp=[];for(var i=0;r[i];i++){if(r[i].getAttribute("id")==m[2]){tmp=[r[i]];break;}}r=tmp;}ret=r;}t=t.replace(re2,"");}}if(t){var val=jQuery.filter(t,r);ret=r=val.r;t=jQuery.trim(val.t);}}if(t){ret=[];}if(ret&&context==ret[0]){ret.shift();}done=jQuery.merge(done,ret);return done;},classFilter:function(r,m,not){m=" "+m+" ";var tmp=[];for(var i=0;r[i];i++){var pass=(" "+r[i].className+" ").indexOf(m)>=0;if(!not&&pass||not&&!pass){tmp.push(r[i]);}}return tmp;},filter:function(t,r,not){var last;while(t&&t!=last){last=t;var p=jQuery.parse,m;for(var i=0;p[i];i++){m=p[i].exec(t);if(m){t=t.substring(m[0].length);m[2]=m[2].replace(/\\/g,"");break;}}if(!m){break;}if(m[1]==":"&&m[2]=="not"){r=isSimple.test(m[3])?jQuery.filter(m[3],r,true).r:jQuery(r).not(m[3]);}else{if(m[1]=="."){r=jQuery.classFilter(r,m[2],not);}else{if(m[1]=="["){var tmp=[],type=m[3];for(var i=0,rl=r.length;i<rl;i++){var a=r[i],z=a[jQuery.props[m[2]]||m[2]];if(z==null||/href|src|selected/.test(m[2])){z=jQuery.attr(a,m[2])||"";}if((type==""&&!!z||type=="="&&z==m[5]||type=="!="&&z!=m[5]||type=="^="&&z&&!z.indexOf(m[5])||type=="$="&&z.substr(z.length-m[5].length)==m[5]||(type=="*="||type=="~=")&&z.indexOf(m[5])>=0)^not){tmp.push(a);}}r=tmp;}else{if(m[1]==":"&&m[2]=="nth-child"){var merge={},tmp=[],test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(m[3]=="even"&&"2n"||m[3]=="odd"&&"2n+1"||!/\D/.test(m[3])&&"0n+"+m[3]||m[3]),first=(test[1]+(test[2]||1))-0,last=test[3]-0;for(var i=0,rl=r.length;i<rl;i++){var node=r[i],parentNode=node.parentNode,id=jQuery.data(parentNode);if(!merge[id]){var c=1;for(var n=parentNode.firstChild;n;n=n.nextSibling){if(n.nodeType==1){n.nodeIndex=c++;}}merge[id]=true;}var add=false;if(first==0){if(node.nodeIndex==last){add=true;}}else{if((node.nodeIndex-last)%first==0&&(node.nodeIndex-last)/first>=0){add=true;}}if(add^not){tmp.push(node);}}r=tmp;}else{var fn=jQuery.expr[m[1]];if(typeof fn=="object"){fn=fn[m[2]];}if(typeof fn=="string"){fn=eval("false||function(a,i){return "+fn+";}");}r=jQuery.grep(r,function(elem,i){return fn(elem,i,m,r);},not);}}}}}return{r:r,t:t};},dir:function(elem,dir){var matched=[],cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1){matched.push(cur);}cur=cur[dir];}return matched;},nth:function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir]){if(cur.nodeType==1&&++num==result){break;}}return cur;},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&n!=elem){r.push(n);}}return r;}});jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType==3||elem.nodeType==8){return ;}if(jQuery.browser.msie&&elem.setInterval){elem=window;}if(!handler.guid){handler.guid=this.guid++;}if(data!=undefined){var fn=handler;handler=this.proxy(fn,function(){return fn.apply(this,arguments);});handler.data=data;}var events=jQuery.data(elem,"events")||jQuery.data(elem,"events",{}),handle=jQuery.data(elem,"handle")||jQuery.data(elem,"handle",function(){if(typeof jQuery!="undefined"&&!jQuery.event.triggered){return jQuery.event.handle.apply(arguments.callee.elem,arguments);}});handle.elem=elem;jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];handler.type=parts[1];var handlers=events[type];if(!handlers){handlers=events[type]={};if(!jQuery.event.special[type]||jQuery.event.special[type].setup.call(elem)===false){if(elem.addEventListener){elem.addEventListener(type,handle,false);}else{if(elem.attachEvent){elem.attachEvent("on"+type,handle);}}}}handlers[handler.guid]=handler;jQuery.event.global[type]=true;});elem=null;},guid:1,global:{},remove:function(elem,types,handler){if(elem.nodeType==3||elem.nodeType==8){return ;}var events=jQuery.data(elem,"events"),ret,index;if(events){if(types==undefined||(typeof types=="string"&&types.charAt(0)==".")){for(var type in events){this.remove(elem,type+(types||""));}}else{if(types.type){handler=types.handler;types=types.type;}jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];if(events[type]){if(handler){delete events[type][handler.guid];}else{for(handler in events[type]){if(!parts[1]||events[type][handler].type==parts[1]){delete events[type][handler];}}}for(ret in events[type]){break;}if(!ret){if(!jQuery.event.special[type]||jQuery.event.special[type].teardown.call(elem)===false){if(elem.removeEventListener){elem.removeEventListener(type,jQuery.data(elem,"handle"),false);}else{if(elem.detachEvent){elem.detachEvent("on"+type,jQuery.data(elem,"handle"));}}}ret=null;delete events[type];}}});}for(ret in events){break;}if(!ret){var handle=jQuery.data(elem,"handle");if(handle){handle.elem=null;}jQuery.removeData(elem,"events");jQuery.removeData(elem,"handle");}}},trigger:function(type,data,elem,donative,extra){data=jQuery.makeArray(data);if(type.indexOf("!")>=0){type=type.slice(0,-1);var exclusive=true;}if(!elem){if(this.global[type]){jQuery("*").add([window,document]).trigger(type,data);}}else{if(elem.nodeType==3||elem.nodeType==8){return undefined;}var val,ret,fn=jQuery.isFunction(elem[type]||null),event=!data[0]||!data[0].preventDefault;if(event){data.unshift({type:type,target:elem,preventDefault:function(){},stopPropagation:function(){},timeStamp:now()});data[0][expando]=true;}data[0].type=type;if(exclusive){data[0].exclusive=true;}var handle=jQuery.data(elem,"handle");if(handle){val=handle.apply(elem,data);}if((!fn||(jQuery.nodeName(elem,"a")&&type=="click"))&&elem["on"+type]&&elem["on"+type].apply(elem,data)===false){val=false;}if(event){data.shift();}if(extra&&jQuery.isFunction(extra)){ret=extra.apply(elem,val==null?data:data.concat(val));if(ret!==undefined){val=ret;}}if(fn&&donative!==false&&val!==false&&!(jQuery.nodeName(elem,"a")&&type=="click")){this.triggered=true;try{elem[type]();}catch(e){}}this.triggered=false;}return val;},handle:function(event){var val,ret,namespace,all,handlers;event=arguments[0]=jQuery.event.fix(event||window.event);namespace=event.type.split(".");event.type=namespace[0];namespace=namespace[1];all=!namespace&&!event.exclusive;handlers=(jQuery.data(this,"events")||{})[event.type];for(var j in handlers){var handler=handlers[j];if(all||handler.type==namespace){event.handler=handler;event.data=handler.data;ret=handler.apply(this,arguments);if(val!==false){val=ret;}if(ret===false){event.preventDefault();event.stopPropagation();}}}return val;},fix:function(event){if(event[expando]==true){return event;}var originalEvent=event;event={originalEvent:originalEvent};var props="altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target timeStamp toElement type view wheelDelta which".split(" ");for(var i=props.length;i;i--){event[props[i]]=originalEvent[props[i]];}event[expando]=true;event.preventDefault=function(){if(originalEvent.preventDefault){originalEvent.preventDefault();}originalEvent.returnValue=false;};event.stopPropagation=function(){if(originalEvent.stopPropagation){originalEvent.stopPropagation();}originalEvent.cancelBubble=true;};event.timeStamp=event.timeStamp||now();if(!event.target){event.target=event.srcElement||document;}if(event.target.nodeType==3){event.target=event.target.parentNode;}if(!event.relatedTarget&&event.fromElement){event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement;}if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc.clientTop||0);}if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode)){event.which=event.charCode||event.keyCode;}if(!event.metaKey&&event.ctrlKey){event.metaKey=event.ctrlKey;}if(!event.which&&event.button){event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)));}return event;},proxy:function(fn,proxy){proxy.guid=fn.guid=fn.guid||proxy.guid||this.guid++;return proxy;},special:{ready:{setup:function(){bindReady();return ;},teardown:function(){return ;}},mouseenter:{setup:function(){if(jQuery.browser.msie){return false;}jQuery(this).bind("mouseover",jQuery.event.special.mouseenter.handler);return true;},teardown:function(){if(jQuery.browser.msie){return false;}jQuery(this).unbind("mouseover",jQuery.event.special.mouseenter.handler);return true;},handler:function(event){if(withinElement(event,this)){return true;}event.type="mouseenter";return jQuery.event.handle.apply(this,arguments);}},mouseleave:{setup:function(){if(jQuery.browser.msie){return false;}jQuery(this).bind("mouseout",jQuery.event.special.mouseleave.handler);return true;},teardown:function(){if(jQuery.browser.msie){return false;}jQuery(this).unbind("mouseout",jQuery.event.special.mouseleave.handler);return true;},handler:function(event){if(withinElement(event,this)){return true;}event.type="mouseleave";return jQuery.event.handle.apply(this,arguments);}}}};jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data);});},one:function(type,data,fn){var one=jQuery.event.proxy(fn||data,function(event){jQuery(this).unbind(event,one);return(fn||data).apply(this,arguments);});return this.each(function(){jQuery.event.add(this,type,one,fn&&data);});},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn);});},trigger:function(type,data,fn){return this.each(function(){jQuery.event.trigger(type,data,this,true,fn);});},triggerHandler:function(type,data,fn){return this[0]&&jQuery.event.trigger(type,data,this[0],false,fn);},toggle:function(fn){var args=arguments,i=1;while(i<args.length){jQuery.event.proxy(fn,args[i++]);}return this.click(jQuery.event.proxy(fn,function(event){this.lastToggle=(this.lastToggle||0)%i;event.preventDefault();return args[this.lastToggle++].apply(this,arguments)||false;}));},hover:function(fnOver,fnOut){return this.bind("mouseenter",fnOver).bind("mouseleave",fnOut);},ready:function(fn){bindReady();if(jQuery.isReady){fn.call(document,jQuery);}else{jQuery.readyList.push(function(){return fn.call(this,jQuery);});}return this;}});jQuery.extend({isReady:false,readyList:[],ready:function(){if(!jQuery.isReady){jQuery.isReady=true;if(jQuery.readyList){jQuery.each(jQuery.readyList,function(){this.call(document);});jQuery.readyList=null;}jQuery(document).triggerHandler("ready");}}});var readyBound=false;function bindReady(){if(readyBound){return ;}readyBound=true;if(document.addEventListener&&!jQuery.browser.opera){document.addEventListener("DOMContentLoaded",jQuery.ready,false);}if(jQuery.browser.msie&&window==top){(function(){if(jQuery.isReady){return ;}try{document.documentElement.doScroll("left");}catch(error){setTimeout(arguments.callee,0);return ;}jQuery.ready();})();}if(jQuery.browser.opera){document.addEventListener("DOMContentLoaded",function(){if(jQuery.isReady){return ;}for(var i=0;i<document.styleSheets.length;i++){if(document.styleSheets[i].disabled){setTimeout(arguments.callee,0);return ;}}jQuery.ready();},false);}if(jQuery.browser.safari){var numStyles;(function(){if(jQuery.isReady){return ;}if(document.readyState!="loaded"&&document.readyState!="complete"){setTimeout(arguments.callee,0);return ;}if(numStyles===undefined){numStyles=jQuery("style, link[rel=stylesheet]").length;}if(document.styleSheets.length!=numStyles){setTimeout(arguments.callee,0);return ;}jQuery.ready();})();}jQuery.event.add(window,"load",jQuery.ready);}jQuery.each(("blur,focus,load,resize,scroll,unload,click,dblclick,"+"mousedown,mouseup,mousemove,mouseover,mouseout,change,select,"+"submit,keydown,keypress,keyup,error").split(","),function(i,name){jQuery.fn[name]=function(fn){return fn?this.bind(name,fn):this.trigger(name);};});var withinElement=function(event,elem){var parent=event.relatedTarget;while(parent&&parent!=elem){try{parent=parent.parentNode;}catch(error){parent=elem;}}return parent==elem;};jQuery(window).bind("unload",function(){jQuery("*").add(document).unbind();});jQuery.fn.extend({_load:jQuery.fn.load,load:function(url,params,callback){if(typeof url!="string"){return this._load(url);}var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}callback=callback||function(){};var type="GET";if(params){if(jQuery.isFunction(params)){callback=params;params=null;}else{params=jQuery.param(params);type="POST";}}var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(res,status){if(status=="success"||status=="notmodified"){self.html(selector?jQuery("<div/>").append(res.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(selector):res.responseText);}self.each(callback,[res.responseText,status,res]);}});return this;},serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return jQuery.nodeName(this,"form")?jQuery.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type));}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:val.constructor==Array?jQuery.map(val,function(val,i){return{name:elem.name,value:val};}):{name:elem.name,value:val};}).get();}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f);};});var jsc=now();jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data=null;}return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type});},getScript:function(url,callback){return jQuery.get(url,null,callback,"script");},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json");},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={};}return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type});},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings);},ajaxSettings:{url:location.href,global:true,type:"GET",timeout:0,contentType:"application/x-www-form-urlencoded",processData:true,async:true,data:null,username:null,password:null,accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(s){s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));var jsonp,jsre=/=\?(&|$)/g,status,data,type=s.type.toUpperCase();if(s.data&&s.processData&&typeof s.data!="string"){s.data=jQuery.param(s.data);}if(s.dataType=="jsonp"){if(type=="GET"){if(!s.url.match(jsre)){s.url+=(s.url.match(/\?/)?"&":"?")+(s.jsonp||"callback")+"=?";}}else{if(!s.data||!s.data.match(jsre)){s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?";}}s.dataType="json";}if(s.dataType=="json"&&(s.data&&s.data.match(jsre)||s.url.match(jsre))){jsonp="jsonp"+jsc++;if(s.data){s.data=(s.data+"").replace(jsre,"="+jsonp+"$1");}s.url=s.url.replace(jsre,"="+jsonp+"$1");s.dataType="script";window[jsonp]=function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp];}catch(e){}if(head){head.removeChild(script);}};}if(s.dataType=="script"&&s.cache==null){s.cache=false;}if(s.cache===false&&type=="GET"){var ts=now();var ret=s.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+ts+"$2");s.url=ret+((ret==s.url)?(s.url.match(/\?/)?"&":"?")+"_="+ts:"");}if(s.data&&type=="GET"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null;}if(s.global&&!jQuery.active++){jQuery.event.trigger("ajaxStart");}var remote=/^(?:\w+:)?\/\/([^\/?#]+)/;if(s.dataType=="script"&&type=="GET"&&remote.test(s.url)&&remote.exec(s.url)[1]!=location.host){var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.src=s.url;if(s.scriptCharset){script.charset=s.scriptCharset;}if(!jsonp){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;success();complete();head.removeChild(script);}};}head.appendChild(script);return undefined;}var requestDone=false;var xhr=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();if(s.username){xhr.open(type,s.url,s.async,s.username,s.password);}else{xhr.open(type,s.url,s.async);}try{if(s.data){xhr.setRequestHeader("Content-Type",s.contentType);}if(s.ifModified){xhr.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT");}xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default);}catch(e){}if(s.beforeSend&&s.beforeSend(xhr,s)===false){s.global&&jQuery.active--;xhr.abort();return false;}if(s.global){jQuery.event.trigger("ajaxSend",[xhr,s]);}var onreadystatechange=function(isTimeout){if(!requestDone&&xhr&&(xhr.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null;}status=isTimeout=="timeout"&&"timeout"||!jQuery.httpSuccess(xhr)&&"error"||s.ifModified&&jQuery.httpNotModified(xhr,s.url)&&"notmodified"||"success";if(status=="success"){try{data=jQuery.httpData(xhr,s.dataType,s.dataFilter);}catch(e){status="parsererror";}}if(status=="success"){var modRes;try{modRes=xhr.getResponseHeader("Last-Modified");}catch(e){}if(s.ifModified&&modRes){jQuery.lastModified[s.url]=modRes;}if(!jsonp){success();}}else{jQuery.handleError(s,xhr,status);}complete();if(s.async){xhr=null;}}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0){setTimeout(function(){if(xhr){xhr.abort();if(!requestDone){onreadystatechange("timeout");}}},s.timeout);}}try{xhr.send(s.data);}catch(e){jQuery.handleError(s,xhr,null,e);}if(!s.async){onreadystatechange();}function success(){if(s.success){s.success(data,status);}if(s.global){jQuery.event.trigger("ajaxSuccess",[xhr,s]);}}function complete(){if(s.complete){s.complete(xhr,status);}if(s.global){jQuery.event.trigger("ajaxComplete",[xhr,s]);}if(s.global&&!--jQuery.active){jQuery.event.trigger("ajaxStop");}}return xhr;},handleError:function(s,xhr,status,e){if(s.error){s.error(xhr,status,e);}if(s.global){jQuery.event.trigger("ajaxError",[xhr,s,e]);}},active:0,httpSuccess:function(xhr){try{return !xhr.status&&location.protocol=="file:"||(xhr.status>=200&&xhr.status<300)||xhr.status==304||xhr.status==1223||jQuery.browser.safari&&xhr.status==undefined;}catch(e){}return false;},httpNotModified:function(xhr,url){try{var xhrRes=xhr.getResponseHeader("Last-Modified");return xhr.status==304||xhrRes==jQuery.lastModified[url]||jQuery.browser.safari&&xhr.status==undefined;}catch(e){}return false;},httpData:function(xhr,type,filter){var ct=xhr.getResponseHeader("content-type"),xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.tagName=="parsererror"){throw"parsererror";}if(filter){data=filter(data,type);}if(type=="script"){jQuery.globalEval(data);}if(type=="json"){data=eval("("+data+")");}return data;},param:function(a){var s=[];if(a.constructor==Array||a.jquery){jQuery.each(a,function(){s.push(encodeURIComponent(this.name)+"="+encodeURIComponent(this.value));});}else{for(var j in a){if(a[j]&&a[j].constructor==Array){jQuery.each(a[j],function(){s.push(encodeURIComponent(j)+"="+encodeURIComponent(this));});}else{s.push(encodeURIComponent(j)+"="+encodeURIComponent(jQuery.isFunction(a[j])?a[j]():a[j]));}}}return s.join("&").replace(/%20/g,"+");}});jQuery.fn.extend({show:function(speed,callback){return speed?this.animate({height:"show",width:"show",opacity:"show"},speed,callback):this.filter(":hidden").each(function(){this.style.display=this.oldblock||"";if(jQuery.css(this,"display")=="none"){var elem=jQuery("<"+this.tagName+" />").appendTo("body");this.style.display=elem.css("display");if(this.style.display=="none"){this.style.display="block";}elem.remove();}}).end();},hide:function(speed,callback){return speed?this.animate({height:"hide",width:"hide",opacity:"hide"},speed,callback):this.filter(":visible").each(function(){this.oldblock=this.oldblock||jQuery.css(this,"display");this.style.display="none";}).end();},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle.apply(this,arguments):fn?this.animate({height:"toggle",width:"toggle",opacity:"toggle"},fn,fn2):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"]();});},slideDown:function(speed,callback){return this.animate({height:"show"},speed,callback);},slideUp:function(speed,callback){return this.animate({height:"hide"},speed,callback);},slideToggle:function(speed,callback){return this.animate({height:"toggle"},speed,callback);},fadeIn:function(speed,callback){return this.animate({opacity:"show"},speed,callback);},fadeOut:function(speed,callback){return this.animate({opacity:"hide"},speed,callback);},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback);},animate:function(prop,speed,easing,callback){var optall=jQuery.speed(speed,easing,callback);return this[optall.queue===false?"each":"queue"](function(){if(this.nodeType!=1){return false;}var opt=jQuery.extend({},optall),p,hidden=jQuery(this).is(":hidden"),self=this;for(p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden){return opt.complete.call(this);}if(p=="height"||p=="width"){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow;}}if(opt.overflow!=null){this.style.overflow="hidden";}opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(/toggle|show|hide/.test(val)){e[val=="toggle"?hidden?"show":"hide":val](prop);}else{var parts=val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit;}if(parts[1]){end=((parts[1]=="-="?-1:1)*end)+start;}e.custom(start,end,unit);}else{e.custom(start,val,"");}}});return true;});},queue:function(type,fn){if(jQuery.isFunction(type)||(type&&type.constructor==Array)){fn=type;type="fx";}if(!type||(typeof type=="string"&&!fn)){return queue(this[0],type);}return this.each(function(){if(fn.constructor==Array){queue(this,type,fn);}else{queue(this,type).push(fn);if(queue(this,type).length==1){fn.call(this);}}});},stop:function(clearQueue,gotoEnd){var timers=jQuery.timers;if(clearQueue){this.queue([]);}this.each(function(){for(var i=timers.length-1;i>=0;i--){if(timers[i].elem==this){if(gotoEnd){timers[i](true);}timers.splice(i,1);}}});if(!gotoEnd){this.dequeue();}return this;}});var queue=function(elem,type,array){if(elem){type=type||"fx";var q=jQuery.data(elem,type+"queue");if(!q||array){q=jQuery.data(elem,type+"queue",jQuery.makeArray(array));}}return q;};jQuery.fn.dequeue=function(type){type=type||"fx";return this.each(function(){var q=queue(this,type);q.shift();if(q.length){q[0].call(this);}});};jQuery.extend({speed:function(speed,easing,fn){var opt=speed&&speed.constructor==Object?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&easing.constructor!=Function&&easing};opt.duration=(opt.duration&&opt.duration.constructor==Number?opt.duration:jQuery.fx.speeds[opt.duration])||jQuery.fx.speeds.def;opt.old=opt.complete;opt.complete=function(){if(opt.queue!==false){jQuery(this).dequeue();}if(jQuery.isFunction(opt.old)){opt.old.call(this);}};return opt;},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p;},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum;}},timers:[],timerId:null,fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig){options.orig={};}}});jQuery.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this);}(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if(this.prop=="height"||this.prop=="width"){this.elem.style.display="block";}},cur:function(force){if(this.elem[this.prop]!=null&&this.elem.style[this.prop]==null){return this.elem[this.prop];}var r=parseFloat(jQuery.css(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.curCSS(this.elem,this.prop))||0;},custom:function(from,to,unit){this.startTime=now();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;this.update();var self=this;function t(gotoEnd){return self.step(gotoEnd);}t.elem=this.elem;jQuery.timers.push(t);if(jQuery.timerId==null){jQuery.timerId=setInterval(function(){var timers=jQuery.timers;for(var i=0;i<timers.length;i++){if(!timers[i]()){timers.splice(i--,1);}}if(!timers.length){clearInterval(jQuery.timerId);jQuery.timerId=null;}},13);}},show:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.show=true;this.custom(0,this.cur());if(this.prop=="width"||this.prop=="height"){this.elem.style[this.prop]="1px";}jQuery(this.elem).show();},hide:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0);},step:function(gotoEnd){var t=now();if(gotoEnd||t>this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim){if(this.options.curAnim[i]!==true){done=false;}}if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(jQuery.css(this.elem,"display")=="none"){this.elem.style.display="block";}}if(this.options.hide){this.elem.style.display="none";}if(this.options.hide||this.options.show){for(var p in this.options.curAnim){jQuery.attr(this.elem.style,p,this.options.orig[p]);}}}if(done){this.options.complete.call(this.elem);}return false;}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=jQuery.easing[this.options.easing||(jQuery.easing.swing?"swing":"linear")](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update();}return true;}};jQuery.extend(jQuery.fx,{speeds:{slow:600,fast:200,def:400},step:{scrollLeft:function(fx){fx.elem.scrollLeft=fx.now;},scrollTop:function(fx){fx.elem.scrollTop=fx.now;},opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now);},_default:function(fx){fx.elem.style[fx.prop]=fx.now+fx.unit;}}});jQuery.fn.offset=function(){var left=0,top=0,elem=this[0],results;if(elem){with(jQuery.browser){var parent=elem.parentNode,offsetChild=elem,offsetParent=elem.offsetParent,doc=elem.ownerDocument,safari2=safari&&parseInt(version)<522&&!/adobeair/i.test(userAgent),css=jQuery.curCSS,fixed=css(elem,"position")=="fixed";if(elem.getBoundingClientRect){var box=elem.getBoundingClientRect();add(box.left+Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),box.top+Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));add(-doc.documentElement.clientLeft,-doc.documentElement.clientTop);}else{add(elem.offsetLeft,elem.offsetTop);while(offsetParent){add(offsetParent.offsetLeft,offsetParent.offsetTop);if(mozilla&&!/^t(able|d|h)$/i.test(offsetParent.tagName)||safari&&!safari2){border(offsetParent);}if(!fixed&&css(offsetParent,"position")=="fixed"){fixed=true;}offsetChild=/^body$/i.test(offsetParent.tagName)?offsetChild:offsetParent;offsetParent=offsetParent.offsetParent;}while(parent&&parent.tagName&&!/^body|html$/i.test(parent.tagName)){if(!/^inline|table.*$/i.test(css(parent,"display"))){add(-parent.scrollLeft,-parent.scrollTop);}if(mozilla&&css(parent,"overflow")!="visible"){border(parent);}parent=parent.parentNode;}if((safari2&&(fixed||css(offsetChild,"position")=="absolute"))||(mozilla&&css(offsetChild,"position")!="absolute")){add(-doc.body.offsetLeft,-doc.body.offsetTop);}if(fixed){add(Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));}}results={top:top,left:left};}}function border(elem){add(jQuery.curCSS(elem,"borderLeftWidth",true),jQuery.curCSS(elem,"borderTopWidth",true));}function add(l,t){left+=parseInt(l,10)||0;top+=parseInt(t,10)||0;}return results;};jQuery.fn.extend({position:function(){var left=0,top=0,results;if(this[0]){var offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=/^body|html$/i.test(offsetParent[0].tagName)?{top:0,left:0}:offsetParent.offset();offset.top-=num(this,"marginTop");offset.left-=num(this,"marginLeft");parentOffset.top+=num(offsetParent,"borderTopWidth");parentOffset.left+=num(offsetParent,"borderLeftWidth");results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};}return results;},offsetParent:function(){var offsetParent=this[0].offsetParent;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&jQuery.css(offsetParent,"position")=="static")){offsetParent=offsetParent.offsetParent;}return jQuery(offsetParent);}});jQuery.each(["Left","Top"],function(i,name){var method="scroll"+name;jQuery.fn[method]=function(val){if(!this[0]){return ;}return val!=undefined?this.each(function(){this==window||this==document?window.scrollTo(!i?val:jQuery(window).scrollLeft(),i?val:jQuery(window).scrollTop()):this[method]=val;}):this[0]==window||this[0]==document?self[i?"pageYOffset":"pageXOffset"]||jQuery.boxModel&&document.documentElement[method]||document.body[method]:this[0][method];};});jQuery.each(["Height","Width"],function(i,name){var tl=i?"Left":"Top",br=i?"Right":"Bottom";jQuery.fn["inner"+name]=function(){return this[name.toLowerCase()]()+num(this,"padding"+tl)+num(this,"padding"+br);};jQuery.fn["outer"+name]=function(margin){return this["inner"+name]()+num(this,"border"+tl+"Width")+num(this,"border"+br+"Width")+(margin?num(this,"margin"+tl)+num(this,"margin"+br):0);};});})();(function(){var B;B=jQuery.fn.flash=function(G,F,D,I){var H=D||B.replace;F=B.copy(B.pluginOptions,F);if(!B.hasFlash(F.version)){if(F.expressInstall&&B.hasFlash(6,0,65)){var E={flashvars:{MMredirectURL:location,MMplayerType:"PlugIn",MMdoctitle:jQuery("title").text()}};}else{if(F.update){H=I||B.update;}else{return this;}}}G=B.copy(B.htmlOptions,E,G);return this.each(function(){H.call(this,B.copy(G));});};B.copy=function(){var F={},E={};for(var G=0;G<arguments.length;G++){var D=arguments[G];if(D==undefined){continue;}jQuery.extend(F,D);if(D.flashvars==undefined){continue;}jQuery.extend(E,D.flashvars);}F.flashvars=E;return F;};B.hasFlash=function(){if(/hasFlash\=true/.test(location)){return true;}if(/hasFlash\=false/.test(location)){return false;}var E=B.hasFlash.playerVersion().match(/\d+/g);var F=String([arguments[0],arguments[1],arguments[2]]).match(/\d+/g)||String(B.pluginOptions.version).match(/\d+/g);for(var D=0;D<3;D++){E[D]=parseInt(E[D]||0);F[D]=parseInt(F[D]||0);if(E[D]<F[D]){return false;}if(E[D]>F[D]){return true;}}return true;};B.hasFlash.playerVersion=function(){try{try{var D=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");try{D.AllowScriptAccess="always";}catch(E){return"6,0,0";}}catch(E){}return new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1];}catch(E){try{if(navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){return(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1];}}catch(E){}}return"0,0,0";};B.htmlOptions={height:240,flashvars:{},pluginspage:"http://www.adobe.com/go/getflashplayer",src:"#",type:"application/x-shockwave-flash",width:320};B.pluginOptions={expressInstall:false,update:true,version:"6.0.65"};B.replace=function(D){this.innerHTML='<div class="alt">'+this.innerHTML+"</div>";jQuery(this).addClass("flash-replaced").prepend(B.transform(D));};B.update=function(E){var D=String(location).split("?");D.splice(1,0,"?hasFlash=true&");D=D.join("");var F='<p>This content requires the Flash Player. <a href="http://www.adobe.com/go/getflashplayer">Download Flash Player</a>. Already have Flash Player? <a href="'+D+'">Click here.</a></p>';this.innerHTML='<span class="alt">'+this.innerHTML+"</span>";jQuery(this).addClass("flash-update").prepend(F);};function A(){var E="";for(var D in this){if(typeof this[D]!="function"){E+=D+'="'+this[D]+'" ';}}return E;}function C(){var E="";for(var D in this){if(typeof this[D]!="function"){E+=D+"="+encodeURIComponent(this[D])+"&";}}return E.replace(/&$/,"");}B.transform=function(D){D.toString=A;if(D.flashvars){D.flashvars.toString=C;}return"<embed "+String(D)+"/>";};if(window.attachEvent){window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};});}})();(function(C){C.ui={plugin:{add:function(E,F,H){var G=C.ui[E].prototype;for(var D in H){G.plugins[D]=G.plugins[D]||[];G.plugins[D].push([F,H[D]]);}},call:function(D,F,E){var H=D.plugins[F];if(!H){return ;}for(var G=0;G<H.length;G++){if(D.options[H[G][0]]){H[G][1].apply(D.element,E);}}}},cssCache:{},css:function(D){if(C.ui.cssCache[D]){return C.ui.cssCache[D];}var E=C('<div class="ui-gen">').addClass(D).css({position:"absolute",top:"-5000px",left:"-5000px",display:"block"}).appendTo("body");C.ui.cssCache[D]=!!((!(/auto|default/).test(E.css("cursor"))||(/^[1-9]/).test(E.css("height"))||(/^[1-9]/).test(E.css("width"))||!(/none/).test(E.css("backgroundImage"))||!(/transparent|rgba\(0, 0, 0, 0\)/).test(E.css("backgroundColor"))));try{C("body").get(0).removeChild(E.get(0));}catch(F){}return C.ui.cssCache[D];},disableSelection:function(D){C(D).attr("unselectable","on").css("MozUserSelect","none");},enableSelection:function(D){C(D).attr("unselectable","off").css("MozUserSelect","");},hasScroll:function(G,E){var D=/top/.test(E||"top")?"scrollTop":"scrollLeft",F=false;if(G[D]>0){return true;}G[D]=1;F=G[D]>0?true:false;G[D]=0;return F;}};var B=C.fn.remove;C.fn.remove=function(){C("*",this).add(this).triggerHandler("remove");return B.apply(this,arguments);};function A(E,F,G){var D=C[E][F].getter||[];D=(typeof D=="string"?D.split(/,?\s+/):D);return(C.inArray(G,D)!=-1);}C.widget=function(E,D){var F=E.split(".")[0];E=E.split(".")[1];C.fn[E]=function(J){var H=(typeof J=="string"),I=Array.prototype.slice.call(arguments,1);if(H&&A(F,E,J)){var G=C.data(this[0],E);return(G?G[J].apply(G,I):undefined);}return this.each(function(){var K=C.data(this,E);if(H&&K&&C.isFunction(K[J])){K[J].apply(K,I);}else{if(!H){C.data(this,E,new C[F][E](this,J));}}});};C[F][E]=function(I,H){var G=this;this.widgetName=E;this.widgetBaseClass=F+"-"+E;this.options=C.extend({},C.widget.defaults,C[F][E].defaults,H);this.element=C(I).bind("setData."+E,function(L,J,K){return G.setData(J,K);}).bind("getData."+E,function(K,J){return G.getData(J);}).bind("remove",function(){return G.destroy();});this.init();};C[F][E].prototype=C.extend({},C.widget.prototype,D);};C.widget.prototype={init:function(){},destroy:function(){this.element.removeData(this.widgetName);},getData:function(D){return this.options[D];},setData:function(D,E){this.options[D]=E;if(D=="disabled"){this.element[E?"addClass":"removeClass"](this.widgetBaseClass+"-disabled");}},enable:function(){this.setData("disabled",false);},disable:function(){this.setData("disabled",true);}};C.widget.defaults={disabled:false};C.ui.mouse={mouseInit:function(){var D=this;this.element.bind("mousedown."+this.widgetName,function(E){return D.mouseDown(E);});if(C.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on");}this.started=false;},mouseDestroy:function(){this.element.unbind("."+this.widgetName);(C.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable));},mouseDown:function(F){(this._mouseStarted&&this.mouseUp(F));this._mouseDownEvent=F;var E=this,G=(F.which==1),D=(typeof this.options.cancel=="string"?C(F.target).parents().add(F.target).filter(this.options.cancel).length:false);if(!G||D||!this.mouseCapture(F)){return true;}this._mouseDelayMet=!this.options.delay;if(!this._mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){E._mouseDelayMet=true;},this.options.delay);}if(this.mouseDistanceMet(F)&&this.mouseDelayMet(F)){this._mouseStarted=(this.mouseStart(F)!==false);if(!this._mouseStarted){F.preventDefault();return true;}}this._mouseMoveDelegate=function(H){return E.mouseMove(H);};this._mouseUpDelegate=function(H){return E.mouseUp(H);};C(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);return false;},mouseMove:function(D){if(C.browser.msie&&!D.button){return this.mouseUp(D);}if(this._mouseStarted){this.mouseDrag(D);return false;}if(this.mouseDistanceMet(D)&&this.mouseDelayMet(D)){this._mouseStarted=(this.mouseStart(this._mouseDownEvent,D)!==false);(this._mouseStarted?this.mouseDrag(D):this.mouseUp(D));}return !this._mouseStarted;},mouseUp:function(D){C(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this.mouseStop(D);}return false;},mouseDistanceMet:function(D){return(Math.max(Math.abs(this._mouseDownEvent.pageX-D.pageX),Math.abs(this._mouseDownEvent.pageY-D.pageY))>=this.options.distance);},mouseDelayMet:function(D){return this._mouseDelayMet;},mouseStart:function(D){},mouseDrag:function(D){},mouseStop:function(D){},mouseCapture:function(D){return true;}};C.ui.mouse.defaults={cancel:null,distance:1,delay:0};})(jQuery);(function(A){A.widget("ui.draggable",A.extend({},A.ui.mouse,{init:function(){var B=this.options;if(B.helper=="original"&&!(/(relative|absolute|fixed)/).test(this.element.css("position"))){this.element.css("position","relative");}this.element.addClass("ui-draggable");(B.disabled&&this.element.addClass("ui-draggable-disabled"));this.mouseInit();},mouseStart:function(F){var H=this.options;if(this.helper||H.disabled||A(F.target).is(".ui-resizable-handle")){return false;}var C=!this.options.handle||!A(this.options.handle,this.element).length?true:false;A(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==F.target){C=true;}});if(!C){return false;}if(A.ui.ddmanager){A.ui.ddmanager.current=this;}this.helper=A.isFunction(H.helper)?A(H.helper.apply(this.element[0],[F])):(H.helper=="clone"?this.element.clone():this.element);if(!this.helper.parents("body").length){this.helper.appendTo((H.appendTo=="parent"?this.element[0].parentNode:H.appendTo));}if(this.helper[0]!=this.element[0]&&!(/(fixed|absolute)/).test(this.helper.css("position"))){this.helper.css("position","absolute");}this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0)};this.cssPosition=this.helper.css("position");this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.offset.click={left:F.pageX-this.offset.left,top:F.pageY-this.offset.top};this.offsetParent=this.helper.offsetParent();var B=this.offsetParent.offset();if(this.offsetParent[0]==document.body&&A.browser.mozilla){B={top:0,left:0};}this.offset.parent={top:B.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:B.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)};var E=this.element.position();this.offset.relative=this.cssPosition=="relative"?{top:E.top-(parseInt(this.helper.css("top"),10)||0)+this.offsetParent[0].scrollTop,left:E.left-(parseInt(this.helper.css("left"),10)||0)+this.offsetParent[0].scrollLeft}:{top:0,left:0};this.originalPosition=this.generatePosition(F);this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};if(H.cursorAt){if(H.cursorAt.left!=undefined){this.offset.click.left=H.cursorAt.left+this.margins.left;}if(H.cursorAt.right!=undefined){this.offset.click.left=this.helperProportions.width-H.cursorAt.right+this.margins.left;}if(H.cursorAt.top!=undefined){this.offset.click.top=H.cursorAt.top+this.margins.top;}if(H.cursorAt.bottom!=undefined){this.offset.click.top=this.helperProportions.height-H.cursorAt.bottom+this.margins.top;}}if(H.containment){if(H.containment=="parent"){H.containment=this.helper[0].parentNode;}if(H.containment=="document"||H.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,A(H.containment=="document"?document:window).width()-this.offset.relative.left-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.element.css("marginRight"),10)||0),(A(H.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.offset.relative.top-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.element.css("marginBottom"),10)||0)];}if(!(/^(document|window|parent)$/).test(H.containment)){var D=A(H.containment)[0];var G=A(H.containment).offset();this.containment=[G.left+(parseInt(A(D).css("borderLeftWidth"),10)||0)-this.offset.relative.left-this.offset.parent.left,G.top+(parseInt(A(D).css("borderTopWidth"),10)||0)-this.offset.relative.top-this.offset.parent.top,G.left+Math.max(D.scrollWidth,D.offsetWidth)-(parseInt(A(D).css("borderLeftWidth"),10)||0)-this.offset.relative.left-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.element.css("marginRight"),10)||0),G.top+Math.max(D.scrollHeight,D.offsetHeight)-(parseInt(A(D).css("borderTopWidth"),10)||0)-this.offset.relative.top-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.element.css("marginBottom"),10)||0)];}}this.propagate("start",F);this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};if(A.ui.ddmanager&&!H.dropBehaviour){A.ui.ddmanager.prepareOffsets(this,F);}this.helper.addClass("ui-draggable-dragging");this.mouseDrag(F);return true;},convertPositionTo:function(C,D){if(!D){D=this.position;}var B=C=="absolute"?1:-1;return{top:(D.top+this.offset.relative.top*B+this.offset.parent.top*B-(this.cssPosition=="fixed"||(this.cssPosition=="absolute"&&this.offsetParent[0]==document.body)?0:this.offsetParent[0].scrollTop)*B+(this.cssPosition=="fixed"?A(document).scrollTop():0)*B+this.margins.top*B),left:(D.left+this.offset.relative.left*B+this.offset.parent.left*B-(this.cssPosition=="fixed"||(this.cssPosition=="absolute"&&this.offsetParent[0]==document.body)?0:this.offsetParent[0].scrollLeft)*B+(this.cssPosition=="fixed"?A(document).scrollLeft():0)*B+this.margins.left*B)};},generatePosition:function(E){var F=this.options;var B={top:(E.pageY-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(this.cssPosition=="fixed"||(this.cssPosition=="absolute"&&this.offsetParent[0]==document.body)?0:this.offsetParent[0].scrollTop)-(this.cssPosition=="fixed"?A(document).scrollTop():0)),left:(E.pageX-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(this.cssPosition=="fixed"||(this.cssPosition=="absolute"&&this.offsetParent[0]==document.body)?0:this.offsetParent[0].scrollLeft)-(this.cssPosition=="fixed"?A(document).scrollLeft():0))};if(!this.originalPosition){return B;}if(this.containment){if(B.left<this.containment[0]){B.left=this.containment[0];}if(B.top<this.containment[1]){B.top=this.containment[1];}if(B.left>this.containment[2]){B.left=this.containment[2];}if(B.top>this.containment[3]){B.top=this.containment[3];}}if(F.grid){var D=this.originalPosition.top+Math.round((B.top-this.originalPosition.top)/F.grid[1])*F.grid[1];B.top=this.containment?(!(D<this.containment[1]||D>this.containment[3])?D:(!(D<this.containment[1])?D-F.grid[1]:D+F.grid[1])):D;var C=this.originalPosition.left+Math.round((B.left-this.originalPosition.left)/F.grid[0])*F.grid[0];B.left=this.containment?(!(C<this.containment[0]||C>this.containment[2])?C:(!(C<this.containment[0])?C-F.grid[0]:C+F.grid[0])):C;}return B;},mouseDrag:function(B){this.position=this.generatePosition(B);this.positionAbs=this.convertPositionTo("absolute");this.position=this.propagate("drag",B)||this.position;if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px";}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px";}if(A.ui.ddmanager){A.ui.ddmanager.drag(this,B);}return false;},mouseStop:function(C){var D=false;if(A.ui.ddmanager&&!this.options.dropBehaviour){var D=A.ui.ddmanager.drop(this,C);}if((this.options.revert=="invalid"&&!D)||(this.options.revert=="valid"&&D)||this.options.revert===true){var B=this;A(this.helper).animate(this.originalPosition,parseInt(this.options.revert,10)||500,function(){B.propagate("stop",C);B.clear();});}else{this.propagate("stop",C);this.clear();}return false;},clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.options.helper!="original"&&!this.cancelHelperRemoval){this.helper.remove();}this.helper=null;this.cancelHelperRemoval=false;},plugins:{},uiHash:function(B){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,options:this.options};},propagate:function(C,B){A.ui.plugin.call(this,C,[B,this.uiHash()]);if(C=="drag"){this.positionAbs=this.convertPositionTo("absolute");}return this.element.triggerHandler(C=="drag"?C:"drag"+C,[B,this.uiHash()],this.options[C]);},destroy:function(){if(!this.element.data("draggable")){return ;}this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable");this.mouseDestroy();}}));A.extend(A.ui.draggable,{defaults:{appendTo:"parent",axis:false,cancel:":input",delay:0,distance:1,helper:"original"}});A.ui.plugin.add("draggable","cursor",{start:function(D,C){var B=A("body");if(B.css("cursor")){C.options._cursor=B.css("cursor");}B.css("cursor",C.options.cursor);},stop:function(C,B){if(B.options._cursor){A("body").css("cursor",B.options._cursor);}}});A.ui.plugin.add("draggable","zIndex",{start:function(D,C){var B=A(C.helper);if(B.css("zIndex")){C.options._zIndex=B.css("zIndex");}B.css("zIndex",C.options.zIndex);},stop:function(C,B){if(B.options._zIndex){A(B.helper).css("zIndex",B.options._zIndex);}}});A.ui.plugin.add("draggable","opacity",{start:function(D,C){var B=A(C.helper);if(B.css("opacity")){C.options._opacity=B.css("opacity");}B.css("opacity",C.options.opacity);},stop:function(C,B){if(B.options._opacity){A(B.helper).css("opacity",B.options._opacity);}}});A.ui.plugin.add("draggable","iframeFix",{start:function(C,B){A(B.options.iframeFix===true?"iframe":B.options.iframeFix).each(function(){A('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css(A(this).offset()).appendTo("body");});},stop:function(C,B){A("div.DragDropIframeFix").each(function(){this.parentNode.removeChild(this);});}});A.ui.plugin.add("draggable","scroll",{start:function(D,C){var E=C.options;var B=A(this).data("draggable");E.scrollSensitivity=E.scrollSensitivity||20;E.scrollSpeed=E.scrollSpeed||20;B.overflowY=function(F){do{if(/auto|scroll/.test(F.css("overflow"))||(/auto|scroll/).test(F.css("overflow-y"))){return F;}F=F.parent();}while(F[0].parentNode);return A(document);}(this);B.overflowX=function(F){do{if(/auto|scroll/.test(F.css("overflow"))||(/auto|scroll/).test(F.css("overflow-x"))){return F;}F=F.parent();}while(F[0].parentNode);return A(document);}(this);if(B.overflowY[0]!=document&&B.overflowY[0].tagName!="HTML"){B.overflowYOffset=B.overflowY.offset();}if(B.overflowX[0]!=document&&B.overflowX[0].tagName!="HTML"){B.overflowXOffset=B.overflowX.offset();}},drag:function(D,C){var E=C.options;var B=A(this).data("draggable");if(B.overflowY[0]!=document&&B.overflowY[0].tagName!="HTML"){if((B.overflowYOffset.top+B.overflowY[0].offsetHeight)-D.pageY<E.scrollSensitivity){B.overflowY[0].scrollTop=B.overflowY[0].scrollTop+E.scrollSpeed;}if(D.pageY-B.overflowYOffset.top<E.scrollSensitivity){B.overflowY[0].scrollTop=B.overflowY[0].scrollTop-E.scrollSpeed;}}else{if(D.pageY-A(document).scrollTop()<E.scrollSensitivity){A(document).scrollTop(A(document).scrollTop()-E.scrollSpeed);}if(A(window).height()-(D.pageY-A(document).scrollTop())<E.scrollSensitivity){A(document).scrollTop(A(document).scrollTop()+E.scrollSpeed);}}if(B.overflowX[0]!=document&&B.overflowX[0].tagName!="HTML"){if((B.overflowXOffset.left+B.overflowX[0].offsetWidth)-D.pageX<E.scrollSensitivity){B.overflowX[0].scrollLeft=B.overflowX[0].scrollLeft+E.scrollSpeed;}if(D.pageX-B.overflowXOffset.left<E.scrollSensitivity){B.overflowX[0].scrollLeft=B.overflowX[0].scrollLeft-E.scrollSpeed;}}else{if(D.pageX-A(document).scrollLeft()<E.scrollSensitivity){A(document).scrollLeft(A(document).scrollLeft()-E.scrollSpeed);}if(A(window).width()-(D.pageX-A(document).scrollLeft())<E.scrollSensitivity){A(document).scrollLeft(A(document).scrollLeft()+E.scrollSpeed);}}}});A.ui.plugin.add("draggable","snap",{start:function(D,C){var B=A(this).data("draggable");B.snapElements=[];A(C.options.snap===true?".ui-draggable":C.options.snap).each(function(){var F=A(this);var E=F.offset();if(this!=B.element[0]){B.snapElements.push({item:this,width:F.outerWidth(),height:F.outerHeight(),top:E.top,left:E.left});}});},drag:function(J,N){var I=A(this).data("draggable");var L=N.options.snapTolerance||20;var D=N.absolutePosition.left,C=D+I.helperProportions.width,P=N.absolutePosition.top,O=P+I.helperProportions.height;for(var H=I.snapElements.length-1;H>=0;H--){var E=I.snapElements[H].left,B=E+I.snapElements[H].width,R=I.snapElements[H].top,M=R+I.snapElements[H].height;if(!((E-L<D&&D<B+L&&R-L<P&&P<M+L)||(E-L<D&&D<B+L&&R-L<O&&O<M+L)||(E-L<C&&C<B+L&&R-L<P&&P<M+L)||(E-L<C&&C<B+L&&R-L<O&&O<M+L))){continue;}if(N.options.snapMode!="inner"){var K=Math.abs(R-O)<=20;var Q=Math.abs(M-P)<=20;var G=Math.abs(E-C)<=20;var F=Math.abs(B-D)<=20;if(K){N.position.top=I.convertPositionTo("relative",{top:R-I.helperProportions.height,left:0}).top;}if(Q){N.position.top=I.convertPositionTo("relative",{top:M,left:0}).top;}if(G){N.position.left=I.convertPositionTo("relative",{top:0,left:E-I.helperProportions.width}).left;}if(F){N.position.left=I.convertPositionTo("relative",{top:0,left:B}).left;}}if(N.options.snapMode!="outer"){var K=Math.abs(R-P)<=20;var Q=Math.abs(M-O)<=20;var G=Math.abs(E-D)<=20;var F=Math.abs(B-C)<=20;if(K){N.position.top=I.convertPositionTo("relative",{top:R,left:0}).top;}if(Q){N.position.top=I.convertPositionTo("relative",{top:M-I.helperProportions.height,left:0}).top;}if(G){N.position.left=I.convertPositionTo("relative",{top:0,left:E}).left;}if(F){N.position.left=I.convertPositionTo("relative",{top:0,left:B-I.helperProportions.width}).left;}}}}});A.ui.plugin.add("draggable","connectToSortable",{start:function(D,C){var B=A(this).data("draggable");B.sortables=[];A(C.options.connectToSortable).each(function(){if(A.data(this,"sortable")){var E=A.data(this,"sortable");B.sortables.push({instance:E,shouldRevert:E.options.revert});E.refreshItems();E.propagate("activate",D,B);}});},stop:function(D,C){var B=A(this).data("draggable");A.each(B.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;B.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true;}this.instance.mouseStop(D);this.instance.element.triggerHandler("sortreceive",[D,A.extend(this.instance.ui(),{sender:B.element})],this.instance.options["receive"]);this.instance.options.helper=this.instance.options._helper;}else{this.instance.propagate("deactivate",D,B);}});},drag:function(F,E){var D=A(this).data("draggable"),B=this;var C=function(K){var H=K.left,J=H+K.width,I=K.top,G=I+K.height;return(H<(this.positionAbs.left+this.offset.click.left)&&(this.positionAbs.left+this.offset.click.left)<J&&I<(this.positionAbs.top+this.offset.click.top)&&(this.positionAbs.top+this.offset.click.top)<G);};A.each(D.sortables,function(G){if(C.call(D,this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=A(B).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return E.helper[0];};F.target=this.instance.currentItem[0];this.instance.mouseCapture(F,true);this.instance.mouseStart(F,true,true);this.instance.offset.click.top=D.offset.click.top;this.instance.offset.click.left=D.offset.click.left;this.instance.offset.parent.left-=D.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=D.offset.parent.top-this.instance.offset.parent.top;D.propagate("toSortable",F);}if(this.instance.currentItem){this.instance.mouseDrag(F);}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance.mouseStop(F,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove();}D.propagate("fromSortable",F);}}});}});A.ui.plugin.add("draggable","stack",{start:function(D,B){var C=A.makeArray(A(B.options.stack.group)).sort(function(F,E){return(parseInt(A(F).css("zIndex"),10)||B.options.stack.min)-(parseInt(A(E).css("zIndex"),10)||B.options.stack.min);});A(C).each(function(E){this.style.zIndex=B.options.stack.min+E;});this[0].style.zIndex=B.options.stack.min+C.length;}});})(jQuery);(function(A){A.widget("ui.resizable",A.extend({},A.ui.mouse,{init:function(){var M=this,N=this.options;var Q=this.element.css("position");this.originalElement=this.element;this.element.addClass("ui-resizable").css({position:/static/.test(Q)?"relative":Q});A.extend(N,{_aspectRatio:!!(N.aspectRatio),helper:N.helper||N.ghost||N.animate?N.helper||"proxy":null,knobHandles:N.knobHandles===true?"ui-resizable-knob-handle":N.knobHandles});var H="1px solid #DEDEDE";N.defaultTheme={"ui-resizable":{display:"block"},"ui-resizable-handle":{position:"absolute",background:"#F2F2F2",fontSize:"0.1px"},"ui-resizable-n":{cursor:"n-resize",height:"4px",left:"0px",right:"0px",borderTop:H},"ui-resizable-s":{cursor:"s-resize",height:"4px",left:"0px",right:"0px",borderBottom:H},"ui-resizable-e":{cursor:"e-resize",width:"4px",top:"0px",bottom:"0px",borderRight:H},"ui-resizable-w":{cursor:"w-resize",width:"4px",top:"0px",bottom:"0px",borderLeft:H},"ui-resizable-se":{cursor:"se-resize",width:"4px",height:"4px",borderRight:H,borderBottom:H},"ui-resizable-sw":{cursor:"sw-resize",width:"4px",height:"4px",borderBottom:H,borderLeft:H},"ui-resizable-ne":{cursor:"ne-resize",width:"4px",height:"4px",borderRight:H,borderTop:H},"ui-resizable-nw":{cursor:"nw-resize",width:"4px",height:"4px",borderLeft:H,borderTop:H}};N.knobTheme={"ui-resizable-handle":{background:"#F2F2F2",border:"1px solid #808080",height:"8px",width:"8px"},"ui-resizable-n":{cursor:"n-resize",top:"0px",left:"45%"},"ui-resizable-s":{cursor:"s-resize",bottom:"0px",left:"45%"},"ui-resizable-e":{cursor:"e-resize",right:"0px",top:"45%"},"ui-resizable-w":{cursor:"w-resize",left:"0px",top:"45%"},"ui-resizable-se":{cursor:"se-resize",right:"0px",bottom:"0px"},"ui-resizable-sw":{cursor:"sw-resize",left:"0px",bottom:"0px"},"ui-resizable-nw":{cursor:"nw-resize",left:"0px",top:"0px"},"ui-resizable-ne":{cursor:"ne-resize",right:"0px",top:"0px"}};N._nodeName=this.element[0].nodeName;if(N._nodeName.match(/canvas|textarea|input|select|button|img/i)){var B=this.element;if(/relative/.test(B.css("position"))&&A.browser.opera){B.css({position:"relative",top:"auto",left:"auto"});}B.wrap(A('<div class="ui-wrapper"	style="overflow: hidden;"></div>').css({position:B.css("position"),width:B.outerWidth(),height:B.outerHeight(),top:B.css("top"),left:B.css("left")}));var J=this.element;this.element=this.element.parent();this.element.data("resizable",this);this.element.css({marginLeft:J.css("marginLeft"),marginTop:J.css("marginTop"),marginRight:J.css("marginRight"),marginBottom:J.css("marginBottom")});J.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});if(A.browser.safari&&N.preventDefault){J.css("resize","none");}N.proportionallyResize=J.css({position:"static",zoom:1,display:"block"});this.element.css({margin:J.css("margin")});this._proportionallyResize();}if(!N.handles){N.handles=!A(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"};}if(N.handles.constructor==String){N.zIndex=N.zIndex||1000;if(N.handles=="all"){N.handles="n,e,s,w,se,sw,ne,nw";}var O=N.handles.split(",");N.handles={};var G={handle:"position: absolute; display: none; overflow:hidden;",n:"top: 0pt; width:100%;",e:"right: 0pt; height:100%;",s:"bottom: 0pt; width:100%;",w:"left: 0pt; height:100%;",se:"bottom: 0pt; right: 0px;",sw:"bottom: 0pt; left: 0px;",ne:"top: 0pt; right: 0px;",nw:"top: 0pt; left: 0px;"};for(var R=0;R<O.length;R++){var S=A.trim(O[R]),L=N.defaultTheme,F="ui-resizable-"+S,C=!A.ui.css(F)&&!N.knobHandles,P=A.ui.css("ui-resizable-knob-handle"),T=A.extend(L[F],L["ui-resizable-handle"]),D=A.extend(N.knobTheme[F],!P?N.knobTheme["ui-resizable-handle"]:{});var K=/sw|se|ne|nw/.test(S)?{zIndex:++N.zIndex}:{};var I=(C?G[S]:""),E=A(['<div class="ui-resizable-handle ',F,'" style="',I,G.handle,'"></div>'].join("")).css(K);N.handles[S]=".ui-resizable-"+S;this.element.append(E.css(C?T:{}).css(N.knobHandles?D:{}).addClass(N.knobHandles?"ui-resizable-knob-handle":"").addClass(N.knobHandles));}if(N.knobHandles){this.element.addClass("ui-resizable-knob").css(!A.ui.css("ui-resizable-knob")?{}:{});}}this._renderAxis=function(Y){Y=Y||this.element;for(var V in N.handles){if(N.handles[V].constructor==String){N.handles[V]=A(N.handles[V],this.element).show();}if(N.transparent){N.handles[V].css({opacity:0});}if(this.element.is(".ui-wrapper")&&N._nodeName.match(/textarea|input|select|button/i)){var W=A(N.handles[V],this.element),X=0;X=/sw|ne|nw|se|n|s/.test(V)?W.outerHeight():W.outerWidth();var U=["padding",/ne|nw|n/.test(V)?"Top":/se|sw|s/.test(V)?"Bottom":/^e$/.test(V)?"Right":"Left"].join("");if(!N.transparent){Y.css(U,X);}this._proportionallyResize();}if(!A(N.handles[V]).length){continue;}}};this._renderAxis(this.element);N._handles=A(".ui-resizable-handle",M.element);if(N.disableSelection){N._handles.each(function(U,V){A.ui.disableSelection(V);});}N._handles.mouseover(function(){if(!N.resizing){if(this.className){var U=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);}M.axis=N.axis=U&&U[1]?U[1]:"se";}});if(N.autoHide){N._handles.hide();A(M.element).addClass("ui-resizable-autohide").hover(function(){A(this).removeClass("ui-resizable-autohide");N._handles.show();},function(){if(!N.resizing){A(this).addClass("ui-resizable-autohide");N._handles.hide();}});}this.mouseInit();},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,options:this.options,originalSize:this.originalSize,originalPosition:this.originalPosition};},propagate:function(C,B){A.ui.plugin.call(this,C,[B,this.ui()]);if(C!="resize"){this.element.triggerHandler(["resize",C].join(""),[B,this.ui()],this.options[C]);}},destroy:function(){var D=this.element,C=D.children(".ui-resizable").get(0);this.mouseDestroy();var B=function(E){A(E).removeClass("ui-resizable ui-resizable-disabled").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove();};B(D);if(D.is(".ui-wrapper")&&C){D.parent().append(A(C).css({position:D.css("position"),width:D.outerWidth(),height:D.outerHeight(),top:D.css("top"),left:D.css("left")})).end().remove();B(C);}},mouseStart:function(K){if(this.options.disabled){return false;}var J=false;for(var H in this.options.handles){if(A(this.options.handles[H])[0]==K.target){J=true;}}if(!J){return false;}var C=this.options,B=this.element.position(),D=this.element,I=function(O){return parseInt(O,10)||0;},G=A.browser.msie&&A.browser.version<7;C.resizing=true;C.documentScroll={top:A(document).scrollTop(),left:A(document).scrollLeft()};if(D.is(".ui-draggable")||(/absolute/).test(D.css("position"))){var M=A.browser.msie&&!C.containment&&(/absolute/).test(D.css("position"))&&!(/relative/).test(D.parent().css("position"));var L=M?C.documentScroll.top:0,F=M?C.documentScroll.left:0;D.css({position:"absolute",top:(B.top+L),left:(B.left+F)});}if(A.browser.opera&&/relative/.test(D.css("position"))){D.css({position:"relative",top:"auto",left:"auto"});}this._renderProxy();var N=I(this.helper.css("left")),E=I(this.helper.css("top"));if(C.containment){N+=A(C.containment).scrollLeft()||0;E+=A(C.containment).scrollTop()||0;}this.offset=this.helper.offset();this.position={left:N,top:E};this.size=C.helper||G?{width:D.outerWidth(),height:D.outerHeight()}:{width:D.width(),height:D.height()};this.originalSize=C.helper||G?{width:D.outerWidth(),height:D.outerHeight()}:{width:D.width(),height:D.height()};this.originalPosition={left:N,top:E};this.sizeDiff={width:D.outerWidth()-D.width(),height:D.outerHeight()-D.height()};this.originalMousePosition={left:K.pageX,top:K.pageY};C.aspectRatio=(typeof C.aspectRatio=="number")?C.aspectRatio:((this.originalSize.height/this.originalSize.width)||1);if(C.preserveCursor){A("body").css("cursor",this.axis+"-resize");}this.propagate("start",K);return true;},mouseDrag:function(I){var D=this.helper,C=this.options,J={},M=this,F=this.originalMousePosition,K=this.axis;var N=(I.pageX-F.left)||0,L=(I.pageY-F.top)||0;var E=this._change[K];if(!E){return false;}var H=E.apply(this,[I,N,L]),G=A.browser.msie&&A.browser.version<7,B=this.sizeDiff;if(C._aspectRatio||I.shiftKey){H=this._updateRatio(H,I);}H=this._respectSize(H,I);this.propagate("resize",I);D.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!C.helper&&C.proportionallyResize){this._proportionallyResize();}this._updateCache(H);this.element.triggerHandler("resize",[I,this.ui()],this.options["resize"]);return false;},mouseStop:function(I){this.options.resizing=false;var E=this.options,H=function(M){return parseInt(M,10)||0;},K=this;if(E.helper){var D=E.proportionallyResize,B=D&&(/textarea/i).test(D.get(0).nodeName),C=B&&A.ui.hasScroll(D.get(0),"left")?0:K.sizeDiff.height,G=B?0:K.sizeDiff.width;var L={width:(K.size.width-G),height:(K.size.height-C)},F=(parseInt(K.element.css("left"),10)+(K.position.left-K.originalPosition.left))||null,J=(parseInt(K.element.css("top"),10)+(K.position.top-K.originalPosition.top))||null;if(!E.animate){this.element.css(A.extend(L,{top:J,left:F}));}if(E.helper&&!E.animate){this._proportionallyResize();}}if(E.preserveCursor){A("body").css("cursor","auto");}this.propagate("stop",I);if(E.helper){this.helper.remove();}return false;},_updateCache:function(B){var C=this.options;this.offset=this.helper.offset();if(B.left){this.position.left=B.left;}if(B.top){this.position.top=B.top;}if(B.height){this.size.height=B.height;}if(B.width){this.size.width=B.width;}},_updateRatio:function(D,E){var F=this.options,G=this.position,C=this.size,B=this.axis;if(D.height){D.width=(C.height/F.aspectRatio);}else{if(D.width){D.height=(C.width*F.aspectRatio);}}if(B=="sw"){D.left=G.left+(C.width-D.width);D.top=null;}if(B=="nw"){D.top=G.top+(C.height-D.height);D.left=G.left+(C.width-D.width);}return D;},_respectSize:function(H,I){var F=this.helper,E=this.options,N=E._aspectRatio||I.shiftKey,M=this.axis,P=H.width&&E.maxWidth&&E.maxWidth<H.width,J=H.height&&E.maxHeight&&E.maxHeight<H.height,D=H.width&&E.minWidth&&E.minWidth>H.width,O=H.height&&E.minHeight&&E.minHeight>H.height;if(D){H.width=E.minWidth;}if(O){H.height=E.minHeight;}if(P){H.width=E.maxWidth;}if(J){H.height=E.maxHeight;}var C=this.originalPosition.left+this.originalSize.width,L=this.position.top+this.size.height;var G=/sw|nw|w/.test(M),B=/nw|ne|n/.test(M);if(D&&G){H.left=C-E.minWidth;}if(P&&G){H.left=C-E.maxWidth;}if(O&&B){H.top=L-E.minHeight;}if(J&&B){H.top=L-E.maxHeight;}var K=!H.width&&!H.height;if(K&&!H.left&&H.top){H.top=null;}else{if(K&&!H.top&&H.left){H.left=null;}}return H;},_proportionallyResize:function(){var F=this.options;if(!F.proportionallyResize){return ;}var D=F.proportionallyResize,C=this.helper||this.element;if(!F.borderDif){var B=[D.css("borderTopWidth"),D.css("borderRightWidth"),D.css("borderBottomWidth"),D.css("borderLeftWidth")],E=[D.css("paddingTop"),D.css("paddingRight"),D.css("paddingBottom"),D.css("paddingLeft")];F.borderDif=A.map(B,function(G,I){var H=parseInt(G,10)||0,J=parseInt(E[I],10)||0;return H+J;});}D.css({height:(C.height()-F.borderDif[0]-F.borderDif[2])+"px",width:(C.width()-F.borderDif[1]-F.borderDif[3])+"px"});},_renderProxy:function(){var C=this.element,F=this.options;this.elementOffset=C.offset();if(F.helper){this.helper=this.helper||A('<div style="overflow:hidden;"></div>');var B=A.browser.msie&&A.browser.version<7,D=(B?1:0),E=(B?2:-1);this.helper.addClass(F.helper).css({width:C.outerWidth()+E,height:C.outerHeight()+E,position:"absolute",left:this.elementOffset.left-D+"px",top:this.elementOffset.top-D+"px",zIndex:++F.zIndex});this.helper.appendTo("body");if(F.disableSelection){A.ui.disableSelection(this.helper.get(0));}}else{this.helper=C;}},_change:{e:function(D,C,B){return{width:this.originalSize.width+C};},w:function(F,C,B){var G=this.options,D=this.originalSize,E=this.originalPosition;return{left:E.left+C,width:D.width-C};},n:function(F,C,B){var G=this.options,D=this.originalSize,E=this.originalPosition;return{top:E.top+B,height:D.height-B};},s:function(D,C,B){return{height:this.originalSize.height+B};},se:function(D,C,B){return A.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[D,C,B]));},sw:function(D,C,B){return A.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[D,C,B]));},ne:function(D,C,B){return A.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[D,C,B]));},nw:function(D,C,B){return A.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[D,C,B]));}}}));A.extend(A.ui.resizable,{defaults:{cancel:":input",distance:1,delay:0,preventDefault:true,transparent:false,minWidth:10,minHeight:10,aspectRatio:false,disableSelection:true,preserveCursor:true,autoHide:false,knobHandles:false}});A.ui.plugin.add("resizable","containment",{start:function(I,K){var E=K.options,M=A(this).data("resizable"),G=M.element;var C=E.containment,F=(C instanceof A)?C.get(0):(/parent/.test(C))?G.parent().get(0):C;if(!F){return ;}M.containerElement=A(F);if(/document/.test(C)||C==document){M.containerOffset={left:0,top:0};M.containerPosition={left:0,top:0};M.parentData={element:A(document),left:0,top:0,width:A(document).width(),height:A(document).height()||document.body.parentNode.scrollHeight};}else{M.containerOffset=A(F).offset();M.containerPosition=A(F).position();M.containerSize={height:A(F).innerHeight(),width:A(F).innerWidth()};var J=M.containerOffset,B=M.containerSize.height,H=M.containerSize.width,D=(A.ui.hasScroll(F,"left")?F.scrollWidth:H),L=(A.ui.hasScroll(F)?F.scrollHeight:B);M.parentData={element:F,left:J.left,top:J.top,width:D,height:L};}},resize:function(H,K){var E=K.options,N=A(this).data("resizable"),C=N.containerSize,J=N.containerOffset,G=N.size,I=N.position,L=E._aspectRatio||H.shiftKey,B={top:0,left:0},D=N.containerElement;if(D[0]!=document&&/static/.test(D.css("position"))){B=N.containerPosition;}if(I.left<(E.helper?J.left:B.left)){N.size.width=N.size.width+(E.helper?(N.position.left-J.left):(N.position.left-B.left));if(L){N.size.height=N.size.width*E.aspectRatio;}N.position.left=E.helper?J.left:B.left;}if(I.top<(E.helper?J.top:0)){N.size.height=N.size.height+(E.helper?(N.position.top-J.top):N.position.top);if(L){N.size.width=N.size.height/E.aspectRatio;}N.position.top=E.helper?J.top:0;}var F=(E.helper?N.offset.left-J.left:(N.position.left-B.left))+N.sizeDiff.width,M=(E.helper?N.offset.top-J.top:N.position.top)+N.sizeDiff.height;if(F+N.size.width>=N.parentData.width){N.size.width=N.parentData.width-F;if(L){N.size.height=N.size.width*E.aspectRatio;}}if(M+N.size.height>=N.parentData.height){N.size.height=N.parentData.height-M;if(L){N.size.width=N.size.height/E.aspectRatio;}}},stop:function(G,J){var C=J.options,L=A(this).data("resizable"),H=L.position,I=L.containerOffset,B=L.containerPosition,D=L.containerElement;var E=A(L.helper),M=E.offset(),K=E.innerWidth(),F=E.innerHeight();if(C.helper&&!C.animate&&/relative/.test(D.css("position"))){A(this).css({left:(M.left-I.left),top:(M.top-I.top),width:K,height:F});}if(C.helper&&!C.animate&&/static/.test(D.css("position"))){A(this).css({left:B.left+(M.left-I.left),top:B.top+(M.top-I.top),width:K,height:F});}}});A.ui.plugin.add("resizable","grid",{resize:function(H,J){var D=J.options,L=A(this).data("resizable"),G=L.size,E=L.originalSize,F=L.originalPosition,K=L.axis,I=D._aspectRatio||H.shiftKey;D.grid=typeof D.grid=="number"?[D.grid,D.grid]:D.grid;var C=Math.round((G.width-E.width)/(D.grid[0]||1))*(D.grid[0]||1),B=Math.round((G.height-E.height)/(D.grid[1]||1))*(D.grid[1]||1);if(/^(se|s|e)$/.test(K)){L.size.width=E.width+C;L.size.height=E.height+B;}else{if(/^(ne)$/.test(K)){L.size.width=E.width+C;L.size.height=E.height+B;L.position.top=F.top-B;}else{if(/^(sw)$/.test(K)){L.size.width=E.width+C;L.size.height=E.height+B;L.position.left=F.left-C;}else{L.size.width=E.width+C;L.size.height=E.height+B;L.position.top=F.top-B;L.position.left=F.left-C;}}}}});A.ui.plugin.add("resizable","animate",{stop:function(I,K){var F=K.options,L=A(this).data("resizable");var E=F.proportionallyResize,B=E&&(/textarea/i).test(E.get(0).nodeName),C=B&&A.ui.hasScroll(E.get(0),"left")?0:L.sizeDiff.height,H=B?0:L.sizeDiff.width;var D={width:(L.size.width-H),height:(L.size.height-C)},G=(parseInt(L.element.css("left"),10)+(L.position.left-L.originalPosition.left))||null,J=(parseInt(L.element.css("top"),10)+(L.position.top-L.originalPosition.top))||null;L.element.animate(A.extend(D,J&&G?{top:J,left:G}:{}),{duration:F.animateDuration||"slow",easing:F.animateEasing||"swing",step:function(){var M={width:parseInt(L.element.css("width"),10),height:parseInt(L.element.css("height"),10),top:parseInt(L.element.css("top"),10),left:parseInt(L.element.css("left"),10)};if(E){E.css({width:M.width,height:M.height});}L._updateCache(M);L.propagate("animate",I);}});}});A.ui.plugin.add("resizable","ghost",{start:function(E,D){var F=D.options,B=A(this).data("resizable"),G=F.proportionallyResize,C=B.size;if(!G){B.ghost=B.element.clone();}else{B.ghost=G.clone();}B.ghost.css({opacity:0.25,display:"block",position:"relative",height:C.height,width:C.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof F.ghost=="string"?F.ghost:"");B.ghost.appendTo(B.helper);},resize:function(D,C){var E=C.options,B=A(this).data("resizable"),F=E.proportionallyResize;if(B.ghost){B.ghost.css({position:"relative",height:B.size.height,width:B.size.width});}},stop:function(D,C){var E=C.options,B=A(this).data("resizable"),F=E.proportionallyResize;if(B.ghost&&B.helper){B.helper.get(0).removeChild(B.ghost.get(0));}}});A.ui.plugin.add("resizable","alsoResize",{start:function(E,C){var F=C.options,B=A(this).data("resizable"),D=function(G){A(G).each(function(){A(this).data("resizable-alsoresize",{width:parseInt(A(this).width(),10),height:parseInt(A(this).height(),10),left:parseInt(A(this).css("left"),10),top:parseInt(A(this).css("top"),10)});});};if(typeof (F.alsoResize)=="object"){if(F.alsoResize.length){F.alsoResize=F.alsoResize[0];D(F.alsoResize);}else{A.each(F.alsoResize,function(G,H){D(G);});}}else{D(F.alsoResize);}},resize:function(F,E){var G=E.options,C=A(this).data("resizable"),D=C.originalSize,I=C.originalPosition;var H={height:(C.size.height-D.height)||0,width:(C.size.width-D.width)||0,top:(C.position.top-I.top)||0,left:(C.position.left-I.left)||0},B=function(J,K){A(J).each(function(){var N=A(this).data("resizable-alsoresize"),M={},L=K&&K.length?K:["width","height","top","left"];A.each(L||["width","height","top","left"],function(O,Q){var P=(N[Q]||0)+(H[Q]||0);if(P&&P>=0){M[Q]=P||null;}});A(this).css(M);});};if(typeof (G.alsoResize)=="object"){A.each(G.alsoResize,function(J,K){B(J,K);});}else{B(G.alsoResize);}},stop:function(C,B){A(this).removeData("resizable-alsoresize-start");}});})(jQuery);(function(B){var A={dragStart:"start.draggable",drag:"drag.draggable",dragStop:"stop.draggable",maxHeight:"maxHeight.resizable",minHeight:"minHeight.resizable",maxWidth:"maxWidth.resizable",minWidth:"minWidth.resizable",resizeStart:"start.resizable",resize:"drag.resizable",resizeStop:"stop.resizable"};B.widget("ui.dialog",{init:function(){var C=this,E=this.options,D=typeof E.resizable=="string"?E.resizable:"n,e,s,w,se,sw,ne,nw",F;uiDialogContent=this.element.addClass("ui-dialog-content").wrap("<div/>").wrap("<div/>"),uiDialogContainer=(this.uiDialogContainer=uiDialogContent.parent().addClass("ui-dialog-container").css({position:"relative",width:"100%",height:"100%"})),title=E.title||uiDialogContent.attr("title")||"",uiDialogTitlebar=(this.uiDialogTitlebar=B('<div class="ui-dialog-titlebar"/>')).append('<span class="ui-dialog-title">'+title+"</span>").append('<a href="#" class="ui-dialog-titlebar-close"><span>X</span></a>').prependTo(uiDialogContainer),uiDialog=(this.uiDialog=uiDialogContainer.parent()).appendTo(document.body).hide().addClass("ui-dialog").addClass(E.dialogClass).addClass(uiDialogContent.attr("className")).removeClass("ui-dialog-content").css({position:"absolute",width:E.width,height:E.height,overflow:"hidden",zIndex:E.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(G){if(E.closeOnEscape){var H=27;(G.keyCode&&G.keyCode==H&&C.close());}}).mousedown(function(){C.moveToTop();}),uiDialogButtonPane=(this.uiDialogButtonPane=B("<div/>")).addClass("ui-dialog-buttonpane").css({position:"absolute",bottom:0}).appendTo(uiDialog);this.uiDialogTitlebarClose=B(".ui-dialog-titlebar-close",uiDialogTitlebar).hover(function(){B(this).addClass("ui-dialog-titlebar-close-hover");},function(){B(this).removeClass("ui-dialog-titlebar-close-hover");}).mousedown(function(G){G.stopPropagation();}).click(function(){C.close();return false;});this.uiDialogTitlebar.find("*").add(this.uiDialogTitlebar).each(function(){B.ui.disableSelection(this);});if(B.fn.draggable){uiDialog.draggable({cancel:".ui-dialog-content",helper:E.dragHelper,handle:".ui-dialog-titlebar",start:function(H,G){C.moveToTop();(E.dragStart&&E.dragStart.apply(C.element[0],arguments));},drag:function(H,G){(E.drag&&E.drag.apply(C.element[0],arguments));},stop:function(H,G){(E.dragStop&&E.dragStop.apply(C.element[0],arguments));B.ui.dialog.overlay.resize();}});(E.draggable||uiDialog.draggable("disable"));}if(B.fn.resizable){uiDialog.resizable({cancel:".ui-dialog-content",helper:E.resizeHelper,maxWidth:E.maxWidth,maxHeight:E.maxHeight,minWidth:E.minWidth,minHeight:E.minHeight,start:function(){(E.resizeStart&&E.resizeStart.apply(C.element[0],arguments));},resize:function(H,G){(E.autoResize&&C.size.apply(C));(E.resize&&E.resize.apply(C.element[0],arguments));},handles:D,stop:function(H,G){(E.autoResize&&C.size.apply(C));(E.resizeStop&&E.resizeStop.apply(C.element[0],arguments));B.ui.dialog.overlay.resize();}});(E.resizable||uiDialog.resizable("disable"));}this.createButtons(E.buttons);this.isOpen=false;(E.bgiframe&&B.fn.bgiframe&&uiDialog.bgiframe());(E.autoOpen&&this.open());},setData:function(C,D){(A[C]&&this.uiDialog.data(A[C],D));switch(C){case"buttons":this.createButtons(D);break;case"draggable":this.uiDialog.draggable(D?"enable":"disable");break;case"height":this.uiDialog.height(D);break;case"position":this.position(D);break;case"resizable":(typeof D=="string"&&this.uiDialog.data("handles.resizable",D));this.uiDialog.resizable(D?"enable":"disable");break;case"title":B(".ui-dialog-title",this.uiDialogTitlebar).text(D);break;case"width":this.uiDialog.width(D);break;}B.widget.prototype.setData.apply(this,arguments);},position:function(H){var D=B(window),E=B(document),F=E.scrollTop(),C=E.scrollLeft(),G=F;if(B.inArray(H,["center","top","right","bottom","left"])>=0){H=[H=="right"||H=="left"?H:"center",H=="top"||H=="bottom"?H:"middle"];}if(H.constructor!=Array){H=["center","middle"];}if(H[0].constructor==Number){C+=H[0];}else{switch(H[0]){case"left":C+=0;break;case"right":C+=D.width()-this.uiDialog.width();break;default:case"center":C+=(D.width()-this.uiDialog.width())/2;}}if(H[1].constructor==Number){F+=H[1];}else{switch(H[1]){case"top":F+=0;break;case"bottom":F+=D.height()-this.uiDialog.height();break;default:case"middle":F+=(D.height()-this.uiDialog.height())/2;}}F=Math.max(F,G);this.uiDialog.css({top:F,left:C});},size:function(){var D=this.uiDialogContainer,G=this.uiDialogTitlebar,E=this.element,F=parseInt(E.css("margin-top"),10)+parseInt(E.css("margin-bottom"),10),C=parseInt(E.css("margin-left"),10)+parseInt(E.css("margin-right"),10);E.height(D.height()-G.outerHeight()-F);E.width(D.width()-C);},open:function(){if(this.isOpen){return ;}this.overlay=this.options.modal?new B.ui.dialog.overlay(this):null;(this.uiDialog.next().length>0)&&this.uiDialog.appendTo("body");this.position(this.options.position);if(!!this.options.show&&!!this.options.show.effect){this.options.show.effect=="fade"?this.uiDialog.fadeIn(this.options.show.speed):this.uiDialog.show(this.options.show.effect,this.options.show.options,this.options.show.speed);}else{this.options.show=="fade"?this.uiDialog.fadeIn():this.uiDialog.show(this.options.show);}this.options.autoResize&&this.size();this.moveToTop(true);var C=null;var D={options:this.options};this.uiDialogTitlebarClose.focus();this.element.triggerHandler("dialogopen",[C,D],this.options.open);this.isOpen=true;},moveToTop:function(E){if((this.options.modal&&!E)||(!this.options.stack&&!this.options.modal)){return this.element.triggerHandler("dialogfocus",[null,{options:this.options}],this.options.focus);}var D=this.options.zIndex,C=this.options;B(".ui-dialog:visible").each(function(){D=Math.max(D,parseInt(B(this).css("z-index"),10)||C.zIndex);});(this.overlay&&this.overlay.$el.css("z-index",++D));this.uiDialog.css("z-index",++D);this.element.triggerHandler("dialogfocus",[null,{options:this.options}],this.options.focus);},close:function(){(this.overlay&&this.overlay.destroy());if(!!this.options.hide&&!!this.options.hide.effect){this.options.hide.effect=="fade"?this.uiDialog.fadeOut(this.options.hide.speed):this.uiDialog.hide(this.options.hide.effect,this.options.hide.options,this.options.hide.speed);}else{this.options.hide=="fade"?this.uiDialog.fadeOut():this.uiDialog.hide(this.options.hide);}var D=null;var C={options:this.options};this.element.triggerHandler("dialogclose",[D,C],this.options.close);B.ui.dialog.overlay.resize();this.isOpen=false;},destroy:function(){(this.overlay&&this.overlay.destroy());this.uiDialog.hide();this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content").hide().appendTo("body");this.uiDialog.remove();},createButtons:function(F){var E=this,C=false,D=this.uiDialogButtonPane;D.empty().hide();B.each(F,function(){return !(C=true);});if(C){D.show();B.each(F,function(G,H){B("<button/>").text(G).click(function(){H.apply(E.element[0],arguments);}).appendTo(D);});}}});B.extend(B.ui.dialog,{defaults:{autoOpen:true,autoResize:true,bgiframe:false,buttons:{},closeOnEscape:true,draggable:true,height:200,minHeight:100,minWidth:150,modal:false,overlay:{},position:"center",resizable:true,stack:true,width:300,zIndex:1000},overlay:function(C){this.$el=B.ui.dialog.overlay.create(C);}});B.extend(B.ui.dialog.overlay,{instances:[],events:B.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(C){return C+".dialog-overlay";}).join(" "),create:function(D){if(this.instances.length===0){setTimeout(function(){B("a, :input").bind(B.ui.dialog.overlay.events,function(){var F=false;var H=B(this).parents(".ui-dialog");if(H.length){var E=B(".ui-dialog-overlay");if(E.length){var G=parseInt(E.css("z-index"),10);E.each(function(){G=Math.max(G,parseInt(B(this).css("z-index"),10));});F=parseInt(H.css("z-index"),10)>G;}else{F=true;}}return F;});},1);B(document).bind("keydown.dialog-overlay",function(E){var F=27;(E.keyCode&&E.keyCode==F&&D.close());});B(window).bind("resize.dialog-overlay",B.ui.dialog.overlay.resize);}var C=B("<div/>").appendTo(document.body).addClass("ui-dialog-overlay").css(B.extend({borderWidth:0,margin:0,padding:0,position:"absolute",top:0,left:0,width:this.width(),height:this.height()},D.options.overlay));(D.options.bgiframe&&B.fn.bgiframe&&C.bgiframe());this.instances.push(C);return C;},destroy:function(C){this.instances.splice(B.inArray(this.instances,C),1);if(this.instances.length===0){B("a, :input").add([document,window]).unbind(".dialog-overlay");}C.remove();},height:function(){if(B.browser.msie&&B.browser.version<7){var D=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);var C=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);if(D<C){return B(window).height()+"px";}else{return D+"px";}}else{return B(document).height()+"px";}},width:function(){if(B.browser.msie&&B.browser.version<7){var C=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);var D=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);if(C<D){return B(window).width()+"px";}else{return C+"px";}}else{return B(document).width()+"px";}},resize:function(){var C=B([]);B.each(B.ui.dialog.overlay.instances,function(){C=C.add(this);});C.css({width:0,height:0}).css({width:B.ui.dialog.overlay.width(),height:B.ui.dialog.overlay.height()});}});B.extend(B.ui.dialog.overlay.prototype,{destroy:function(){B.ui.dialog.overlay.destroy(this.$el);}});})(jQuery);(function(C){C.effects=C.effects||{};C.extend(C.effects,{save:function(F,G){for(var E=0;E<G.length;E++){if(G[E]!==null){C.data(F[0],"ec.storage."+G[E],F[0].style[G[E]]);}}},restore:function(F,G){for(var E=0;E<G.length;E++){if(G[E]!==null){F.css(G[E],C.data(F[0],"ec.storage."+G[E]));}}},setMode:function(E,F){if(F=="toggle"){F=E.is(":hidden")?"show":"hide";}return F;},getBaseline:function(F,G){var H,E;switch(F[0]){case"top":H=0;break;case"middle":H=0.5;break;case"bottom":H=1;break;default:H=F[0]/G.height;}switch(F[1]){case"left":E=0;break;case"center":E=0.5;break;case"right":E=1;break;default:E=F[1]/G.width;}return{x:E,y:H};},createWrapper:function(F){if(F.parent().attr("id")=="fxWrapper"){return F;}var E={width:F.outerWidth({margin:true}),height:F.outerHeight({margin:true}),"float":F.css("float")};F.wrap('<div id="fxWrapper" style="font-size:100%;background:transparent;border:none;margin:0;padding:0"></div>');var I=F.parent();if(F.css("position")=="static"){I.css({position:"relative"});F.css({position:"relative"});}else{var H=F.css("top");if(isNaN(parseInt(H))){H="auto";}var G=F.css("left");if(isNaN(parseInt(G))){G="auto";}I.css({position:F.css("position"),top:H,left:G,zIndex:F.css("z-index")}).show();F.css({position:"relative",top:0,left:0});}I.css(E);return I;},removeWrapper:function(E){if(E.parent().attr("id")=="fxWrapper"){return E.parent().replaceWith(E);}return E;},setTransition:function(F,G,E,H){H=H||{};C.each(G,function(J,I){unit=F.cssUnit(I);if(unit[0]>0){H[I]=unit[0]*E+unit[1];}});return H;},animateClass:function(G,H,J,I){var E=(typeof J=="function"?J:(I?I:null));var F=(typeof J=="object"?J:null);return this.each(function(){var O={};var M=C(this);var N=M.attr("style")||"";if(typeof N=="object"){N=N["cssText"];}if(G.toggle){M.hasClass(G.toggle)?G.remove=G.toggle:G.add=G.toggle;}var K=C.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(G.add){M.addClass(G.add);}if(G.remove){M.removeClass(G.remove);}var L=C.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(G.add){M.removeClass(G.add);}if(G.remove){M.addClass(G.remove);}for(var P in L){if(typeof L[P]!="function"&&L[P]&&P.indexOf("Moz")==-1&&P.indexOf("length")==-1&&L[P]!=K[P]&&(P.match(/color/i)||(!P.match(/color/i)&&!isNaN(parseInt(L[P],10))))&&(K.position!="static"||(K.position=="static"&&!P.match(/left|top|bottom|right/)))){O[P]=L[P];}}M.animate(O,H,F,function(){if(typeof C(this).attr("style")=="object"){C(this).attr("style")["cssText"]="";C(this).attr("style")["cssText"]=N;}else{C(this).attr("style",N);}if(G.add){C(this).addClass(G.add);}if(G.remove){C(this).removeClass(G.remove);}if(E){E.apply(this,arguments);}});});}});C.fn.extend({_show:C.fn.show,_hide:C.fn.hide,__toggle:C.fn.toggle,_addClass:C.fn.addClass,_removeClass:C.fn.removeClass,_toggleClass:C.fn.toggleClass,effect:function(E,G,F,H){return C.effects[E]?C.effects[E].call(this,{method:E,options:G||{},duration:F,callback:H}):null;},show:function(){if(!arguments[0]||(arguments[0].constructor==Number||/(slow|normal|fast)/.test(arguments[0]))){return this._show.apply(this,arguments);}else{var E=arguments[1]||{};E["mode"]="show";return this.effect.apply(this,[arguments[0],E,arguments[2]||E.duration,arguments[3]||E.callback]);}},hide:function(){if(!arguments[0]||(arguments[0].constructor==Number||/(slow|normal|fast)/.test(arguments[0]))){return this._hide.apply(this,arguments);}else{var E=arguments[1]||{};E["mode"]="hide";return this.effect.apply(this,[arguments[0],E,arguments[2]||E.duration,arguments[3]||E.callback]);}},toggle:function(){if(!arguments[0]||(arguments[0].constructor==Number||/(slow|normal|fast)/.test(arguments[0]))||(arguments[0].constructor==Function)){return this.__toggle.apply(this,arguments);}else{var E=arguments[1]||{};E["mode"]="toggle";return this.effect.apply(this,[arguments[0],E,arguments[2]||E.duration,arguments[3]||E.callback]);}},addClass:function(F,E,H,G){return E?C.effects.animateClass.apply(this,[{add:F},E,H,G]):this._addClass(F);},removeClass:function(F,E,H,G){return E?C.effects.animateClass.apply(this,[{remove:F},E,H,G]):this._removeClass(F);},toggleClass:function(F,E,H,G){return E?C.effects.animateClass.apply(this,[{toggle:F},E,H,G]):this._toggleClass(F);},morph:function(E,G,F,I,H){return C.effects.animateClass.apply(this,[{add:G,remove:E},F,I,H]);},switchClass:function(){return this.morph.apply(this,arguments);},cssUnit:function(E){var F=this.css(E),G=[];C.each(["em","px","%","pt"],function(H,I){if(F.indexOf(I)>0){G=[parseFloat(F),I];}});return G;}});jQuery.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(F,E){jQuery.fx.step[E]=function(G){if(G.state==0){G.start=D(G.elem,E);G.end=B(G.end);}G.elem.style[E]="rgb("+[Math.max(Math.min(parseInt((G.pos*(G.end[0]-G.start[0]))+G.start[0]),255),0),Math.max(Math.min(parseInt((G.pos*(G.end[1]-G.start[1]))+G.start[1]),255),0),Math.max(Math.min(parseInt((G.pos*(G.end[2]-G.start[2]))+G.start[2]),255),0)].join(",")+")";};});function B(F){var E;if(F&&F.constructor==Array&&F.length==3){return F;}if(E=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(F)){return[parseInt(E[1]),parseInt(E[2]),parseInt(E[3])];}if(E=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(F)){return[parseFloat(E[1])*2.55,parseFloat(E[2])*2.55,parseFloat(E[3])*2.55];}if(E=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(F)){return[parseInt(E[1],16),parseInt(E[2],16),parseInt(E[3],16)];}if(E=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(F)){return[parseInt(E[1]+E[1],16),parseInt(E[2]+E[2],16),parseInt(E[3]+E[3],16)];}if(E=/rgba\(0, 0, 0, 0\)/.exec(F)){return A["transparent"];}return A[jQuery.trim(F).toLowerCase()];}function D(G,E){var F;do{F=jQuery.curCSS(G,E);if(F!=""&&F!="transparent"||jQuery.nodeName(G,"body")){break;}E="backgroundColor";}while(G=G.parentNode);return B(F);}var A={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]};jQuery.easing["jswing"]=jQuery.easing["swing"];jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(F,G,E,I,H){return jQuery.easing[jQuery.easing.def](F,G,E,I,H);},easeInQuad:function(F,G,E,I,H){return I*(G/=H)*G+E;},easeOutQuad:function(F,G,E,I,H){return -I*(G/=H)*(G-2)+E;},easeInOutQuad:function(F,G,E,I,H){if((G/=H/2)<1){return I/2*G*G+E;}return -I/2*((--G)*(G-2)-1)+E;},easeInCubic:function(F,G,E,I,H){return I*(G/=H)*G*G+E;},easeOutCubic:function(F,G,E,I,H){return I*((G=G/H-1)*G*G+1)+E;},easeInOutCubic:function(F,G,E,I,H){if((G/=H/2)<1){return I/2*G*G*G+E;}return I/2*((G-=2)*G*G+2)+E;},easeInQuart:function(F,G,E,I,H){return I*(G/=H)*G*G*G+E;},easeOutQuart:function(F,G,E,I,H){return -I*((G=G/H-1)*G*G*G-1)+E;},easeInOutQuart:function(F,G,E,I,H){if((G/=H/2)<1){return I/2*G*G*G*G+E;}return -I/2*((G-=2)*G*G*G-2)+E;},easeInQuint:function(F,G,E,I,H){return I*(G/=H)*G*G*G*G+E;},easeOutQuint:function(F,G,E,I,H){return I*((G=G/H-1)*G*G*G*G+1)+E;},easeInOutQuint:function(F,G,E,I,H){if((G/=H/2)<1){return I/2*G*G*G*G*G+E;}return I/2*((G-=2)*G*G*G*G+2)+E;},easeInSine:function(F,G,E,I,H){return -I*Math.cos(G/H*(Math.PI/2))+I+E;},easeOutSine:function(F,G,E,I,H){return I*Math.sin(G/H*(Math.PI/2))+E;},easeInOutSine:function(F,G,E,I,H){return -I/2*(Math.cos(Math.PI*G/H)-1)+E;},easeInExpo:function(F,G,E,I,H){return(G==0)?E:I*Math.pow(2,10*(G/H-1))+E;},easeOutExpo:function(F,G,E,I,H){return(G==H)?E+I:I*(-Math.pow(2,-10*G/H)+1)+E;},easeInOutExpo:function(F,G,E,I,H){if(G==0){return E;}if(G==H){return E+I;}if((G/=H/2)<1){return I/2*Math.pow(2,10*(G-1))+E;}return I/2*(-Math.pow(2,-10*--G)+2)+E;},easeInCirc:function(F,G,E,I,H){return -I*(Math.sqrt(1-(G/=H)*G)-1)+E;},easeOutCirc:function(F,G,E,I,H){return I*Math.sqrt(1-(G=G/H-1)*G)+E;},easeInOutCirc:function(F,G,E,I,H){if((G/=H/2)<1){return -I/2*(Math.sqrt(1-G*G)-1)+E;}return I/2*(Math.sqrt(1-(G-=2)*G)+1)+E;},easeInElastic:function(F,H,E,L,K){var I=1.70158;var J=0;var G=L;if(H==0){return E;}if((H/=K)==1){return E+L;}if(!J){J=K*0.3;}if(G<Math.abs(L)){G=L;var I=J/4;}else{var I=J/(2*Math.PI)*Math.asin(L/G);}return -(G*Math.pow(2,10*(H-=1))*Math.sin((H*K-I)*(2*Math.PI)/J))+E;},easeOutElastic:function(F,H,E,L,K){var I=1.70158;var J=0;var G=L;if(H==0){return E;}if((H/=K)==1){return E+L;}if(!J){J=K*0.3;}if(G<Math.abs(L)){G=L;var I=J/4;}else{var I=J/(2*Math.PI)*Math.asin(L/G);}return G*Math.pow(2,-10*H)*Math.sin((H*K-I)*(2*Math.PI)/J)+L+E;},easeInOutElastic:function(F,H,E,L,K){var I=1.70158;var J=0;var G=L;if(H==0){return E;}if((H/=K/2)==2){return E+L;}if(!J){J=K*(0.3*1.5);}if(G<Math.abs(L)){G=L;var I=J/4;}else{var I=J/(2*Math.PI)*Math.asin(L/G);}if(H<1){return -0.5*(G*Math.pow(2,10*(H-=1))*Math.sin((H*K-I)*(2*Math.PI)/J))+E;}return G*Math.pow(2,-10*(H-=1))*Math.sin((H*K-I)*(2*Math.PI)/J)*0.5+L+E;},easeInBack:function(F,G,E,J,I,H){if(H==undefined){H=1.70158;}return J*(G/=I)*G*((H+1)*G-H)+E;},easeOutBack:function(F,G,E,J,I,H){if(H==undefined){H=1.70158;}return J*((G=G/I-1)*G*((H+1)*G+H)+1)+E;},easeInOutBack:function(F,G,E,J,I,H){if(H==undefined){H=1.70158;}if((G/=I/2)<1){return J/2*(G*G*(((H*=(1.525))+1)*G-H))+E;}return J/2*((G-=2)*G*(((H*=(1.525))+1)*G+H)+2)+E;},easeInBounce:function(F,G,E,I,H){return I-jQuery.easing.easeOutBounce(F,H-G,0,I,H)+E;},easeOutBounce:function(F,G,E,I,H){if((G/=H)<(1/2.75)){return I*(7.5625*G*G)+E;}else{if(G<(2/2.75)){return I*(7.5625*(G-=(1.5/2.75))*G+0.75)+E;}else{if(G<(2.5/2.75)){return I*(7.5625*(G-=(2.25/2.75))*G+0.9375)+E;}else{return I*(7.5625*(G-=(2.625/2.75))*G+0.984375)+E;}}}},easeInOutBounce:function(F,G,E,I,H){if(G<H/2){return jQuery.easing.easeInBounce(F,G*2,0,I,H)*0.5+E;}return jQuery.easing.easeOutBounce(F,G*2-H,0,I,H)*0.5+I*0.5+E;}});})(jQuery);(function(A){A.effects.transfer=function(B){return this.queue(function(){var E=A(this);var G=A.effects.setMode(E,B.options.mode||"effect");var F=A(B.options.to);var C=E.offset();var D=A('<div class="ui-effects-transfer"></div>').appendTo(document.body);if(B.options.className){D.addClass(B.options.className);}D.addClass(B.options.className);D.css({top:C.top,left:C.left,height:E.outerHeight()-parseInt(D.css("borderTopWidth"))-parseInt(D.css("borderBottomWidth")),width:E.outerWidth()-parseInt(D.css("borderLeftWidth"))-parseInt(D.css("borderRightWidth")),position:"absolute"});C=F.offset();animation={top:C.top,left:C.left,height:F.outerHeight()-parseInt(D.css("borderTopWidth"))-parseInt(D.css("borderBottomWidth")),width:F.outerWidth()-parseInt(D.css("borderLeftWidth"))-parseInt(D.css("borderRightWidth"))};D.animate(animation,B.duration,B.options.easing,function(){D.remove();if(B.callback){B.callback.apply(E[0],arguments);}E.dequeue();});});};})(jQuery);(function(A){A.effects.slide=function(B){return this.queue(function(){var E=A(this),D=["position","top","left"];var I=A.effects.setMode(E,B.options.mode||"show");var H=B.options.direction||"left";A.effects.save(E,D);E.show();A.effects.createWrapper(E).css({overflow:"hidden"});var F=(H=="up"||H=="down")?"top":"left";var C=(H=="up"||H=="left")?"pos":"neg";var J=B.options.distance||(F=="top"?E.outerHeight({margin:true}):E.outerWidth({margin:true}));if(I=="show"){E.css(F,C=="pos"?-J:J);}var G={};G[F]=(I=="show"?(C=="pos"?"+=":"-="):(C=="pos"?"-=":"+="))+J;E.animate(G,{queue:false,duration:B.duration,easing:B.options.easing,complete:function(){if(I=="hide"){E.hide();}A.effects.restore(E,D);A.effects.removeWrapper(E);if(B.callback){B.callback.apply(this,arguments);}E.dequeue();}});});};})(jQuery);(function(A){A.fn.unwrap=A.fn.unwrap||function(B){return this.each(function(){A(this).parents(B).eq(0).after(this).remove();});};A.widget("ui.slider",{plugins:{},ui:function(B){return{options:this.options,handle:this.currentHandle,value:this.options.axis!="both"||!this.options.axis?Math.round(this.value(null,this.options.axis=="vertical"?"y":"x")):{x:Math.round(this.value(null,"x")),y:Math.round(this.value(null,"y"))},range:this.getRange()};},propagate:function(C,B){A.ui.plugin.call(this,C,[B,this.ui()]);this.element.triggerHandler(C=="slide"?C:"slide"+C,[B,this.ui()],this.options[C]);},destroy:function(){this.element.removeClass("ui-slider ui-slider-disabled").removeData("slider").unbind(".slider");if(this.handle&&this.handle.length){this.handle.unwrap("a");this.handle.each(function(){A(this).data("mouse").mouseDestroy();});}this.generated&&this.generated.remove();},setData:function(B,C){A.widget.prototype.setData.apply(this,arguments);if(/min|max|steps/.test(B)){this.initBoundaries();}if(B=="range"){C?this.handle.length==2&&this.createRange():this.removeRange();}},init:function(){var B=this;this.element.addClass("ui-slider");this.initBoundaries();this.handle=A(this.options.handle,this.element);if(!this.handle.length){B.handle=B.generated=A(B.options.handles||[0]).map(function(){var D=A("<div/>").addClass("ui-slider-handle").appendTo(B.element);if(this.id){D.attr("id",this.id);}return D[0];});}var C=function(D){this.element=A(D);this.element.data("mouse",this);this.options=B.options;this.element.bind("mousedown",function(){if(B.currentHandle){this.blur(B.currentHandle);}B.focus(this,1);});this.mouseInit();};A.extend(C.prototype,A.ui.mouse,{mouseStart:function(D){return B.start.call(B,D,this.element[0]);},mouseStop:function(D){return B.stop.call(B,D,this.element[0]);},mouseDrag:function(D){return B.drag.call(B,D,this.element[0]);},mouseCapture:function(){return true;},trigger:function(D){this.mouseDown(D);}});A(this.handle).each(function(){new C(this);}).wrap('<a href="javascript:void(0)" style="outline:none;border:none;"></a>').parent().bind("focus",function(D){B.focus(this.firstChild);}).bind("blur",function(D){B.blur(this.firstChild);}).bind("keydown",function(D){if(!B.options.noKeyboard){B.keydown(D.keyCode,this.firstChild);}});this.element.bind("mousedown.slider",function(D){B.click.apply(B,[D]);B.currentHandle.data("mouse").trigger(D);B.firstValue=B.firstValue+1;});A.each(this.options.handles||[],function(D,E){B.moveTo(E.start,D,true);});if(!isNaN(this.options.startValue)){this.moveTo(this.options.startValue,0,true);}this.previousHandle=A(this.handle[0]);if(this.handle.length==2&&this.options.range){this.createRange();}},initBoundaries:function(){var B=this.element[0],C=this.options;this.actualSize={width:this.element.outerWidth(),height:this.element.outerHeight()};A.extend(C,{axis:C.axis||(B.offsetWidth<B.offsetHeight?"vertical":"horizontal"),max:!isNaN(parseInt(C.max,10))?{x:parseInt(C.max,10),y:parseInt(C.max,10)}:({x:C.max&&C.max.x||100,y:C.max&&C.max.y||100}),min:!isNaN(parseInt(C.min,10))?{x:parseInt(C.min,10),y:parseInt(C.min,10)}:({x:C.min&&C.min.x||0,y:C.min&&C.min.y||0})});C.realMax={x:C.max.x-C.min.x,y:C.max.y-C.min.y};C.stepping={x:C.stepping&&C.stepping.x||parseInt(C.stepping,10)||(C.steps?C.realMax.x/(C.steps.x||parseInt(C.steps,10)||C.realMax.x):0),y:C.stepping&&C.stepping.y||parseInt(C.stepping,10)||(C.steps?C.realMax.y/(C.steps.y||parseInt(C.steps,10)||C.realMax.y):0)};},keydown:function(C,B){if(/(37|38|39|40)/.test(C)){this.moveTo({x:/(37|39)/.test(C)?(C==37?"-":"+")+"="+this.oneStep("x"):0,y:/(38|40)/.test(C)?(C==38?"-":"+")+"="+this.oneStep("y"):0},B);}},focus:function(B,C){this.currentHandle=A(B).addClass("ui-slider-handle-active");if(C){this.currentHandle.parent()[0].focus();}},blur:function(B){A(B).removeClass("ui-slider-handle-active");if(this.currentHandle&&this.currentHandle[0]==B){this.previousHandle=this.currentHandle;this.currentHandle=null;}},click:function(C){var D=[C.pageX,C.pageY];var B=false;this.handle.each(function(){if(this==C.target){B=true;}});if(B||this.options.disabled||!(this.currentHandle||this.previousHandle)){return ;}if(!this.currentHandle&&this.previousHandle){this.focus(this.previousHandle,true);}this.offset=this.element.offset();this.moveTo({y:this.convertValue(C.pageY-this.offset.top-this.currentHandle[0].offsetHeight/2,"y"),x:this.convertValue(C.pageX-this.offset.left-this.currentHandle[0].offsetWidth/2,"x")},null,!this.options.distance);},createRange:function(){if(this.rangeElement){return ;}this.rangeElement=A("<div></div>").addClass("ui-slider-range").css({position:"absolute"}).appendTo(this.element);this.updateRange();},removeRange:function(){this.rangeElement.remove();this.rangeElement=null;},updateRange:function(){var C=this.options.axis=="vertical"?"top":"left";var B=this.options.axis=="vertical"?"height":"width";this.rangeElement.css(C,(parseInt(A(this.handle[0]).css(C),10)||0)+this.handleSize(0,this.options.axis=="vertical"?"y":"x")/2);this.rangeElement.css(B,(parseInt(A(this.handle[1]).css(C),10)||0)-(parseInt(A(this.handle[0]).css(C),10)||0));},getRange:function(){return this.rangeElement?this.convertValue(parseInt(this.rangeElement.css(this.options.axis=="vertical"?"height":"width"),10),this.options.axis=="vertical"?"y":"x"):null;},handleIndex:function(){return this.handle.index(this.currentHandle[0]);},value:function(D,B){if(this.handle.length==1){this.currentHandle=this.handle;}if(!B){B=this.options.axis=="vertical"?"y":"x";}var C=A(D!=undefined&&D!==null?this.handle[D]||D:this.currentHandle);if(C.data("mouse").sliderValue){return parseInt(C.data("mouse").sliderValue[B],10);}else{return parseInt(((parseInt(C.css(B=="x"?"left":"top"),10)/(this.actualSize[B=="x"?"width":"height"]-this.handleSize(D,B)))*this.options.realMax[B])+this.options.min[B],10);}},convertValue:function(C,B){return this.options.min[B]+(C/(this.actualSize[B=="x"?"width":"height"]-this.handleSize(null,B)))*this.options.realMax[B];},translateValue:function(C,B){return((C-this.options.min[B])/this.options.realMax[B])*(this.actualSize[B=="x"?"width":"height"]-this.handleSize(null,B));},translateRange:function(D,B){if(this.rangeElement){if(this.currentHandle[0]==this.handle[0]&&D>=this.translateValue(this.value(1),B)){D=this.translateValue(this.value(1,B)-this.oneStep(B),B);}if(this.currentHandle[0]==this.handle[1]&&D<=this.translateValue(this.value(0),B)){D=this.translateValue(this.value(0,B)+this.oneStep(B),B);}}if(this.options.handles){var C=this.options.handles[this.handleIndex()];if(D<this.translateValue(C.min,B)){D=this.translateValue(C.min,B);}else{if(D>this.translateValue(C.max,B)){D=this.translateValue(C.max,B);}}}return D;},translateLimits:function(C,B){if(C>=this.actualSize[B=="x"?"width":"height"]-this.handleSize(null,B)){C=this.actualSize[B=="x"?"width":"height"]-this.handleSize(null,B);}if(C<=0){C=0;}return C;},handleSize:function(C,B){return A(C!=undefined&&C!==null?this.handle[C]:this.currentHandle)[0]["offset"+(B=="x"?"Width":"Height")];},oneStep:function(B){return this.options.stepping[B]||1;},start:function(C,B){var D=this.options;if(D.disabled){return false;}this.actualSize={width:this.element.outerWidth(),height:this.element.outerHeight()};if(!this.currentHandle){this.focus(this.previousHandle,true);}this.offset=this.element.offset();this.handleOffset=this.currentHandle.offset();this.clickOffset={top:C.pageY-this.handleOffset.top,left:C.pageX-this.handleOffset.left};this.firstValue=this.value();this.propagate("start",C);this.drag(C,B);return true;},stop:function(B){this.propagate("stop",B);if(this.firstValue!=this.value()){this.propagate("change",B);}this.focus(this.currentHandle,true);return false;},drag:function(E,D){var F=this.options;var B={top:E.pageY-this.offset.top-this.clickOffset.top,left:E.pageX-this.offset.left-this.clickOffset.left};if(!this.currentHandle){this.focus(this.previousHandle,true);}B.left=this.translateLimits(B.left,"x");B.top=this.translateLimits(B.top,"y");if(F.stepping.x){var C=this.convertValue(B.left,"x");C=Math.round(C/F.stepping.x)*F.stepping.x;B.left=this.translateValue(C,"x");}if(F.stepping.y){var C=this.convertValue(B.top,"y");C=Math.round(C/F.stepping.y)*F.stepping.y;B.top=this.translateValue(C,"y");}B.left=this.translateRange(B.left,"x");B.top=this.translateRange(B.top,"y");if(F.axis!="vertical"){this.currentHandle.css({left:B.left});}if(F.axis!="horizontal"){this.currentHandle.css({top:B.top});}this.currentHandle.data("mouse").sliderValue={x:Math.round(this.convertValue(B.left,"x"))||0,y:Math.round(this.convertValue(B.top,"y"))||0};if(this.rangeElement){this.updateRange();}this.propagate("slide",E);return false;},moveTo:function(F,E,G){var H=this.options;this.actualSize={width:this.element.outerWidth(),height:this.element.outerHeight()};if(E==undefined&&!this.currentHandle&&this.handle.length!=1){return false;}if(E==undefined&&!this.currentHandle){E=0;}if(E!=undefined){this.currentHandle=this.previousHandle=A(this.handle[E]||E);}if(F.x!==undefined&&F.y!==undefined){var B=F.x,I=F.y;}else{var B=F,I=F;}if(B!==undefined&&B.constructor!=Number){var D=/^\-\=/.test(B),C=/^\+\=/.test(B);if(D||C){B=this.value(null,"x")+parseInt(B.replace(D?"=":"+=",""),10);}else{B=isNaN(parseInt(B,10))?undefined:parseInt(B,10);}}if(I!==undefined&&I.constructor!=Number){var D=/^\-\=/.test(I),C=/^\+\=/.test(I);if(D||C){I=this.value(null,"y")+parseInt(I.replace(D?"=":"+=",""),10);}else{I=isNaN(parseInt(I,10))?undefined:parseInt(I,10);}}if(H.axis!="vertical"&&B!==undefined){if(H.stepping.x){B=Math.round(B/H.stepping.x)*H.stepping.x;}B=this.translateValue(B,"x");B=this.translateLimits(B,"x");B=this.translateRange(B,"x");H.animate?this.currentHandle.stop().animate({left:B},(Math.abs(parseInt(this.currentHandle.css("left"))-B))*(!isNaN(parseInt(H.animate))?H.animate:5)):this.currentHandle.css({left:B});}if(H.axis!="horizontal"&&I!==undefined){if(H.stepping.y){I=Math.round(I/H.stepping.y)*H.stepping.y;}I=this.translateValue(I,"y");I=this.translateLimits(I,"y");I=this.translateRange(I,"y");H.animate?this.currentHandle.stop().animate({top:I},(Math.abs(parseInt(this.currentHandle.css("top"))-I))*(!isNaN(parseInt(H.animate))?H.animate:5)):this.currentHandle.css({top:I});}if(this.rangeElement){this.updateRange();}this.currentHandle.data("mouse").sliderValue={x:Math.round(this.convertValue(B,"x"))||0,y:Math.round(this.convertValue(I,"y"))||0};if(!G){this.propagate("start",null);this.propagate("stop",null);this.propagate("change",null);this.propagate("slide",null);}}});A.ui.slider.getter="value";A.ui.slider.defaults={handle:".ui-slider-handle",distance:1,animate:false};})(jQuery);function init(){}function ccbtn_ready(D){var C=D.substr(D.indexOf("_")+1);if(!tbCheck("cc")){if(bIsIE){$("object[name="+D+"]").get(0).setClipboardData(getTBRedirect("cc",null,C));}else{$("embed[name="+D+"]").get(0).setClipboardData(getTBRedirect("cc",null,C));}return ;}try{var A=$("#assetType_"+C).val();if(A==9){if(bIsIE){$("object[name="+D+"]").get(0).setClipboardData("loading");}else{$("embed[name="+D+"]").get(0).setClipboardData("loading");}if($.inArray(C,layout_gen_queue)==-1){if(layout_gen_queue.push(C)==1){layout_gen_process();}}}else{if(A==13||A==14||A==15||A==16||A==17||A==18){setCopyCodeSwf(D,C);}else{if($(".cc_textarea").length!=0||$(".cc_textarea_old").length!=0){if(bIsIE){$("object[name="+D+"]").get(0).setClipboardData($("#txt_copy_code").val());$("object[name="+D+"]").get(0).setUrchinData("/clicks/views"+s_cur_asset_path.replace(/ /g,"_")+"/copy_code/"+network+"/"+s_cur_asset_id);}else{$("embed[name="+D+"]").get(0).setClipboardData($("#txt_copy_code").val());$("embed[name="+D+"]").get(0).setUrchinData("/clicks/views"+s_cur_asset_path.replace(/ /g,"_")+"/copy_code/"+network+"/"+s_cur_asset_id);}}else{if($.isFunction(blended_gen_code)){setCopyCodeSwf(D,C);}}}}}catch(B){if($("#txt_copy_code").val()==""){setTimeout(function(){ccbtn_ready(D);},5000);}}}function ccbtn_popularity(A){$.get(permBaseUrl+"addToPopularity.jhtml",{path:A},function(C,B){});}function load_asset_click(F,A){var E=F;var B=$("input#assetUrl_"+E).attr("value");var D=$("input#assetPath_"+E).attr("value");var C=$("input#assetType_"+E).attr("value");asset_click(B,A,E,D,C);}function setCopyCodeSwf(A,D){var C=$("#assetType_"+D).val();load_asset_click(D,false);var B=blended_gen_code(C,$("#assetUrl_"+D).val(),D);if(B!=null){if(bIsIE){$("object[name="+A+"]").get(0).setClipboardData(B);}else{$("embed[name="+A+"]").get(0).setClipboardData(B);}}}$(function(){if($.isFunction(oToolbarController.check_disable)){oToolbarController.check_disable(oToolbarController.winner,"ZK");}init();$(".clickTrack").click(function(){clickTrack(this);});$('img[id ^="v2_header_"]').hover(function(){if(!($(this).attr("src").indexOf(dataSection)>0)){$(this).attr("src",(sImgPath+"/"+$(this).attr("id")+"_roll.gif"));}},function(){if(!($(this).attr("src").indexOf(dataSection)>0)){$(this).attr("src",(sImgPath+"/"+$(this).attr("id")+((dataSection=="saf")?"_on.gif":"_def.gif")));}});$("div.topnav").mouseover(function(){$(this).find("a").css("color","#fff").css("background-color","#990453");});$("div.topnav[class != '']").mouseout(function(){if($(this).attr("class")!="topnav selected"){$(this).find("a").css("background-color","").css("color","#555");}});$("#topnav_theme img").hover(function(){var C=$(this).attr("src");if(C.lastIndexOf(".jpg")!=-1){C=C.substr(0,C.lastIndexOf("_def.jpg"))+"_roll.jpg";}else{C=C.substr(0,C.lastIndexOf("_def.gif"))+"_roll.gif";}$(this).attr("src",C);},function(){var C=$(this).attr("src");if(C.lastIndexOf(".jpg")!=-1){C=C.substr(0,C.lastIndexOf("_roll.jpg"))+"_def.jpg";}else{C=C.substr(0,C.lastIndexOf("_roll.gif"))+"_def.gif";}$(this).attr("src",C);});$("#div_nav :first").css("border-top","none");function A(C){var D=$(C);if(dataSection!="cursor"&&C.id!="ratingSave"&&dataSection!="text"){var E=D.attr("id").substr(D.attr("id").indexOf("_")+1,D.attr("id").length);}else{var E=s_cur_asset_id;}if(dataSection!="text"){load_asset_click(E,true);}}$("img.cc_btn").hover(function(){var C=$(this).attr("src");if(C.lastIndexOf("_copied.gif")==-1&&C.lastIndexOf("_over.gif")==-1&&C.lastIndexOf("_on.gif")==-1){C=C.substr(0,C.lastIndexOf("_out.gif"))+"_over.gif";$(this).attr("src",C);}},function(){var C=$(this).attr("src");if(C.lastIndexOf("_over.gif")!=-1&&C.lastIndexOf("_on.gif")==-1){C=C.substr(0,C.lastIndexOf("_over.gif"))+"_out.gif";$(this).attr("src",C);}});$(".qp_btn, .saf_btn, .prev_btn").hover(function(){if(dataSection!="artist"&&dataSection!="favorites"&&s_cur_section=="fullLayouts"&&cur_network=="myspace"&&this.className.indexOf("prev_btn")!=-1){var C=$(this).attr("src");$(this).attr("src",C.replace(".gif","_over.gif"));}else{$(this).attr("src",$(this).attr("src").replace("_out","_over"));}},function(){if(dataSection!="artist"&&dataSection!="favorites"&&s_cur_section=="fullLayouts"&&cur_network=="myspace"&&this.className.indexOf("prev_btn")!=-1){var C=$(this).attr("src");$(this).attr("src",C.replace("_over.gif",".gif"));}else{$(this).attr("src",$(this).attr("src").replace("_over","_out"));}});$(".qp_btn, a#WildfirePostButton").click(function(){if($(this).attr("id")!="WildfirePostButton"&&dataSection!="layout"&&dataSection!="video"&&dataSection!="music"&&dataSection!="smiley"){A(this);}if(!tbCheck("cc",null,true)){return ;}if(populateQuickPostCode()){UpdateWildfireConfig(cur_network);OpenWildfire();}});if(dataSection!="layout"&&dataSection!="layouteditor"){for(var B=0;B<ntwrks.length;B++){$("<div style='display:none;'><textarea style='visibility:hidden;' id='"+ntwrks[B]+"_code'></textarea></div>").appendTo("body");}}$(".saf_btn").hover(function(){var D=getTafParam(this);D[1]=D[1].replace("//","*");var C=(dataSection=="cursor")?D[1].substr(0,D[1].lastIndexOf("/"))+".jhtml?selectedPath="+escape(s_cur_asset_path):D[1];C=C.replace("*","//");showHoverMap(this,"200810071471",C,D[0]);},function(){hideHoverMap(this);}).click(function(){var D=getTafParam(this);D[1]=D[1].replace("//","*");var C=(dataSection=="cursor")?D[1].substr(0,D[1].lastIndexOf("/"))+".jhtml?selectedPath="+escape(s_cur_asset_path):D[1];C=C.replace("*","//");if(D){cw(this,{id:"200810071471",link:C,title:D[0]});}});$("#cc_safbtn").hover(function(){var C=document.location+"?selectedPath="+escape(s_cur_asset_path);showHoverMap(this,"200810071471",C,s_cur_asset_name);},function(){hideHoverMap(this);}).click(function(){var C=document.location+"?selectedPath="+escape(s_cur_asset_path);cw(this,{id:"200810071471",link:C,title:s_cur_asset_name});});$("#search_submit").click(doSearch);$("#search_submit, #superfetti_btn").hover(function(){$(this).attr("src",$(this).attr("src").replace(/\.gif/,"_over.gif"));},function(){$(this).attr("src",$(this).attr("src").replace(/_over\.gif/,".gif"));});$(".inappropriate").hover(function(){$(this).css("background-position","-11px 0");},function(){$(this).css("background-position","0 0");}).parent().click(function(){$("#inappropriateModal").dialog({autoOpen:false,draggable:true,resizable:false,modal:true,overlay:{opacity:0.4,background:"black"},dialogClass:"inappropriateModal",position:"center",height:150,width:369,show:{effect:"fade",speed:500},hide:{effect:"fade",speed:250},buttons:{OK:function(){$("#inappropriateModal").dialog("close");}}}).show();$(".inappropriateModal .ui-resizable-handle").hide();$(".inappropriateModal .ui-dialog-container").before('<div style="position: absolute; height: 100%; width: 100%; background: transparent;"><div style="height: 4px; width: 100%; background: transparent url(http://ak.webfetti.com/v2/ratings_modal_outer_top.gif) no-repeat; overflow-y: hidden;"></div><div id="ratingModalBGSpacer" style="height: 220px; width: 100%; background: white;"></div></div>');$(".inappropriateModal .ui-dialog-buttonpane button:contains('OK')").addClass("okbutton").text("");$("#inappropriateModal").dialog("open");});$(".network").click(function(){var C="";if(document.location.href.indexOf("selectedPath")==-1){C="selectedPath="+s_cur_asset_path;}networkRedirect(this.value,C);});$(".gallery_container, .landing_block, .cardThumbnail").hover(function(){$(this).css("border","2px solid gray");},function(){$(this).css("border","2px solid white");});if(dataSubSection){assetType=getAssetType(dataSubSection);}else{assetType=getAssetType(dataSection);}$("#addthis").mouseover(function(){if(dataSection=="photocard builder"||dataSection=="photo card builder"||dataSection=="fab foto"){$("embed").css("visibility","visible");}});$('a[id*="delete_"]').click(function(){var D=this.title;var C="http://"+document.domain+"/publisher/deleteAsset.jhtml";$.ajax({type:"post",data:{"fid":D},url:C,success:function(E){alert("Added asset to deleted queue. ");},error:function(G,E,F){alert("Error: "+E+" "+G.status);}});});ratings_init();if(bEnableConnect){fb_init();}if(sDlTheme==null||sDlTheme==""){setDlThemeVal();}if(parseURL("popTwitterModal")=="true"){launchTwitterModal();}if(network=="facebook"){$("a").click(function(){var D=$(this).parent().parent()[0].id.split("_");var E=D[D.length-1];var C=$("#fb_post_btn_"+E);if(C.length){C.click();return false;}else{if($(this)[0].href.indexOf("home")!=-1){return false;}}});}});var ntwrks=("myspace,blogger,hi5,livejournal,friendster,migente,blackplanet,orkut,bebo,tagged,livespaces,piczo,freewebs,myyearbook,wordpress,vox,typepad,xanga,multiply,netvibes,igoogle,pageflakes").split(",");var bIsIE=$.browser.msie;var bIsFF=$.browser.mozilla;var parentPtnrVal=null;var asset_gen_code;var asset_gen_html;var uid=null;var path="";var layoutType="default";var sDlTheme="";var s_cur_assetHTML="";var bCkTrk=true;function ckTrk(A){if(bCkTrk&&$.isFunction(urchinTracker)){urchinTracker(A);}}function clickTrack(D){var A="";var C="";var B=false;if(bCkTrk&&$.isFunction(urchinTracker)){if(D.id=="txt_copy_code"||D.id=="copycode_button"){C="copy code";}else{if($(D).next("INPUT").attr("tagName")!=undefined){if($(D).next("INPUT").val().indexOf("/clicks")!=-1){A=$(D).next("INPUT").val();B=true;}else{C=$(D).next("INPUT").val();}}else{if(D.tagName=="A"||D.tagName=="SPAN"){if(D.name.indexOf("/clicks")!=-1){A=D.name;B=true;}else{C=D.name;}}else{if(D.title.indexOf("/clicks")!=-1){A=D.title;B=true;}else{C=D.title;}}}}}if(!B){A=generateClickViewString(C,getTmpAsset());}A=A.replace(/\{network\}/i,cur_network);ckTrk(A);}function getTafParam(B){var A=$(B).parent().nextAll(":hidden[id ^= 'assetAlt_']").val();var C=permBaseUrl+networks[cur_network]+$(B).parent().nextAll(":hidden[id ^= 'assetPath_']").val()+".jhtml";C=C.replace(/\-/g,"_").replace(/ /g,"-").replace(/\?/g,"%3F").replace(/\#/g,"%23");return new Array(A,C);}function populateQuickPostCode(B){var C="";if(path.toLowerCase().indexOf("custom")!=-1){C="custom_smiley";}else{if(path.toLowerCase().indexOf("talking")!=-1){C="flash_smiley";}else{if(dataSection=="graphics"){C="3d_graphic";}else{if(dataSection=="music"){C="12";}else{if(dataSection=="video"){C="7";}else{if(dataSection=="photo"){C="19";}else{if(dataSection=="text"){C="11";}else{if(dataSection=="gidgets"){C="flash_toys";}else{if(dataSection=="coupons"){C="customcard_coupon";}else{if(dataSection=="postcard builder"){C="customcard_post";}else{if(dataSection=="photocard builder"){C="customcard_photo";}else{if(dataSection=="fab foto"){C="customcard_editor";}else{C=dataSection;}}}}}}}}}}}}var A=(dataSection=="cursor")?true:false;for(var E=0;E<ntwrks.length;E++){var D=getTrackingHTML(C,ntwrks[E],(dataSection!="cursor")?s_cur_assetHTML:null,s_cur_asset_id,A);if(B){cc_html=B+D;}else{cc_html=((dataSection=="cursor")?s_cur_assetHTML:"")+D;}$("#"+ntwrks[E]+"_code").html(cc_html);$("#"+ntwrks[E]+"_code").val(cc_html);}return true;}function g(A){return document.getElementById(A);}var networks={"myspace":"MySpace","myspace2":"MySpace2","blogger":"Blogger","hi5":"Hi5","zwinky":"Zwinky","livejournal":"LiveJournal","ebay":"eBay","twitter":"Twitter"};var networkCodes={"myspace":"my","myspace2":"my2","blogger":"bl","hi5":"hi","zwinky":"zw","livejournal":"lj","ebay":"eb","twitter":"tw","facebook":"fb"};var networksDisplay={"myspace":"MySpace","myspace2":"MySpace 2.0","blogger":"Blogger","hi5":"Hi5","zwinky":"Zwinky","livejournal":"LiveJournal","ebay":"eBay","twitter":"Twitter"};var cur_network=network;var s_cur_network=networkCodes[cur_network];var successurl="";var HTML_LOADING='<center><BR><BR><BR><BR><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="200" height="200" id="loadingswf" align="middle"><param name="movie" value="http://ak.webfetti.com/v2_loader.swf" /><param name="loop" value="true" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed bgcolor="#ffffff" src="http://ak.webfetti.com/v2_loader.swf" loop="true" quality="high" width="200" height="200" name="loadingswf" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object></center>';var sEmptyFavPage='Oops! Your Favorites folder is currently empty. <br /> To add your favorite Webfetti items to your Favorites folder, simply right-click on the item you wish to add in the Glitter, 3D Graphics, Smileys and Cursors sections. <br /> If you wish to add a music, video or photo generator to your Favorites folder, click on the <img src="http://ak.webfetti.com/v2_icon_favorites.gif" width="16" height="16" align="absbottom" border="0" /> Add to Favorites link in the top right corner of each generator page. <br /> PLEASE NOTE: Webfetti layouts cannot be added to your Favorites Folder.';var init_queue="";var cc_anim=0;var cc_animInterval=null;var s_customCat=false;var addthis_pub="Webfetti";var addthis_logo="http://ak.webfetti.com/v2_WF_addthisLogo.png";var addthis_logo_background="EFEFFF";var addthis_logo_color="666699";var addthis_brand="Webfetti.com";var addthis_options="favorites, email, digg, delicious, myspace, facebook, google, live, more";var addthis_offset_top=0;var addthis_offset_left=0;var navArray=["home|Home|0","text|Generators|11","layout|Layouts|9","glitter|Glitter|8","3d-animation|Graphics|6","smiley|Smileys|2","cursor|Cursors|3","artist|Artists|22","toys|Gidgets|21","featured|Election '08|25"];var sectionData={"fullLayouts":{code:9,full:true,cat:"LAYOUT_CATEGORIES",w:160,h:120,promptOnChange:function(){return false;}},"backgrounds":{code:13,full:false,cat:"BACKGROUNDS_CATEGORIES",xmlkey:"bg",w:160,h:160,promptOnChange:function(){return false;}},"pageHeader":{code:14,full:false,cat:"HEADERS_CATEGORIES",xmlkey:"nv_"+s_cur_network,w:510,h:70,promptOnChange:function(){return false;}},"subHeader":{code:15,full:false,cat:"SUB_HEADERS_CATEGORIES",xmlkey:"sn_hi",w:510,h:26,promptOnChange:function(){return true;}},"moduleHeaders":{code:16,full:false,cat:"MODULE_HEADERS_CATEGORIES",xmlkey:"cs_hdr",w:165,h:20,promptOnChange:function(){return cur_network=="myspace";}},"extendedNetwork":{code:17,full:false,cat:"EXTENDED_NETWORKS_CATEGORIES",xmlkey:"en",w:246,h:43,promptOnChange:function(){return true;}},"contactTable":{code:18,full:false,cat:"CONTACT_TABLE_CATEGORIES",xmlkey:"ct",w:160,h:81,promptOnChange:function(){return true;}}};var s_cur_layout;var s_cust_state=false;var s_cur_section="fullLayouts";var bDisplayFull=true;var s_cur_category="";var i=0;var isMotherCat=false;var bAssetData=false;var winPreview=null;var dThumbW=95;var dThumbH=95;function setDlThemeVal(){if(sDlTheme==null||sDlTheme==""){sDlTheme=getCookie("theme");if(sDlTheme==null||sDlTheme==""){sDlTheme=parseURL("theme");if(sDlTheme!=null&&sDlTheme!=""){setCookie("theme",sDlTheme,null,"/",null,null);}}}getSuccessURL();}function setPartnerVal(){var A=$("tsox_tbck").attr("cbid");if(A!=null){A=A.split("_");A=A[A.length-1];}parentPtnrVal=oToolbarController.sParentPartnerID||A;if(parentPtnrVal==null){parentPtnrVal=getCookie("partner");if(parentPtnrVal==null){parentPtnrVal=parseURL("partner");if(parentPtnrVal==null){parentPtnrVal="ZKxdm030";}else{setCookie("partner",parentPtnrVal,null,"/",null,null);}}}}function setUidVal(){testForTrkParams();uid=newCookieParse("uid",getCookie("cssP"));}function toolbarControlFuncs(){setPartnerVal();setUidVal();}function doSearch(){var A=$("input[name='search_query']").val();if($("input[name='search_radio']:checked").val()=="wf"){searchUrl=permBaseUrl+"search.jhtml?searchTerms="+escape(A);}else{if(oToolbarController.bInstalled||oToolbarController.bXPIInstalled){searchUrl=sExtSearchUrl+"&id="+parentPtnrVal+"&ptb="+(oToolbarController.sUID||$("tsox_tbck").attr("tbid"))+"&url=http://cap.ask.com/web"+"&q="+escape(A);}else{searchUrl=sExtSearchUrl+"&id=ZK&url=http://cap.ask.com/web&q="+escape(A);}}if(network!="facebook"){window.location=searchUrl;}else{window.open(searchUrl);}return false;}function gotoAsset(){var A;if(bIsFF&&g("div_"+sAidParamArr[0])){A=g("div_"+sAidParamArr[0]);}else{A=g(sAidParamArr[0]);}if(A){A.scrollIntoView();}}function GetWildfireConfig(qpNetwork){if(!qpNetwork){qpNetwork=cur_network;}var button=g("WildfirePostButton");if(button){button.style.visibility=(qpNetwork=="zwinky"||qpNetwork=="ebay")?"hidden":"visible";}s_cur_asset_id+="";if(qpNetwork=="myspace2"&&dataSection.indexOf("layout")!=-1){qpNetwork="myspace";}else{if(qpNetwork=="other"||(dataSection!="quizzes"&&dataSection!="layouteditor"&&s_cur_asset_id.indexOf("UG")==-1)){qpNetwork=(dataSection=="layout")?"myspace,blogger,hi5,livejournal":"myspace,blogger,hi5,livejournal,friendster,migente,blackplanet,orkut,bebo,tagged,livespaces,piczo,freewebs,myyearbook,wordpress,vox,typepad,xanga,multiply,netvibes,igoogle,pageflakes";}else{qpNetwork="myspace";}}s_cur_asset_id=parseInt(s_cur_asset_id);var config={contentIsLayout:(cur_network=="myspace2"&&dataSection.indexOf("layout")!=-1?true:false),nowmode:true,includeShareButton:false,defaultContent:(assetType=="26"?"customcardcreatorCopyCode":"txt_copy_code"),UIConfig:'<config><display showEmail="false" showPost="true" showBookmark="false" showCodeBox="true" showCloseButton="false" postToSidebarChecked="false" networksWithCodeBox="" networksToShow="'+qpNetwork+'" /></config>',offerTypes:"afterPost",useMyspaceAPI:true};if(qpNetwork.split(",").length>1&&dataSection!="layout"&&dataSection!="layouteditor"){var netwks=qpNetwork.split(",");for(i=0;i<netwks.length;i++){eval("config."+netwks[i]+"Content='"+netwks[i]+"_code'");}}return config;}var WildfireConfig=GetWildfireConfig();function UpdateWildfireConfig(A){WildfireConfig=GetWildfireConfig(A);if(Wildfire.WildfireContainer){Wildfire.WildfireContainer.applyConfig(WildfireConfig);}}function OpenWildfire(){var B=dataSection;if(dataSection=="postcard builder"||dataSection=="photo card builder"||dataSection=="fab foto"){B="Generators";}var A=getTmpAsset();UI_Window_Open("<div id='WildfireContainer'></div>","closeOnClick",true,400,220);Wildfire.initPost("154941","WildfireContainer",400,200,WildfireConfig);if(dataSection!="layouteditor"){Wildfire.onPostProfile=SAFWildfire;}}function SAFWildfire(){var A=getTmpAsset();UI_Window_Close();content="<div id='WildfireContainer' style='font-family:Arial;text-align:center;width:300px;height:160px;vertical-align:middle;'><br /><br />Item posted successfully.<br /><br />";if("layout|text|Glitter|Graphics|photo|music|video|body_builder|coupons|fab foto|photocard builder|postcard builder|quizzes".indexOf(dataSection)==-1){content+="<button onclick='UI_Window_Close();saf();'>Send to a friend</button>";}content+="</div>";UI_Window_Open(content,"closeOnClick",true,300,187);}var assetDataMap=[];assetDataMap[2]="smiley";assetDataMap[3]="cursor";assetDataMap[6]="graphics";assetDataMap[7]="video";assetDataMap[8]="glitter";assetDataMap[9]="layout";assetDataMap[10]="graphictext";assetDataMap[11]="glittertext";assetDataMap[12]="music";assetDataMap[13]="module";assetDataMap[19]="photo";assetDataMap[21]="gidgets";assetDataMap[22]="artist";assetDataMap[25]="featured";assetDataMap[26]="customcard";var DEFAULT_ARTIST_CAT="2084160";function getAssetType(B){for(var A in assetDataMap){if(assetDataMap[A]==B){return A;}}return null;}function generateExternalObject(A){document.write(A);}function replaceExternalObject(A,B){jQuery("#"+A).html(B);}function displayCopyCode(D){var C=g("copy_code");var B=g("div_content");var A=g("txt_copy_code");if(A){setCopyCode(D);A.style.borderColor="#8e8e8e";jQuery("#txt_copy_code").addClass("copyCode");clearInterval(cc_animInterval);cc_animInterval=null;cc_anim=0;CopyCodeTextAnim();}}function getSuccessURL(){if(sDlTheme=="fcbk"){successurl=sSuperFettiAppUrl;}else{if(dataSection=="quizzes"){successurl=document.location.href;}else{if(dataSection=="gidgets"){if(s_cur_asset_path){var A=s_cur_asset_path;A=A.replace("-","_");A=A.replace("#","%23");A=A.replace("?","%3F");A=A.replace(/\s+/g,"-");successurl=permBaseUrl+networks[cur_network]+A+".jhtml";}else{successurl=permBaseUrl+"home.jhtml";}}else{if(network=="twitter"){successurl=document.location.href+"?popTwitterModal=true";}}}}}function setCopyCode(A){if(A&&A.substring(4,0)=="http"){document.location=A;}else{$("#txt_copy_code").val(A);if($("#txt_copy_code").length!=0){try{if(!tbCheck("cc")){if(bIsIE){$("object[name^='ccbtn_']").get(0).setClipboardData(getTBRedirect("cc"));}else{$("embed[name^='ccbtn_']").get(0).setClipboardData(getTBRedirect("cc"));}return ;}if(bIsIE){$("object[name^='ccbtn_']").get(0).setClipboardData(A);$("object[name^='ccbtn_']").get(0).setUrchinData("/clicks/views"+s_cur_asset_path.replace(/ /g,"_")+"/copy_code/"+network+"/"+s_cur_asset_id);$("object[name^='ccbtn_']").get(0).setNotifyData(s_cur_asset_path);}else{$("embed[name^='ccbtn_']").get(0).setClipboardData(A);$("embed[name^='ccbtn_']").get(0).setUrchinData("/clicks/views"+s_cur_asset_path.replace(/ /g,"_")+"/copy_code/"+network+"/"+s_cur_asset_id);$("embed[name^='ccbtn_']").get(0).setNotifyData(s_cur_asset_path);}}catch(B){}}}}function CopyCode(F){var B=document.getElementById(F);var A=null;if(typeof (B)!="undefined"){switch(B.tagName){case"DIV":A=B.innerHTML;break;case"INPUT":case"TEXTAREA":A=B.value;break;}}B.select();CopyCodeText(A);if(F!="lc_wh_code"){var E=s_cur_category;var D=dataSection;if(dataSection=="text"||dataSection=="Glitter"){E="11";D="Generators";}else{if(dataSection=="Graphics"){E="10";D="Generators";}else{if(dataSection=="photo"){E="photo";D="Generators";}else{if(dataSection=="video"){E="video";D="Generators";}else{if(dataSection=="music"){E="music";D="Generators";}else{if(dataSection=="customcard"){E=cardType_catId;D="Generators";}}}}}}var C=getTmpAsset();}}function CopyCodeText(A){var B=getFlashMovieObject("copyToClipboard");B.SetVariable("c",A);}function CopyCodeUpdateButton(B){if(B==null){B="copycode_button";}var A=g(B);if(A){A.innerHTML="Copied";setTimeout("g('"+B+"').innerHTML='Copy Code';",5000);}}function CopyCodeTextAnim(){if(cc_animInterval==null){cc_animInterval=setInterval("CopyCodeSwitchBorder()",400);}}function CopyCodeSwitchBorder(){if(cc_anim<10){var A=g("txt_copy_code");if((cc_anim%2)==1){A.style.borderColor="#8e8e8e";jQuery(A).addClass("copyCode");jQuery(A).removeClass("copyCodeHighlighted");}else{A.style.borderColor="#9f0047 ";jQuery(A).removeClass("copyCode");jQuery(A).addClass("copyCodeHighlighted");}cc_anim++;}else{clearInterval(cc_animInterval);cc_animInterval=null;cc_anim=0;}}function CopyCodeReset(){g("txt_copy_code").style.backgroundColor="#fff";g("txt_copy_code").style.borderColor="#8e8e8e";g("txt_copy_code").value="";g("txt_copy_code").className="copyCode";clearInterval(cc_animInterval);cc_animInterval=null;cc_anim=0;}function CopyCodeHandler(A){if(tbCheck("cc")){if(A){cc_hide();}CopyCode("txt_copy_code");CopyCodeUpdateButton();}}function getRealPosition(D){var B=0,A=0;var C=D,E=0,F=0;while(C){E+=C.offsetLeft;F+=C.offsetTop;C=C.offsetParent;}A=F;B=E;return[B,A];}var cc_optionsDiv=null;var cc_open=false;function cc_display(C){var A=getRealPosition(C);var B=g("cc_optionsDiv");cc_open=true;B.style.visibility="visible";B.style.left=A[0]+"px";B.style.top=A[1]+C.offsetHeight+"px";}function cc_hide(){var A=g("cc_optionsDiv");A.style.visibility="hidden";g("copycode_select").className="ccp_div";}function cc_click(A){ccp_changeTo(A.id);ccp_mouseclick(g("copycode_select"));}function cc_mouseover(A){A.className="cc_option_over";}function cc_mouseout(A){A.className="cc_option";}function ccp_mouseclick(A){if(!cc_open){A.className="ccp_div_open";cc_display(A);cc_open=true;}else{A.className="ccp_div";cc_hide();cc_open=false;}}function ccp_changeTo(A){var B=A.split("_");if(cur_network!=B[1]){var C=g("copycode_select_text");C.innerHTML="&nbsp;&nbsp;<b>Network:</b>&nbsp;"+networks[B[1]];networkRedirect(B[1]);}}function networkRedirect(B,A){var D=document.location.href;var C=D.replace(networks[cur_network],networks[B]);if(A){C=C+(C.indexOf("?")==-1?"?":"&")+A;}cur_network=B;s_cur_network=networkCodes[cur_network];setCookie("cur_network",B,null,"/",null,null);document.location.href=C;}function writeCCSelMenuOptions(D){var C=g(D);var B="";for(var A in networks){B+="<div class='cc_option' id='cc_"+A+"' onclick='cc_click(this)' onmouseover='cc_mouseover(this)' onmouseout='cc_mouseout(this)'>&nbsp;&nbsp;"+networksDisplay[A]+"</div>";}C.innerHTML=B;}function VerifyNetworkChange(D,C,B){var A="<div style='padding:10px;'>"+D+"<br>";A+="<div style='text-align:center;padding:10px;'><img src='"+sImgPath+"/v2_msg_btn_yes.gif' width='58' height='20' class='hand' onclick='"+C+"'hspace='8'/>";A+="<img src='"+sImgPath+"/v2_msg_btn_no.gif' width='58' height='20' class='hand' onclick='"+B+"' hspace='8' /></div></div>";UI_Window_Open(A,null,true,300,null);}var ui_close_func=null;function UI_Window_Open(G,B,D,M,K,S){var A=7;var F=20;var E=g("div_ui_msg");var O=g("div_ui_topbar");var N=g("ui_msg_content");var L=true;if(S){L=false;}if(!L){O.style.display="none";}else{O.style.display="block";}E.style.height=(K?K+"px":"auto");E.style.width=M+"px";N.style.width=M+"px";var R,H;if(self.innerHeight){R=self.innerWidth;H=self.innerHeight;}else{if(document.documentElement&&document.documentElement.clientHeight){R=document.documentElement.clientWidth;H=document.documentElement.clientHeight;}else{if(document.body){R=document.body.clientWidth;H=document.body.clientHeight;}}}var Q=Math.max(document.body.scrollTop,document.documentElement.scrollTop);var J=Math.floor(H/2)-Math.floor(E.offsetHeight/2);var C=Math.floor(R/2)-Math.floor(E.offsetWidth/2);J+=Q;E.style.left=C+"px";E.style.top=J+"px";N.innerHTML=G;if(D){g("div_cover").style.visibility="visible";}var P;var T,I;if(document.body.scrollHeight){T=document.body.scrollHeight;}if(document.body.offsetHeight){P=I=document.body.offsetHeight;}if(T&&I){P=Math.max(T,I);}g("div_cover").style.height=(P+50)+"px";E.style.visibility="visible";switch(B){case"closeOnClick":if(document.all){g("div_cover").setAttribute("onclick",function(){UI_Window_Close();});}else{g("div_cover").setAttribute("onclick","UI_Window_Close();");}break;}}function UI_Window_Close(){g("div_cover").style.visibility="hidden";g("div_ui_topbar").style.display="none";g("div_ui_msg").style.visibility="hidden";if(typeof (ui_close_func)=="function"){ui_close_func();ui_close_func=null;}showHideSelects(1);}function createXMLDoc(F){var C;var D=F.Trim();if(window.ActiveXObject){var A=["Microsoft.XmlDom","MSXML.DOMDocument","MSXML2.DOMDocument","MSXML3.DOMDocument","MSXML4.DOMDocument","MSXML5.DOMDocument"];var B=A.length;while(B--){try{C=new ActiveXObject(A[B]);B=0;}catch(E){}}C.async="false";C.loadXML(D);if(C.parseError.errorCode!=0){return false;}}else{if(document.implementation.createDocument){var G=new DOMParser();C=G.parseFromString(D,"text/xml");}}return C;}function parseXML(E,A){var C=[];var D=E;if(D==null){return false;}var F=D.getElementsByTagName(A);if(F.length!=0){for(t=0;t<F.length;t++){arrTempOut=[];arrTmpNodes=[];arrTmpNodes=F[t].childNodes;if(F[t].attributes.length!=0){for(a=0;a<F[t].attributes.length;a++){arrTempOut[F[t].attributes[a].name]=F[t].attributes[a].value;}}if(arrTmpNodes.length!=0){for(i=0;i<arrTmpNodes.length;i++){if(arrTmpNodes[i].nodeType==3){tmpNode=arrTmpNodes[i].nextSibling;i++;}else{tmpNode=arrTmpNodes[i];}if(tmpNode!=null&&typeof (tmpNode)=="object"){arrTempOut[tmpNode.tagName]=[];try{arrTempOut[tmpNode.tagName]["value"]=tmpNode.firstChild.nodeValue;}catch(B){}for(a=0;a<tmpNode.attributes.length;a++){arrTempOut[tmpNode.tagName][tmpNode.attributes[a].name]=tmpNode.attributes[a].value;}}}}C[C.length]=arrTempOut;}}if(C.length!=0){return C;}else{return false;}}function makeRequest(B,A){var D=false;if(window.XMLHttpRequest){D=new XMLHttpRequest();if(D.overrideMimeType){D.overrideMimeType("text/xml");}}else{if(window.ActiveXObject){try{D=new ActiveXObject("Msxml2.XMLHTTP");}catch(C){try{D=new ActiveXObject("Microsoft.XMLHTTP");}catch(C){}}}}if(!D){alert("Giving up :( Cannot create an XMLHTTP instance");return false;}if(!A){A=ReceiveAssetData;}D.onreadystatechange=function(){A(D);};D.open("GET",B,true);D.send(null);return D;}function cursorPos(C){if(!C){C=window.event;}if(!C||(typeof (C.pageX)!="number"&&typeof (C.clientX)!="number")){return[0,0];}if(typeof (C.pageX)=="number"){var B=C.pageX;var A=C.pageY;}else{var B=C.clientX;var A=C.clientY;if(!((window.navigator.userAgent.indexOf("Opera")+1)||window.navigator.vendor=="KDE")){if(document.documentElement&&(document.documentElement.scrollTop||document.documentElement.scrollLeft)){B+=document.documentElement.scrollLeft;A+=document.documentElement.scrollTop;}else{if(document.body&&(document.body.scrollTop||document.body.scrollLeft)){B+=document.body.scrollLeft;A+=document.body.scrollTop;}}}}return[B,A];}function getColorPickerHTML(E,C){var A=["99ff00","99ff33","99ff66","99ff99","99ffcc","99ffff","ccff00","ccff33","ccff66","ccff99","ccffcc","ccffff","ffff00","ffff33","ffff99","ffffcc","f3f3f3","99cc00","99cc33","99cc66","99cc99","99cccc","99ccff","cccc00","cccc33","cccc66","cccc99","cccccc","ccccff","ffcc00","ffcc33","ffcc99","ffcccc","ffccff","999900","999933","999966","999999","9999cc","9999ff","cc9900","cc9933","cc9966","cc9999","cc99cc","cc99ff","ff9900","ff9933","ff9999","ff99cc","ff99ff","996600","996633","996666","996699","9966cc","9966ff","cc6600","cc6633","cc6666","cc6699","cc66cc","cc66ff","ff6600","ff6633","ff6699","ff66cc","ff66ff","993333","993366","993399","9933cc","9933ff","cc3300","cc3333","cc3366","cc3399","cc33cc","cc33ff","ff3300","ff3333","ff3399","ff33cc","ff33ff","990000","990033","990066","990099","9900cc","9900ff","cc0000","cc0033","cc0066","cc0099","cc00cc","cc00ff","ff0000","ff0033","ff0099","ff00cc","ff00ff","00ff00","00ff33","00ff66","00ff99","00ffcc","00ffff","33ff00","33ff33","33ff66","33ff99","33ffcc","33ffff","66ff00","66ff33","66ff99","66ffcc","66ffff","00cc00","00cc33","00cc66","00cc99","00cccc","00ccff","33cc00","33cc33","33cc66","33cc99","33cccc","33ccff","66cc00","66cc33","66cc99","66cccc","66ccff","009900","009933","009966","009999","0099cc","0099ff","339900","339933","339966","339999","3399cc","3399ff","669900","669933","669999","6699cc","6699ff","006600","006633","006666","006699","0066cc","0066ff","336600","336633","336666","336699","3366cc","3366ff","666600","666633","666699","6666cc","6666ff","003300","003333","003366","003399","0033cc","0033ff","333300","333333","333366","333399","3333cc","3333ff","663300","663333","663399","6633cc","6633ff","000000","000033","000066","000099","0000cc","0000ff","330000","330033","330066","330099","3300cc","3300ff","660000","660033","660099","6600cc","6600ff","0e0e0e","1c1c1c","2a2a2a","383838","464646","555555","636363","717171","7f7f7f","8d8d8d","9b9b9b","aaaaaa","b8b8b8","c6c6c6","d4d4d4","e2e2e2","f0f0f0","ffffff"];var B="<div style='width:175px;'>";for(var D=0;D<A.length;D++){B+="<div onclick='"+E+'("'+A[D]+"\");' title='color_"+A[D]+"' style='background-color:#"+A[D]+";' class='colorSwatch clickTrack'>&nbsp;</div>";}if(C){B+="<div onclick='"+E+"(\"transparent\");' title='transparent' style='color:#f00;' class='colorSwatch aCenter clickTrack'>X</div>";}B+="<br class='floatClear'/></div>";return B;}function PageStateManager(sInit){if(sInit){init_queue+=sInit;}var sFRAME_ID="frmPageState";var sPAGE="/common/htm/blank.htm?";var bIgnoreSet=true;var bIgnoreNext=false;var arrPageStates=[];var iCurrentState=-1;this.SetPageState=function(st){if(!bIgnoreNext){bIgnoreSet=true;arrPageStates.push(st);var oFrame=g(sFRAME_ID);if(oFrame!=null){oFrame.src=sPAGE+iCurrentState;iCurrentState++;}}else{bIgnoreNext=false;}};this.GetPageState=function(){var sFrameSrc=g(sFRAME_ID).src;var iAtQ=sFrameSrc.indexOf("?");if(iAtQ==-1){return false;}else{var iStateIndex=sFrameSrc.substring(iAtQ+1);return iStateIndex;}};this.LoadPageState=function(){var ps=this.GetPageState();if(ps){if(bIgnoreSet){bIgnoreSet=false;return ;}else{bIgnoreNext=true;bIgnoreSet=true;try{iCurrentState--;var sJSState=arrPageStates[ps];eval(sJSState);iCurrentState=ps;g(sFRAME_ID).src=sPAGE+iCurrentState;}catch(e){}}}};}var xmlReq;function getXml(A,B){if(window.XMLHttpRequest){xmlReq=new XMLHttpRequest();xmlReq.open("GET",A,false);xmlReq.send(null);B();}else{if(window.ActiveXObject){xmlReq=new ActiveXObject("Microsoft.XMLHTTP");if(xmlReq){xmlReq.onreadystatechange=B;xmlReq.open("GET",A,false);xmlReq.send("");}}}}var sendEmailsArr=[];var sendType="";var defToValue="Enter recipient's email address";var defFromValue="Enter your email address";function sendEmail(I){sendType=I;if(g(sendType+"_response").style.display==""){g(sendType+"_response").style.display="none";}var G=g(sendType+"_from").value;var K=g(sendType+"_to").value;var B=g(sendType+"_note").value;if(sendType=="saf"){var J=g(sendType+"_url").value;var F=g(sendType+"_html").value;var E=g(sendType+"_utmid").value;}if((K.indexOf(";")>-1)||(K.indexOf(":")>-1)){g(sendType+"_response").innerHTML="Please use commas to separate addresses. Semi-colons and/or colons are not valid separators.<br><br>";g(sendType+"_response").style.display="";return false;}if(!validEmail(G)){g(sendType+"_response").innerHTML=G+" is not a valid email address.<br><br>";g(sendType+"_response").style.display="";return false;}var A=sendType+"Email.jhtml?from="+escape(G);var C=K.split(",");for(i=0;i<C.length;i++){C[i]=C[i].replace(/ /gi,"");if(!validEmail(C[i])&&C[i]!=""){g(sendType+"_response").innerHTML=C[i]+" is not a valid email address.<br><br>";g(sendType+"_response").style.display="";sendEmailsArr=[];return false;}sendEmailsArr[sendEmailsArr.length]=C[i];}A+="&to=";for(j=0;j<sendEmailsArr.length;j++){A+=escape(sendEmailsArr[j]);if(j!=sendEmailsArr.length-1){A+=escape(",");}}if(B!=""){A+="&note="+escape(B);}if(sendType=="saf"){A+="&url="+escape(J);A+="&html="+escape(F);}A+="&partnerVal="+getPartnerVal(sendType,cur_network,false);if(sendType=="taf"){A+="&utmId=7";}else{A+="&utmId="+E;}getXml(A,cbEmail);var D="";if(sendType=="taf"){}else{if(sendType=="saf"){var H=g("saf_assetId").value;if(typeof (H)=="string"){H=H.replace(/\//g,"-");}}}return true;}function cbEmail(){if(xmlReq.readyState==4&&xmlReq.status==200){var ra=eval(xmlReq.responseText);var rf=[];var rb=true;var rst="Thank you. Your message has been sent!";var rft="Your message could not be sent to:<br>";for(i=0;i<ra.length;i++){if(ra[i]==false){rb=false;rf[rf.length]=sendEmailsArr[i];}}for(j=0;j<rf.length;j++){rft+=rf[j];if(j!=rf.length-1){rft+="<br>";}}if(rb){g(sendType+"_response").innerHTML=rst+"<br><br>";}else{g(sendType+"_response").innerHTML=rft+"<br><br>";}sendEmailsArr=[];g(sendType+"_response").style.display="";g(sendType+"_to").value=defToValue;}}var validEmailRegExp=/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;function validEmail(A){if(validEmailRegExp.test(A)){return true;}else{return false;}}function setEmailVal(C,B){var A=C.value;if(C.id.indexOf("to")!=-1){if(B){if(A==defToValue){C.value="";}}else{if(A==""){C.value=defToValue;}}}else{if(B){if(A==defFromValue){C.value="";}}else{if(A==""){C.value=defFromValue;}}}}function setNote(B,A){if(A==1){B.innerHTML="";}else{B.innerHTML="Enter your text";}return true;}function saf(){if(saf_code!=null&&saf_type!=null&&dataSection!=null&&saf_aid!=null){var A=sSafUrl+"?dCode="+escape(saf_code)+"&path="+escape(s_cur_asset_path)+"&dNetwork="+networks[cur_network]+"&pVal="+getPartnerVal("saf",cur_network,false);location.href=A;}else{alert("Please select an asset to send to a friend.");}}function permalink(A,B){return permBaseUrl+"/"+assetDataMap[A]+"/category/"+A+"/0/"+B+"/false/main.jhtml";}function saf_fav(){var C=g(s_cur_asset);var E=C.getAttribute("dc_type");var A=C.getAttribute("dc_cat");var B=(C.id.indexOf("F")==0)?2:0;var D=sSafUrl+"?dCode="+C.id+"&dAid="+s_cur_asset_id+"&dType="+B+"&dSec="+assetDataMap[E]+"&permurl="+escape(permalink(E,A))+"&pVal="+getPartnerVal("saf",cur_network,false);location.href=D;}var oPSM=new PageStateManager();function addEvent(B,A,C){if(bIsIE){if(A.substr(0,2)!="on"){A="on"+A;}B.setAttribute(A,function(){return C(this);});}else{if(A.substr(0,2)=="on"){A=A.substr(2);}B.addEventListener(A,C,false);}}function isModule(A){return(A==19||A==12||A==7||A==11||A==10||A==26);}function tbCheck(C,A,D,B){A=A||"";B=B||"";D=D||false;if(oToolbarController.bInstalled&&!oToolbarController.bUpgradeRequired){return true;}else{if(D){location.href=getTBRedirect(C,A,B);}return false;}}function getTBRedirect(C,A,B){A=A||"";B=B||getTmpAsset(A);var D="wf_"+dataSection;if(dataSection=="customcard"){D+=(cardType=="601"?"_post":"_photo");}return sDownloadUrl+"?partner="+parentPtnrVal+"&utm_campaign="+D+"&utm_source="+B+"&utm_medium=wf_"+C+(successurl!=""?"&successurl="+escape(successurl):"")+(sDlTheme!=""&&sDlTheme!=null?"&theme="+escape(sDlTheme):"");}function parseURL(I){var E=new String(document.location);sf_val=E.substring(E.indexOf("?",0)+1);var A=sf_val;var C=I+"=";var F=A.length;var D=0;var B=null;while(D<F){var G=D+C.length;if(A.substring(D,G)==C){var H=A.indexOf("&",G);if(H==-1){H=F;}B=A.substring(G,H);}D=A.indexOf("&",D)+1;if(D==0){D=F;}}return B;}var trkConfig={smiley:{partner:{my:"ZKzeb009",my2:"ZKzeb853",zw:"ZKzeb021",bl:"ZKzeb033",hi:"ZKzeb045",lj:"ZKzeb057",eb:"ZKzeb221",bebo:"ZKzeb240",friendster:"ZKzeb257",xanga:"ZKzeb274",freewebs:"ZKzeb291",tagged:"ZKzeb308",typepad:"ZKzeb325",blackplanet:"ZKzeb342",orkut:"ZKzeb359",livespaces:"ZKzeb376",piczo:"ZKzeb393",myyearbook:"ZKzeb410",wordpress:"ZKzeb427",multiply:"ZKzeb444",igoogle:"ZKzeb461",netvibes:"ZKzeb478",pageflakes:"ZKzeb495",migente:"ZKzeb512",vox:"ZKzeb529"},trkDir:"sm"},flash_smiley:{partner:{my:"ZKzeb010",my2:"ZKzeb854",zw:"ZKzeb022",bl:"ZKzeb034",hi:"ZKzeb046",lj:"ZKzeb058",eb:"ZKzeb222",bebo:"ZKzeb241",friendster:"ZKzeb258",xanga:"ZKzeb275",freewebs:"ZKzeb292",tagged:"ZKzeb309",typepad:"ZKzeb326",blackplanet:"ZKzeb343",orkut:"ZKzeb360",livespaces:"ZKzeb377",piczo:"ZKzeb394",myyearbook:"ZKzeb411",wordpress:"ZKzeb428",multiply:"ZKzeb445",igoogle:"ZKzeb462",netvibes:"ZKzeb479",pageflakes:"ZKzeb496",migente:"ZKzeb513",vox:"ZKzeb530"},trkDir:"fs"},custom_smiley:{partner:{my:"ZKzeb011",my2:"ZKzeb855",zw:"ZKzeb023",bl:"ZKzeb035",hi:"ZKzeb047",lj:"ZKzeb059",eb:"ZKzeb223",bebo:"ZKzeb242",friendster:"ZKzeb259",xanga:"ZKzeb276",freewebs:"ZKzeb293",tagged:"ZKzeb310",typepad:"ZKzeb327",blackplanet:"ZKzeb344",orkut:"ZKzeb361",livespaces:"ZKzeb378",piczo:"ZKzeb395",myyearbook:"ZKzeb412",wordpress:"ZKzeb429",multiply:"ZKzeb446",igoogle:"ZKzeb463",netvibes:"ZKzeb480",pageflakes:"ZKzeb497",migente:"ZKzeb514",vox:"ZKzeb531"},trkDir:"cs"},cursor:{partner:{my:"ZKzeb012",my2:"ZKzeb856",zw:"ZKzeb024",bl:"ZKzeb036",hi:"ZKzeb048",lj:"ZKzeb060",eb:"ZKzeb224",bebo:"ZKzeb243",friendster:"ZKzeb260",xanga:"ZKzeb277",freewebs:"ZKzeb294",tagged:"ZKzeb311",typepad:"ZKzeb328",blackplanet:"ZKzeb345",orkut:"ZKzeb362",livespaces:"ZKzeb379",piczo:"ZKzeb396",myyearbook:"ZKzeb413",wordpress:"ZKzeb430",multiply:"ZKzeb447",igoogle:"ZKzeb464",netvibes:"ZKzeb481",pageflakes:"ZKzeb498",migente:"ZKzeb515",vox:"ZKzeb532"},trkDir:"cur"},glitter:{partner:{my:"ZKzeb007",my2:"ZKzeb851",zw:"ZKzeb019",bl:"ZKzeb031",hi:"ZKzeb043",lj:"ZKzeb055",eb:"ZKzeb219",bebo:"ZKzeb238",friendster:"ZKzeb255",xanga:"ZKzeb272",freewebs:"ZKzeb289",tagged:"ZKzeb306",typepad:"ZKzeb323",blackplanet:"ZKzeb340",orkut:"ZKzeb357",livespaces:"ZKzeb374",piczo:"ZKzeb391",myyearbook:"ZKzeb408",wordpress:"ZKzeb425",multiply:"ZKzeb442",igoogle:"ZKzeb459",netvibes:"ZKzeb476",pageflakes:"ZKzeb493",migente:"ZKzeb510",vox:"ZKzeb527"},trkDir:"gl"},"3d_graphic":{partner:{my:"ZKzeb008",my2:"ZKzeb852",zw:"ZKzeb020",bl:"ZKzeb032",hi:"ZKzeb044",lj:"ZKzeb056",eb:"ZKzeb220",bebo:"ZKzeb239",friendster:"ZKzeb256",xanga:"ZKzeb273",freewebs:"ZKzeb290",tagged:"ZKzeb307",typepad:"ZKzeb324",blackplanet:"ZKzeb341",orkut:"ZKzeb358",livespaces:"ZKzeb375",piczo:"ZKzeb392",myyearbook:"ZKzeb409",wordpress:"ZKzeb426",multiply:"ZKzeb443",igoogle:"ZKzeb460",netvibes:"ZKzeb477",pageflakes:"ZKzeb494",migente:"ZKzeb511",vox:"ZKzeb528"},trkDir:"3d"},"12":{partner:{my:"ZKzeb157",my2:"ZKzeb845",zw:"ZKzeb162",bl:"ZKzeb167",hi:"ZKzeb172",lj:"ZKzeb177",eb:"ZKzeb214",bebo:"ZKzeb232",friendster:"ZKzeb249",xanga:"ZKzeb266",freewebs:"ZKzeb283",tagged:"ZKzeb300",typepad:"ZKzeb317",blackplanet:"ZKzeb334",orkut:"ZKzeb351",livespaces:"ZKzeb368",piczo:"ZKzeb385",myyearbook:"ZKzeb402",wordpress:"ZKzeb419",multiply:"ZKzeb436",igoogle:"ZKzeb453",netvibes:"ZKzeb470",pageflakes:"ZKzeb487",migente:"ZKzeb504",vox:"ZKzeb521"},trkDir:"mu",trkGifSig:"rdsgen",trkGifW:214,trkGifH:25},"7":{partner:{my:"ZKzeb158",my2:"ZKzeb846",zw:"ZKzeb163",bl:"ZKzeb168",hi:"ZKzeb173",lj:"ZKzeb178",eb:"ZKzeb215",bebo:"ZKzeb233",friendster:"ZKzeb250",xanga:"ZKzeb267",freewebs:"ZKzeb284",tagged:"ZKzeb301",typepad:"ZKzeb318",blackplanet:"ZKzeb335",orkut:"ZKzeb352",livespaces:"ZKzeb369",piczo:"ZKzeb386",myyearbook:"ZKzeb403",wordpress:"ZKzeb420",multiply:"ZKzeb437",igoogle:"ZKzeb454",netvibes:"ZKzeb471",pageflakes:"ZKzeb488",migente:"ZKzeb505",vox:"ZKzeb522"},trkDir:"vd",trkGifSig:"rdsgen",trkGifW:214,trkGifH:25},"19":{partner:{my:"ZKzeb159",my2:"ZKzeb847",zw:"ZKzeb164",bl:"ZKzeb169",hi:"ZKzeb174",lj:"ZKzeb179",eb:"ZKzeb216",bebo:"ZKzeb234",friendster:"ZKzeb251",xanga:"ZKzeb268",freewebs:"ZKzeb285",tagged:"ZKzeb302",typepad:"ZKzeb319",blackplanet:"ZKzeb336",orkut:"ZKzeb353",livespaces:"ZKzeb370",piczo:"ZKzeb387",myyearbook:"ZKzeb404",wordpress:"ZKzeb421",multiply:"ZKzeb438",igoogle:"ZKzeb455",netvibes:"ZKzeb472",pageflakes:"ZKzeb489",migente:"ZKzeb506",vox:"ZKzeb523"},trkDir:"ph",trkGifSig:"rdsgen",trkGifW:214,trkGifH:25},"11":{partner:{my:"ZKzeb160",my2:"ZKzeb848",zw:"ZKzeb165",bl:"ZKzeb170",hi:"ZKzeb175",lj:"ZKzeb180",eb:"ZKzeb217",bebo:"ZKzeb235",friendster:"ZKzeb252",xanga:"ZKzeb269",freewebs:"ZKzeb286",tagged:"ZKzeb303",typepad:"ZKzeb320",blackplanet:"ZKzeb337",orkut:"ZKzeb354",livespaces:"ZKzeb371",piczo:"ZKzeb388",myyearbook:"ZKzeb405",wordpress:"ZKzeb422",multiply:"ZKzeb439",igoogle:"ZKzeb456",netvibes:"ZKzeb473",pageflakes:"ZKzeb490",migente:"ZKzeb507",vox:"ZKzeb524"},trkDir:"st",trkGifSig:"rdsgen",trkGifW:214,trkGifH:25},"10":{partner:{my:"ZKzeb161",my2:"ZKzeb849",zw:"ZKzeb166",bl:"ZKzeb171",hi:"ZKzeb176",lj:"ZKzeb181",eb:"ZKzeb218",bebo:"ZKzeb236",friendster:"ZKzeb253",xanga:"ZKzeb270",freewebs:"ZKzeb287",tagged:"ZKzeb304",typepad:"ZKzeb321",blackplanet:"ZKzeb338",orkut:"ZKzeb355",livespaces:"ZKzeb372",piczo:"ZKzeb389",myyearbook:"ZKzeb406",wordpress:"ZKzeb423",multiply:"ZKzeb440",igoogle:"ZKzeb457",netvibes:"ZKzeb474",pageflakes:"ZKzeb491",migente:"ZKzeb508",vox:"ZKzeb525"},trkDir:"gt",trkGifSig:"rdsgen",trkGifW:214,trkGifH:25},layout:{partner:{my:"ZKzeb006",my2:"ZKzeb850",zw:"ZKzeb018",bl:"ZKzeb030",hi:"ZKzeb042",lj:"ZKzeb054",eb:"ZKzeb227",bebo:"ZKzeb237",friendster:"ZKzeb254",xanga:"ZKzeb271",freewebs:"ZKzeb288",tagged:"ZKzeb305",typepad:"ZKzeb322",blackplanet:"ZKzeb339",orkut:"ZKzeb356",livespaces:"ZKzeb373",piczo:"ZKzeb390",myyearbook:"ZKzeb407",wordpress:"ZKzeb424",multiply:"ZKzeb441",igoogle:"ZKzeb458",netvibes:"ZKzeb475",pageflakes:"ZKzeb492",migente:"ZKzeb509",vox:"ZKzeb526"},trkDir:"la"},quizzes:{partner:{my:"ZKzeb897",my2:"ZKzeb898",zw:"ZKzeb899",bl:"ZKzeb900",hi:"ZKzeb901",lj:"ZKzeb902",bebo:"ZKzeb903",friendster:"ZKzeb904",xanga:"ZKzeb905",freewebs:"ZKzeb906",tagged:"ZKzeb907",typepad:"ZKzeb908",blackplanet:"ZKzeb909",orkut:"ZKzeb911",livespaces:"ZKzeb912",piczo:"ZKzeb913",myyearbook:"ZKzeb914",wordpress:"ZKzeb922",multiply:"ZKzeb915",igoogle:"ZKzeb916",netvibes:"ZKzeb917",pageflakes:"ZKzeb918",migente:"ZKzeb910",vox:"ZKzeb919"},trkDir:"qz",trkGifSig:"rdsq",trkGifW:286,trkGifH:53},taf:{partner:{my:"ZKzeb062",my2:"ZKzeb062",zw:"ZKzeb062",bl:"ZKzeb062",hi:"ZKzeb062",lj:"ZKzeb062",eb:"ZKzeb062"}},saf:{partner:{my:"ZKzeb063",my2:"ZKzeb063",zw:"ZKzeb063",bl:"ZKzeb063",hi:"ZKzeb063",lj:"ZKzeb063",eb:"ZKzeb063"}},artist:{partner:{my:"ZKzeb064",my2:"ZKzeb857",zw:"ZKzeb065",bl:"ZKzeb066",hi:"ZKzeb067",lj:"ZKzeb068",eb:"ZKzeb230",bebo:"ZKzeb244",friendster:"ZKzeb261",xanga:"ZKzeb278",freewebs:"ZKzeb295",tagged:"ZKzeb312",typepad:"ZKzeb329",blackplanet:"ZKzeb346",orkut:"ZKzeb363",livespaces:"ZKzeb380",piczo:"ZKzeb397",myyearbook:"ZKzeb414",wordpress:"ZKzeb431",multiply:"ZKzeb448",igoogle:"ZKzeb465",netvibes:"ZKzeb482",pageflakes:"ZKzeb499",migente:"ZKzeb516",vox:"ZKzeb533"},trkDir:"as"},flash_toys:{partner:{my:"ZKzeb069",my2:"ZKzeb858",zw:"ZKzeb070",bl:"ZKzeb071",hi:"ZKzeb072",lj:"ZKzeb073",eb:"ZKzeb225",bebo:"ZKzeb245",friendster:"ZKzeb262",xanga:"ZKzeb279",freewebs:"ZKzeb296",tagged:"ZKzeb313",typepad:"ZKzeb330",blackplanet:"ZKzeb347",orkut:"ZKzeb364",livespaces:"ZKzeb381",piczo:"ZKzeb398",myyearbook:"ZKzeb415",wordpress:"ZKzeb432",multiply:"ZKzeb449",igoogle:"ZKzeb466",netvibes:"ZKzeb483",pageflakes:"ZKzeb500",migente:"ZKzeb517",vox:"ZKzeb534"},trkDir:"ft"},featured:{partner:{my:"ZKzeb132",my2:"ZKzeb869",zw:"ZKzeb133",bl:"ZKzeb134",hi:"ZKzeb135",lj:"ZKzeb136",eb:"ZKzeb231"},trkDir:"fe"},customcard_photo:{partner:{my:"ZKzeb192",my2:"ZKzeb881",zw:"ZKzeb193",bl:"ZKzeb194",hi:"ZKzeb195",lj:"ZKzeb196",eb:"ZKzeb228",bebo:"ZKzeb247",friendster:"ZKzeb264",xanga:"ZKzeb281",freewebs:"ZKzeb298",tagged:"ZKzeb315",typepad:"ZKzeb332",blackplanet:"ZKzeb349",orkut:"ZKzeb366",livespaces:"ZKzeb383",piczo:"ZKzeb400",myyearbook:"ZKzeb417",wordpress:"ZKzeb434",multiply:"ZKzeb451",igoogle:"ZKzeb468",netvibes:"ZKzeb485",pageflakes:"ZKzeb502",migente:"ZKzeb519",vox:"ZKzeb536"},trkDir:"cph",trkGifSig:"rdsgen",trkGifW:214,trkGifH:25},customcard_post:{partner:{my:"ZKzeb187",my2:"ZKzeb880",zw:"ZKzeb188",bl:"ZKzeb189",hi:"ZKzeb190",lj:"ZKzeb191",eb:"ZKzeb229",bebo:"ZKzeb246",friendster:"ZKzeb263",xanga:"ZKzeb280",freewebs:"ZKzeb297",tagged:"ZKzeb314",typepad:"ZKzeb331",blackplanet:"ZKzeb348",orkut:"ZKzeb365",livespaces:"ZKzeb382",piczo:"ZKzeb399",myyearbook:"ZKzeb416",wordpress:"ZKzeb433",multiply:"ZKzeb450",igoogle:"ZKzeb467",netvibes:"ZKzeb484",pageflakes:"ZKzeb501",migente:"ZKzeb518",vox:"ZKzeb535"},trkDir:"cpc",trkGifSig:"rdsgen",trkGifW:214,trkGifH:25},customcard_editor:{partner:{my:"ZKzeb197",my2:"ZKzeb882",zw:"ZKzeb198",bl:"ZKzeb199",hi:"ZKzeb200",lj:"ZKzeb201",eb:"ZKzeb226",bebo:"ZKzeb248",friendster:"ZKzeb265",xanga:"ZKzeb282",freewebs:"ZKzeb299",tagged:"ZKzeb316",typepad:"ZKzeb333",blackplanet:"ZKzeb350",orkut:"ZKzeb367",livespaces:"ZKzeb384",piczo:"ZKzeb401",myyearbook:"ZKzeb418",wordpress:"ZKzeb435",multiply:"ZKzeb452",igoogle:"ZKzeb469",netvibes:"ZKzeb486",pageflakes:"ZKzeb503",migente:"ZKzeb520",vox:"ZKzeb537"},trkDir:"cpe",trkGifSig:"rdsgen",trkGifW:214,trkGifH:25},body_builder:{partner:{my:"ZKzeb792",my2:"ZKzeb894",zw:"ZKzeb793",bl:"ZKzeb794",hi:"ZKzeb795",lj:"ZKzeb796",eb:"ZKzeb797",bebo:"ZKzeb823",friendster:"ZKzeb824",xanga:"ZKzeb825",freewebs:"ZKzeb826",tagged:"ZKzeb827",typepad:"ZKzeb828",blackplanet:"ZKzeb829",orkut:"ZKzeb831",livespaces:"ZKzeb832",piczo:"ZKzeb833",myyearbook:"ZKzeb834",wordpress:"",multiply:"ZKzeb835",igoogle:"ZKzeb836",netvibes:"ZKzeb837",pageflakes:"ZKzeb838",migente:"ZKzeb830",vox:"ZKzeb839"},trkDir:"bb",trkGifSig:"rdsgen",trkGifW:214,trkGifH:25},customcard_coupon:{partner:{my:"ZKzeb799",my2:"ZKzeb895",zw:"ZKzeb800",bl:"ZKzeb801",hi:"ZKzeb802",lj:"ZKzeb803",eb:"ZKzeb804",bebo:"ZKzeb806",friendster:"ZKzeb807",xanga:"ZKzeb808",freewebs:"ZKzeb809",tagged:"ZKzeb810",typepad:"ZKzeb811",blackplanet:"ZKzeb812",orkut:"ZKzeb814",livespaces:"ZKzeb815",piczo:"ZKzeb816",myyearbook:"ZKzeb817",wordpress:"",multiply:"ZKzeb818",igoogle:"ZKzeb819",netvibes:"ZKzeb820",pageflakes:"ZKzeb821",migente:"ZKzeb813",vox:"ZKzeb822"},trkDir:"cco",trkGifSig:"rdsgen",trkGifW:214,trkGifH:25},layouteditor:{partner:{my:"ZKzeb791",my2:"ZKzeb896"},trkDir:"cl"},grabber:{partner:{my:"grabber",my2:"grabber",zw:"grabber",bl:"grabber",hi:"grabber",lj:"grabber",eb:"grabber"},trkDir:"gr"},"default":{partner:{my:"default",my2:"default",zw:"default",bl:"default",hi:"default",lj:"default",eb:"default"},trkDir:"def"}};var bRandSB=true;var randVals=[];function getSignatureVals(A){var B=[];B[0]="test/rds/01/|87|18|zebSig1";B[1]="test/rds/02/|37|18|zebSig2";B[2]="test/rds/03/|75|18|zebSig3";B[3]="rds/|160|18|zebSigControl";return B[A];}function getBadgeVals(A){var B=[];B[0]="test/rdb/01/|106|45|zebBadgeControl|badge_01.gif|badge_01.gif|106|45|zebBadgeControl|0";B[1]="test/rdb/05/|120|103|zebBadge2Left|badge_02.gif|badge_02.gif|120|103|zebBadge2Right|1";return B[A];}function resetTrkConfig(A){if(!A){return ;}for(key in trkConfig){var B=trkConfig[key].partner;if(B&&"taf|saf|layouteditor|grabber|default".indexOf(B)==-1){trkConfig[key].partner=A;}}return false;}function getTrackingHTML(whatSection,whatNetwork,assetHtml,assetId,writeBadge,whatType){if(typeof (trkConfig[whatSection])=="undefined"){whatSection="default";}if(assetHtml){s_cur_assetHTML=assetHtml;}if(whatNetwork=="ebay"&&(whatSection=="layout"||whatSection=="cursor")){return getSignatureHTML(getPartnerVal(whatSection,whatNetwork,false),whatSection,whatNetwork,assetHtml,assetId);}if(dataSection=="layouteditor"){whatSection=dataSection;}if(bRandSB&&writeBadge&&whatNetwork=="myspace2"&&dataSection.indexOf("layout")!=-1){var getRandVals="";var iRand=Math.floor(Math.random()*2);getRandVals=getBadgeVals(iRand);randVals=getRandVals.split("|");var zebBadgeControl={my:"ZKzeb112",my2:"ZKzeb865",zw:"ZKzeb113",bl:"ZKzeb114",hi:"ZKzeb115",lj:"ZKzeb116",eb:""};var zebBadge2Right={my:"ZKzeb117",my2:"ZKzeb866",zw:"ZKzeb118",bl:"ZKzeb119",hi:"ZKzeb120",lj:"ZKzeb121",eb:""};var zebBadge2Left={my:"ZKzeb137",my2:"ZKzeb870",zw:"ZKzeb138",bl:"ZKzeb139",hi:"ZKzeb140",lj:"ZKzeb141",eb:""};var zebPartnerRandVal=eval(randVals[8]);resetTrkConfig(zebPartnerRandVal);var randBadgeHTML="";if(whatType=="css"){return getRandBadgeCSS(getPartnerVal(whatSection,whatNetwork,false),whatSection,whatNetwork,assetId,"right");}else{return getRandBadgeHTML(getPartnerVal(whatSection,whatNetwork,false),whatSection,whatNetwork,assetId,"right");}return randBadgeHTML;}else{if(writeBadge){return getBadgeHTML(getPartnerVal(whatSection,whatNetwork,false),whatSection,whatNetwork,assetId);}else{return getSignatureHTML(getPartnerVal(whatSection,whatNetwork,false),whatSection,whatNetwork,assetHtml,assetId);}}}function getPartnerVal(D,C,A){if(parentPtnrVal.indexOf("_")>-1||(!oToolbarController.bInstalled&&!oToolbarController.bXPIInstalled)){return parentPtnrVal;}var E=(networkCodes[C])?networkCodes[C]:C;var B=trkConfig[D].partner[E];B+=(A?"%255F":"_")+parentPtnrVal;return B;}function getBadgeHTML(G,C,B,F){var A="";var D=sDownloadUrl;if(B=="myspace"){D=sWFDownloadUrl;}if(typeof (F)=="string"){A=F.replace(/\//g,"-");}var E="";if(B=="myspace2"&&C.indexOf("layout")!=-1){E+="";}else{E='<style type="text/css">';}E+=".button_size {border-style:none;border-width:0;height:46px;width:106px;}";E+=".wfbutton {background:url("+sImgPath+"/badge_01.gif) no-repeat left top;display:block;";E+="height:46px;text-align:left;width:106px;position:absolute;"+(B=="blogger"?"top:30px;":"top:0px;")+"right:10px;z-index:10000;}";E+=".wfbutton a:link,.wfbutton a:visited {display:block;background-color:transparent;}";E+=".wfbutton a:hover,.wfbutton a:active {background:url("+sImgPath+"/badge_01.gif) no-repeat left top;display:block;height:46px;width:106px;}";if(B=="myspace2"&&C.indexOf("layout")!=-1){E+="";}else{E+="</style>";}E+='<div class="wfbutton"><a href="'+D+"?partner="+G+"&utm_campaign=wf_"+C+"&utm_source="+A+"&utm_medium=wf_"+B+'"><img src="'+sImgTrk+"test/rdb/01/"+trkConfig[C].trkDir+"/"+networkCodes[B]+"/"+F+'.gif" name="click_here" class="button_size" /></a></div>';return E;}function getSignatureHTML(A,E,I,D,K){var B="";var F=sDownloadUrl;if(I=="myspace"){F=sWFDownloadUrl;}themed=(dataSection=="quizzes")?"theme=quiz2&":"";getSuccessURL();if(typeof (K)=="string"){B=K.replace(/\//g,"-");}else{B=K;}var J=trkConfig[E].trkGifSig;var H=trkConfig[E].trkGifW;var C=trkConfig[E].trkGifH;if(!J){J="rds";H=160;C=18;}var G=(networkCodes[I])?networkCodes[I]:I;if(I=="ebay"){return D+'<a href="'+F+"?partner="+A+"&utm_campaign=wf_"+E+"&utm_source="+B+"&utm_medium=wf_"+I+'">Graphics by Webfetti.com</a><br/><img src="'+sImgTrk+"rdts"+"/"+trkConfig[E].trkDir+"/"+G+"/"+K+'.gif" width="1" height="1" border="0" />';}else{return D+'<a href="'+F+"?"+themed+"partner="+A+"&utm_campaign=wf_"+E+"&utm_source="+B+"&utm_medium=wf_"+I+(successurl!=""?"&successurl="+escape(successurl):"")+'" ><img src="'+sImgTrk+J+"/"+trkConfig[E].trkDir+"/"+G+"/"+K+'.gif" width="'+H+'" height="'+C+'" border="0" /></a><br/>';}}function getRandBadgeCSS(F,C,A,D,E){var B="";if(E=="left"){B+=".button_sizeL {border-style:none;border-width:0;height:"+randVals[2]+"px;width:"+randVals[1]+"px;}";B+=".wfbuttonL {background:url("+sImgPath+"/"+randVals[4]+") no-repeat left top;display:block;";B+="height:"+randVals[2]+"px;text-align:left;width:"+randVals[1]+"px;position:absolute;"+(A=="blogger"?"top:30px;":"top:0px;")+"left:10px;z-index:10000;}";B+=".wfbuttonL a:link,.wfbuttonL a:visited {display:block;background-color:transparent;}";B+=".wfbuttonL a:hover,.wfbuttonL a:active {background:url("+sImgPath+"/"+randVals[4]+") no-repeat left top;display:block;height:"+randVals[2]+"px;width:"+randVals[1]+"px;}";}else{B+=".button_size {border-style:none;border-width:0;height:"+randVals[7]+"px;width:"+randVals[6]+"px;}";B+=".wfbutton {background:url("+sImgPath+"/"+randVals[5]+") no-repeat left top;display:block;";B+="height:"+randVals[7]+"px;text-align:left;width:"+randVals[6]+"px;position:absolute;"+(A=="blogger"?"top:30px;":"top:0px;")+"right:10px;z-index:10000;}";B+=".wfbutton a:link,.wfbutton a:visited {display:block;background-color:transparent;}";B+=".wfbutton a:hover,.wfbutton a:active {background:url("+sImgPath+"/"+randVals[5]+") no-repeat left top;display:block;height:"+randVals[7]+"px;width:"+randVals[6]+"px;}";}return B;}function getRandBadgeHTML(H,C,B,F,G){var A="";if(typeof (F)=="string"){A=F.replace(/\//g,"-");}var D=sDownloadUrl;if(B=="myspace"){D=sWFDownloadUrl;}var E="";if(G=="left"){E+='<div class="wfbuttonL"><a href="'+D+"?partner="+H+"&utm_campaign=wf_"+C+"&utm_source="+A+"&utm_medium=wf_"+B+'"><img src="'+sImgTrk+randVals[0]+trkConfig[C].trkDir+"/"+networkCodes[B]+"/"+F+'.gif" name="click_here" class="button_sizeL" /></a></div>';}else{if(randVals[9]!=0){E+='<div class="wfbutton"><a href="'+D+"?partner="+H+"&utm_campaign=wf_"+C+"&utm_source="+A+"&utm_medium=wf_"+B+'"><img src="http://ak.webfetti.com/spacer.gif" name="click_here" class="button_size" /></a></div>';}else{E+='<div class="wfbutton"><a href="'+D+"?partner="+H+"&utm_campaign=wf_"+C+"&utm_source="+A+"&utm_medium=wf_"+B+'"><img src="'+sImgTrk+randVals[0]+trkConfig[C].trkDir+"/"+networkCodes[B]+"/"+F+'.gif" name="click_here" class="button_size" /></a></div>';}}return E;}function getRandSignatureHTML(H,C,B,G,F){var A="";if(typeof (F)=="string"){A=F.replace(/\//g,"-");}var D=sDownloadUrl;if(B=="myspace"){D=sWFDownloadUrl;}if(G!=""){G+="<br/>";}var E='<a href="'+D+"?partner="+H+"&utm_campaign=wf_"+C+"&utm_source="+A+"&utm_medium=wf_"+B+'">'+G+'<img src="'+sImgTrk+randVals[0]+trkConfig[C].trkDir+"/"+networkCodes[B]+"/"+F+'.gif" width="'+randVals[1]+'" height="'+randVals[2]+'" border="0" /></a><br/>';return E;}function getTmpAsset(A){if(A==null){A="";}var B="";if(dataSection=="layout"){B=Data.Layout.CurrentId;}else{if(dataSection=="music"){B=oSelectedMusicMod.GetId();}else{if(dataSection=="video"){B=oSelectedVideoMod.GetId();}else{if(dataSection=="photo"){B=oMod.GetId();}else{if(dataSection=="text"&&dataSubSection=="graphictext"){B=oGT.GetId();}else{if(dataSection=="text"&&dataSubSection=="glittertext"){B=oFT.GetId();}else{if(dataSection=="artist"){switch(A){case"9":case"17":case"18":B=Data.Layout.CurrentId;break;case"2":case"8":case"24":default:B=s_cur_asset_id;break;}}else{B=s_cur_asset_id;}}}}}}}if(typeof (B)=="string"){B=B.replace(/\//g,"-");B=B.substring(B.indexOf("_")+1,B.length);}return B;}function getAssetUrl(G,C,B,E){var F="";var A="";var D=sDownloadUrl;if(B=="myspace"){D=sWFDownloadUrl;}if(typeof (E)=="string"){A=E.replace(/\//g,"-");}else{A=E;}F+=D+"?"+"partner="+G+"&utm_campaign=wf_"+C+"&utm_source="+A+"&utm_medium=wf_"+B+(successurl!=""?"&successurl="+escape(successurl):"");return F;}function myspace_gen_code(C,E,A,B,F){var D="";D+='<object type="application/x-shockwave-flash" allowScriptAccess="always" width="'+E+'" height="'+A+'" align="middle" data="'+C+'">';D+='<param name="allowScriptAccess" value="always" />';D+='<param name="movie" value="'+C+'" />';D+='<param name="loop" value="'+B+'" />';D+='<param name="quality" value="best" />';D+='<param name="bgcolor" value="#ffffff" />';D+='<param name="wmode" value="transparent" />';if(F!=""){D+='<param name="flashvars" value="'+F+'" />';}D+="</object><br/>";return D;}function writeFlashSmiley(B){code=B.code;alt=B.alt;var C=code;var A="";if(bIsFF&&dataSection!="artist"){A+="<div id='div_"+C+"' class='flash_smiley_div' style='height:140px;width:100px;'>";}A+="<object id='"+C+"' name='"+C+"' title='"+alt+"' dc_type='"+B.dc_type+"' dc_cat='"+B.category+"' dc_id='"+B.dc_id+"' class='flash_smiley'"+(assetType!=22?" onmousedown='asset_click(\""+B.code+'", true, "'+B.assetId+"\");' onmouseover='asset_over(this)' onmouseout='asset_out(this)'":"")+' classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width=\'100\' height=\'140\' id="smiley_'+C+"\" align='middle'>";A+='<param name="allowScriptAccess" value="always" />';A+='<param name="movie" value="'+sImgSmileyPath+'F/uitransport_wf2.swf" /><param name="flashvars" value="code='+code+"&cmode=0"+(assetType!=22?"&cm="+escape(contextMenuString):"")+"&at="+escape(alt)+'" /><param name="loop" value="false" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><param name="wmode" value="transparent" />';A+="<embed id='"+C+"' name='smiley23' alt='"+alt+"' dc_type='"+B.dc_type+"' dc_cat='"+B.category+"' dc_id='"+B.dc_id+"' class='flash_smiley' src=\""+sImgSmileyPath+'F/uitransport_wf.swf" flashvars="code='+code+"&cmode=0"+(assetType!=22?"&cm="+escape(contextMenuString):"")+"&at="+escape(alt)+'" loop="false" quality="high" bgcolor="#ffffff" width="100" height="140" name="smiley_'+C+'" align="middle" wmode="transparent" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';A+="</object><scr"+"ipt for='"+C+"' EVENT='fscommand(command, msg)'>eval(msg);</scr"+"ipt>";if(bIsFF&&dataSection!="artist"){A+="</div>";}return A;}function smiley_gen_code(D,C){var B="";if(D){switch(D.charAt(0)){case"F":var A=escape(escape(D));A=A.replace(/\//g,"%252F").replace(/_/g,"%255F");if(s_cur_network.indexOf("my")!=-1){B=myspace_gen_code("http://plugin.smileycentral.com/http%253A%252F%252Fsmileys.smileycentral.com%252Fcat%252FF%252Ftransport_sf.swf%253Fcode%253D"+A+"%2526partner%253D"+getPartnerVal("flash_smiley",cur_network,true)+"%2526curl%253D"+sEscapedDownloadUrl+"/transport_sf.swf","100","120","false","code="+D+"&partner="+getPartnerVal("flash_smiley",cur_network,false)+"&curl="+sWFDownloadUrl);}else{B='<div><embed src="http://plugin.smileycentral.com/http%253A%252F%252Fsmileys.smileycentral.com%252Fcat%252FF%252Ftransport_sf.swf%253Fcode%253D'+A+"%2526partner%253D"+getPartnerVal("flash_smiley",cur_network,true)+"%2526curl%253D"+sEscapedDownloadUrl+'/transport_sf.swf" loop="false" quality="best" bgcolor="#ffffff" width="100" height="120" name="transport" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="transparent" flashvars="code='+D+"&partner="+getPartnerVal("flash_smiley",cur_network,false)+"&curl="+sDownloadUrl+'"></embed></div>';}s_cur_assetHTML=B;B=getTrackingHTML(((!C)?"flash_smiley":C),cur_network,B,s_cur_asset_id,false);break;case"e":if(dataSection=="favorites"){B=csmiley_gen_code(D,"");}else{B=csmiley_gen_code(D,g("csmiley_edittext").innerHTML);}break;default:B='<img src="http://smileys.smileycentral.com/cat/'+D+'.gif" alt="Webfetti.com" border="0"><br/>';s_cur_assetHTML=B;B=getTrackingHTML(((!C)?"smiley":C),cur_network,B,s_cur_asset_id,false);break;}}return B;}function toys_gen_code(C,A){var E="";var D=C;var K=100;var F=100;var H="";var J=A;if(J=="gidgets"||J==null||J==""){J="flash_toys";}try{K=jQuery("input#assetWidth_"+s_cur_asset_id).attr("value");F=jQuery("input#assetHeight_"+s_cur_asset_id).attr("value");}catch(G){}var B=getCountdownVars(C);if(B){H="month="+B.month+"&day="+B.day+"&year="+B.year;}else{H="assetUrl="+getAssetUrl(getPartnerVal(J,cur_network,false),J,cur_network,s_cur_asset_id);}var I=new RegExp("[&]","g");H=H.replace(I,"%26");if(s_cur_network.indexOf("my")!=-1){E=myspace_gen_code(sImgToysPath+D+".swf",K,F,"true",H);}else{E='<div><embed src="'+sImgToysPath+D+'.swf" loop="true" quality="best" bgcolor="#ffffff" width="'+K+'" height="'+F+'" flashvars="'+H+'" name="transport" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="transparent" ></embed></div><br/>';}s_cur_assetHTML=E;E=getTrackingHTML(J,cur_network,E,s_cur_asset_id,false);return E;}function cursor_gen_code(C){var B="";var A=C.replace(/\//g,"%252F").replace(/_/g,"%255F");if(cur_network=="ebay"){B+="<p>Click here to enter the description of the item you are selling</p>";}B+='<style type="text/css">body{cursor:url("http://plugin.smileycentral.com/http%253A%252F%252Fplugin%252Esmileycentral%252Ecom%252Fassetserver%252Fcursor%252Ejhtml%253Fcur%253D1%2526i%253D'+A+'/image.gif"), auto !important;}</style>';s_cur_assetHTML=B;B+=getTrackingHTML("cursor",cur_network,null,s_cur_asset_id,true);return B;}function anim_gen_code(F){var E="";var A=150;var C=150;try{A=g(F).getAttribute("width");C=g(F).getAttribute("height");}catch(D){}if(F!=null){switch(F.charAt(0)){case"F":var B=escape(escape(sImg3danimPath+F+".swf"));B=B.replace(/\//g,"%252F").replace(/_/g,"%255F");if(s_cur_network.indexOf("my")!=-1){E=myspace_gen_code("http://plugin.smileycentral.com/"+B+"/3dgraphic.swf",A,C,"true","");}else{E='<div><embed src="http://plugin.smileycentral.com/'+B+'/3dgraphic.swf" quality="high" bgcolor="#ffffff" width="'+A+'" height="'+C+'" name="3dgraphic" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="transparent"></embed></div><br/>';}s_cur_assetHTML=E;E=getTrackingHTML("3d_graphic",cur_network,E,s_cur_asset_id,false);break;default:E='<img src="'+sImg3danimPath+F+'.gif" alt="Webfetti.com" border="0"><br/>';s_cur_assetHTML=E;E=getTrackingHTML("3d_graphic",cur_network,E,s_cur_asset_id,false);break;}}else{return null;}return E;}function glitter_gen_code(C,B){var A="";A='<img src="'+sImgGlitterPath+C+'.gif" alt="Webfetti.com" border="0"><br/>';s_cur_assetHTML=A;A=getTrackingHTML(((!B)?"glitter":B),cur_network,A,s_cur_asset_id,false);return A;}function pics_gen_code(C,B){var A="";if(C.charAt(0)=="F"){A=getFlash(sImgPicturesPath+C+".swf",600,150,"pics_"+C);A=getTrackingHTML(((!B)?"pics":B),cur_network,A,s_cur_asset_id,false);}else{A='<img src="'+sImgPicturesPath+C+'" alt="Webfetti.com" border="0"><br/>';A=getTrackingHTML(((!B)?"pics":B),cur_network,A,s_cur_asset_id,false);}return A;}var layout_gen_queue=[];function layout_gen_process(){var B=layout_gen_queue[0];try{layout_gen_code(B,s_cur_section,9);}catch(A){setTimeout(layout_gen_process,1000);}}function layout_gen_code(D,C,B){s_cur_asset=D;s_cur_section=C;s_cur_layout_id=s_cur_asset;sectionData.Current=sectionData[C];if(C=="fullLayouts"){Data.Layout.Load(s_cur_layout_id);if(tbCheck("cc",B)){Data.Run(function(){if($.inArray(D,layout_gen_queue)>-1){try{if(bIsIE){$("object[name^='ccbtn_']").get(0).setClipboardData(Data.CurrentCSS(dataSection));}else{$("embed[name^='ccbtn_']").get(0).setClipboardData(Data.CurrentCSS(dataSection));}layout_gen_queue.shift();if(layout_gen_queue.length>0){layout_gen_process();}else{$(".lc_btn_bar img").show().parent().find(".placeholder").remove();}}catch(E){setTimeout(layout_gen_process,1000);}}},Data.DefaultRequires(),"");return Data.CurrentCSS(dataSection);}}else{sectionData.Current=sectionData[s_cur_section];var A=g(s_cur_section+"_"+D);Data.Layout.LoadFromElement(D,A.src);if(tbCheck("cc",B)){return Data.CurrentCSS(dataSection);}}}function favorite_gen_code(D){var A=g(D);var C=A.getAttribute("dc_type");var B=A.getAttribute("dc_id");}function smiley_gen_html(A){if(A.type==2){return writeFlashSmiley(A);}if(A.code.indexOf("e")==0){return csmiley_gen_html(A.code,A.name,A.dc_type,A.dc_id,A.category,A.assetId);}return gen_html(A,sImgSmileyPath+A.code+".gif");}function writeFlash3D(B){var C=B.code;var A="";A+="<object id='"+C+"' name='"+C+"' title='"+B.alt+"' dc_type='"+B.dc_type+"' dc_cat='"+B.category+"' dc_id='"+B.dc_id+"' class='flash_3d' onmousedown='asset_click(\""+B.code+'", true, "'+B.assetId+'");\' onmouseover=\'asset_over(this)\' onmouseout=\'asset_out(this)\' classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+B.width+'" height="'+B.height+'" id="3d_'+C+"\" align='middle'>";A+='<param name="allowScriptAccess" value="always" /><param name="movie" value="'+sImg3danimPath+B.code+'.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><param name="wmode" value="transparent" />';A+="<embed id='"+C+"' name=\"3d_"+C+"\" alt='"+B.alt+"' dc_type='"+B.dc_type+"' dc_cat='"+B.category+"' dc_id='"+B.dc_id+"'  class='flash_3d' src=\""+sImg3danimPath+B.code+'.swf" quality="high" bgcolor="#ffffff" width="'+B.width+'" height="'+B.height+'" align="middle" wmode="transparent" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';A+="</object>";return A;}function toys_gen_html(B){code=B.code;alt=B.alt;var C=code;var A="";if(bIsFF&&dataSection!="featured"){A+="<div id='div_"+C+"' class='flash_smiley_div' style='height:"+B.height+"px;width:"+B.width+"px;'>";}A+="<object id='"+C+"' name='"+C+"' title='"+alt+"' dc_type='"+B.dc_type+"' dc_cat='"+B.category+"' dc_id='"+B.dc_id+"' class='flash_smiley'"+(assetType!=25?" onmousedown='asset_click(\""+B.code+'", true, "'+B.assetId+"\");' onmouseover='asset_over(this)' onmouseout='asset_out(this)'":"")+' classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width=\''+B.width+"' height='"+B.height+"' id=\"toys_"+C+"\" align='middle'>";A+='<param name="allowScriptAccess" value="always" />';A+='<param name="movie" value="'+sImgToysPath+code+'.swf" /><param name="loop" value="true" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><param name="wmode" value="transparent" />';A+="<embed id='"+C+"' name='toys23' alt='"+alt+"' dc_type='"+B.dc_type+"' dc_cat='"+B.category+"' dc_id='"+B.dc_id+"'  class='flash_smiley' src=\""+sImgToysPath+code+'.swf" loop="true" quality="high" bgcolor="#ffffff" width="'+B.width+'" height="'+B.height+'" name="smiley_'+C+'" align="middle" wmode="transparent" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';A+="</object>";if(bIsFF&&dataSection!="featured"){A+="</div>";}return A;}function csmiley_gen_html(G,A,B,F,C,E){var D="";D+="<div id='"+G+"' dc_type='"+B+"' dc_cat='"+C+"' dc_id='"+F+"' title=\""+A.replace('"','\\"')+"\" class='div_asset' style='width:140px;float:left;'>";D+='<div style="background-color:white;border:1px solid black;font-family:verdana;font-size:11px;font-weight:bold;width:130px;text-align:center;padding:4px;">'+A+"</div>";D+='<img src="http://smileys.smileycentral.com/cus/'+G+'.gif" alt="Webfetti.com" border="0">';D+="</div>";return D;}function csmiley_gen_code(D,A){var B='<div style="background-color:white;border:1px solid black;font-family:verdana;font-size:11px;font-weight:bold;width:130px;text-align:center;padding:4px;text-decoration:none;"><font color="black">'+A+"</font></div>";var C='<img src="http://smileys.smileycentral.com/cus/'+D+'.gif" alt="Webfetti.com" border="0"><br/>';C=B+C;s_cur_assetHTML=C;C=getTrackingHTML("custom_smiley",cur_network,C,s_cur_asset_id,false);return C;}function cursor_gen_html(A){var B=sImgCursorPath+Math.floor(A.code.replace("a","")/500)+"/"+A.code+".gif";return gen_html(A,B);}function anim_gen_html(A){if(A.type==2){return writeFlash3D(A);}else{return gen_html(A,sImg3danimPath+A.code+".gif");}}function glitter_gen_html(A){return gen_html(A,sImgGlitterPath+A.code+".gif");}function gen_html(B,C,A){var D=B.code;if(!A){A="";}if(B.id>0&&(dataSection!="artist"&&dataSection!="featured")){D=B.id;}if(B.id>0&&(B.assetType==18||B.assetType==17)){D=B.id;}return"<img id='"+D+"' dc_type='"+B.dc_type+"' dc_cat='"+B.category+"' dc_id='"+B.dc_id+"' class='div_asset' alt='"+B.alt+"' "+(assetType!=22&&assetType!=25?"onmouseover='asset_over(this)' onmouseout='asset_out(this)' oncontextmenu='asset_click(\""+D+'", true, "'+B.assetId+"\");asset_context(this)' onclick='asset_click(\""+D+'", true, "'+B.assetId+"\");'":"")+" src='"+C+"' hspace=2 vspace=2 "+A+" />";}function getSectionDataFromAssetType(A){if(typeof (sectionData)=="undefined"){return null;}for(key in sectionData){if(sectionData[key].code==A){return key;}}return null;}function layout_gen_html(C,E){var A=(E?"":"<span style='float:left;text-align:center;'><div>");if(E){var B=getSectionDataFromAssetType(C.assetType);if(B!=null){dThumbW=sectionData[B].w;dThumbH=sectionData[B].h;bDisplayFull=sectionData[B].full;}}if(bDisplayFull){var D=(C.network!=null)?C.network:s_cur_network;var F=sImgLayoutPath+D+"/"+Math.floor(C.id/1000)+"/"+C.id+".jpg";A+=gen_html(C,F,"width='"+dThumbW+"' height='"+dThumbH+"'");}else{var F=sImgPath+"/assets/layouts/"+C.code;A+=gen_html(C,F,"width='"+dThumbW+"' height='"+dThumbH+"'");}A+=(E?"":'</div><a class="previewButton" onclick="prevFull(\''+C.id+"')\">Click here to preview</a></span>");return A;}var s_context_pad=4;var s_cur_asset=null;var s_cur_asset_path=null;var s_cur_asset_name=null;var s_curCodeCopy=null;var s_scrollInterval=null;var s_scrollLast=null;function music_gen_html(B){var A="";if(B.width){A+='<div class="fwpMod" id="mod_'+B.id+'" style="width:'+B.width+";height:"+B.height+';" onmousedown="gotoAssetCategoryPage('+B.assetType+","+B.id+",'"+B.code+"');\">";A+=getFlash(sImgPath+"/assets/modules/music/"+B.code+".swf",B.width,B.height,"music_"+B.id);A+="</div>";}else{A+='<div class="fwpMod" id="mod_'+B.id+'" onmousedown="gotoAssetCategoryPage('+B.assetType+","+B.id+",'"+B.code+"');\">";A+=getFlash(sImgPath+"/assets/modules/music/"+B.code+".swf",120,100,"music_"+B.id);A+="</div>";}return A;}function gotoAssetCategoryPage(A,C,B){if(A=="12"){location.href=baseUrl+networks[cur_network]+"/Generators/Media-Skins/Music-Generator.jhtml?assetid="+C+"&to=artist&at="+B;}else{if(A=="7"){location.href=baseUrl+networks[cur_network]+"/Generators/Media-Skins/Video-Generator.jhtml?assetid="+C+"&to=artist&at="+B;}}}function returnAssetCategoryPage(A,C,B){if(A=="12"){return permBaseUrl+networks[cur_network]+"/Generators/Media-Skins/Music-Generator.jhtml?assetid="+C+"&to=artist&at="+B;}else{if(A=="7"){return permBaseUrl+networks[cur_network]+"/Generators/Media-Skins/Video-Generator.jhtml?assetid="+C+"&to=artist&at="+B;}}}function video_gen_html(B){var A="";if(B.width){A+='<div class="fwpMod" id="mod_'+B.id+'" style="width:'+B.width+";height:"+B.height+';" onmousedown="gotoAssetCategoryPage('+B.assetType+","+B.id+",'"+B.code+"');\">";A+=getFlash(sImgPath+"/assets/modules/video/"+B.code+".swf",B.width,B.height,"music_"+B.id);A+="</div>";}else{A+='<div class="fwpMod" id="mod_'+B.id+'" onmousedown="gotoAssetCategoryPage('+B.assetType+","+B.id+",'"+B.code+"');\">";A+=getFlash(sImgPath+"/assets/modules/video/"+B.code+".swf",120,100,"music_"+B.id);A+="</div>";}return A;}function pics_gen_html(B){if(B.imageType=="2"){var A='<div id="mod_'+B.id+'">';A+=getFlash(sImgPicturesPath+B.code+".swf",360,100,"pics_"+B.id);A+="</div>";return A;}else{if(B.imageType=="0"){var C=B.code;C=C.replace(".","p.");return gen_html(B,sImgPicturesPath+C);}}return null;}function generateBlendedAsset(B){var A="";switch(B.assetType){case"2":A=smiley_gen_html(B);break;case"7":B.width=295;B.height=355;A=video_gen_html(B);break;case"8":A=glitter_gen_html(B);break;case"9":A=layout_gen_html(B,true);break;case"12":B.width=295;B.height=255;A=music_gen_html(B);break;case"17":A=layout_gen_html(B,true);break;case"18":A=layout_gen_html(B,true);break;case"21":A=toys_gen_html(B);break;case"24":A=pics_gen_html(B);break;}return A;}function blended_gen_code(A,B,D){var C=dataSection;if(dataSection=="favorites"){C="";}switch(A){case"2":return smiley_gen_code(B,C);case"3":return cursor_gen_code(D);case"6":return anim_gen_code(B);case"7":return returnAssetCategoryPage(A,D,B);case"8":return glitter_gen_code(B,C);case"9":return layout_gen_code(D,"fullLayouts",A);case"12":return returnAssetCategoryPage(A,D,B);case"13":return layout_gen_code(D,"backgrounds",A);case"14":return layout_gen_code(D,"pageHeader",A);case"15":return layout_gen_code(D,"subHeader",A);case"16":return layout_gen_code(D,"moduleHeaders",A);case"17":return layout_gen_code(D,"extendedNetwork",A);case"18":return layout_gen_code(D,"contactTable",A);case"21":return toys_gen_code(B,C);case"24":return pics_gen_code(B,C);}return"";}function blended_gen_code_old(D,E,F){var C="";var A="";var B="";switch(D){case"2":s_cur_asset=E;s_cur_asset_id=F;B=s_cur_asset_id;C=smiley_gen_code(E,dataSection);break;case"8":s_cur_asset=E;s_cur_asset_id=F;B=s_cur_asset_id;C=glitter_gen_code(E,dataSection);break;case"7":case"12":gotoAssetCategoryPage(D,F,E);break;case"9":blendedLayoutCopycode(F,"fullLayouts",D);break;case"17":blendedLayoutCopycode(F,"extendedNetwork",D);break;case"18":blendedLayoutCopycode(F,"contactTable",D);break;case"21":s_cur_asset=E;s_cur_asset_id=F;B=s_cur_asset_id;C=toys_gen_code(E,dataSection);break;case"24":s_cur_asset=E;s_cur_asset_id=F;B=s_cur_asset_id;C=pics_gen_code(E,dataSection);break;}if(C!=""&&tbCheck("cc",D)){CopyCodeText(C);B=B.replace(/\//g,"-");}}function blendedLayoutPreview(A,E,C){s_cur_asset=E;var B=g(E);var F=s_cur_asset;if(!B){B=g(C);}switch(A){case"9":Data.Layout.Load(s_cur_asset);openLayoutPrev();break;case"17":s_cur_section="extendedNetwork";sectionData.Current=sectionData[s_cur_section];F=s_cur_section+"_"+F;var D=g(F);Data.Layout.LoadFromElement(F,D.src);openAssetPrev();break;case"18":s_cur_section="contactTable";sectionData.Current=sectionData[s_cur_section];F=s_cur_section+"_"+F;var D=g(F);Data.Layout.LoadFromElement(F,D.src);openAssetPrev();break;case"13":s_cur_section="backgrounds";sectionData.Current=sectionData[s_cur_section];F=s_cur_section+"_"+F;var D=g(F);Data.Layout.LoadFromElement(F,D.src);openAssetPrev();break;}}function displayBlendedLayoutCopyCode(A){CopyCodeText(Data.CurrentCSS("artist"));}function blendedLayoutCopycode(E,D,C){s_cur_asset=E;s_cur_layout_id=s_cur_asset;var B=E;s_cur_section="layouts";sectionData.Current=sectionData[D];if(D=="fullLayouts"){Data.Layout.Load(s_cur_layout_id);if(tbCheck("cc",C)){Data.Run(displayBlendedLayoutCopyCode,Data.DefaultRequires(),loadingCopyCode);}}else{s_cur_section=D;B=s_cur_section+"_"+B;sectionData.Current=sectionData[s_cur_section];var F=s_cur_section+"_"+E;var A=g(F);Data.Layout.LoadFromElement(E,A.src);if(tbCheck("cc",C)){displayBlendedLayoutCopyCode();}}B=B.replace(/\//g,"-");}function blendedSlideshowPreview(A,C){var B=pics_gen_code(A,"artist");UI_Window_Open(B,"closeOnClick",true,690,200);}function swapImg(A,B){A.src=B;}function getFlash(C,E,A,H,G,B,D){if(!G){G="";}if(!B){B="8,0,0,0";}var F="<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'"+" codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version="+B+"'"+" width='"+E+"' height='"+A+"'"+" id='"+H+"' name='"+H+"' class='"+D+"' align='middle'>"+"<param name='allowScriptAccess' value='always' />"+"<param name='movie' value='"+C+"' />"+"<param name='quality' value='high' />"+"<param name='FlashVars' value='"+G+"' />"+"<param name='WMode' value='transparent' />"+"<param name='menu' value='false' />"+"<embed src='"+C+"' quality='high' "+" width='"+E+"'"+" height='"+A+"' name='"+H+"'"+" align='middle' FlashVars='"+G+"' allowScriptAccess='always'"+" type='application/x-shockwave-flash' wmode='transparent' menu='false'"+" pluginspage='http://www.macromedia.com/go/getflashplayer' /></object>";return F;}function resetPage(){s_customCat=false;saf_code=null;saf_type=null;saf_aid=null;asset_context_close();if(s_cur_asset){if(g(s_cur_asset)){g(s_cur_asset).style.border="4px solid #fff";}s_cur_asset=null;s_cur_asset_id=null;s_cur_asset_path=null;}CopyCodeReset();}function asset_over(A){if(A.id!=s_cur_asset){if(bIsFF&&g("div_"+A.id)&&dataSection!="artist"){g("div_"+A.id).style.border="4px dashed #888888";}else{if(!(bIsFF&&A.id.charAt(0)=="F")){A.style.border=(assetType==22?"4px solid #fff":"4px dashed #888888");}}}}function asset_out(A){if(A.id!=s_cur_asset){if(bIsFF&&g("div_"+A.id)&&dataSection!="artist"){g("div_"+A.id).style.border="4px solid #fff";}else{if(!(bIsFF&&A.id.charAt(0)=="F")){A.style.border=(assetType==22?"4px solid #000":"4px solid #fff");}}}}function asset_context_close(){clearInterval(s_scrollInterval);try{g("scontext_div").style.visibility="hidden";}catch(A){}try{g("scontext_div_fav").style.visibility="hidden";}catch(A){}}function asset_click(B,J,L,K,I){if(B!=null){var C=g(B);var D=g(s_cur_asset);var M=0;var A=null;try{M=C.dc_type;}catch(H){}if(M==22){A="artist";}s_cur_asset=B;s_cur_asset_id=L;s_cur_asset_path=K;if(s_cur_asset_id==null||s_cur_asset_id=="undefined"){s_cur_asset_id=B;}saf_type=0;saf_code=B;saf_aid=s_cur_asset_id;var F=dataSection;if(I&&dataSection!="favorites"){F=assetDataMap[I];}switch(F){case"cursor":if(J){displayCopyCode(asset_gen_code(B,A));}var E=Math.floor(B.replace("a","")/500);saf_code=E+"/"+B;break;case"smiley":if(J){displayCopyCode(asset_gen_code(B,A));}if(B.charAt(0)=="F"){saf_type=2;}if(s_customCat){saf_type=1;csmiley_generate();saf_code=escape(g("csmiley_previewText").innerHTML);}break;case"gidgets":getSuccessURL();if(J){displayCopyCode(asset_gen_code(B,A));}break;case"graphics":if(J){displayCopyCode(asset_gen_code(B));}if(B.charAt(0)=="F"){saf_type=2;}break;case"layouteditor":s_cur_layout_id=s_cur_asset;Data.Layout.Load(s_cur_layout_id);if(J){Data.Run(displayLayoutCopyCode,Data.DefaultRequires(),loadingCopyCode);}break;case"layout":s_cur_layout_id=s_cur_asset;if(bDisplayFull){Data.Layout.Load(s_cur_layout_id);if(J){Data.Run(displayLayoutCopyCode,Data.DefaultRequires(),loadingCopyCode);}}else{B=s_cur_section+"_"+B;var G=g(B);Data.Layout.LoadFromElement(B,G.src);if(J){displayLayoutCopyCode();}}break;case"glitter":if(J){displayCopyCode(asset_gen_code(B,A));}break;default:if(J){displayCopyCode(blended_gen_code(I,B,L,""));}break;}}}function TransportCB(B,A){}if(!Array.prototype.unshift){Array.prototype.unshift=function(){this.reverse();for(var A=arguments.length-1;A>=0;A--){this[this.length]=arguments[A];}this.reverse();return this.length;};}if(!String.prototype.trim){String.prototype.trim=function(){return this.replace(/^\s*/,"").replace(/\s*$/,"");};}if(!String.prototype.toProperCase){String.prototype.toProperCase=function(){return this.toLowerCase().replace(/^(\w)|\s(i|(\w)(?!(he|n)?($|\s)))/g,function(A){return A.toUpperCase();});};}if(!Number.prototype.commas){Number.prototype.commas=function(){var E=this+"";var A=E.split(".");var D=A[0];var B=A.length>1?"."+A[1]:"";var C=/(\d+)(\d{3})/;while(C.test(D)){D=D.replace(C,"$1"+","+"$2");}return D+B;};}function ToJSONString(A){switch(typeof (A)){case"boolean":return String(A);break;case"date":return DateToJSONString(A);break;case"number":return NumberToJSONString(A);break;case"object":if(A.constructor==Array){return ArrayToJSONString(A);}else{return ObjectToJSONString(A);}break;case"string":return StringToJSONString(A);break;}}function ArrayToJSONString(G){var C=["["],A,E,B=G.length,D;function F(H){if(A){C.push(",");}C.push(H);A=true;}for(E=0;E<B;E+=1){D=G[E];switch(typeof D){case"undefined":case"function":case"unknown":break;case"object":if(D){F(ToJSONString(D));}else{F("null");}break;default:F(ToJSONString(D));}}C.push("]");return C.join("");}function BooleanToJSONString(){return String(this);}function DateToJSONString(B){function A(C){return C<10?"0"+C:C;}return'"'+B.getFullYear()+"-"+A(B.getMonth()+1)+"-"+A(B.getDate())+"T"+A(B.getHours())+":"+A(B.getMinutes())+":"+A(B.getSeconds())+'"';}function NumberToJSONString(A){return isFinite(A)?String(A):"null";}function ObjectToJSONString(F){var B=["{"],A,D,C;function E(G){if(A){B.push(",");}B.push(ToJSONString(D),":",G);A=true;}for(D in F){if(F.hasOwnProperty&&F.hasOwnProperty(D)){C=F[D];switch(typeof C){case"undefined":case"function":case"unknown":break;case"object":if(C){E(ToJSONString(C));}else{E("null");}break;default:E(ToJSONString(C));}}}B.push("}");return B.join("");}function StringToJSONString(B){var A={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};if(/["\\\x00-\x1f]/.test(B)){return'"'+B.replace(/([\x00-\x1f\\"])/g,function(D,C){var E=A[C];if(E){return E;}E=C.charCodeAt();return"\\u00"+Math.floor(E/16).toString(16)+(E%16).toString(16);})+'"';}return'"'+B+'"';}(function(s){var _ESCAPES=/\\["\\\/bfnrtu]/g;var _VALUES=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g;var _BRACKETS=/(?:^|:|,)(?:\s*\[)+/g;var _INVALID=/^[\],:{}\s]*$/;s.parseJSON=function(){try{if(_INVALID.test(this.replace(_ESCAPES,"@").replace(_VALUES,"]").replace(_BRACKETS,""))){return eval("("+this+")");}}catch(e){}throw new SyntaxError("parseJSON");};})(String.prototype);var Types={};Types.Value=function(){this.m_val="";this.m_val_original="";this.m_dbkey="";this.disabled=true;this.modified=false;this.Get=function(){return this.m_val;};this.Set=function(A){if(A!=""&&A!=null){A=A.Trim();}if(this.Convertor){A=this.Convertor(A);}if(A==""||A==null){return this.Disable();}if(A==this.m_val_original){this.modified=false;}else{if(this.Validator&&!this.Validator(A)){return false;}this.modified=true;}this.m_val=A;this.disabled=false;return true;};this.DbKey=function(){if(arguments.length==0){return this.m_dbkey;}else{this.m_dbkey=arguments[0];return true;}};this.v=function(){switch(arguments.length){case 0:return this.Get();break;case 1:return this.Set(arguments[0]);break;case 2:return this.Set(arguments[0],arguments[1]);break;default:return this.Get();break;}return null;};this.Disable=function(){this.m_val=null;this.disabled=true;this.modified=false;return true;};this.SetOriginal=function(B,A){if(this.Set(B)){this.m_val_original=B;this.modified=false;if(A){return A;}else{return true;}}else{if(A){return A;}else{return true;}}};this.Reset=function(){this.m_val=this.m_val_original;this.modified=false;return true;};this.isDisabled=function(){return this.disabled;};this.isModified=function(){return this.modified;};this.toString=function(){return this.Get();};};Types.CSS=function(A){var C;var B=document.createElement("span");if(!A){return ;}C=A;if(bIsIE){this.Validator=function(E){try{B.style[C]=E;return true;}catch(D){return false;}};}else{this.Validator=function(F){try{var E=B.style;E[C]=null;E[C]=F;if(E[C]==""){return false;}return true;}catch(D){return false;}};}};Types.CSS.prototype=new Types.Value();Types.Text=function(B){var A;if(!B){return ;}A=B;this.Validator=function(C){if(!C){return true;}return A.test(C);};};Types.Text.prototype=new Types.Value();Types.Number=function(){return new Types.Value();};Types.DateTime=function(){return new Types.Value();};Types.URL=function(){var A=null;var B=new Types.Text(A,true);B.GetHost=function(){return"host";};return B;};Types.Color=function(){var A=new Types.CSS("color");A.RGB=function(){};A.Red=function(){};A.Green=function(){};A.Blue=function(){};A.HSB=function(){};A.Named=function(){};return A;};Types.BackgroundColor=function(){var A=new Types.CSS("backgroundColor");A.RGB=function(){};A.Red=function(){};A.Green=function(){};A.Blue=function(){};A.HSB=function(){};A.Named=function(){};return A;};Types.BackgroundImage=function(){var A=new Types.CSS("backgroundImage");return A;};Types.Border=function(){var A=new Types.CSS("border");A.Width=new Types.CSS("borderWidth");A.Style=new Types.CSS("borderStyle");A.Color=new Types.Color();A._Set=A.Set;A.Set=function(D,B){if(!this._Set(D,B)){return ;}var C=document.createElement("span");C.style.border=D;this.Width.v(C.style.borderTopWidth);this.Style.v(C.style.borderTopStyle);this.Color.v(C.style.borderTopColor);};return A;};Types.Font=function(){this.Family=new Types.CSS("fontFamily");this.Size=new Types.CSS("fontSize");this.Weight=new Types.CSS("fontWeight");this.Style=new Types.CSS("fontStyle");this.TextDecoration=new Types.CSS("textDecoration");this.Color=new Types.CSS("color");this.Background=new Types.Background();this.TextTransform=new Types.CSS("TextTransform");};Types.Background=function(){this.Image=new Types.URL();this.Cursor=new Types.URL();this.Repeat=new Types.CSS("backgroundRepeat");this.Attachment=new Types.CSS("backgroundAttachment");this.Position=new Types.CSS("backgroundPosition");this.Color=new Types.CSS("backgroundColor");this.BorderLeftStyle=new Types.CSS("borderLeftStyle");this.BorderLeftWidth=new Types.CSS("borderLeftWidth");this.BorderLeftColor=new Types.CSS("borderLeftColor");this.BorderRightStyle=new Types.CSS("borderRightStyle");this.BorderRightWidth=new Types.CSS("borderRightWidth");this.BorderRightColor=new Types.CSS("borderRightColor");this.BorderTopStyle=new Types.CSS("borderTopStyle");this.BorderTopWidth=new Types.CSS("borderTopWidth");this.BorderTopColor=new Types.CSS("borderTopColor");this.BorderBottomStyle=new Types.CSS("borderBottomStyle");this.BorderBottomWidth=new Types.CSS("borderBottomWidth");this.BorderBottomColor=new Types.CSS("borderBottomColor");};Types.StyleElement=function(){this.Background=new Types.Background();this.Font=new Types.Font();this.Border=new Types.CSS("border");this.Opacity=new Types.Number();};Types.LinkElement=function(){this.Background=new Types.Background();this.Font=new Types.Font();this.Border=new Types.CSS("border");this.Opacity=new Types.Number();this.Hover=new Types.StyleElement();this.Visited=new Types.StyleElement();this.Active=new Types.StyleElement();};Types.PageElement=function(){this.Background=new Types.Background();this.Font=new Types.Font();this.Height=new Types.CSS("height");this.Width=new Types.CSS("width");this.Opacity=new Types.Number();this.Links=new Types.LinkElement();this.Border=new Types.CSS("border");this.BorderLeftStyle=new Types.CSS("borderLeftStyle");this.BorderLeftWidth=new Types.CSS("borderLeftWidth");this.BorderLeftColor=new Types.CSS("borderLeftColor");this.BorderRightStyle=new Types.CSS("borderRightStyle");this.BorderRightWidth=new Types.CSS("borderRightWidth");this.BorderRightColor=new Types.CSS("borderRightColor");this.BorderTopStyle=new Types.CSS("borderTopStyle");this.BorderTopWidth=new Types.CSS("borderTopWidth");this.BorderTopColor=new Types.CSS("borderTopColor");this.BorderBottomStyle=new Types.CSS("borderBottomStyle");this.BorderBottomWidth=new Types.CSS("borderBottomWidth");this.BorderBottomColor=new Types.CSS("borderBottomColor");this.Display=new Types.CSS("display");this.Hover=new Types.ImageHover();};Types.ImageHover=function(){this.Width=new Types.CSS("width");this.Height=new Types.CSS("height");this.Opacity=new Types.Number();this.BorderLeftStyle=new Types.CSS("borderLeftStyle");this.BorderLeftWidth=new Types.CSS("borderLeftWidth");this.BorderLeftColor=new Types.CSS("borderLeftColor");this.BorderRightStyle=new Types.CSS("borderRightStyle");this.BorderRightWidth=new Types.CSS("borderRightWidth");this.BorderRightColor=new Types.CSS("borderRightColor");this.BorderTopStyle=new Types.CSS("borderTopStyle");this.BorderTopWidth=new Types.CSS("borderTopWidth");this.BorderTopColor=new Types.CSS("borderTopColor");this.BorderBottomStyle=new Types.CSS("borderBottomStyle");this.BorderBottomWidth=new Types.CSS("borderBottomWidth");this.BorderBottomColor=new Types.CSS("borderBottomColor");};Types.PageElement.prototype.StreamOut=function(){var A="";for(key in this){A+=key;}return A;};function Layout(B){this.cssCache=[];var A=["Body","ContentSection","ContentSectionHeader","Header","SubHeader","Nav","MY","LJ","HI","BL","ZW","SubNav","Profile","TimeDate","Image","ContactTable","ExtendedNetwork"];var C=A.length;while(C--){this[A[C]]=new Types.PageElement();}this.keyCache={"bg_bgc":this.Body.Background.Color,"bg_bgi":this.Body.Background.Image,"bg_bgr":this.Body.Background.Repeat,"bg_bga":this.Body.Background.Attachment,"bg_bgp":this.Body.Background.Position,"cs_b":this.ContentSection.Border,"cs_bgc":this.ContentSection.Background.Color,"cs_o":this.ContentSection.Opacity,"cs_hdr_ff":this.ContentSectionHeader.Font.Family,"cs_hdr_fsz":this.ContentSectionHeader.Font.Size,"cs_hdr_fw":this.ContentSectionHeader.Font.Weight,"cs_hdr_fst":this.ContentSectionHeader.Font.Style,"cs_hdr_td":this.ContentSectionHeader.Font.TextDecoration,"cs_hdr_c":this.ContentSectionHeader.Font.Color,"cs_hdr_bgc":this.ContentSectionHeader.Background.Color,"cs_hdr_bgi":this.ContentSectionHeader.Background.Image,"cs_hdr_bgr":this.ContentSectionHeader.Background.Repeat,"cs_hdr_bga":this.ContentSectionHeader.Background.Attachment,"cs_hdr_bgp":this.ContentSectionHeader.Background.Position,"cs_hdr_b":this.ContentSectionHeader.Border,"txt_def_ff":this.Body.Font.Family,"txt_def_fsz":this.Body.Font.Size,"txt_def_fw":this.Body.Font.Weight,"txt_def_fst":this.Body.Font.Style,"txt_def_td":this.Body.Font.TextDecoration,"txt_def_c":this.Body.Font.Color,"txt_pn_ff":this.Profile.Font.Family,"txt_pn_fsz":this.Profile.Font.Size,"txt_pn_fw":this.Profile.Font.Weight,"txt_pn_fst":this.Profile.Font.Style,"txt_pn_td":this.Profile.Font.TextDecoration,"txt_pn_c":this.Profile.Font.Color,"txt_sh_ff":this.SubHeader.Font.Family,"txt_sh_fsz":this.SubHeader.Font.Size,"txt_sh_fw":this.SubHeader.Font.Weight,"txt_sh_fst":this.SubHeader.Font.Style,"txt_sh_td":this.SubHeader.Font.TextDecoration,"txt_sh_c":this.SubHeader.Font.Color,"txt_hd_ff":this.Header.Font.Family,"txt_hd_fsz":this.Header.Font.Size,"txt_hd_fw":this.Header.Font.Weight,"txt_hd_fst":this.Header.Font.Style,"txt_hd_td":this.Header.Font.TextDecoration,"txt_hd_c":this.Header.Font.Color,"txt_tad_ff":this.TimeDate.Font.Family,"txt_tad_fsz":this.TimeDate.Font.Size,"txt_tad_fw":this.TimeDate.Font.Weight,"txt_tad_fst":this.TimeDate.Font.Style,"txt_tad_td":this.TimeDate.Font.TextDecoration,"txt_tad_c":this.TimeDate.Font.Color,"lnk_def_ff":this.Body.Links.Font.Family,"lnk_def_fsz":this.Body.Links.Font.Size,"lnk_def_fw":this.Body.Links.Font.Weight,"lnk_def_fst":this.Body.Links.Font.Style,"lnk_def_td":this.Body.Links.Font.TextDecoration,"lnk_def_c":this.Body.Links.Font.Color,"lnk_def_bgc":this.Body.Links.Background.Color,"lnk_hov_ff":this.Body.Links.Hover.Font.Family,"lnk_hov_fsz":this.Body.Links.Hover.Font.Size,"lnk_hov_fw":this.Body.Links.Hover.Font.Weight,"lnk_hov_fst":this.Body.Links.Hover.Font.Style,"lnk_hov_td":this.Body.Links.Hover.Font.TextDecoration,"lnk_hov_c":this.Body.Links.Hover.Font.Color,"lnk_hov_bgc":this.Body.Links.Hover.Background.Color,"lnk_nf_def_ff":this.Nav.Links.Font.Family,"lnk_nf_def_fsz":this.Nav.Links.Font.Size,"lnk_nf_def_fw":this.Nav.Links.Font.Weight,"lnk_nf_def_fst":this.Nav.Links.Font.Style,"lnk_nf_def_td":this.Nav.Links.Font.TextDecoration,"lnk_nf_def_c":this.Nav.Links.Font.Color,"lnk_nf_def_bgc":this.Nav.Links.Background.Color,"lnk_nf_def_b":this.Nav.Links.Border,"lnk_nf_hov_ff":this.Nav.Links.Hover.Font.Family,"lnk_nf_hov_fsz":this.Nav.Links.Hover.Font.Size,"lnk_nf_hov_fw":this.Nav.Links.Hover.Font.Weight,"lnk_nf_hov_fst":this.Nav.Links.Hover.Font.Style,"lnk_nf_hov_td":this.Nav.Links.Hover.Font.TextDecoration,"lnk_nf_hov_c":this.Nav.Links.Hover.Font.Color,"lnk_nf_hov_bgc":this.Nav.Links.Hover.Background.Color,"lnk_nf_hov_b":this.Nav.Links.Hover.Border,"lnk_img_def_o":this.Nav.Links.Opacity,"lnk_img_hov_o":this.Nav.Links.Hover.Opacity,"lnk_sn_def_ff":this.SubNav.Links.Font.Family,"lnk_sn_def_fsz":this.SubNav.Links.Font.Size,"lnk_sn_def_fw":this.SubNav.Links.Font.Weight,"lnk_sn_def_fst":this.SubNav.Links.Font.Style,"lnk_sn_def_td":this.SubNav.Links.Font.TextDecoration,"lnk_sn_def_c":this.SubNav.Links.Font.Color,"lnk_sn_def_bgc":this.SubNav.Links.Background.Color,"lnk_sn_def_b":this.SubNav.Links.Border,"lnk_sn_hov_ff":this.SubNav.Links.Hover.Font.Family,"lnk_sn_hov_fsz":this.SubNav.Links.Hover.Font.Size,"lnk_sn_hov_fw":this.SubNav.Links.Hover.Font.Weight,"lnk_sn_hov_fst":this.SubNav.Links.Hover.Font.Style,"lnk_sn_hov_td":this.SubNav.Links.Hover.Font.TextDecoration,"lnk_sn_hov_c":this.SubNav.Links.Hover.Font.Color,"lnk_sn_hov_bgc":this.SubNav.Links.Hover.Background.Color,"lnk_sn_hov_b":this.SubNav.Links.Hover.Border,"ct_bgi":this.ContactTable.Background.Image,"en_bgi":this.ExtendedNetwork.Background.Image,"nv_bgc":this.Nav.Background.Color,"nv_my_bgi":this.MY.Background.Image,"nv_zw_bgi":this.ZW.Background.Image,"nv_lj_bgi":this.LJ.Background.Image,"nv_hi_bgi":this.HI.Background.Image,"nv_bl_bgi":this.BL.Background.Image,"sn_bgc":this.SubNav.Background.Color,"sn_hi_bgi":this.SubNav.Background.Image,"sn_b":this.SubNav.Border};for(key in this.keyCache){this.keyCache[key].DbKey(key);}this.PageKeys={"backgrounds":["bg_bgi","bg_bgr","bg_bga","bg_bgc","bg_bgp"],"linksDefault":["lnk_def_ff","lnk_def_fsz","lnk_def_fw","lnk_def_fst","lnk_def_td","lnk_def_c","lnk_def_bgc","lnk_hov_ff","lnk_hov_fsz","lnk_hov_fw","lnk_hov_fst","lnk_hov_td","lnk_hov_c","lnk_hov_bgc"],"linksNavFooter":["lnk_nf_def_ff","lnk_nf_def_fsz","lnk_nf_def_fw","lnk_nf_def_fst","lnk_nf_def_td","lnk_nf_def_c","lnk_nf_def_bgc","lnk_nf_def_b","lnk_nf_hov_ff","lnk_nf_hov_fsz","lnk_nf_hov_fw","lnk_nf_hov_fst","lnk_nf_hov_td","lnk_nf_hov_c","lnk_nf_hov_bgc","lnk_nf_hov_b"],"linksSubnav":["lnk_sn_def_ff","lnk_sn_def_fsz","lnk_sn_def_fw","lnk_sn_def_fst","lnk_sn_def_td","lnk_sn_def_c","lnk_sn_def_bgc","lnk_sn_def_b","lnk_sn_hov_ff","lnk_sn_hov_fsz","lnk_sn_hov_fw","lnk_sn_hov_fst","lnk_sn_hov_td","lnk_sn_hov_c","lnk_sn_hov_bgc","lnk_sn_hov_b"],"moduleColors":["cs_b","cs_o","cs_bgc"],"moduleHeaders":["cs_hdr_ff","cs_hdr_fsz","cs_hdr_fw","cs_hdr_fst","cs_hdr_td","cs_hdr_c","cs_hdr_bgr","cs_hdr_bga","cs_hdr_bgc","cs_hdr_bgp","cs_hdr_b"],"textOptions":["txt_pn_ff","txt_pn_fsz","txt_pn_fw","txt_pn_fst","txt_pn_td","txt_pn_c","txt_def_ff","txt_def_fsz","txt_def_fw","txt_def_fst","txt_def_td","txt_def_c","txt_hd_ff","txt_hd_fsz","txt_hd_fw","txt_hd_fst","txt_hd_td","txt_hd_c","txt_sh_ff","txt_sh_fsz","txt_sh_fw","txt_sh_fst","txt_sh_td","txt_sh_c","txt_tad_ff","txt_tad_fsz","txt_tad_fw","txt_tad_fst","txt_tad_td","txt_tad_c"],"textOptions_hi":["txt_def_ff","txt_def_fsz","txt_def_fw","txt_def_fst","txt_def_td","txt_def_c","txt_hd_ff","txt_hd_fsz","txt_hd_fw","txt_hd_fst","txt_hd_td","txt_hd_c","txt_sh_ff","txt_sh_fsz","txt_sh_fw","txt_sh_fst","txt_sh_td","txt_sh_c","txt_tad_ff","txt_tad_fsz","txt_tad_fw","txt_tad_fst","txt_tad_td","txt_tad_c"],"textOptions_zw":["txt_def_ff","txt_def_fsz","txt_def_fw","txt_def_fst","txt_def_td","txt_def_c","txt_hd_ff","txt_hd_fsz","txt_hd_fw","txt_hd_fst","txt_hd_td","txt_hd_c"],"contactTable":["ct_bgi"],"extendedNetwork":["en_bgi"]};this.PageObjects={"backgrounds":["Body.Background"],"linksDefault":["Body.Links"],"linksNavFooter":["Nav"],"linksSubnav":["SubNav"],"moduleColors":["ContentSection"],"moduleHeaders":["ContentSectionHeader"],"textOptions":["Profile","Body.Font","Header","SubHeader","TimeDate"],"textOptions_hi":["Body.Font","Header","SubHeader","TimeDate"],"textOptions_zw":["Body.Font","Header"],"contactTable":["ContactTable"],"extendedNetwork":["ExtendedNetwork"]};if(B){this.StreamIn(B);}}Layout.prototype.isModified=function(D){var A=false;var C=this.PageKeys[D];var B=C.length;while(B--){A=A||this.keyCache[C[B]].isModified();}return A;};Layout.prototype.UpdateStatusBar=function(){for(key in this.PageKeys){var A=g("ls_"+key);if(!A){continue;}if(this.isModified(key)){A.innerHTML="1";A.className="ls_yellow";}else{A.innerHTML="0";A.className="ls_red";}}};Layout.prototype.v=function(){var B=arguments[0];if(arguments.length==1){if(!this.keyCache[B]){return null;}return this.keyCache[B].v();}else{if(!this.keyCache[B]){return false;}var A=this.keyCache[B].v(arguments[1]);if(A){this.cssCache=[];this.UpdateStatusBar();}return A;}};Layout.prototype.Dispose=function(){for(key in this.keyCache){this.keyCache[key]=null;}this.keyCache=null;};Layout.prototype.StreamIn=function(B){this.cssCache=[];if(!B){return false;}var D;var F=createXMLDoc(B);if(F){if(F.firstChild.nodeName=="layout"){D=F.firstChild;}if(F.childNodes[1]&&F.childNodes[1].nodeName=="layout"){D=F.childNodes[1];}}if(!D){return false;}var A=D.attributes;var C=A.length;while(C--){try{this.keyCache[A.item(C).nodeName].SetOriginal(A.item(C).nodeValue);}catch(E){}}return true;};Layout.prototype.PopulateCSS=function(bAddTag,pageName){if(bAddTag==null){bAddTag=true;}var template=Data.CSS.Current;if(cur_network=="myspace"){if(s_cur_layout_id.indexOf("UG")!=-1){template=Data.CSS.Cache["my_v2"];}else{template=Data.CSS.Cache["my"];}}if(!bDisplayFull&&pageName){template=this.SplitCSS(template,pageName);}var blocks=[];var pieces=template.split("/*");var returnCSS="";var ndxPieces=pieces.length;while(ndxPieces--){var a=pieces[ndxPieces].split("*/");if(a.length<2){blocks.push(a[0]);}else{if(a[0].Trim()=="DEFAULT"){returnCSS+=a[1];}else{blocks.push(a[1]);}}}var curCSS,matches;var n,m;var changed;var re=/@[A-Z\.]+@/igm;var ndxBlocks=blocks.length;while(ndxBlocks--){changed=true;curCSS=blocks[ndxBlocks];matches=curCSS.match(re);if(!matches){continue;}var i=matches.length;while(i--){try{n=matches[i];m=matches[i].substring(1,n.length-1);v=eval("this."+m);if(!v.isDisabled()){curCSS=curCSS.replace(n,v);changed=true;}}catch(e){}}if(changed){returnCSS+=curCSS;}}returnCSS=returnCSS.replace(/\/\*[A-Z \.]*\*\//ig,"");returnCSS=returnCSS.replace(/[a-z-]+[^;{]+@[A-Za-z\.]+@[^;]*;/g,"");returnCSS=returnCSS.replace(/opacity:0\.100/g,"opacity:1.0");returnCSS=returnCSS.replace("http://ak.webfetti.com/assets/layouts/http","http");returnCSS="/* Webfetti Layout Begins Here */"+returnCSS+"/* Webfetti Layout Ends Here */";if(bAddTag){return"<style>"+returnCSS+"</style>";}else{return returnCSS;}};Layout.prototype.PopulateCSSFromTemplate=function(template,bAddTag){if(bAddTag==null){bAddTag=true;}var blocks=[];var pieces=template.split("/*");var returnCSS="";var ndxPieces=pieces.length;while(ndxPieces--){var a=pieces[ndxPieces].split("*/");if(a.length<2){blocks.push(a[0]);}else{if(a[0].Trim()=="DEFAULT"){returnCSS+=a[1];}else{blocks.push(a[1]);}}}var curCSS,matches;var n,m;var changed;var re=/@[A-Z\.]+@/igm;var ndxBlocks=blocks.length;while(ndxBlocks--){changed=true;curCSS=blocks[ndxBlocks];matches=curCSS.match(re);if(!matches){continue;}var i=matches.length;while(i--){try{n=matches[i];m=matches[i].substring(1,n.length-1);v=eval("this."+m);if(!v.isDisabled()){curCSS=curCSS.replace(n,v);changed=true;}}catch(e){}}if(changed){returnCSS+=curCSS;}}returnCSS=returnCSS.replace(/\/\*[A-Z \.]*\*\//ig,"");returnCSS=returnCSS.replace(/[a-z-]+[^;{]+@[A-Za-z\.]+@[^;]*;/g,"");returnCSS=returnCSS.replace(/opacity:0\.100/g,"opacity:1.0");returnCSS=returnCSS.replace("http://ak.webfetti.com/assets/layouts/http","http");returnCSS="/* Webfetti Layout Begins Here */"+returnCSS+"/* Webfetti Layout Ends Here */";if(bAddTag){return"<style>"+returnCSS+"</style>";}else{return returnCSS;}};Layout.prototype.SplitCSS=function(H,A){var C=this.PageObjects[A];if(!C){return"";}var G=[];var F=H.split("/*");for(var D=1;D<F.length;D++){var B=F[D].split("*/");G[B[0].Trim()]=B[1];}var E="";E+=G["DEFAULT"]+"\r\n";for(D=0;D<C.length;D++){E+=G[C[D]]+"\r\n";}return E;};var bShowPreview=true;var bLivePreview=true;var aKeysToProps=[];var aKeys=[];var sCurrentSection="";var aSubSections=[];var iCPcoordX=0;var iCPcoordY=0;aKeysToProps["bgc"]="backgroundColor";aKeysToProps["bgi"]="background";aKeysToProps["bgi"]="backgroundImage";aKeysToProps["bgr"]="backgroundRepeat";aKeysToProps["bga"]="backgroundAttachment";aKeysToProps["bgp"]="backgroundPosition";aKeysToProps["b"]="border";aKeysToProps["o"]="opacity";aKeysToProps["ff"]="fontFamily";aKeysToProps["fsz"]="fontSize";aKeysToProps["fw"]="fontWeight";aKeysToProps["fst"]="fontStyle";aKeysToProps["td"]="textDecoration";aKeysToProps["c"]="color";aKeysToProps["bls"]="borderLeftStyle";aKeysToProps["blw"]="borderLeftWidth";aKeysToProps["blc"]="borderLeftColor";aKeysToProps["brs"]="borderRightStyle";aKeysToProps["brw"]="borderRightWidth";aKeysToProps["brc"]="borderRightColor";aKeysToProps["bts"]="borderTopStyle";aKeysToProps["btw"]="borderTopWidth";aKeysToProps["btc"]="borderTopColor";aKeysToProps["bbs"]="borderBottomStyle";aKeysToProps["bbw"]="borderBottomWidth";aKeysToProps["bbc"]="borderBottomColor";aKeysToProps["d"]="display";aKeysToProps["w"]="width";aKeysToProps["h"]="height";aKeysToProps["tt"]="textTransform";aKeysToProps["cur"]="cursor";aKeys["bg"]="bgc,bgi,bgr,bga,bgp";var aBorders=["top","bottom","left","right"];var aContentSections=["nb","pi","ct","en","ur","in","de","sc","co","fs","be","sm","ne","bl","ap","fc"];var aFontSections=["pn","st","hd","sh","la","def","nu","url","tad"];var aLinkSections=["nf","def","p"];var aImageSections=["pp","tf","cf"];var aPositions=new Array("top left","top center","top right","left","center","right","bottom left","bottom center","bottom right");function getPosIdx(A){for(var B=0;B<aPositions.length;B++){if(aPositions[B]==A){return B;}}return 0;}function togglePos(C){var B=C.id.substr(C.id.lastIndexOf("_")+1);var D=C.id.substr(0,C.id.lastIndexOf("_"));var A=g(D+"-selected");var E=g(D+"_"+A.value.toString());C.className="posit_selected";E.className="posit";A.value=B;g(D).value=aPositions[B];s_cur_layout.v(D,aPositions[B]);}function setPosition(B,C){var E=getPosIdx(C);var A=g(B+"-selected");var D=g(B+"_"+E);D.className="posit_selected";A.value=E;}var sColorField="";var bSetField=false;var bCPvisible=false;function showColorPicker(D,C,B,F){if(!bCPvisible){bCPvisible=true;}else{bCPvisible=false;}var A,E;if(!window.ActiveXObject){A=D.pageX;E=D.pageY;}else{A=D.clientX;E=D.clientY;}if(C==null){return false;}if(C.innerHTML==""){C.innerHTML=getColorPickerHTML(F);}toggleDisplay(C);sColorField=B;bSetField=true;if(bCPvisible){showHideSelect(true,A,E);}else{showHideSelect(false,A,E);}return true;}function setColor(B){var C=(B.charAt(0)!="#")?"#"+B:B;var D="colorMenu_"+sColorField;var A=hex2rgb(C);g(sColorField).value=C;setColorPicker(sColorField,C);updateLayout(g(sColorField));}function setColorPicker(A,B){var C="colorMenu_"+A;g(C).style.backgroundColor=B;}var aFields=[];var oLayoutForm=null;function layoutFormLoaded(){oLayoutForm=g("layout_form");if(oLayoutForm==null){return ;}aFields=oLayoutForm.elements;}function layoutFormFill(){if(oLayoutForm==null){return ;}sCurrentSection="";aSubSections=[];var I="";for(var P=0;P<aFields.length;P++){var A=aFields[P].name;var R=A.substr(0,A.lastIndexOf("_"));var E=A.split("-")[0].substr(A.lastIndexOf("_")+1);if(sCurrentSection==""){sCurrentSection=A.substr(0,A.indexOf("_"));}if(R!=I){aSubSections[aSubSections.length]=R;I=R;}var H="";if(A.indexOf("-")>-1){var G=A.substr(0,A.indexOf("-"));var K=A.substr(A.lastIndexOf("-")+1);var F=s_cur_layout.v(G);showLivePreview(G,F);if(E=="b"&&F!=null){var B=F.split(" ",3);switch(K){case"width":H=(typeof (B[0])=="string")?B[0]:"";break;case"style":H=(typeof (B[1])=="string")?B[1]:"";break;case"color":H=(typeof (B[2])=="string")?B[2]:"";break;}}else{if(E=="bgp"&&K=="selected"){H=getPosIdx(F);}else{if(E=="bgi"){var Q=g(G+"-image");if(Q!=null){Q.src="http://ak.webfetti.com/assets/layouts/g/001_bkgd.jpg";}}}}}else{H=s_cur_layout.v(A);showLivePreview(A,H);}if(H==null||H=="undefined"){H="";}if(H.toString().indexOf("rgb")>-1){var D=rgb2hex(H);H="#"+D;}if(E=="fsz"){var L=getValueUnits(H);H=L[0];var O=L[1];setFieldValue(A+"-unit",O,"select");}if(E=="bgi"){if(H==""){g("use_"+sCurrentSection+"_bgi").checked=false;g("use_"+sCurrentSection+"_bgi").disabled=true;}else{g("use_"+sCurrentSection+"_bgi").checked=true;g("use_"+sCurrentSection+"_bgi").disabled=false;g("lc_"+sCurrentSection+"_preview").style.visibility="visible";g("lc_"+sCurrentSection+"_preview").parentNode.style.display="block";}}var C=getFieldType(oLayoutForm.elements[A]);setFieldValue(A,H,C);setFieldEvent(A,C,updateLayout);if(A.substr(A.lastIndexOf("_")+1)=="bgp"){setPosition(A,H);}}if(sCurrentSection=="txt"||sCurrentSection=="lnk"){var J="cs_o,cs_b,cs_bgc".split(",");for(var P=0;P<J.length;P++){for(var N=0;N<aSubSections.length;N++){var M=s_cur_layout.v(J[P]);showLivePreview(aSubSections[N]+J[P].substr(J[P].lastIndexOf("_")),M);}}}else{if(sCurrentSection+"_hdr"=="cs_hdr"){var J="cs_hdr_o,cs_hdr_b,cs_hdr_bgc".split(",");for(var P=0;P<J.length;P++){for(var N=0;N<aSubSections.length;N++){var M=s_cur_layout.v(J[P]);showLivePreview(aSubSections[N]+J[P].substr(J[P].lastIndexOf("_")),M);}}}}updateCSScode();setImgPreview();}function setFieldValue(C,I,A){var F=C.substr(C.lastIndexOf("_")+1);var J=(F=="ff");var E=(F=="c"||F=="bgc"||F=="b-color");var H=oLayoutForm.elements[C];if(H==null||H=="undefined"){return ;}if(A=="select"){var B=H.options;if(B=="undefined"||B==null){return ;}for(var D=0;D<B.length;D++){var K=(J)?escape(I.split(",")[0]):I;var G=(J)?B[D].value.split(",")[0]:B[D].value;if(G==K){oLayoutForm.elements[C].options[D].selected=true;}else{oLayoutForm.elements[C].options[D].selected=false;}}}else{H.value=I;}if(E){sColorField=C;setColorPicker(C,I);}}function setFieldEvent(B,D,C){var A=oLayoutForm.elements[B];if(D=="select"||D=="hidden"){addEvent(A,"change",C);return ;}else{if(D=="text"){addEvent(A,"blur",C);return ;}else{return ;}}}function getFieldType(B){var C="";if(!B.tagName){return"";}var A=B.tagName.toLowerCase();if(A=="select"){C=A;}else{if(A=="textarea"){C=A;}else{if(A=="input"){C=B.getAttribute("type").toLowerCase();}else{C="text";}}}return C;}function getValueUnits(B){var A=[];A[0]=B.substr(0,B.length-2);A[1]=B.substr(B.length-2);return A;}function updateLayout(C){bShowPreview=true;if(!bIsIE&&this.name!=""){C=this;}var L=C.name;var B="";var E="";var K="";var F=getFieldType(C);if(F=="select"){B=C.options[C.selectedIndex].value;}else{if(F=="text"||F=="hidden"){B=C.value;}}E=L.substr(L.lastIndexOf("_")+1);K=L.substr(0,L.lastIndexOf("_"));hideInputError(L);if(E=="fsz-unit"||E=="fsz"){var H=updateUnits(L);var J=(L.indexOf("-")>-1)?L.substr(0,L.lastIndexOf("-")):L;if(H){var G=s_cur_layout.v(J,H);if(!G){displayInputError("please enter a valid value for this property",J);}else{showLivePreview(J,H);}}}else{if(L.indexOf("-")>-1){var I=L.substr(0,L.indexOf("-"));var D=L.substr(L.lastIndexOf("-")+1);var A=I.substr(I.lastIndexOf("_")+1);E=A;if(A=="b"){var H=updateBorder(I);if(H){s_cur_layout.v(I,H);if(bLivePreview){if(L.substr(0,L.indexOf("_"))=="lnk"&&A=="bgc"){showLivePreview(I,H,true);}else{showLivePreview(I,H);}}}}}else{var G=s_cur_layout.v(L,unescape(B));if(!G){displayInputError("please enter a valid value for this property",L);}else{if(bLivePreview){if(L.substr(0,L.indexOf("_"))=="lnk"&&L.substr(L.lastIndexOf("_")+1)=="bgc"){showLivePreview(L,unescape(B),true);}else{showLivePreview(L,unescape(B));}}}}}updateCSScode();}function updateUnits(A){if(A.indexOf("-")>-1){A=A.substr(0,A.lastIndexOf("-"));}var C=0;var B="px";C=g(A).value;B=g(A+"-unit").options[g(A+"-unit").selectedIndex].value;return C+B;}function updateBorder(C){var G="";var B="";var E="px";var A="";var D="";var I=g(C+"-width");var H=g(C+"-style");B=getSize(I.value)[0];A=H.options[H.selectedIndex].value;D=g(C+"-color").value;if(B==null||A==null||D==null){return false;}if(B==""||B==0){return"";}else{if(B>0&&A.length<1){displayInputError("please select a border style",C+"-style");return false;}else{if(B>0&&D.length<1){displayInputError("please select a border color",C+"-color");return false;}else{hideInputError(C+"-width");hideInputError(C+"-style");hideInputError(C+"-color");var F=hex2rgb(D);return B+E+" "+A+" "+F;}}}}function updateCSScode(){var B=s_cur_layout.PopulateCSS(true,s_cur_section);var A=g("layout_section_css_code");if(A==null||B==null||B=="undefined"){return ;}A.value=B;}function setImgPreview(){var C=g("lc_"+sCurrentSection+"_preview");if(C==null){return ;}var B=(sCurrentSection=="nv")?"nv_"+s_cur_network+"_bgi":"bg_bgi";if(sCurrentSection=="ct"||sCurrentSection=="en"){B=sCurrentSection+"_bgi";}var A=s_cur_layout.v(B);if(A==false){return ;}if(C.tagName.toLowerCase()=="img"){C.src="http://ak.webfetti.com/assets/layouts/"+A;}else{C.style.backgroundImage="url(http://ak.webfetti.com/assets/layouts/"+A+")";}}function showLivePreview(E,B,A){if(A==null){A=false;}if(B==null){B="";}var F=E.split("_");var D="";var H="";var G=null;H=F[0];D=F[F.length-1];for(var C=1;C<F.length-1;C++){H+="_"+F[C];}G=g(H+"-preview");if(G==null){return ;}if(D.toLowerCase()=="o"){if(B==""){B="100";}G.style["filter"]="alpha(opacity="+B+")";G.style["opacity"]=(B/100);G.style["-moz-opacity"]=(B/100);}else{if(F[0]=="lnk"&&A&&D=="bgc"){G.firstChild.style[aKeysToProps[D]]=B;}else{G.style[aKeysToProps[D]]=B;}}}function getOptions(E){var B=[];if(E=="bg"){B="bgc,bgi,bgr,bga,bgp".split(",");}for(var C=0;C<B.length;C++){var D="bg_"+B[C];var A=s_cur_layout.v(D);showLivePreview(D,A);}}function getSize(C){var B=C.toString().replace(/\s/,"");if(B.search(/\D/)==-1){return new Array(C,"");}var D=/(\d*)(\w*)/;var A=D.exec(B);if(A[2]==null){return new Array(A[1],"px");}else{return new Array(A[1],A[2]);}}function validateInput(A,C){var B=A.substr(sField.lastIndexOf("_")+1);if(B==""){return false;}return true;}function displayInputError(C,B){bShowPreview=false;var A=g("error_"+B);if(A==null){alert("INPUT ERROR: "+C);return ;}highlightField(B);A.innerHTML=C;A.style.display="block";}function hideInputError(B){var A=g("error_"+B);if(A==null){return ;}if(A.style.display=="none"){return ;}highlightField(B,true);A.innerHTML="";A.style.display="none";}function highlightField(E,F){if(F==null){F=false;}var G="#FFFCA2";var D="#FF0000";var A="#FFFFFF";var C="#AAAAAA";var B=g(E);if(B==null){return ;}if(F){B.style.backgroundColor=A;B.style.borderColor=C;}else{B.style.backgroundColor=G;B.style.borderColor=D;}}function rgb2hex(E){var F="";var D=/\s/;var G=/(\d*)\,(\d*)\,(\d*)/ig;D.lastIndex=0;G.lastIndex=0;var B=E.toString().replace(D,"");var A=G.exec(B.toString());if(A==null){return null;}for(var C=1;C<A.length;C++){F+=dec2hex(A[C]);}return F;}function dec2hex(A){var E=new Array("0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F");var D=Math.floor(A/16);var C=A-D*16;var B=E[D];B+=E[C];return(B);}function hex2rgb(F){var E="";var D=(F.charAt(0)=="#")?F.substr(1):F;var C=0;var B=0;var A=0;if(D.length==3){C=parseInt("0"+D[0],16);B=parseInt("0"+D[1],16);A=parseInt("0"+D[2],16);}else{if(D.length==6){C=parseInt(D.substr(0,2),16);B=parseInt(D.substr(2,2),16);A=parseInt(D.substr(4,2),16);}}E="rgb("+C+","+B+","+A+")";return E;}function showHide(D,C,B,F){var A,E;if(!window.ActiveXObject){A=D.pageX;E=D.pageY;}else{A=D.clientX;E=D.clientY;}iCPcoordX=A;iCPcoordY=E;return ;if(style.display=="none"){showHideSelect(1,A,E);style.display="block";style.top=A+10;style.left=E+10;}else{showHideSelect(0,A,E);style.display="none";}}function showHideSelect(C,A,H){var D=document.getElementsByTagName("select");if(C){for(var B=0;B<D.length;B++){var E=getOffsets(D[B]);var G=E.split(",")[0];var F=E.split(",")[1];if(G<H){}else{if(((F+D[B].offsetWidth)>A)&&(F<A+200)&&((G+D[B].offsetHeight)>H)&&(G<H+200)){D[B].style.visibility="hidden";}}}}else{for(var B=0;B<D.length;B++){D[B].style.visibility="visible";}}}function getOffsets(B){var A=0;var C=0;var D=B.parentNode;while(B){A+=B.offsetTop+B.scrollTop;C+=B.offsetLeft;B=B.offsetParent;}return(A+","+C);}function toggleUseImg(B){var C=B.name;C=C.replace(/use_/i,"");if(!B.checked){if(sCurrentSection=="bg"||sCurrentSection=="cs"){var A=sCurrentSection+"_bgi";oLayoutForm.elements[A].value="";s_cur_layout.v(A,"");A=sCurrentSection+"_bgr";oLayoutForm.elements[A].selectedIndex=0;s_cur_layout.v(A,"");A=sCurrentSection+"_bga";oLayoutForm.elements[A].selectedIndex=0;s_cur_layout.v(A,"");A=sCurrentSection+"_bgp";s_cur_layout.v(A,"");}else{if(sCurrentSection=="nv"){var A="nv_"+s_cur_network+"_bgi";oLayoutForm.elements[A].value="";s_cur_layout.v(A,"");}}B.disabled=true;}}function Img(G,D,B,F,C,A,E,H){this.src=G;this.width=D;this.height=B;this.alt=F;this.id=AUTOINCR_ID++;this.type=C;this.category=E;if(typeof (H)!=undefined){this.domId=H;}this.attributes=A;return this;}Img.prototype.Area=function(){return this.width*this.height;};Img.prototype.GetCopyCode=function(A){var B="";if(this.type=="image"||this.type=="background"){B+="<img src='"+this.src+"' width='"+this.width+"' height='"+this.height+"' />";}else{if(this.type=="embed"){B+="<embed ";for(var C in this.attributes){if(C=="width"){B+='width="'+this.width+'" ';}else{if(C=="height"){B+='height="'+this.height+'" ';}else{B+=C+'="'+this.attributes[C]+'" ';}}}B+="/>";}}return B;};Img.prototype.Loaded=function(A,C){var B=g("g_"+this.id);if(A==null||C==null){if(g("g_"+this.id)){g("g_"+this.id).removeNode(true);}}else{this.width=A;this.height=C;if(B){B.innerHTML=this.Thumbnail(THUMB_WIDTH,THUMB_HEIGHT,false);}}};Img.prototype.Thumbnail=function(D,I,G){var E="";var H=this.height;var B=this.width;if(H>I){H=I;var A=I/this.height;B=Math.floor(B*A);}if(B>D){var C=B;B=D;var A=D/C;H=Math.floor(H*A);}E+=(G?"<div id='"+(this.domId?this.domId:"g_"+this.id)+"' class='gasset' onmouseover='grabber_over(this)' onmouseout='grabber_out(this)' onclick='grabber_click(this.id,true)' oncontextmenu='grabber_click(this.id,true);grabber_context(this);'>":"");if(this.type=="image"||this.type=="background"){if(GrabThumbnailMode=="stretch"){E+="<img src='"+this.src+"' width="+THUMB_WIDTH+" height="+THUMB_HEIGHT+" />";}else{E+="<img src='"+this.src+"' "+(this.width!=null?"width='"+B+"'":"")+(this.height!=null?"height='"+H+"'":"")+" />";}}else{if(this.type=="embed"){E+="<embed ";for(var F in this.attributes){if(F=="width"){E+='width="'+this.width+'" ';}else{if(F=="height"){E+='height="'+this.height+'" ';}else{E+=F+'="'+this.attributes[F]+'" ';}}}E+="/>";}}E+=(G?"</div>":"");return E;};function DataObject(){this.Current=null;this.CurrentId=null;this.Cache=[];this.GetUrl=function(A){return A;};this.EmptyCache=function(A){if(A){for(key in this.Cache){if(key.indexOf(A)==0){this.Cache[key]=null;}}}else{for(key in this.Cache){this.Cache[key]=null;}}};this.SetCurrentFromCache=function(A){this.CurrentId=A;this.Current=this.Cache[A];this.onSetCurrent();};this.SetCurrentFromLoad=function(B){this.SetCurrentLoading(B);var A=this;makeRequest(this.GetUrl(B),function(C){A.SaveHttp(C,A,B);});};this.SetCurrentLoading=function(A){this.CurrentId=A;this.Cache[A]=-1;this.Current=null;};this.isLoaded=function(A){if(A===undefined){return(this.Cache[this.CurrentId]!=null&&this.Cache[this.CurrentId]!=-1);}else{return(this.Cache[A]!=null&&this.Cache[A]!=-1);}};this.isLoading=function(A){return(this.Cache[A]==-1);};this.Load=function(A){if(A==null){return ;}if(this.isLoaded(A)&&dataSection!="artist"){this.SetCurrentFromCache(A);}else{this.SetCurrentFromLoad(A);}};this.LoadFromElement=function(B,A){if(B==null){return ;}if(this.isLoaded(B)){this.SetCurrentFromCache(B);}else{this.SetCurrentFromElement(B,A);}};this.onIdLoaded=function(A){if(this.CurrentId==A){this.SetCurrentFromCache(A);}};this.onSetCurrent=function(){};this.SaveHttp=function(D,A,C){if(D.readyState!=4){return ;}var B="";if(D.status==200){B=D.responseText;}A.Save(C,B);A.onIdLoaded(C);};this.Save=function(B,A){this.Cache[B]=A;};}var Data={Layout:new DataObject(),LayoutXml:new DataObject(),CSS:new DataObject(),HTML:new DataObject(),Run:function(I,J,H){var F=null;if(H==null){H=function(){};}if(typeof (H)=="function"){F=H();}var G=true;var E=J.length;while(E--){var A=J[E][0];var B=J[E][1];var D=A.isLoaded(B);G=G&&D;if(!D&&!A.isLoading(B)){A.Load(B);}}if(G){I();}else{var C=this;setTimeout(function(){C.Run(I,J,F);},1000);}},Requires:function(C,B,D){var A=[];if(C){A.push([Data.CSS,C]);}if(B){A.push([Data.HTML,B]);}if(D){A.push([Data.LayoutXml,D]);}return A;},DefaultRequires:function(){return this.Requires(s_cur_network,s_cur_network,s_cur_asset);},CurrentPreview:function(){if(this.Layout.isLoaded()){var A="";var B="";if(this.HTML.Current.Pre){A=this.HTML.Current.Pre;}if(this.HTML.Current.Post){B=this.HTML.Current.Post;}if(cur_network=="twitter"){return A+getTwitterBackground()+B;}else{return A+this.Layout.Current.PopulateCSS()+B;}}else{return"";}},CurrentCSS:function(A){var B="";var C=true;if(this.Layout.isLoaded()){if(s_cur_network=="eb"){B='<p id="WF_EBdescription" style="width:100%;">Click here to enter the description of the item you are selling<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br></p>';}if(s_cur_network=="my2"){C=false;return this.Layout.Current.PopulateCSS(C)+getTrackingHTML((A?A:"layout"),cur_network,null,this.Layout.CurrentId,true,"css");}else{return B+this.Layout.Current.PopulateCSS(C)+getTrackingHTML((A?A:"layout"),cur_network,null,this.Layout.CurrentId,true);}}else{return null;}}};Data.HTML.htmlSplit="<!-- ADD CSS HERE -->";Data.Layout.LoadBlank=function(){this.Cache[0]=new Layout();this.SetCurrentFromCache(0);};Data.Layout.SetCurrentFromLoad=function(A){if(Data.LayoutXml.isLoaded(A)){if((typeof (A)=="string"&&A.indexOf("UG")!=-1)||dataSection=="layouteditor"||network=="myspace2"){this.Cache[A]=new CustomLayout(Data.LayoutXml.Cache[A]);}else{this.Cache[A]=new Layout(Data.LayoutXml.Cache[A]);}this.SetCurrentFromCache(A);}else{this.SetCurrentLoading(A);Data.LayoutXml.Load(A);}};Data.Layout.SetCurrentFromElement=function(D,C){var B=sectionData.Current.xmlkey;var A="<?xml version='1.0' encoding='UTF-8'?><layout "+B+"_bgi='"+C+"' "+B+"_bgr='repeat' "+B+"_bgp='left top' "+B+"_bga='scroll' "+B+"_bgc='transparent' />";this.Cache[D]=new Layout(A);this.SetCurrentFromCache(D);};Data.Layout.onSetCurrent=function(){s_cur_layout=this.Current;};Data.LayoutXml.onSetCurrent=function(){Data.Layout.Load(this.CurrentId);};Data.CSS.Save=function(B,A){this.Cache[B]=A.replace(/\r|\n/gm,"");};Data.HTML.Save=function(C,B){var A=B.split(this.htmlSplit);this.Cache[C]={Pre:A[0],Post:A[1]};};Data.LayoutXml.Save=function(B){var A=jQuery("input#layoutXML_"+B).attr("value");if(A){this.Cache[B]=A.replace(/\r|\n/gm,"");}else{this.Cache[B]="";}this.SetCurrentFromCache(B);};Data.CSS.GetUrl=function(A){return contextPath+"common/css/template/"+A+".css";};Data.HTML.GetUrl=function(A){return contextPath+"common/htm/template/"+A+".html";};Data.LayoutXml.GetUrl=function(D){var B=false;var C=jQuery("input#assetPath_"+D).attr("value");var A=jQuery("input#layoutName_"+D).attr("value");if(document.location.href.indexOf("refName")!=-1){B=true;}if(B){return contextPath+"MySpace/Layouts/Layout-Editor.jhtml?refName="+A+"&viewName=util/layoutXML";}else{return contextPath+"asset"+C+".jhtml?viewName=util/layoutXML";}};Data.LayoutXml.SetCurrentFromLoad=function(A){this.SetCurrentLoading(A);this.Save(A);};function loadingPreviewWindow(){if(network=="twitter"){winPreview=window.open(contextPath+"common/htm/loader.htm","winPreview","scrollbars=yes,location=no,toolbars=no,width=1080,height=800");}else{winPreview=window.open(contextPath+"common/htm/loader.htm","winPreview","scrollbars=yes,location=no,toolbars=no,width=820,height=600");}winPreview.document.open();winPreview.document.write(HTML_LOADING);winPreview.document.close();winPreview.focus();}function openLayoutPrev(){Data.Run(layout_preview_display,Data.DefaultRequires(),loadingPreviewWindow);}function openAssetPrev(){Data.Run(layout_preview_display,Data.Requires(s_cur_network,s_cur_network),loadingPreviewWindow);}function layout_preview_display(){try{winPreview.document.open();winPreview.document.write(Data.CurrentPreview());winPreview.document.close();winPreview.focus();}catch(A){}}function displayLayoutCopyCode(){var A=Data.CurrentCSS();if(A){displayCopyCode(A);}CopyCode("txt_copy_code");}function loadingContent(){g("asset_content").innerHTML=HTML_LOADING;}function loadingCopyCode(){setCopyCode("Loading Code...");}function prevFull(B){if(B){if(cur_network=="twitter"){asset_click(B,false);}else{asset_click(B,true);}}if(s_cur_section=="fullLayouts"){var A=B;openLayoutPrev();}else{var A=s_cur_section+"_"+B;openAssetPrev();}}function getTwitterBackground(){var A="http://ak.webfetti.com/assets/layouts/"+$("#assetUrl_"+s_cur_asset_id).val();return"<style>body{background-image:url("+A+");</style>";}Data.Layout.LoadCustomBlank=function(){this.Cache[0]=new CustomLayout();this.SetCurrentFromCache(0);};function CustomLayout(B){this.cssCache=[];var A=["Body","ContentSection","ContentSectionProfileInfo","ContentSectionContactTable","ContentSectionExtendedNetwork","ContentSectionURL","ContentSectionInterests","ContentSectionDetails","ContentSectionSchools","ContentSectionCompanies","ContentSectionFriendSpace","ContentSectionBlogs","ContentSectionNetworking","ContentSectionBlurbs","ContentSectionApplications","ContentSectionComments","Header","SubHeader","NavFooter","People","Profile","TimeDate","Status","Label","Number","YourUrl","Image","ImageProfilePicture","ImageTopFriends","ImageCommentFriends"];var C=A.length;while(C--){this[A[C]]=new Types.PageElement();}this.keyCache={"bg_bgc":this.Body.Background.Color,"bg_bgi":this.Body.Background.Image,"bg_bgr":this.Body.Background.Repeat,"bg_bga":this.Body.Background.Attachment,"bg_bgp":this.Body.Background.Position,"bg_cur":this.Body.Background.Cursor,"bg_bls":this.Body.Background.BorderLeftStyle,"bg_blw":this.Body.Background.BorderLeftWidth,"bg_blc":this.Body.Background.BorderLeftColor,"bg_brs":this.Body.Background.BorderRightStyle,"bg_brw":this.Body.Background.BorderRightWidth,"bg_brc":this.Body.Background.BorderRightColor,"bg_bts":this.Body.Background.BorderTopStyle,"bg_btw":this.Body.Background.BorderTopWidth,"bg_btc":this.Body.Background.BorderTopColor,"bg_bbs":this.Body.Background.BorderBottomStyle,"bg_bbw":this.Body.Background.BorderBottomWidth,"bg_bbc":this.Body.Background.BorderBottomColor,"cs_pi_bgi":this.ContentSectionProfileInfo.Background.Image,"cs_pi_bgc":this.ContentSectionProfileInfo.Background.Color,"cs_pi_o":this.ContentSectionProfileInfo.Opacity,"cs_pi_bls":this.ContentSectionProfileInfo.BorderLeftStyle,"cs_pi_blw":this.ContentSectionProfileInfo.BorderLeftWidth,"cs_pi_blc":this.ContentSectionProfileInfo.BorderLeftColor,"cs_pi_brs":this.ContentSectionProfileInfo.BorderRightStyle,"cs_pi_brw":this.ContentSectionProfileInfo.BorderRightWidth,"cs_pi_brc":this.ContentSectionProfileInfo.BorderRightColor,"cs_pi_bts":this.ContentSectionProfileInfo.BorderTopStyle,"cs_pi_btw":this.ContentSectionProfileInfo.BorderTopWidth,"cs_pi_btc":this.ContentSectionProfileInfo.BorderTopColor,"cs_pi_bbs":this.ContentSectionProfileInfo.BorderBottomStyle,"cs_pi_bbw":this.ContentSectionProfileInfo.BorderBottomWidth,"cs_pi_bbc":this.ContentSectionProfileInfo.BorderBottomColor,"cs_ct_bgi":this.ContentSectionContactTable.Background.Image,"cs_ct_bgc":this.ContentSectionContactTable.Background.Color,"cs_ct_o":this.ContentSectionContactTable.Opacity,"cs_ct_bls":this.ContentSectionContactTable.BorderLeftStyle,"cs_ct_blw":this.ContentSectionContactTable.BorderLeftWidth,"cs_ct_blc":this.ContentSectionContactTable.BorderLeftColor,"cs_ct_brs":this.ContentSectionContactTable.BorderRightStyle,"cs_ct_brw":this.ContentSectionContactTable.BorderRightWidth,"cs_ct_brc":this.ContentSectionContactTable.BorderRightColor,"cs_ct_bts":this.ContentSectionContactTable.BorderTopStyle,"cs_ct_btw":this.ContentSectionContactTable.BorderTopWidth,"cs_ct_btc":this.ContentSectionContactTable.BorderTopColor,"cs_ct_bbs":this.ContentSectionContactTable.BorderBottomStyle,"cs_ct_bbw":this.ContentSectionContactTable.BorderBottomWidth,"cs_ct_bbc":this.ContentSectionContactTable.BorderBottomColor,"cs_en_bgi":this.ContentSectionExtendedNetwork.Background.Image,"cs_en_bgc":this.ContentSectionExtendedNetwork.Background.Color,"cs_en_o":this.ContentSectionExtendedNetwork.Opacity,"cs_en_bls":this.ContentSectionExtendedNetwork.BorderLeftStyle,"cs_en_blw":this.ContentSectionExtendedNetwork.BorderLeftWidth,"cs_en_blc":this.ContentSectionExtendedNetwork.BorderLeftColor,"cs_en_brs":this.ContentSectionExtendedNetwork.BorderRightStyle,"cs_en_brw":this.ContentSectionExtendedNetwork.BorderRightWidth,"cs_en_brc":this.ContentSectionExtendedNetwork.BorderRightColor,"cs_en_bts":this.ContentSectionExtendedNetwork.BorderTopStyle,"cs_en_btw":this.ContentSectionExtendedNetwork.BorderTopWidth,"cs_en_btc":this.ContentSectionExtendedNetwork.BorderTopColor,"cs_en_bbs":this.ContentSectionExtendedNetwork.BorderBottomStyle,"cs_en_bbw":this.ContentSectionExtendedNetwork.BorderBottomWidth,"cs_en_bbc":this.ContentSectionExtendedNetwork.BorderBottomColor,"cs_ur_bgi":this.ContentSectionURL.Background.Image,"cs_ur_bgc":this.ContentSectionURL.Background.Color,"cs_ur_o":this.ContentSectionURL.Opacity,"cs_ur_bls":this.ContentSectionURL.BorderLeftStyle,"cs_ur_blw":this.ContentSectionURL.BorderLeftWidth,"cs_ur_blc":this.ContentSectionURL.BorderLeftColor,"cs_ur_brs":this.ContentSectionURL.BorderRightStyle,"cs_ur_brw":this.ContentSectionURL.BorderRightWidth,"cs_ur_brc":this.ContentSectionURL.BorderRightColor,"cs_ur_bts":this.ContentSectionURL.BorderTopStyle,"cs_ur_btw":this.ContentSectionURL.BorderTopWidth,"cs_ur_btc":this.ContentSectionURL.BorderTopColor,"cs_ur_bbs":this.ContentSectionURL.BorderBottomStyle,"cs_ur_bbw":this.ContentSectionURL.BorderBottomWidth,"cs_ur_bbc":this.ContentSectionURL.BorderBottomColor,"cs_in_bgi":this.ContentSectionInterests.Background.Image,"cs_in_bgc":this.ContentSectionInterests.Background.Color,"cs_in_o":this.ContentSectionInterests.Opacity,"cs_in_bls":this.ContentSectionInterests.BorderLeftStyle,"cs_in_blw":this.ContentSectionInterests.BorderLeftWidth,"cs_in_blc":this.ContentSectionInterests.BorderLeftColor,"cs_in_brs":this.ContentSectionInterests.BorderRightStyle,"cs_in_brw":this.ContentSectionInterests.BorderRightWidth,"cs_in_brc":this.ContentSectionInterests.BorderRightColor,"cs_in_bts":this.ContentSectionInterests.BorderTopStyle,"cs_in_btw":this.ContentSectionInterests.BorderTopWidth,"cs_in_btc":this.ContentSectionInterests.BorderTopColor,"cs_in_bbs":this.ContentSectionInterests.BorderBottomStyle,"cs_in_bbw":this.ContentSectionInterests.BorderBottomWidth,"cs_in_bbc":this.ContentSectionInterests.BorderBottomColor,"cs_de_bgi":this.ContentSectionDetails.Background.Image,"cs_de_bgc":this.ContentSectionDetails.Background.Color,"cs_de_o":this.ContentSectionDetails.Opacity,"cs_de_bls":this.ContentSectionDetails.BorderLeftStyle,"cs_de_blw":this.ContentSectionDetails.BorderLeftWidth,"cs_de_blc":this.ContentSectionDetails.BorderLeftColor,"cs_de_brs":this.ContentSectionDetails.BorderRightStyle,"cs_de_brw":this.ContentSectionDetails.BorderRightWidth,"cs_de_brc":this.ContentSectionDetails.BorderRightColor,"cs_de_bts":this.ContentSectionDetails.BorderTopStyle,"cs_de_btw":this.ContentSectionDetails.BorderTopWidth,"cs_de_btc":this.ContentSectionDetails.BorderTopColor,"cs_de_bbs":this.ContentSectionDetails.BorderBottomStyle,"cs_de_bbw":this.ContentSectionDetails.BorderBottomWidth,"cs_de_bbc":this.ContentSectionDetails.BorderBottomColor,"cs_sc_bgi":this.ContentSectionSchools.Background.Image,"cs_sc_bgc":this.ContentSectionSchools.Background.Color,"cs_sc_o":this.ContentSectionSchools.Opacity,"cs_sc_bls":this.ContentSectionSchools.BorderLeftStyle,"cs_sc_blw":this.ContentSectionSchools.BorderLeftWidth,"cs_sc_blc":this.ContentSectionSchools.BorderLeftColor,"cs_sc_brs":this.ContentSectionSchools.BorderRightStyle,"cs_sc_brw":this.ContentSectionSchools.BorderRightWidth,"cs_sc_brc":this.ContentSectionSchools.BorderRightColor,"cs_sc_bts":this.ContentSectionSchools.BorderTopStyle,"cs_sc_btw":this.ContentSectionSchools.BorderTopWidth,"cs_sc_btc":this.ContentSectionSchools.BorderTopColor,"cs_sc_bbs":this.ContentSectionSchools.BorderBottomStyle,"cs_sc_bbw":this.ContentSectionSchools.BorderBottomWidth,"cs_sc_bbc":this.ContentSectionSchools.BorderBottomColor,"cs_co_bgi":this.ContentSectionCompanies.Background.Image,"cs_co_bgc":this.ContentSectionCompanies.Background.Color,"cs_co_o":this.ContentSectionCompanies.Opacity,"cs_co_bls":this.ContentSectionCompanies.BorderLeftStyle,"cs_co_blw":this.ContentSectionCompanies.BorderLeftWidth,"cs_co_blc":this.ContentSectionCompanies.BorderLeftColor,"cs_co_brs":this.ContentSectionCompanies.BorderRightStyle,"cs_co_brw":this.ContentSectionCompanies.BorderRightWidth,"cs_co_brc":this.ContentSectionCompanies.BorderRightColor,"cs_co_bts":this.ContentSectionCompanies.BorderTopStyle,"cs_co_btw":this.ContentSectionCompanies.BorderTopWidth,"cs_co_btc":this.ContentSectionCompanies.BorderTopColor,"cs_co_bbs":this.ContentSectionCompanies.BorderBottomStyle,"cs_co_bbw":this.ContentSectionCompanies.BorderBottomWidth,"cs_co_bbc":this.ContentSectionCompanies.BorderBottomColor,"cs_fs_bgi":this.ContentSectionFriendSpace.Background.Image,"cs_fs_bgc":this.ContentSectionFriendSpace.Background.Color,"cs_fs_o":this.ContentSectionFriendSpace.Opacity,"cs_fs_bls":this.ContentSectionFriendSpace.BorderLeftStyle,"cs_fs_blw":this.ContentSectionFriendSpace.BorderLeftWidth,"cs_fs_blc":this.ContentSectionFriendSpace.BorderLeftColor,"cs_fs_brs":this.ContentSectionFriendSpace.BorderRightStyle,"cs_fs_brw":this.ContentSectionFriendSpace.BorderRightWidth,"cs_fs_brc":this.ContentSectionFriendSpace.BorderRightColor,"cs_fs_bts":this.ContentSectionFriendSpace.BorderTopStyle,"cs_fs_btw":this.ContentSectionFriendSpace.BorderTopWidth,"cs_fs_btc":this.ContentSectionFriendSpace.BorderTopColor,"cs_fs_bbs":this.ContentSectionFriendSpace.BorderBottomStyle,"cs_fs_bbw":this.ContentSectionFriendSpace.BorderBottomWidth,"cs_fs_bbc":this.ContentSectionFriendSpace.BorderBottomColor,"cs_be_bgi":this.ContentSectionBlogs.Background.Image,"cs_be_bgc":this.ContentSectionBlogs.Background.Color,"cs_be_o":this.ContentSectionBlogs.Opacity,"cs_be_bls":this.ContentSectionBlogs.BorderLeftStyle,"cs_be_blw":this.ContentSectionBlogs.BorderLeftWidth,"cs_be_blc":this.ContentSectionBlogs.BorderLeftColor,"cs_be_brs":this.ContentSectionBlogs.BorderRightStyle,"cs_be_brw":this.ContentSectionBlogs.BorderRightWidth,"cs_be_brc":this.ContentSectionBlogs.BorderRightColor,"cs_be_bts":this.ContentSectionBlogs.BorderTopStyle,"cs_be_btw":this.ContentSectionBlogs.BorderTopWidth,"cs_be_btc":this.ContentSectionBlogs.BorderTopColor,"cs_be_bbs":this.ContentSectionBlogs.BorderBottomStyle,"cs_be_bbw":this.ContentSectionBlogs.BorderBottomWidth,"cs_be_bbc":this.ContentSectionBlogs.BorderBottomColor,"cs_ne_bgi":this.ContentSectionNetworking.Background.Image,"cs_ne_bgc":this.ContentSectionNetworking.Background.Color,"cs_ne_o":this.ContentSectionNetworking.Opacity,"cs_ne_bls":this.ContentSectionNetworking.BorderLeftStyle,"cs_ne_blw":this.ContentSectionNetworking.BorderLeftWidth,"cs_ne_blc":this.ContentSectionNetworking.BorderLeftColor,"cs_ne_brs":this.ContentSectionNetworking.BorderRightStyle,"cs_ne_brw":this.ContentSectionNetworking.BorderRightWidth,"cs_ne_brc":this.ContentSectionNetworking.BorderRightColor,"cs_ne_bts":this.ContentSectionNetworking.BorderTopStyle,"cs_ne_btw":this.ContentSectionNetworking.BorderTopWidth,"cs_ne_btc":this.ContentSectionNetworking.BorderTopColor,"cs_ne_bbs":this.ContentSectionNetworking.BorderBottomStyle,"cs_ne_bbw":this.ContentSectionNetworking.BorderBottomWidth,"cs_ne_bbc":this.ContentSectionNetworking.BorderBottomColor,"cs_bl_bgi":this.ContentSectionBlurbs.Background.Image,"cs_bl_bgc":this.ContentSectionBlurbs.Background.Color,"cs_bl_o":this.ContentSectionBlurbs.Opacity,"cs_bl_bls":this.ContentSectionBlurbs.BorderLeftStyle,"cs_bl_blw":this.ContentSectionBlurbs.BorderLeftWidth,"cs_bl_blc":this.ContentSectionBlurbs.BorderLeftColor,"cs_bl_brs":this.ContentSectionBlurbs.BorderRightStyle,"cs_bl_brw":this.ContentSectionBlurbs.BorderRightWidth,"cs_bl_brc":this.ContentSectionBlurbs.BorderRightColor,"cs_bl_bts":this.ContentSectionBlurbs.BorderTopStyle,"cs_bl_btw":this.ContentSectionBlurbs.BorderTopWidth,"cs_bl_btc":this.ContentSectionBlurbs.BorderTopColor,"cs_bl_bbs":this.ContentSectionBlurbs.BorderBottomStyle,"cs_bl_bbw":this.ContentSectionBlurbs.BorderBottomWidth,"cs_bl_bbc":this.ContentSectionBlurbs.BorderBottomColor,"cs_ap_bgi":this.ContentSectionApplications.Background.Image,"cs_ap_bgc":this.ContentSectionApplications.Background.Color,"cs_ap_o":this.ContentSectionApplications.Opacity,"cs_ap_bls":this.ContentSectionApplications.BorderLeftStyle,"cs_ap_blw":this.ContentSectionApplications.BorderLeftWidth,"cs_ap_blc":this.ContentSectionApplications.BorderLeftColor,"cs_ap_brs":this.ContentSectionApplications.BorderRightStyle,"cs_ap_brw":this.ContentSectionApplications.BorderRightWidth,"cs_ap_brc":this.ContentSectionApplications.BorderRightColor,"cs_ap_bts":this.ContentSectionApplications.BorderTopStyle,"cs_ap_btw":this.ContentSectionApplications.BorderTopWidth,"cs_ap_btc":this.ContentSectionApplications.BorderTopColor,"cs_ap_bbs":this.ContentSectionApplications.BorderBottomStyle,"cs_ap_bbw":this.ContentSectionApplications.BorderBottomWidth,"cs_ap_bbc":this.ContentSectionApplications.BorderBottomColor,"cs_fc_bgi":this.ContentSectionComments.Background.Image,"cs_fc_bgc":this.ContentSectionComments.Background.Color,"cs_fc_o":this.ContentSectionComments.Opacity,"cs_fc_bls":this.ContentSectionComments.BorderLeftStyle,"cs_fc_blw":this.ContentSectionComments.BorderLeftWidth,"cs_fc_blc":this.ContentSectionComments.BorderLeftColor,"cs_fc_brs":this.ContentSectionComments.BorderRightStyle,"cs_fc_brw":this.ContentSectionComments.BorderRightWidth,"cs_fc_brc":this.ContentSectionComments.BorderRightColor,"cs_fc_bts":this.ContentSectionComments.BorderTopStyle,"cs_fc_btw":this.ContentSectionComments.BorderTopWidth,"cs_fc_btc":this.ContentSectionComments.BorderTopColor,"cs_fc_bbs":this.ContentSectionComments.BorderBottomStyle,"cs_fc_bbw":this.ContentSectionComments.BorderBottomWidth,"cs_fc_bbc":this.ContentSectionComments.BorderBottomColor,"cs_bgi":this.ContentSection.Background.Image,"cs_bgc":this.ContentSection.Background.Color,"cs_o":this.ContentSection.Opacity,"cs_bls":this.ContentSection.BorderLeftStyle,"cs_blw":this.ContentSection.BorderLeftWidth,"cs_blc":this.ContentSection.BorderLeftColor,"cs_brs":this.ContentSection.BorderRightStyle,"cs_brw":this.ContentSection.BorderRightWidth,"cs_brc":this.ContentSection.BorderRightColor,"cs_bts":this.ContentSection.BorderTopStyle,"cs_btw":this.ContentSection.BorderTopWidth,"cs_btc":this.ContentSection.BorderTopColor,"cs_bbs":this.ContentSection.BorderBottomStyle,"cs_bbw":this.ContentSection.BorderBottomWidth,"cs_bbc":this.ContentSection.BorderBottomColor,"txt_def_ff":this.Body.Font.Family,"txt_def_fsz":this.Body.Font.Size,"txt_def_fw":this.Body.Font.Weight,"txt_def_fst":this.Body.Font.Style,"txt_def_td":this.Body.Font.TextDecoration,"txt_def_c":this.Body.Font.Color,"txt_def_bgc":this.Body.Font.Background.Color,"txt_def_tt":this.Body.Font.TextTransform,"txt_pn_ff":this.Profile.Font.Family,"txt_pn_fsz":this.Profile.Font.Size,"txt_pn_fw":this.Profile.Font.Weight,"txt_pn_fst":this.Profile.Font.Style,"txt_pn_td":this.Profile.Font.TextDecoration,"txt_pn_c":this.Profile.Font.Color,"txt_pn_bgc":this.Profile.Font.Background.Color,"txt_pn_tt":this.Profile.Font.TextTransform,"txt_sh_ff":this.SubHeader.Font.Family,"txt_sh_fsz":this.SubHeader.Font.Size,"txt_sh_fw":this.SubHeader.Font.Weight,"txt_sh_fst":this.SubHeader.Font.Style,"txt_sh_td":this.SubHeader.Font.TextDecoration,"txt_sh_c":this.SubHeader.Font.Color,"txt_sh_bgc":this.SubHeader.Font.Background.Color,"txt_sh_tt":this.SubHeader.Font.TextTransform,"txt_hd_ff":this.Header.Font.Family,"txt_hd_fsz":this.Header.Font.Size,"txt_hd_fw":this.Header.Font.Weight,"txt_hd_fst":this.Header.Font.Style,"txt_hd_td":this.Header.Font.TextDecoration,"txt_hd_c":this.Header.Font.Color,"txt_hd_bgc":this.Header.Font.Background.Color,"txt_hd_tt":this.Header.Font.TextTransform,"txt_tad_ff":this.TimeDate.Font.Family,"txt_tad_fsz":this.TimeDate.Font.Size,"txt_tad_fw":this.TimeDate.Font.Weight,"txt_tad_fst":this.TimeDate.Font.Style,"txt_tad_td":this.TimeDate.Font.TextDecoration,"txt_tad_c":this.TimeDate.Font.Color,"txt_tad_bgc":this.TimeDate.Font.Background.Color,"txt_tad_tt":this.TimeDate.Font.TextTransform,"txt_st_ff":this.Status.Font.Family,"txt_st_fsz":this.Status.Font.Size,"txt_st_fw":this.Status.Font.Weight,"txt_st_fst":this.Status.Font.Style,"txt_st_td":this.Status.Font.TextDecoration,"txt_st_c":this.Status.Font.Color,"txt_st_bgc":this.Status.Font.Background.Color,"txt_st_tt":this.Status.Font.TextTransform,"txt_la_ff":this.Label.Font.Family,"txt_la_fsz":this.Label.Font.Size,"txt_la_fw":this.Label.Font.Weight,"txt_la_fst":this.Label.Font.Style,"txt_la_td":this.Label.Font.TextDecoration,"txt_la_c":this.Label.Font.Color,"txt_la_bgc":this.Label.Font.Background.Color,"txt_la_tt":this.Label.Font.TextTransform,"txt_nu_ff":this.Number.Font.Family,"txt_nu_fsz":this.Number.Font.Size,"txt_nu_fw":this.Number.Font.Weight,"txt_nu_fst":this.Number.Font.Style,"txt_nu_td":this.Number.Font.TextDecoration,"txt_nu_c":this.Number.Font.Color,"txt_nu_bgc":this.Number.Font.Background.Color,"txt_nu_tt":this.Number.Font.TextTransform,"txt_url_ff":this.YourUrl.Font.Family,"txt_url_fsz":this.YourUrl.Font.Size,"txt_url_fw":this.YourUrl.Font.Weight,"txt_url_fst":this.YourUrl.Font.Style,"txt_url_td":this.YourUrl.Font.TextDecoration,"txt_url_c":this.YourUrl.Font.Color,"txt_url_bgc":this.YourUrl.Font.Background.Color,"txt_url_tt":this.YourUrl.Font.TextTransform,"lnk_def_ff":this.Body.Links.Font.Family,"lnk_def_fsz":this.Body.Links.Font.Size,"lnk_def_fw":this.Body.Links.Font.Weight,"lnk_def_fst":this.Body.Links.Font.Style,"lnk_def_td":this.Body.Links.Font.TextDecoration,"lnk_def_c":this.Body.Links.Font.Color,"lnk_def_bgc":this.Body.Links.Background.Color,"lnk_def_tt":this.Body.Links.Font.TextTransform,"lnk_hov_ff":this.Body.Links.Hover.Font.Family,"lnk_hov_fsz":this.Body.Links.Hover.Font.Size,"lnk_hov_fw":this.Body.Links.Hover.Font.Weight,"lnk_hov_fst":this.Body.Links.Hover.Font.Style,"lnk_hov_td":this.Body.Links.Hover.Font.TextDecoration,"lnk_hov_c":this.Body.Links.Hover.Font.Color,"lnk_hov_bgc":this.Body.Links.Hover.Background.Color,"lnk_hov_tt":this.Body.Links.Hover.Font.TextTransform,"lnk_nf_def_ff":this.NavFooter.Links.Font.Family,"lnk_nf_def_fsz":this.NavFooter.Links.Font.Size,"lnk_nf_def_fw":this.NavFooter.Links.Font.Weight,"lnk_nf_def_fst":this.NavFooter.Links.Font.Style,"lnk_nf_def_td":this.NavFooter.Links.Font.TextDecoration,"lnk_nf_def_c":this.NavFooter.Links.Font.Color,"lnk_nf_def_bgc":this.NavFooter.Links.Background.Color,"lnk_nf_def_tt":this.NavFooter.Links.Font.TextTransform,"lnk_nf_def_b":this.NavFooter.Links.Border,"lnk_nf_hov_ff":this.NavFooter.Links.Hover.Font.Family,"lnk_nf_hov_fsz":this.NavFooter.Links.Hover.Font.Size,"lnk_nf_hov_fw":this.NavFooter.Links.Hover.Font.Weight,"lnk_nf_hov_fst":this.NavFooter.Links.Hover.Font.Style,"lnk_nf_hov_td":this.NavFooter.Links.Hover.Font.TextDecoration,"lnk_nf_hov_c":this.NavFooter.Links.Hover.Font.Color,"lnk_nf_hov_bgc":this.NavFooter.Links.Hover.Background.Color,"lnk_nf_hov_b":this.NavFooter.Links.Hover.Border,"lnk_nf_hov_tt":this.NavFooter.Links.Hover.Font.TextTransform,"lnk_p_def_ff":this.People.Links.Font.Family,"lnk_p_def_fsz":this.People.Links.Font.Size,"lnk_p_def_fw":this.People.Links.Font.Weight,"lnk_p_def_fst":this.People.Links.Font.Style,"lnk_p_def_td":this.People.Links.Font.TextDecoration,"lnk_p_def_c":this.People.Links.Font.Color,"lnk_p_def_bgc":this.People.Links.Background.Color,"lnk_p_def_tt":this.People.Links.Font.TextTransform,"lnk_p_def_b":this.People.Links.Border,"lnk_p_hov_ff":this.People.Links.Hover.Font.Family,"lnk_p_hov_fsz":this.People.Links.Hover.Font.Size,"lnk_p_hov_fw":this.People.Links.Hover.Font.Weight,"lnk_p_hov_fst":this.People.Links.Hover.Font.Style,"lnk_p_hov_td":this.People.Links.Hover.Font.TextDecoration,"lnk_p_hov_c":this.People.Links.Hover.Font.Color,"lnk_p_hov_bgc":this.People.Links.Hover.Background.Color,"lnk_p_hov_b":this.People.Links.Hover.Border,"lnk_p_hov_tt":this.People.Links.Hover.Font.TextTransform,"img_def_d":this.Image.Display,"img_def_w":this.Image.Width,"img_def_h":this.Image.Height,"img_def_o":this.Image.Opacity,"img_def_bls":this.Image.BorderLeftStyle,"img_def_brs":this.Image.BorderRightStyle,"img_def_bts":this.Image.BorderTopStyle,"img_def_bbs":this.Image.BorderBottomStyle,"img_def_blw":this.Image.BorderLeftWidth,"img_def_brw":this.Image.BorderRightWidth,"img_def_btw":this.Image.BorderTopWidth,"img_def_bbw":this.Image.BorderBottomWidth,"img_def_blc":this.Image.BorderLeftColor,"img_def_brc":this.Image.BorderRightColor,"img_def_btc":this.Image.BorderTopColor,"img_def_bbc":this.Image.BorderBottomColor,"img_hov_w":this.Image.Hover.Width,"img_hov_h":this.Image.Hover.Height,"img_hov_o":this.Image.Hover.Opacity,"img_hov_bls":this.Image.Hover.BorderLeftStyle,"img_hov_brs":this.Image.Hover.BorderRightStyle,"img_hov_bts":this.Image.Hover.BorderTopStyle,"img_hov_bbs":this.Image.Hover.BorderBottomStyle,"img_hov_blw":this.Image.Hover.BorderLeftWidth,"img_hov_brw":this.Image.Hover.BorderRightWidth,"img_hov_btw":this.Image.Hover.BorderTopWidth,"img_hov_bbw":this.Image.Hover.BorderBottomWidth,"img_hov_blc":this.Image.Hover.BorderLeftColor,"img_hov_brc":this.Image.Hover.BorderRightColor,"img_hov_btc":this.Image.Hover.BorderTopColor,"img_hov_bbc":this.Image.Hover.BorderBottomColor,"img_pp_def_d":this.ImageProfilePicture.Display,"img_pp_def_w":this.ImageProfilePicture.Width,"img_pp_def_h":this.ImageProfilePicture.Height,"img_pp_def_o":this.ImageProfilePicture.Opacity,"img_pp_def_bls":this.ImageProfilePicture.BorderLeftStyle,"img_pp_def_brs":this.ImageProfilePicture.BorderRightStyle,"img_pp_def_bts":this.ImageProfilePicture.BorderTopStyle,"img_pp_def_bbs":this.ImageProfilePicture.BorderBottomStyle,"img_pp_def_blw":this.ImageProfilePicture.BorderLeftWidth,"img_pp_def_brw":this.ImageProfilePicture.BorderRightWidth,"img_pp_def_btw":this.ImageProfilePicture.BorderTopWidth,"img_pp_def_bbw":this.ImageProfilePicture.BorderBottomWidth,"img_pp_def_blc":this.ImageProfilePicture.BorderLeftColor,"img_pp_def_brc":this.ImageProfilePicture.BorderRightColor,"img_pp_def_btc":this.ImageProfilePicture.BorderTopColor,"img_pp_def_bbc":this.ImageProfilePicture.BorderBottomColor,"img_pp_hov_w":this.ImageProfilePicture.Hover.Width,"img_pp_hov_h":this.ImageProfilePicture.Hover.Height,"img_pp_hov_o":this.ImageProfilePicture.Hover.Opacity,"img_pp_hov_bls":this.ImageProfilePicture.Hover.BorderLeftStyle,"img_pp_hov_brs":this.ImageProfilePicture.Hover.BorderRightStyle,"img_pp_hov_bts":this.ImageProfilePicture.Hover.BorderTopStyle,"img_pp_hov_bbs":this.ImageProfilePicture.Hover.BorderBottomStyle,"img_pp_hov_blw":this.ImageProfilePicture.Hover.BorderLeftWidth,"img_pp_hov_brw":this.ImageProfilePicture.Hover.BorderRightWidth,"img_pp_hov_btw":this.ImageProfilePicture.Hover.BorderTopWidth,"img_pp_hov_bbw":this.ImageProfilePicture.Hover.BorderBottomWidth,"img_pp_hov_blc":this.ImageProfilePicture.Hover.BorderLeftColor,"img_pp_hov_brc":this.ImageProfilePicture.Hover.BorderRightColor,"img_pp_hov_btc":this.ImageProfilePicture.Hover.BorderTopColor,"img_pp_hov_bbc":this.ImageProfilePicture.Hover.BorderBottomColor,"img_tf_def_d":this.ImageTopFriends.Display,"img_tf_def_w":this.ImageTopFriends.Width,"img_tf_def_h":this.ImageTopFriends.Height,"img_tf_def_o":this.ImageTopFriends.Opacity,"img_tf_def_bls":this.ImageTopFriends.BorderLeftStyle,"img_tf_def_brs":this.ImageTopFriends.BorderRightStyle,"img_tf_def_bts":this.ImageTopFriends.BorderTopStyle,"img_tf_def_bbs":this.ImageTopFriends.BorderBottomStyle,"img_tf_def_blw":this.ImageTopFriends.BorderLeftWidth,"img_tf_def_brw":this.ImageTopFriends.BorderRightWidth,"img_tf_def_btw":this.ImageTopFriends.BorderTopWidth,"img_tf_def_bbw":this.ImageTopFriends.BorderBottomWidth,"img_tf_def_blc":this.ImageTopFriends.BorderLeftColor,"img_tf_def_brc":this.ImageTopFriends.BorderRightColor,"img_tf_def_btc":this.ImageTopFriends.BorderTopColor,"img_tf_def_bbc":this.ImageTopFriends.BorderBottomColor,"img_tf_hov_w":this.ImageTopFriends.Hover.Width,"img_tf_hov_h":this.ImageTopFriends.Hover.Height,"img_tf_hov_o":this.ImageTopFriends.Hover.Opacity,"img_tf_hov_bls":this.ImageTopFriends.Hover.BorderLeftStyle,"img_tf_hov_brs":this.ImageTopFriends.Hover.BorderRightStyle,"img_tf_hov_bts":this.ImageTopFriends.Hover.BorderTopStyle,"img_tf_hov_bbs":this.ImageTopFriends.Hover.BorderBottomStyle,"img_tf_hov_blw":this.ImageTopFriends.Hover.BorderLeftWidth,"img_tf_hov_brw":this.ImageTopFriends.Hover.BorderRightWidth,"img_tf_hov_btw":this.ImageTopFriends.Hover.BorderTopWidth,"img_tf_hov_bbw":this.ImageTopFriends.Hover.BorderBottomWidth,"img_tf_hov_blc":this.ImageTopFriends.Hover.BorderLeftColor,"img_tf_hov_brc":this.ImageTopFriends.Hover.BorderRightColor,"img_tf_hov_btc":this.ImageTopFriends.Hover.BorderTopColor,"img_tf_hov_bbc":this.ImageTopFriends.Hover.BorderBottomColor,"img_cf_def_d":this.ImageCommentFriends.Display,"img_cf_def_w":this.ImageCommentFriends.Width,"img_cf_def_h":this.ImageCommentFriends.Height,"img_cf_def_o":this.ImageCommentFriends.Opacity,"img_cf_def_bls":this.ImageCommentFriends.BorderLeftStyle,"img_cf_def_brs":this.ImageCommentFriends.BorderRightStyle,"img_cf_def_bts":this.ImageCommentFriends.BorderTopStyle,"img_cf_def_bbs":this.ImageCommentFriends.BorderBottomStyle,"img_cf_def_blw":this.ImageCommentFriends.BorderLeftWidth,"img_cf_def_brw":this.ImageCommentFriends.BorderRightWidth,"img_cf_def_btw":this.ImageCommentFriends.BorderTopWidth,"img_cf_def_bbw":this.ImageCommentFriends.BorderBottomWidth,"img_cf_def_blc":this.ImageCommentFriends.BorderLeftColor,"img_cf_def_brc":this.ImageCommentFriends.BorderRightColor,"img_cf_def_btc":this.ImageCommentFriends.BorderTopColor,"img_cf_def_bbc":this.ImageCommentFriends.BorderBottomColor,"img_cf_hov_w":this.ImageCommentFriends.Hover.Width,"img_cf_hov_h":this.ImageCommentFriends.Hover.Height,"img_cf_hov_o":this.ImageCommentFriends.Hover.Opacity,"img_cf_hov_bls":this.ImageCommentFriends.Hover.BorderLeftStyle,"img_cf_hov_brs":this.ImageCommentFriends.Hover.BorderRightStyle,"img_cf_hov_bts":this.ImageCommentFriends.Hover.BorderTopStyle,"img_cf_hov_bbs":this.ImageCommentFriends.Hover.BorderBottomStyle,"img_cf_hov_blw":this.ImageCommentFriends.Hover.BorderLeftWidth,"img_cf_hov_brw":this.ImageCommentFriends.Hover.BorderRightWidth,"img_cf_hov_btw":this.ImageCommentFriends.Hover.BorderTopWidth,"img_cf_hov_bbw":this.ImageCommentFriends.Hover.BorderBottomWidth,"img_cf_hov_blc":this.ImageCommentFriends.Hover.BorderLeftColor,"img_cf_hov_brc":this.ImageCommentFriends.Hover.BorderRightColor,"img_cf_hov_btc":this.ImageCommentFriends.Hover.BorderTopColor,"img_cf_hov_bbc":this.ImageCommentFriends.Hover.BorderBottomColor};for(key in this.keyCache){this.keyCache[key].DbKey(key);}this.PageKeys={"backgrounds":["bg_bgi","bg_bgr","bg_bga","bg_bgc","bg_bgp","bg_cur","bg_bls","bg_brs","bg_bts","bg_bbs","bg_blw","bg_brw","bg_btw","bg_bbw","bg_blc","bg_brc","bg_btc","bg_bbc"],"linksDefault":["lnk_def_ff","lnk_def_fsz","lnk_def_fw","lnk_def_fst","lnk_def_td","lnk_def_c","lnk_def_bgc","lnk_def_tt","lnk_hov_ff","lnk_hov_fsz","lnk_hov_fw","lnk_hov_fst","lnk_hov_td","lnk_hov_c","lnk_hov_bgc","lnk_hov_tt"],"linksNavFooter":["lnk_nf_def_ff","lnk_nf_def_fsz","lnk_nf_def_fw","lnk_nf_def_fst","lnk_nf_def_td","lnk_nf_def_c","lnk_nf_def_bgc","lnk_nf_def_b","lnk_nf_def_tt","lnk_nf_hov_ff","lnk_nf_hov_fsz","lnk_nf_hov_fw","lnk_nf_hov_fst","lnk_nf_hov_td","lnk_nf_hov_c","lnk_nf_hov_bgc","lnk_nf_hov_b","lnk_nf_hov_tt"],"linksPeople":["lnk_p_def_ff","lnk_p_def_fsz","lnk_p_def_fw","lnk_p_def_fst","lnk_p_def_td","lnk_p_def_c","lnk_p_def_bgc","lnk_p_def_tt","lnk_p_hov_ff","lnk_p_hov_fsz","lnk_p_hov_fw","lnk_p_hov_fst","lnk_p_hov_td","lnk_p_hov_c","lnk_p_hov_bgc","lnk_p_hov_tt"],"moduleColors_pi":["cs_pi_bgi","cs_pi_bgc","cs_pi_o","cs_pi_bls","cs_pi_brs","cs_pi_bts","cs_pi_bbs","cs_pi_blw","cs_pi_brw","cs_pi_btw","cs_pi_bbw","cs_pi_blc","cs_pi_brc","cs_pi_btc","cs_pi_bbc"],"moduleColors_ct":["cs_ct_bgi","cs_ct_bgc","cs_ct_o","cs_ct_bls","cs_ct_brs","cs_ct_bts","cs_ct_bbs","cs_ct_blw","cs_ct_brw","cs_ct_btw","cs_ct_bbw","cs_ct_blc","cs_ct_brc","cs_ct_btc","cs_ct_bbc"],"moduleColors_en":["cs_en_bgi","cs_en_bgc","cs_en_o","cs_en_bls","cs_en_brs","cs_en_bts","cs_en_bbs","cs_en_blw","cs_en_brw","cs_en_btw","cs_en_bbw","cs_en_blc","cs_en_brc","cs_en_btc","cs_en_bbc"],"moduleColors_ur":["cs_ur_bgi","cs_ur_bgc","cs_ur_o","cs_ur_bls","cs_ur_brs","cs_ur_bts","cs_ur_bbs","cs_ur_blw","cs_ur_brw","cs_ur_btw","cs_ur_bbw","cs_ur_blc","cs_ur_brc","cs_ur_btc","cs_ur_bbc"],"moduleColors_in":["cs_in_bgi","cs_in_bgc","cs_in_o","cs_in_bls","cs_in_brs","cs_in_bts","cs_in_bbs","cs_in_blw","cs_in_brw","cs_in_btw","cs_in_bbw","cs_in_blc","cs_in_brc","cs_in_btc","cs_in_bbc"],"moduleColors_de":["cs_de_bgi","cs_de_bgc","cs_de_o","cs_de_bls","cs_de_brs","cs_de_bts","cs_de_bbs","cs_de_blw","cs_de_brw","cs_de_btw","cs_de_bbw","cs_de_blc","cs_de_brc","cs_de_btc","cs_de_bbc"],"moduleColors_sc":["cs_sc_bgi","cs_sc_bgc","cs_sc_o","cs_sc_bls","cs_sc_brs","cs_sc_bts","cs_sc_bbs","cs_sc_blw","cs_sc_brw","cs_sc_btw","cs_sc_bbw","cs_sc_blc","cs_sc_brc","cs_sc_btc","cs_sc_bbc"],"moduleColors_co":["cs_co_bgi","cs_co_bgc","cs_co_o","cs_co_bls","cs_co_brs","cs_co_bts","cs_co_bbs","cs_co_blw","cs_co_brw","cs_co_btw","cs_co_bbw","cs_co_blc","cs_co_brc","cs_co_btc","cs_co_bbc"],"moduleColors_fs":["cs_fs_bgi","cs_fs_bgc","cs_fs_o","cs_fs_bls","cs_fs_brs","cs_fs_bts","cs_fs_bbs","cs_fs_blw","cs_fs_brw","cs_fs_btw","cs_fs_bbw","cs_fs_blc","cs_fs_brc","cs_fs_btc","cs_fs_bbc"],"moduleColors_be":["cs_be_bgi","cs_be_bgc","cs_be_o","cs_be_bls","cs_be_brs","cs_be_bts","cs_be_bbs","cs_be_blw","cs_be_brw","cs_be_btw","cs_be_bbw","cs_be_blc","cs_be_brc","cs_be_btc","cs_be_bbc"],"moduleColors_ne":["cs_ne_bgi","cs_ne_bgc","cs_ne_o","cs_ne_bls","cs_ne_brs","cs_ne_bts","cs_ne_bbs","cs_ne_blw","cs_ne_brw","cs_ne_btw","cs_ne_bbw","cs_ne_blc","cs_ne_brc","cs_ne_btc","cs_ne_bbc"],"moduleColors_bl":["cs_bl_bgi","cs_bl_bgc","cs_bl_o","cs_bl_bls","cs_bl_brs","cs_bl_bts","cs_bl_bbs","cs_bl_blw","cs_bl_brw","cs_bl_btw","cs_bl_bbw","cs_bl_blc","cs_bl_brc","cs_bl_btc","cs_bl_bbc"],"moduleColors_ap":["cs_ap_bgi","cs_ap_bgc","cs_ap_o","cs_ap_aps","cs_ap_brs","cs_ap_bts","cs_ap_bbs","cs_ap_blw","cs_ap_brw","cs_ap_btw","cs_ap_bbw","cs_ap_blc","cs_ap_brc","cs_ap_btc","cs_ap_bbc"],"moduleColors_fc":["cs_fc_bgi","cs_fc_bgc","cs_fc_o","cs_fc_fcs","cs_fc_brs","cs_fc_bts","cs_fc_bbs","cs_fc_blw","cs_fc_brw","cs_fc_btw","cs_fc_bbw","cs_fc_blc","cs_fc_brc","cs_fc_btc","cs_fc_bbc"],"moduleColors":["cs_bgi","cs_bgc","cs_o","cs_fcs","cs_brs","cs_bts","cs_bbs","cs_blw","cs_brw","cs_btw","cs_bbw","cs_blc","cs_brc","cs_btc","cs_bbc"],"textOptions":["txt_pn_ff","txt_pn_fsz","txt_pn_fw","txt_pn_fst","txt_pn_td","txt_pn_c","txt_pn_bgc","txt_pn_tt","txt_def_ff","txt_def_fsz","txt_def_fw","txt_def_fst","txt_def_td","txt_def_c","txt_def_bgc","txt_def_tt","txt_hd_ff","txt_hd_fsz","txt_hd_fw","txt_hd_fst","txt_hd_td","txt_hd_c","txt_hd_bgc","txt_hd_tt","txt_sh_ff","txt_sh_fsz","txt_sh_fw","txt_sh_fst","txt_sh_td","txt_sh_c","txt_sh_bgc","txt_sh_tt","txt_tad_ff","txt_tad_fsz","txt_tad_fw","txt_tad_fst","txt_tad_td","txt_tad_c","txt_tad_bgc","txt_tad_tt","txt_st_ff","txt_st_fsz","txt_st_fw","txt_st_fst","txt_st_td","txt_st_c","txt_st_bgc","txt_st_tt","txt_la_ff","txt_la_fsz","txt_la_fw","txt_la_fla","txt_la_td","txt_la_c","txt_la_bgc","txt_la_tt","txt_nu_ff","txt_nu_fsz","txt_nu_fw","txt_nu_fnu","txt_nu_td","txt_nu_c","txt_nu_bgc","txt_nu_tt","txt_url_ff","txt_url_fsz","txt_url_fw","txt_url_furl","txt_url_td","txt_url_c","txt_url_bgc","txt_url_tt"],"images":["img_def_d","img_def_w","img_def_h","img_def_o","img_def_bls","img_def_brs","img_def_bts","img_def_bbs","img_def_blw","img_def_brw","img_def_btw","img_def_bbw","img_def_blc","img_def_brc","img_def_btc","img_def_bbc","img_hov_w","img_hov_h","img_hov_o","img_hov_bls","img_hov_brs","img_hov_bts","img_hov_bbs","img_hov_blw","img_hov_brw","img_hov_btw","img_hov_bbw","img_hov_blc","img_hov_brc","img_hov_btc","img_hov_bbc","img_pp_def_d","img_pp_def_w","img_pp_def_h","img_pp_def_o","img_pp_def_bls","img_pp_def_brs","img_pp_def_bts","img_pp_def_bbs","img_pp_def_blw","img_pp_def_brw","img_pp_def_btw","img_pp_def_bbw","img_pp_def_blc","img_pp_def_brc","img_pp_def_btc","img_pp_def_bbc","img_pp_hov_w","img_pp_hov_h","img_pp_hov_o","img_pp_hov_bls","img_pp_hov_brs","img_pp_hov_bts","img_pp_hov_bbs","img_pp_hov_blw","img_pp_hov_brw","img_pp_hov_btw","img_pp_hov_bbw","img_pp_hov_blc","img_pp_hov_brc","img_pp_hov_btc","img_pp_hov_bbc","img_tf_def_d","img_tf_def_w","img_tf_def_h","img_tf_def_o","img_tf_def_bls","img_tf_def_brs","img_tf_def_bts","img_tf_def_bbs","img_tf_def_blw","img_tf_def_brw","img_tf_def_btw","img_tf_def_bbw","img_tf_def_blc","img_tf_def_brc","img_tf_def_btc","img_tf_def_bbc","img_tf_hov_w","img_tf_hov_h","img_tf_hov_o","img_tf_hov_bls","img_tf_hov_brs","img_tf_hov_bts","img_tf_hov_bbs","img_tf_hov_blw","img_tf_hov_brw","img_tf_hov_btw","img_tf_hov_bbw","img_tf_hov_blc","img_tf_hov_brc","img_tf_hov_btc","img_tf_hov_bbc","img_cf_def_d","img_cf_def_w","img_cf_def_h","img_cf_def_o","img_cf_def_bls","img_cf_def_brs","img_cf_def_bts","img_cf_def_bbs","img_cf_def_blw","img_cf_def_brw","img_cf_def_btw","img_cf_def_bbw","img_cf_def_blc","img_cf_def_brc","img_cf_def_btc","img_cf_def_bbc","img_cf_hov_w","img_cf_hov_h","img_cf_hov_o","img_cf_hov_bls","img_cf_hov_brs","img_cf_hov_bts","img_cf_hov_bbs","img_cf_hov_blw","img_cf_hov_brw","img_cf_hov_btw","img_cf_hov_bbw","img_cf_hov_blc","img_cf_hov_brc","img_cf_hov_btc","img_cf_hov_bbc"]};this.PageObjects={"backgrounds":["Body.Background"],"linksDefault":["Body.Links"],"linksNavFooter":["NavFooter"],"linksPeople":["People"],"moduleColors_pi":["ContentSectionProfileInfo.ContentSection"],"moduleColors_ct":["ContentSectionContactTable.ContentSection"],"moduleColors_en":["ContentSectionExtendedNetwork.ContentSection"],"moduleColors_ur":["ContentSectionURL.ContentSection"],"moduleColors_in":["ContentSectionInterests.ContentSection"],"moduleColors_de":["ContentSectionDetails.ContentSection"],"moduleColors_sc":["ContentSectionSchools.ContentSection"],"moduleColors_co":["ContentSectionCompanies.ContentSection"],"moduleColors_fs":["ContentSectionFriendSpace.ContentSection"],"moduleColors_be":["ContentSectionBlogs.ContentSection"],"moduleColors_ne":["ContentSectionNetworking.ContentSection"],"moduleColors_bl":["ContentSectionBlurbs.ContentSection"],"moduleColors_ap":["ContentSectionApplications.ContentSection"],"moduleColors_fc":["ContentSectionComments.ContentSection"],"moduleColors":["ContentSection"],"textOptions":["Profile","Body.Font","Header","SubHeader","TimeDate","Status","Label","Number","YourUrl"],"images":["Image","ImageProfilePicture","ImageTopFriends","ImageCommentFriends"]};this.xml="";if(B){this.StreamIn(B);}}CustomLayout.prototype.isModified=function(D){var A=false;var C=this.PageKeys[D];var B=C.length;while(B--){A=A||this.keyCache[C[B]].isModified();}return A;};CustomLayout.prototype.v=function(){var B=arguments[0];if(arguments.length==1){if(!this.keyCache[B]){return null;}return this.keyCache[B].v();}else{if(!this.keyCache[B]){return false;}var A=this.keyCache[B].v(arguments[1]);if(A){this.cssCache=[];}return A;}};CustomLayout.prototype.Dispose=function(){for(key in this.keyCache){this.keyCache[key]=null;}this.keyCache=null;};CustomLayout.prototype.StreamIn=function(F){this.cssCache=[];if(!F){return false;}var A;var K=createXMLDoc(F);if(K){if(K.firstChild.nodeName=="layout"){A=K.firstChild;}if(K.childNodes[1]&&K.childNodes[1].nodeName=="layout"){A=K.childNodes[1];}}if(!A){return false;}var I=A.attributes;var D=I.length;while(D--){var L=I.item(D).nodeName;var B=I.item(D).nodeValue;if(L.indexOf("_bgi")!=-1&&B.indexOf("http")==-1){B="http://ak.webfetti.com/assets/layouts/"+B;}if(L=="ct_bgi"){L="cs_ct_bgi";try{this.keyCache[I.item(D).nodeName].SetOriginal(B,false);}catch(H){}try{this.keyCache[L].SetOriginal(B);}catch(H){}}else{if(L=="en_bgi"){L="cs_en_bgi";try{this.keyCache[I.item(D).nodeName].SetOriginal(B,false);}catch(H){}try{this.keyCache[L].SetOriginal(B);}catch(H){}}else{if(L=="cs_bgc"){try{this.keyCache[I.item(D).nodeName].SetOriginal(B,false);}catch(H){}for(var J in aContentSections){L="cs_"+aContentSections[J]+"_bgc";try{this.keyCache[L].SetOriginal(B);}catch(H){}}}else{if(L=="cs_o"){try{this.keyCache[I.item(D).nodeName].SetOriginal(B,false);}catch(H){}for(var J in aContentSections){L="cs_"+aContentSections[J]+"_o";try{this.keyCache[L].SetOriginal(B);}catch(H){}}}else{if(L=="cs_b"){var G=B.split(" ");for(var C in aBorders){var E=aBorders[C].substr(0,1);for(var J in aContentSections){L="cs_"+"b"+E+"w";try{this.keyCache[L].SetOriginal(G[0],false);}catch(H){}L="cs_"+aContentSections[J]+"_b"+E+"w";try{this.keyCache[L].SetOriginal(G[0]);}catch(H){}L="cs_"+"b"+E+"s";try{this.keyCache[L].SetOriginal(G[1],false);}catch(H){}L="cs_"+aContentSections[J]+"_b"+E+"s";try{this.keyCache[L].SetOriginal(G[1]);}catch(H){}L="cs_"+"b"+E+"c";try{this.keyCache[L].SetOriginal(G[2],false);}catch(H){}L="cs_"+aContentSections[J]+"_b"+E+"c";try{this.keyCache[L].SetOriginal(G[2]);}catch(H){}}}}else{try{this.keyCache[I.item(D).nodeName].SetOriginal(B);}catch(H){}}}}}}}return true;};CustomLayout.prototype.StreamOut=function(){var A='<?xml version="1.0" encoding="UTF-8"?><layout ';for(var B in s_cur_layout.keyCache){if(s_cur_layout.keyCache[B].m_val!=""&&s_cur_layout.keyCache[B].m_val!=null){A+=s_cur_layout.keyCache[B].m_dbkey+'="';A+=(s_cur_layout.keyCache[B].m_val)?s_cur_layout.keyCache[B].m_val.replace(/"/g,""):"";A+='" ';}}return A+="/>";};CustomLayout.prototype.PopulateCSS=function(bAddTag,pageName){if(bAddTag==null){bAddTag=true;}if(s_cur_network=="my2"){var template=Data.CSS.Cache["my2"];}else{var template=Data.CSS.Cache["my_v2"];}if(!bDisplayFull&&pageName){template=this.SplitCSS(template,pageName);}var blocks=[];var pieces=template.split("/*");var returnCSS="";var ndxPieces=pieces.length;while(ndxPieces--){var a=pieces[ndxPieces].split("*/");if(a.length<2){blocks.push(a[0]);}else{if(a[0].Trim()=="DEFAULT"){returnCSS+=a[1];}else{blocks.push(a[1]);}}}var curCSS,matches;var n,m;var changed;var re=/@[A-Z\.]+@/igm;var ndxBlocks=blocks.length;while(ndxBlocks--){changed=true;curCSS=blocks[ndxBlocks];matches=curCSS.match(re);if(!matches){continue;}var i=matches.length;while(i--){try{n=matches[i];m=matches[i].substring(1,n.length-1);v=eval("this."+m);if(!v.isDisabled()){curCSS=curCSS.replace(n,v);changed=true;}}catch(e){}}if(changed){returnCSS+=curCSS;}}returnCSS=returnCSS.replace(/\/\*[A-Z \.]*\*\//ig,"");returnCSS=returnCSS.replace(/[a-z-]+[^;{]+@[A-Za-z\.]+@[^;]*;/g,"");returnCSS=returnCSS.replace(/opacity:0\.100/g,"opacity:1.0");returnCSS=returnCSS.replace("http://ak.webfetti.com/assets/layouts/http","http");returnCSS="/* Webfetti Layout Begins Here */"+returnCSS+"/* Webfetti Layout Ends Here */";if(bAddTag){return"<style>"+returnCSS+"</style>";}else{return returnCSS;}};CustomLayout.prototype.PopulateCSSFromTemplate=function(template,bAddTag){if(bAddTag==null){bAddTag=true;}var blocks=[];var pieces=template.split("/*");var returnCSS="";var ndxPieces=pieces.length;while(ndxPieces--){var a=pieces[ndxPieces].split("*/");if(a.length<2){blocks.push(a[0]);}else{if(a[0].Trim()=="DEFAULT"){returnCSS+=a[1];}else{blocks.push(a[1]);}}}var curCSS,matches;var n,m;var changed;var re=/@[A-Z\.]+@/igm;var ndxBlocks=blocks.length;while(ndxBlocks--){changed=true;curCSS=blocks[ndxBlocks];matches=curCSS.match(re);if(!matches){continue;}var i=matches.length;while(i--){try{n=matches[i];m=matches[i].substring(1,n.length-1);v=eval("this."+m);if(!v.isDisabled()){if(n.indexOf("Background.Image")!=-1&&v.m_val.indexOf("http")==-1){v="http://ak.webfetti.com/assets/layouts/"+v;}curCSS=curCSS.replace(n,v);changed=true;}}catch(e){}}if(changed){returnCSS+=curCSS;}}returnCSS=returnCSS.replace(/\/\*[A-Z \.]*\*\//ig,"");returnCSS=returnCSS.replace(/[a-z-]+[^;{]+@[A-Za-z\.]+@[^;]*;/g,"");returnCSS=returnCSS.replace(/opacity:0\.100/g,"opacity:1.0");returnCSS=returnCSS.replace("http://ak.webfetti.com/assets/layouts/http","http");returnCSS="/* Webfetti Layout Begins Here */"+returnCSS+"/* Webfetti Layout Ends Here */";if(bAddTag){return"<style>"+returnCSS+"</style>";}else{return returnCSS;}};CustomLayout.prototype.SplitCSS=function(H,A){var C=this.PageObjects[A];if(!C){return"";}var G=[];var F=H.split("/*");for(var D=1;D<F.length;D++){var B=F[D].split("*/");G[B[0].Trim()]=B[1];}var E="";E+=G["DEFAULT"]+"\r\n";for(D=0;D<C.length;D++){E+=G[C[D]]+"\r\n";}return E;};var csmiley_msg=null;function csmiley_generate(){var A=csmiley_gen_html(s_cur_asset,g("csmiley_edittext").value);displayCopyCode(csmiley_gen_code(s_cur_asset,g("csmiley_edittext").value));return A;}function generateFlashObject(B,C,D,O,N,G,L,J,M,K,F,P,A){if(arguments.length<=3){params=arguments[2];}else{return generateFlashObject(B,C,{width:D,height:O,oContainer:N,bReturn:G,Style:L,OtherAttributes:J,bUseCodeBase:M,quality:K,wmode:F,avatarParams:P,bPlay:A});}var H={width:null,height:null,oContainer:null,bReturn:false,Style:null,OtherAttributes:null,bUseCodeBase:false,quality:"high",wmode:"Transparent",avatarParams:null,bPlay:false,salign:"tl"};for(key in H){if(params[key]==null){params[key]=H[key];}}if(!B){return false;}if(!C){C="oAvatarControl";}if(B.indexOf("?")==-1){B+="?";}var I='<object id="'+C+'" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"';if(params.bUseCodeBase){I+=' codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"';}else{I+=' codebase="#version=8,0,0,0"';}I+=' align="middle"';I+=" onerror=\"if ( typeof(generateFlashObjectError) == 'function' ) generateFlashObjectError();return false;\"";if(params.width){I+=' width="'+params.width+'"';}if(params.height){I+=' height="'+params.height+'"';}if(params.Style){I+=params.Style;}if(params.OtherAttributes){I+=params.OtherAttributes;}I+=">";I+='<param name="movie" value="'+B+'">';I+='<param name="WMode" value="'+params.wmode+'">';I+='<param name="allowScriptAccess" value="always">';I+='<param name="quality" value="'+params.quality+'">';I+='<param name="menu" value="0">';I+='<param name="play" value="'+params.bPlay+'">';if(params.salign){I+='<param name="salign" value="'+params.salign+'">';}if(params.avatarParams){I+='<param name="FlashVars" value="'+params.avatarParams+'">';}var E=(navigator.appName.toLowerCase().indexOf("microsoft internet explorer")>-1);if(!E){I+='<embed src="'+B+'" play="'+params.bPlay+'" menu="'+params.bPlay+'" quality="'+params.quality+'" wmode="'+params.wmode+'"';if(params.width){I+=' width="'+params.width+'"';}if(params.height){I+=' height="'+params.height+'"';}if(params.avatarParams){I+=' FlashVars="'+params.avatarParams+'"';}I+=' name="'+C+'" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" '+'pluginspage="http://www.macromedia.com/go/getflashplayer" />';}I+="</object>";if(params.oContainer){params.oContainer.innerHTML=I;}else{if(params.bReturn){return I;}else{document.write(I);}}}function unescapeHTML(B){var A=document.createElement("DIV");A.innerHTML=B;if(A.innerText){return A.innerText;}else{if(A.textContent){return A.textContent;}else{return B;}}}function generateClickViewString(B,C){var A="";if(pageType=="details"){A="/clicks/views/"+path.substring(0,path.substring(0,path.length-1).lastIndexOf("/"))+"/";}else{A="/clicks/views/"+path;}if(B){A+=B;}if(B.indexOf("copy code")!=-1||B.indexOf("quick post")!=-1){A+="/"+cur_network;}if(B.indexOf("copy_code")!=-1||B.indexOf("quick_post")!=-1){A+="/"+cur_network;}if(C&&B!="change network"&&B!="add"){A+="/"+C;}return formatUrchin(A);}function formatUrchin(A){return A.replace(/ /g,"_").replace(/&/g,"").replace(/__/g,"_").replace(/\'/g,"").replace(/_\/_/g,"_-_").replace(/_\/\/_/g,"_-_");}function thisMovie(A){if(navigator.appName.indexOf("Microsoft")!=-1){return window[A];}else{return window.document[A];}}function setCountdownVars(B){B.id=s_cur_asset;var A=getCountdownVars(s_cur_asset);if(A){A.month=B.month;A.day=B.day;A.year=B.year;}else{arr_countdownclock.push(B);}asset_click(s_cur_asset,true,s_cur_asset_id);return ;}function getCountdownVars(B){var A=null;if(arr_countdownclock.length>0){for(i=0;i<arr_countdownclock.length;i++){if(arr_countdownclock[i].id==B){A=arr_countdownclock[i];}}}return A;}function checkToolbarUpdate(){if(oToolbarController.bInstalled){var A=true;if(getCookie("toolbarUpdate")){A=false;}if((oToolbarController.sVersion&&A)&&(oToolbarController.NeedsUpgrade({tb:"mws.settingsCtl",ver:"2.3.50.21"}))){displayToolbarUpdateModal();}}}function setToolBarUpdateCookie(){var A=new Date("December 31, 2010 12:59:59");setCookie("toolbarUpdate","false",A,"/",null,null);UI_Window_Close();}function updateToolbar(){var B=$("tsox_tbck").attr("cbid");if(B!=null){B=B.split("_");B=B[B.length-1];}var A=oToolbarController.sParentPartnerID||B;document.location=sUpdateTBUrl+"?partner="+A+"&pg=wf_home&up=true&spk="+VCipherRollerkey;}function mouseOverUpdate(A){A.src="http://ak.webfetti.com/tbupdate/tbupdate_button_rollover.gif";}function mouseOutUpdate(A){A.src="http://ak.webfetti.com/tbupdate/tbupdate_button.gif";}function displayToolbarUpdateModal(){var A='<div class="toolbarUpdateDivTop aRight"><img src="http://ak.webfetti.com/tbupdate/tbupdate_close.jpg" alt="Close" class="hand" onclick="UI_Window_Close();" style="position:relative;top:0px;"/>&nbsp;</div>'+'<div class="toolbarUpdateDiv">'+'<div class="toolbarUpdateText">We recently unveiled a new product upgrade that will enable you to send our cool Webfetti Glitter graphics, 3D animations and Gidgets to your friends via instant messaging (IM) or email!<br><br>Click on the "Upgrade Now" button below to start using this great new feature!</div>'+'<div class="toolbarUpdateLinksDiv"><div class="toolbarUpdateLinks"><a href="#" onclick="UI_Window_Close();">Remind me later</a></div><div class="toolbarUpdateLinks"><a href="#" onclick="setToolBarUpdateCookie();">No thanks</a></div></div>'+'<div class="toolbarUpdateButton"><img id="updateTBBtn" src="http://ak.webfetti.com/tbupdate/tbupdate_button.gif" alt="Update Now!" class="hand" onclick="updateToolbar();" onmouseover="mouseOverUpdate(this);" onmouseout="mouseOutUpdate(this);" /></div>'+"</div>";UI_Window_Open(A,null,true,425,325,true);}function getCookieVal(B){var A=document.cookie.indexOf(";",B);if(A==-1){A=document.cookie.length;}return unescape(document.cookie.substring(B,A));}function setCookie(B,E,A,G,D,F,C){document.cookie=B+"="+((C)?escape(E):E)+((A)?";expires="+A.toGMTString():"")+((G)?";path="+G:"")+";domain=.webfetti.com"+((F)?";secure":"");}function getCookie(C){var B=C+"=";var F=B.length;var A=document.cookie.length;var D=0;while(D<A){var E=D+F;if(document.cookie.substring(D,E)==B){return getCookieVal(E);}D=document.cookie.indexOf(" ",D)+1;if(D==0){break;}}}function newCookieParse(E,B){var F=new RegExp("(?:\\&|^)"+E+"=(?:\\w|.)+(\\&|$)");var D=B;var A=0;if((D!=null)&&(D!="")){var C=F.exec(D);if((C!=null)&&(typeof C.length=="number")){A=C[0];if(A.indexOf("&")!=-1){A=A.substring(1,(A.length-1));}A=A.substring(E.length+1);}}return A;}function setCookieChip(D,A,C){var E=getCookie(D);var F=function(){var G=A+"="+C+"&";(E==null)?E="&"+G:E+=G;setCookie(D,E,getPermDate(),"/");};if(E==null){F();}else{var B=newCookieParse(A,E);if((!B)&&(E.indexOf(A+"=")==-1)){F();}}}function getPermDate(){var A=new Date();A.setTime(A.getTime()+(1825*24*60*60*1000));return A;}function getToolbarObj(){var A=document.getElementById("ToolbarCtlMWS");if(A==null){A=document.getElementById("SettingsControl");}return A;}function getXPIToolbarObj(){var A=document.getElementsByTagName("TSOX_TBCk");return A;}function testForTrkParams(){var B="cssP";var E="uid";var C="p";if(!oToolbarController.bInstalled){return ;}var D=oToolbarController.get_property("sUID",null);var A=oToolbarController.get_property("sPartnerID",null);if(typeof (D)=="string"){setCookieChip(B,E,D);}if(typeof (A)=="string"){setCookieChip(B,C,A);}}function getFlashMovieObject(A){if(window.document[A]){return window.document[A];}if(navigator.appName.indexOf("Microsoft Internet")==-1){if(document.embeds&&document.embeds[A]){return document.embeds[A];}}else{return document.getElementById(A);}return null;}String.prototype.Trim=function(){return this.replace(/^\s*|\s*$/gm,"");};String.prototype.IsValidJPGUrl=function(){var A=new RegExp(/^http.*\.jpe?g/i);return(A.test(this))?true:false;};String.prototype.IsValidMP3Url=function(){var A=new RegExp(/^http.*\.mp3$/i);return(A.test(this))?true:false;};String.prototype.IsValidUrl=function(){var A=new RegExp(/^http.*\.[a-z](1,)/i);return(A.test(this))?true:false;};String.prototype.StripInvalidChars=function(){var A=/["'~|]/g;return this.replace(A,"");};function toggleDisplay(A){(A.offsetWidth==0)?showEle(A):hideEle(A);}function showEle(A){A.style.display="block";return A;}function hideEle(A){A.style.display="none";return A;}function removeElement(A){var C=A.parentNode;var B=C.removeChild(A);return B;}function parseIntAll(A){if(typeof (A)=="string"){if((parseInt(A)+"")=="NaN"){for(i=1;i<A.length;i++){if((parseInt(A.charAt(i))+"")!="NaN"){return parseInt(A.substring(i,A.length));}}}else{if(typeof (parseInt(A))=="number"){return parseInt(A);}}}else{if(typeof (A)=="number"){return A;}}return false;}function showHideSelects(A){arrSelects=document.getElementsByTagName("select");for(i=0;i<arrSelects.length;i++){if(A){arrSelects[i].style.visibility="visible";}else{arrSelects[i].style.visibility="hidden";}}}var iPREV_MAX_WIDTH=295;var iPREV_MAX_HEIGHT=255;function oFWP_Module(D,B,C,A){this.oFlashVars={u:null,bg:null,s:1};this.sFileName=D;this.sImgPath;this.iHeight=C;this.iWidth=B;this.nScale=1;this.id="default";this.cDELIM="|";this.sAssetId=A;this.Construct=function(H,F,G,E){this.sFileName=H;this.iHeight=G;this.iWidth=F;if(E==null||E=="undefined"){this.sAssetId=H;}else{this.sAssetId=E;}};this.StreamIn=function(F){var E=F.parseJSON();this.Construct(E.file,E.width,E.height,E.assetid);this.nScale=E.scale;this.oFlashVars=E.flashVars;this.sImgPath=E.imgPath;if(typeof (E.playerHTML)!="undefined"){this.sPlayerHTML=E.playerHTML;this.iPlayerHeight=E.playerHeight;this.iPlayerWidth=E.playerWidth;}};this.StreamOut=function(){var E={file:this.sFileName,imgPath:this.sImgPath,height:this.iHeight,width:this.iWidth,scale:this.nScale,flashVars:this.oFlashVars,playerHTML:this.sPlayerHTML,playerHeight:this.iPlayerHeight,playerWidth:this.iPlayerWidth,assetid:this.sAssetId};return ObjectToJSONString(E);};this.GetHTML=function(){var F=this.GetFlashVarsStr();var G=this.sFileName;if(G.indexOf(".swf")==-1){G+=".swf";}var E='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"'+' codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"'+' width="'+(this.iWidth*this.nScale)+'" height="'+(this.iHeight*this.nScale)+'"'+' id="'+this.sFileName+'" align="middle">'+'<param name="allowScriptAccess" value="always" />'+'<param name="movie" value="'+this.sImgPath+G+'" />'+'<param name="quality" value="high" />'+'<param name="FlashVars" value="'+F+'" />'+'<param name="WMode" value="transparent" />'+'<embed src="'+this.sImgPath+G+'" quality="high" bgcolor="#ffffff"'+' width="'+(this.iWidth*this.nScale)+'"'+' height="'+(this.iHeight*this.nScale)+'" name="'+this.sFileName+'"'+' align="middle" FlashVars="'+F+'" allowScriptAccess="always"'+' type="application/x-shockwave-flash" wmode="transparent"'+' pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></object>';return E;};this.GetId=function(){return this.sAssetId;};this.GetFlashVarsStr=function(){var E="";for(ii in this.oFlashVars){if(this.oFlashVars[ii]!=null){E+="&"+ii+"="+this.oFlashVars[ii];}}return E;};this.SetFlashVar=function(G,F,E){G=G.toLowerCase();(!E)?this.oFlashVars[G]=F:this.oFlashVars[G]+=F;};this.UpdateSplitFlashVar=function(E,H,F){var G=this.oFlashVars[H].split(this.cDELIM);for(var I=0;I<G.length;I++){if(I==E){G[I]=escape(F);this.oFlashVars[H]=G.join(this.cDELIM);break;}}};this.ReplaceHTML=function(E){g(E).innerHTML=this.GetHTML();};this.GetPreviewHTML=function(E,G,J){var H=[this.iWidth,this.iHeight,this.nScale];var F;if(J){F=[E,G];}else{F=this.SetScaledDims(E,G);}this.iWidth=F[0];this.iHeight=F[1];this.nScale=1;var I=this.GetHTML();this.iWidth=H[0];this.iHeight=H[1];this.nScale=H[2];return I;};this.SetScaledDims=function(E,F){if(!E){E=F;}var H=[];var G;H[0]=this.iWidth;H[1]=this.iHeight;if(H[0]<F){F=H[0];}if(H[1]<E){E=H[1];}G=Math.max(H[0],H[1]);if(G==H[0]){ratio=H[1]/H[0];H[0]=F;H[1]=Math.round(ratio*F);if(H[1]>E){H[0]=E;H[1]=E*(1/ratio);}}else{ratio=H[0]/H[1];H[1]=E;H[0]=Math.round(ratio*E);if(H[0]>F){H[0]=F;H[1]=F*(1/ratio);}}if(isNaN(H[1])){H[1]=E;H[0]=F;}return H;};this.HasUserData=function(){if(this.oFlashVars["u"]==null||this.oFlashVars["u"]==""){return false;}return true;};}function oFWP_VideoModule(){this.sImgPath=sImgPath+"/assets/modules/video/";this.oThumbDiv=null;this.sPlayerHTML=null;this.iPlayerWidth=null;this.iPlayerHeight=null;this.GetVideoHTML=function(B){var F=1.0318;var D=0.057;var A=Math.round(this.iPlayerHeight*0.057);var C='<div style="position:absolute;" align="center">';if(this.sPlayerHTML!=null){if(B){C+=this.GetPlayerPreviewHTML(iPREV_MAX_WIDTH,iPREV_MAX_HEIGHT);}else{C+=this.sPlayerHTML;}}C+="</div>";C+='<div style="position:absolute;margin-top:-'+A+'px;">';if(B){var E=Math.round(iPREV_MAX_HEIGHT*F);C+=this.GetPreviewHTML(iPREV_MAX_WIDTH,E,1);}else{this.iWidth=this.iPlayerWidth;this.iHeight=Math.round(this.iPlayerHeight*F);C+=this.GetHTML();}C+="</div>";if(B){C+='<div style="height:'+iPREV_MAX_HEIGHT+"px;width:"+iPREV_MAX_WIDTH+'px"></div>';}else{C+='<div style="height:'+this.iPlayerHeight+"px;width:"+this.iPlayerWidth+'px"></div>';}return C;};this.GetPlayerPreviewHTML=function(E,B){var D=new RegExp(this.iPlayerWidth,"g");var A=new RegExp(this.iPlayerHeight,"g");var C=this.sPlayerHTML.replace(D,E).replace(A,B);return C;};this.SetPlayer=function(A,B,C){this.sPlayerHTML=A;this.iPlayerWidth=B;this.iPlayerHeight=C;};this.DisplayPreview=function(){replaceExternalObject("dvVideoModPreview",this.GetVideoHTML(true));};}function oFWP_PhotoModule(){this.sImgPath=sImgPath+"/assets/modules/photo/";this.oThumbDiv=null;this.oFlashVars={u:null,bg:null,s:1,r:0};this.AddPhoto=function(B,A){B=escape(B);A=escape(A);if(this.oFlashVars["u"]==null||this.oFlashVars["u"]==""){this.SetFlashVar("u",B);this.SetFlashVar("c",A);}else{this.SetFlashVar("u",this.cDELIM+B,true);this.SetFlashVar("c",this.cDELIM+A,true);}};this.RemoveUrl=function(C,E){var A=this.oFlashVars["u"];var D=this.oFlashVars["c"];var B=new RegExp("\\|?"+escape(C));A=A.replace(B,"");if(A.charAt(0)=="|"){A=A.substring(1,A.length);}var F=new RegExp("\\|?"+escape(E));D=D.replace(F,"");if(D.charAt(0)=="|"){D=D.substring(1,D.length);}this.oFlashVars["u"]=A;this.oFlashVars["c"]=D;};}function oFWP_MusicModule(){this.sImgPath=sImgPath+"/assets/modules/music/";this.oThumbDiv=null;this.oFlashVars={u:null,bg:null,s:1,r:0,c:null};this.AddSong=function(C,B,A){C=escape(C);var D=escape(B+"~"+A);if(!this.HasUserData()){this.SetFlashVar("u",C);this.SetFlashVar("c",D);}else{this.SetFlashVar("u",this.cDELIM+C,true);this.SetFlashVar("c",this.cDELIM+D,true);}};this.RemoveSong=function(D,F,A){var C=this.oFlashVars["u"];var B=this.oFlashVars["c"];var H=F+"~"+A;var E=new RegExp("\\|?"+escape(D));C=C.replace(E,"");if(C.charAt(0)=="|"){C=C.substring(1,C.length);}var G=new RegExp("\\|?"+escape(H));B=B.replace(G,"");if(B.charAt(0)=="|"){B=B.substring(1,B.length);}this.oFlashVars["u"]=C;this.oFlashVars["c"]=B;};}function GifText(){this.sIMG_PATH=sImgPath+"/assets/fonts/";this.sIMG_EXT=".gif";this.sFont=null;this.sTheText="SAMPLE";this.cSize="s";this.sAssetId=null;var A=null;this.bookendLeft=null;this.bookendRight=null;this.StreamIn=function(C){var B=C.parseJSON();this.sFont=B.font;this.cSize=B.size;A=B.charset;this.sTheText=B.text;if(B.assetid==null||B.assetid=="undefined"){this.sAssetId=B.font;}else{this.sAssetId=B.assetid;}};this.StreamOut=function(){var B={font:this.sFont,size:this.cSize,charset:A,text:this.sTheText,assetid:this.sAssetId};return ObjectToJSONString(B);};this.GetHTML=function(){var B="";if(this.bookendLeft){B+='<img border="0" src="'+this.sIMG_PATH+this.sFont+this.cSize+"/"+this.bookendLeft+'"/>';}for(ii=0;ii<this.sTheText.length;ii++){B+=this.GetCharImg(this.sTheText.charAt(ii));}if(this.bookendRight){B+='<img border="0" src="'+this.sIMG_PATH+this.sFont+this.cSize+"/"+this.bookendRight+'"/>';}return B;};this.GetId=function(){return this.sAssetId;};this.GetCharImg=function(B){if(B.length==1&&A.toLowerCase().indexOf(B.toLowerCase())>-1){switch(B){case" ":B="sp";break;case"&":B="am";break;case"'":B="ap";break;case"*":B="as";break;case"@":B="at";break;case"[":B="bl";break;case"]":B="br";break;case"$":B="do";break;case"!":B="ex";break;case"=":B="eq";break;case"?":B="qu";break;case"#":B="po";break;case"%":B="pe";break;case".":B="pd";break;default:B=B.toLowerCase();break;}var C='<img border="0" src="'+this.sIMG_PATH+this.sFont+this.cSize+"/"+B+this.sIMG_EXT+'"';C+="/>";return C;}else{if(B=="\n"){return"<br/>";}return"";}};this.SetFont=function(C,D,B){if(typeof (C)=="string"){this.sFont=C;}if(typeof (D)=="string"){A=unescape(D)+" ";}if(typeof (B)=="string"){this.sAssetId=B;}};this.GetFont=function(){return this.sFont;};this.SetText=function(B){if(typeof (B)=="string"){this.sTheText=B;}};this.GetText=function(){return this.sTheText;};this.SetSize=function(B){this.cSize=B;};this.GetSize=function(){return this.cSize;};this.UpdateAndPreview=function(B){this.sTheText=B;return this.GetHTML();};this.GetCharSet=function(){return A;};this.HasCharset=function(){return(A==null)?false:true;};this.SetBookends=function(B,C){this.bookendLeft=B;this.bookendRight=C;};}function FlashText(){var A=430;var C=200;var B="\r\n";this.sIMG_PATH=sImgPath+"/assets/fonts/swf/";this.iEmbedWidth=A;this.iEmbedHeight=C;this.sTheText="sample"+B;this.sFontSize=50;this.sFont=null;this.sColor="0xFF00CC";this.sStyleStr=this.sFontSize+"|"+this.sColor;this.sAssetId=null;this.StreamIn=function(E){var D=E.parseJSON();this.iEmbedWidth=D.width;this.iEmbedHeight=D.height;this.sTheText=D.text;this.sFontSize=D.size;this.sFont=D.file;this.sColor=D.color;if(D.assetid==null||D.assetid=="undefined"){this.sAssetId=D.file;}else{this.sAssetId=D.assetid;}this.SetStyleString();};this.StreamOut=function(){var D={file:this.sFont,size:this.sFontSize,color:this.sColor,width:this.iEmbedWidth,height:this.iEmbedHeight,text:this.sTheText,assetid:this.sAssetId};return ObjectToJSONString(D);};this.GetHTML=function(K){var J="tt";var D="";var H=this.iEmbedWidth;var G=this.iEmbedHeight;if(K){H=A;G=C;D="&mode=edit";}var F="t="+escape(this.sTheText)+"&s="+this.sStyleStr+D;var E=this.sFont;if(typeof (cur_network)=="string"&&cur_network.toLowerCase()=="hi5"&&!K){E+="?"+F;F="";}var I='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" '+'codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" '+'width="'+H+'" height="'+G+'" id="'+J+'" '+'align="middle">'+'<param name="allowScriptAccess" value="always" />'+'<param name="movie" value="'+E+'?" />'+'<param name="FlashVars" value="'+F+'" />'+'<param name="WMode" value="transparent" />'+'<embed src="'+E+'" width="'+H+'" height="'+G+'" name="tt" align="middle" allowScriptAccess="always" '+'type="application/x-shockwave-flash" wmode="transparent" '+'FlashVars="'+F+'"></embed>'+"</object>";return I;};this.GetId=function(){return this.sAssetId;};this.SetFontSize=function(D){var F=/[0-9]/;var E=/^-?([0-9]*)(\.?)([0-9]*)$/;if(F.test(D)&&E.test(D)){this.sFontSize=D;this.SetStyleString();return true;}else{return false;}};this.SetColor=function(D){var E=/^(0x|#)?((?:\d|[a-f]){6})$/i;if(0==D.search(E)){this.sColor=D;this.SetStyleString();return true;}else{return false;}};this.SetStyleString=function(){this.sStyleStr=this.sFontSize+"|"+this.sColor;};this.GetStyle=function(){this.SetStyleString();return this.sStyleStr;};this.SetText=function(D){if(typeof (D)=="string"){this.sTheText=D;if(D.indexOf("\n")==-1){this.sTheText+=B;}}};this.GetText=function(){return this.sTheText;};}function showModPopPreview(B){var A='<div class="aCenter" align="center" style="margin-top:6px;">'+B.GetHTML()+'<br/><span style="text-decoration:underline;" onclick="UI_Window_Close();return false;">close</span></div>';UI_Window_Open(A,"closeOnClick",true,(parseInt(B.iWidth)+20),(parseInt(B.iHeight)+50));showHideSelects(0);return false;}function highlightMod(A){A.className="fwpMod fwpModSelected";}function deselectMod(A){A.className="fwpMod";}function overMod(A){A.className="fwpMod fwpModOver";}function overCurrentMod(A,B){if(B!=null&&B.oThumbDiv!=A){overMod(A);}}function outCurrentMod(A,B){if(B!=null&&B.oThumbDiv!=A){deselectMod(A);}}function getCurrentModule(){var A;switch(dataSection){case"music":A=oSelectedMusicMod;break;case"photo":A=oMod;if(!oMod.HasUserData()){A=oPhotoModPreview;}break;case"video":A=oSelectedVideoMod;break;case"text":if(dataSubSection=="glittertext"){A=oFT;}else{A=oGT;}break;}return A;}function setModCopyCode(A,D,B){var C=A+(B!="7"?"<br/>":"");s_cur_assetHTML=C;s_cur_asset_id=D;C+=getTrackingHTML(((trackingOverride!=""&&D==defaultAssetCode)?trackingOverride:B),cur_network,"",D,false);setCopyCode(C);}function checkFocusTxt(A){if(A.value.toLowerCase().Trim()=="sample"){A.value="";}}var ns_optionsDiv=null;var ns_open=false;function ns_display(C){var A=getRealPosition(C);var B=g("ns_optionsDiv");ns_holdOpen=true;B.style.visibility="visible";B.style.pixelLeft=A[0];B.style.pixelTop=A[1]+C.offsetHeight;}function ns_hide(){g("ns_optionsDiv").style.visibility="hidden";}function ns_click(A){nsp_changeTo(A.id);nsp_mouseclick(g("network_select"));}function ns_mouseover(A){A.className="ns_option_over";}function ns_mouseout(A){A.className="ns_option";}function nsp_mouseclick(A){if(!ns_open){A.className="nsp_div_open";ns_display(A);ns_open=true;}else{A.className="nsp_div";ns_hide();ns_open=false;}}function nsp_changeTo(A){var B=A.split("_");var D=document.location.href;var C=D.replace(networks[cur_network],networks[B[1]]);if(B[1]=="twitter"){layoutNetworkSwitch(B[1]);}else{if(dataSection=="layout"){layoutNetworkSwitch(B[1]);}else{if(cur_network!=B[1]){var E=g("network_select_text");E.innerHTML="&nbsp;&nbsp;<b>Network:</b>&nbsp;"+networksDisplay[B[1]];cur_network=B[1];s_cur_network=networkCodes[cur_network];setCookie("cur_network",B[1],null,"/",null,null);document.location.href=C;}}}}function layoutNetworkSwitch(A){switch(A){case"ebay":document.location.href=permBaseUrl+networks[A]+"/Layouts/Backgrounds.jhtml";break;case"twitter":document.location.href=permBaseUrl+networks[A]+"/Layouts/Twitter-Backgrounds.jhtml";break;default:document.location.href=permBaseUrl+networks[A]+"/Layouts/Full-Layouts.jhtml";}}function nsp_changeToNetwork(A){g("network_select_text").innerHTML=networks[A];cur_network=A;s_cur_network=networkCodes[cur_network];setCookie("cur_network",A,null,"/",null,null);updateLayoutLinks();}function writeNetSelMenuOptions(C){var B="";for(var A in networks){B+="<div class='ns_option' id='ns_"+A+"' onclick='ns_click(this)' onmouseover='ns_mouseover(this)' onmouseout='ns_mouseout(this)'>&nbsp;&nbsp;"+networksDisplay[A]+"</div>";}g(C).innerHTML=B;}function goToLayoutEditor(A){var B=(A?"?refPath="+escape(A):"");document.location=sLayoutEditorUrl+B;}function callIframe(id,url,appendTo,callback){var appendToObj=(appendTo?appendTo:document.body);$(appendToObj).append('<IFRAME id="'+id+'" name="'+id+'" border="0" height="100%" width="946px" style="clear:both;"></IFRAME>');$("iframe#"+id).attr("src",url);$("iframe#"+id).load(function(){eval(callback)(this);});}function openPromo(){var A=sRatingsTutorialUrl;var B=window.open(A,"ratingsTutorialWindow","height=900,width=574,scrollbars=yes,resizable=no,status=yes,toolbar=no,menubar=no,location=no");B.moveTo(0,0);}function getAbsolutePosition(B){var C={x:B.offsetLeft,y:B.offsetTop};if(B.offsetParent){var A=getAbsolutePosition(B.offsetParent);C.x+=A.x;C.y+=A.y;}return C;}function doInternalSearch(){var A=$("input[name='searchTerms']").val();window.location=sSearchByTypeUrl+"?searchTerms="+escape(A)+"&pageName="+sSearchByTypeName+"&network="+networks[cur_network];return false;}function launchTwitterModal(A){if(tbCheck("tw","",true,"")){if(A!=""&&A!=null){s_cur_asset_id=A;}ckTrk("/clicks/twittermodal/open");ui_close_func=closeTwitterModalOutside;UI_Window_Open($("#twitterModal").html(),"closeOnClick",true,440,200,true);$("#twitterModalBG").attr("src","http://ak.webfetti.com/assets/layouts/"+$("#assetUrl_"+s_cur_asset_id).val());}}function closeTwitterModal(A){if(A=="done"){ckTrk("/clicks/closetwittermodal/done");}else{ckTrk("/clicks/closetwittermodal/close");}ui_close_func=null;UI_Window_Close();}function closeTwitterModalOutside(){ckTrk("/clicks/closetwittermodal/offbox");}function launchMySpace2CopyCodeModal(D){if(!bIsIE){$("#myspaceTemplate").hide();}var B='<div class="my2CCModal_Main"><table class="my2CCModal_Table" border="0" cellspacing="0" cellpadding="0">';B+='<tr><td colspan="2" align="left"><div class="my2CCModal_Title">Profile 2.0</div></td></tr>';B+='<tr><td colspan="2" align="center"><div class="my2CCModal_Instructions">To get this layout to work with MySpace 2.0 please complete <b>BOTH</b> steps below.</div></td></tr>';B+='<tr><td align="center"><div><table class="my2CCModal_InnerTable"><tr><td colspan="2" align="left"><div class="my2CCModal_InnerTitle">Step 1: About Me</div></td></tr><tr><td colspan="2" align="left"><div class="my2CCModal_InnerInstructions">Copy and Paste this code in your <b>About Me</b> section</div></td></tr><tr><td align="center"><div class="my2CCModal_CopyCode">';B+=getFlash("http://ak.webfetti.com/v3/ccbtn20_2.swf?v=1","64","20","ccbtnBadge_"+D,"id=ccbtnBadge_"+D+"&amp;urchinfunc=ckTrk&amp;urchin=/clicks/profile2modal/aboutme/copy/"+D+"&amp;notify=&amp;notify_arg=","8,0,0,0","");B+='</div></td><td><div class="my2CCModal_Textbox"><textarea id="txt_my2_badge" class="text_myspace2" readonly>Loading...</textarea></div></td></tr><tr><td colspan="2" align="left"><div class="my2CCModal_Link"><a href="http://profileedit.myspace.com/index.cfm?fuseaction=profile.blurbs" target="_MySpaceWin" onclick="ckTrk(\'clicks/profile2modal/aboutme/paste/'+D+"')\">Paste Code</a> in your <b>About Me</b> section on MySpace</div></td></tr></table></div></td></tr>";B+='<tr><td align="center"><div><table class="my2CCModal_InnerTable"><tr><td colspan="2" align="left"><div class="my2CCModal_InnerTitle">Step 2: CSS</div></td></tr><tr><td colspan="2" align="left"><div class="my2CCModal_InnerInstructions">Copy and Paste this code in your <b>CSS</b> section</div></td></tr><tr><td align="center"><div class="my2CCModal_CopyCode">';B+=getFlash("http://ak.webfetti.com/v3/ccbtn20_2.swf?v=1","64","20","ccbtnCss_"+D,"id=ccbtnCss_"+D+"&amp;urchinfunc=ckTrk&amp;urchin=/clicks/profile2modal/css/copy/"+D+"&amp;notify=ccbtn_popularity&amp;notify_arg="+"AssetPathTBD","8,0,0,0","");B+='</div></td><td><div class="my2CCModal_Textbox"><textarea id="txt_my2_css" class="text_myspace2" readonly>Loading...</textarea></div></td></tr><tr><td colspan="2" align="left"><div class="my2CCModal_Link"><a href="http://profileedit.myspace.com/index.cfm?fuseaction=pageeditor.profile" target="_MySpaceWin" onclick="ckTrk(\'clicks/profile2modal/css/paste/'+D+"')\">Paste Code</a> in your <b>CSS</b> section on MySpace</div></td></tr></table></div></td></tr>";B+='<tr><td align="center"><div class="my2CCModal_Buttons"><table class="my2CCModal_ButtonsTable"><tr><td align="center"><div class="my2CCModal_BtnDone" onclick="closeMySpace2CopyCodeModal();ckTrk(\'clicks/profile2modal/done\')" /></td><td align="center"><div class="my2CCModal_BtnCancel" onclick="closeMySpace2CopyCodeModal();ckTrk(\'clicks/profile2modal/cancel\')"/></td></tr></table></div></td></tr>';B+="</table></div>";ui_close_func=function(){closeMySpace2CopyCodeModal();ckTrk("clicks/profile2modal/close");};UI_Window_Open(B,"closeOnClick",true,400,465);if(dataSection=="artist"){var C=jQuery("input#assetType_"+D).attr("value");var A=jQuery("input#assetUrl_"+D).attr("value");blended_gen_code(C,A,D);}else{asset_click(D,false);}setTimeout(function(){setMySpace2Badge(D);},1000);setTimeout(function(){setMySpace2CopyCode(D);},1000);}function closeMySpace2CopyCodeModal(){ui_close_func=null;UI_Window_Close();if(!bIsIE){$("#myspaceTemplate").show();}}function setMySpace2Badge(B){var A=getTrackingHTML(dataSection,cur_network,null,B,true);$("#txt_my2_badge").attr("value",A);if(bIsIE){$("object[name=ccbtnBadge_"+B+"]")[0].setClipboardData(A);}else{$("embed[name=ccbtnBadge_"+B+"]")[0].setClipboardData(A);}}function setMySpace2CopyCode(B){var A=Data.CurrentCSS(dataSection);$("#txt_my2_css").attr("value",A);if(bIsIE){$("object[name=ccbtnCss_"+B+"]")[0].setClipboardData(A);}else{$("embed[name=ccbtnCss_"+B+"]")[0].setClipboardData(A);}}function limitChars(D,A,B){var E=$("#"+D).val();var C=E.length;if(C>=A){$("#"+B).html("0");$("#"+D).val(E.substr(0,A));return false;}else{$("#"+B).html(A-C);return true;}}function ratings_init(){if(($.browser.msie&&$.browser.version.substr(0,3)<7)||($.browser.opera&&$.browser.version.substr(0,3)<6)){$("img[src$='heart18_full.png']").attr("src","http://ak.webfetti.com/v3/heart18_full.gif");$("img[src$='heart18_empty.png']").attr("src","http://ak.webfetti.com/v3/heart18_empty.gif");}$(".asset_rating").hover(function(){var C=$(this).find("span").text().trim();var B=$(this).find("img").attr("src");$(this).css("color","#990453").find("span").text($(this).find("span").attr("alttxt")).attr("alttxt",C);if(B.indexOf("24_")!=-1){$(this).find("img").attr("src","http://ak.webfetti.com/v3/heart24_over.gif");}else{if(B.indexOf(".png")!=-1){$(this).find("img").attr("src","http://ak.webfetti.com/v3/heart18_over.png");}else{$(this).find("img").attr("src","http://ak.webfetti.com/v3/heart18_over.gif");}}$(this).find("img").attr("altsrc",B);},function(){if($(this).find("img").attr("altsrc")!=null){var B=$(this).find("span").text().trim();$(this).css("color","gray").find("span").text($(this).find("span").attr("alttxt")).attr("alttxt",B);$(this).find("img").attr("src",$(this).find("img").attr("altsrc"));}}).click(function(){if($(this).find("span").text().trim()=="Love it!"){ratings_urchin_path=$(this).find(":hidden").val().split("|")[1].split(" ").join("_");asset_for_fb_post={id:$(this).find(":hidden").val().split("|")[0],assetName:$(this).find(":hidden").val().split("|")[2]};asset_rate_click({ratingtag:this,id:$(this).find(":hidden").val().split("|")[0],path:$(this).find(":hidden").val().split("|")[1]});}});$("#tag_btn").hover(function(){$(this).css("color","#990453").find("img").attr("src","http://ak.webfetti.com/v3/tag_over.gif");},function(){$(this).css("color","gray").find("img").attr("src","http://ak.webfetti.com/v3/tag_out.gif");}).click(function(){ratings_urchin_path=$(this).find(":hidden").val().split("|")[0].split(" ").join("_");asset_for_fb_post={id:$(this).parent().find(":hidden").val().split("|")[0],assetName:$(this).parent().find(":hidden").val().split("|")[2]};asset_tag_click({id:$(this).find(":hidden").val()});});var A=$("#v2_header_favorites").parent().attr("href");$("#v2_header_favorites").parent().removeAttr("href").css("cursor","pointer").click(function(){if(isUserLoggedIn){window.location=A;}else{ratings_urchin_path="/favorites";$(".registrationModal .ui-dialog-title").text("To view all your saved favorites, please sign in or create a Webfetti account.");$(".registrationModal #regModalFacebookLogin").hide().parent().css({background:"url(http://ak.webfetti.com/v3/Reg_Modal_Login.gif) no-repeat",height:154});$("#registrationModal #regMode").val("fav");$("#registrationModal").dialog("open");}});$("#tagSorting").mouseover(function(){$("#tagSortSelectDropdown").css("top",$("#tagSorting").position().top+15).css("left",$("#tagSorting").position().left-5);$("#tagSortSelectDropdown").show();});$("#tagSortSelectDropdown").mouseout(function(F){var C=$("#tagSortSelectDropdown").position().left;var B=C+$("#tagSortSelectDropdown").width();var E=$("#tagSortSelectDropdown").position().top;var D=E+$("#tagSortSelectDropdown").height();if(F.pageX<C||F.pageX>B||F.pageY<E||F.pageY>D){$("#tagSortSelectDropdown").hide();}});createRegistrationDialog();createFirstTimeDialog();createAddTagsModal();createTagsViewModal();}var asset_to_rate_after_login={};var reload_page_after_rate=false;var ratings_urchin_path="";function asset_rate_click(B){if(isUserLoggedIn||(bEnableConnect&&FwpConnect.adapters.facebook.loggedIn)){if(B.path!=""){rateAsset(B);}if(B.ratingtag!=null){var D=$(B.ratingtag);if(D.css("color")=="gray"){if(D.find("img").attr("src").indexOf("24_")!=-1){D.find("img").attr("src","http://ak.webfetti.com/v3/heart24_full.gif");}else{if(D.find("img").attr("src").indexOf(".png")!=-1){D.find("img").attr("src","http://ak.webfetti.com/v3/heart18_full.png");}else{D.find("img").attr("src","http://ak.webfetti.com/v3/heart18_full.gif");}}D.find("span").attr("alttxt","Loved, thanks!");if(D.find("span").text()=="Loved, thanks!"){D.find("span").text("1 Love");}else{if(D.find("span").text()!="Love it!"){D.find("span").text((1*(D.find("span").text().match(/(\d+)\sLove(s)?/)[1])+1)+" Loves");}}}else{if(D.find("img").attr("src").indexOf("24_")!=-1){D.find("img").attr("altsrc","http://ak.webfetti.com/v3/heart24_full.gif");}else{if(D.find("img").attr("src").indexOf(".png")!=-1){D.find("img").attr("altsrc","http://ak.webfetti.com/v3/heart18_full.png");}else{D.find("img").attr("altsrc","http://ak.webfetti.com/v3/heart18_full.gif");}}D.find("span").text("Loved, thanks!");if(D.find("span").attr("alttxt")=="Be the first to love it!"){D.find("span").attr("alttxt","1 Love");}else{if(D.find("span").attr("alttxt")!="Love it!"){D.find("span").attr("alttxt",(1*(D.find("span").attr("alttxt").match(/(\d+)\sLove(s)?/)[1])+1)+" Loves");}}}if($(".statistics_box").length==1){$(".statistics_box").html($(".statistics_box").html().replace(/Loved: (\d*)&nbsp;/,"Loved: "+(parseInt($(".statistics_box").html().match(/Loved: (\d*)&nbsp;/)[1])+1)+"&nbsp;"));}var E=$(".asset_rating :hidden").val().split("|")[0];$("#assetRatedByUser_"+E).val(true);if(typeof (arrVideoModules)!="undefined"||typeof (arrMusicModules)!="undefined"){var C,A;if(typeof (arrVideoModules)!="undefined"){C=arrVideoModules;}else{if(typeof (arrMusicModules)!="undefined"){C=arrMusicModules;}}for(A=0;A<C.length&&C[A].id!=E;A++){}C[A].ratedByUser=true;$(".fwpModSelected div img").attr("src",$(".fwpModSelected div img").attr("src").replace("_empty.","_full."));$(".fwpModSelected div").html($(".fwpModSelected div").html().substr(0,$(".fwpModSelected div").html().indexOf(">")+1)+"Loved, thanks!");}}asset_to_rate_after_login={};}else{asset_to_rate_after_login=B;$("#registrationModal #regMode").val("rate");$("#registrationModal").dialog("open");}}function asset_tag_click(A){if(isUserLoggedIn||(bEnableConnect&&FwpConnect.adapters.facebook.loggedIn&&dataSection!="quizzes")){asset_to_rate_after_login=A;$("#tagCheckboxes :checkbox").attr("disabled",false).attr("checked",false);$("#tagCheckboxes span").css("color","black");$("#tagCheckboxes + div").hide();tagBtn=$("#tag_btn :hidden").val();if(tagBtn.split("|")[2]!=""){$("#userTags div, #tagGraph > div, #noTagsDesc").hide();$("#userTags span,#tagGraph span").text("");$("#tagGraph .bargraph").css("width","0");$(tagBtn.split("|")[2].split(",")).each(function(E){$("#userTag_"+E).text($("#tag_checkbox_"+this+" + span").text()).parent().show();});if(tagBtn.split("|").length<4){$("#noTagsDesc").show();}else{$(tagBtn.split("|")).slice(3).each(function(E){if(E<5){$("#tagGraphbar_"+E).css("width",(230*this.split("=")[1])/tagBtn.split("|")[1]+"px");$("#tagGraphname_"+E).text($("#tag_checkbox_"+this.split("=")[0]+" + span").text()).parent().show();}});}$(tagBtn.split("|")[2].split(",")).each(function(){$("#tag_checkbox_"+this).click().triggerHandler("click");$("#tag_checkbox_"+this).attr("disabled",true).next().css("color","gray").css("cursor","default");});var D=16*Math.min(5,Math.max(1,$(tagBtn.split("|")).length-3));var C=16*Math.min(5,$(tagBtn.split("|")[2].split(",")).length);var B=D+C;$("#viewTagsModalBGSpacer").css("height",140+B+"px");$(".viewTagsModal").css("height",175+B+"px");$("#tagGraph").css("height",10+D+"px");$("#viewTagsModal").dialog("open");}else{$("#addTagsModal").dialog("open");}}else{asset_to_rate_after_login=A;$("#registrationModal #regMode").val("tag");$("#registrationModal").dialog("open");}}function createRegistrationDialog(){$("#registrationModal").dialog({autoOpen:false,draggable:true,resizable:false,modal:true,overlay:{opacity:0.4,background:"black"},dialogClass:"registrationModal",position:"center",height:490,width:595,show:{effect:"fade",speed:500},hide:{effect:"fade",speed:250},open:function(){$("#le_container select").css("visibility","hidden");ckTrk("/clicks/registermodal"+ratings_urchin_path);$("#loginEmail").focus();},close:function(){$("#le_contcainer select").css("visibility","visible");ckTrk("/clicks/closeregistermodal"+ratings_urchin_path);$(".registrationModal .ui-dialog-title").text($("#registrationModal").attr("title"));$("#registerDisplayNameRow").hide();setTimeout(function(){$(".registrationModal #regModalFacebookLogin").show().parent().css({background:"url(http://ak.webfetti.com/v3/RegGreyBox.gif) no-repeat",height:256});},1000);}}).show();$(".registrationModal .ui-resizable-handle").hide();$(".registrationModal #connectButton").click(function(){FwpConnect.connect("facebook",function(){reload_page_after_rate=true;$("#registrationModal").dialog("close");if($(".registrationModal #regMode").val()=="rate"){asset_rate_click(asset_to_rate_after_login);}else{if($(".registrationModal #regMode").val()=="tag"){asset_tag_click(asset_to_rate_after_login);}}});return false;});$(".registrationModal #loginButton").click(function(){if($("#loginEmail").val().length==0){return $("#loginEmailError1").show();}else{$("#loginEmailError1").hide();if(!(new RegExp(/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/).test($("#loginEmail").val()))){return $("#loginEmailError2").show();}else{$("#loginEmailError2").hide();}}if($("#loginPassword").val().length==0){return $("#loginPasswordError").show();}else{$("#loginPasswordError").hide();}$("#loginEmailError3").hide();ckTrk("/clicks/signin"+ratings_urchin_path);$.post("/registration/loginAjax.jhtml",{loginPassword:HMAC_SHA256_MAC($("#loginEmail").val().toUpperCase(),$("#loginPassword").val()),loginEmail:$("#loginEmail").val()},function(data,status){if(status=="success"){var dataObj=eval("("+data+")");if(dataObj.Status=="success"){fakeLogin(dataObj.displayName,dataObj.usrInfo,dataObj.expiry);reload_page_after_rate=true;$("#registrationModal").dialog("close");var sMode=$(".registrationModal #regMode").val();if(sMode=="rate"){asset_rate_click(asset_to_rate_after_login);}else{if(sMode=="tag"){asset_tag_click(asset_to_rate_after_login);}else{if(sMode=="layoutEditor"){storageManager.setState("save");}else{if(sMode=="fav"){$("#v2_header_favorites").parent().click();}}}}}else{if(dataObj.Error1.indexOf("invalid")!=-1){$("#loginEmailError3").show();}}}});});$(".registrationModal #registerButton").click(function(){if($("#registerEmail").val().length==0){return $("#registerEmailError1").show();}else{$("#registerEmailError1").hide();if(!(new RegExp(/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/).test($("#registerEmail").val()))){return $("#registerEmailError2").show();}else{$("#registerEmailError2").hide();}}if($("#registerPassword").val().length==0){return $("#registerPasswordError1").show();}else{$("#registerPasswordError1").hide();if($("#registerPassword").val().length<6){return $("#registerPasswordError2").show();}else{$("#registerPasswordError2").hide();}}if($("#registerBirthMonth option:selected").val()=="Month"||$("#registerBirthMonth option:selected").val()==""||$("#registerBirthDay option:selected").val()=="Day"||$("#registerBirthDay option:selected").val()==""||$("#registerBirthYear option:selected").val()=="Year"||$("#registerBirthYear option:selected").val()==""){return $("#registerBirthdateError1").show();}else{$("#registerBirthdateError1").hide();}if($("#registerGender option:selected").val()=="Select"||$("#registerGender option:selected").val()==""){return $("#registerGenderError").show();}else{$("#registerGenderError").hide();}$("#registerEmailError3").hide();$("#registerBirthdateError2").hide();ckTrk("/clicks/register"+ratings_urchin_path);$.post("/registration/registerAjax.jhtml",{"account.toolbarId":oToolbarController.sUID||$("tsox_tbck").attr("tbid"),"account.passwordHash":HMAC_SHA256_MAC($("#registerEmail").val().toUpperCase(),$("#registerPassword").val()),"account.emailAddress":$("#registerEmail").val(),"account.userName":$("#registerDisplayName").val(),birthdayMonth:$("#registerBirthMonth option:selected").val(),birthdayDay:$("#registerBirthDay option:selected").val(),birthdayYear:$("#registerBirthYear option:selected").val(),gender:$("#registerGender option:selected").val(),emailInternalOptIn:$("#registerInternalEmailOptIn").attr("checked"),emailExternalOptIn:$("#registerExternalEmailOptIn").attr("checked")},function(data,status){if(status=="success"){var dataObj=eval("("+data+")");if(dataObj.Status=="success"){fakeLogin(dataObj.displayName,dataObj.usrInfo,dataObj.expiry);$("#registrationModal").dialog("close");var sMode=$(".registrationModal #regMode").val();if(sMode=="rate"){asset_rate_click(asset_to_rate_after_login);}else{if(sMode=="tag"){asset_tag_click(asset_to_rate_after_login);}else{if(sMode=="layoutEditor"){storageManager.setState("save");}else{if(sMode=="fav"){$("#v2_header_favorites").parent().click();}}}}}else{if(dataObj.Error1.indexOf("13 or older")!=-1){$("#registerBirthdateError2").show();}if(dataObj.Error1.indexOf("Email exists")!=-1){$("#registerEmailError3").show();}}}});});if($.browser.msie){$("#registrationModal").css("padding","0");$("#registerBirthMonth").css("width","60px");$("#registerBirthDay").css("width","47px");$("#registerBirthYear").css("width","52px");$("#registerGender").css("margin-left","0");if($.browser.version.substr(0,3)>=7){$("#registrationModal").css("padding-left","20px");}}$(".loginError, .registrationError:not(#registerBirthdateError):not(#registerGenderError)").click(function(){$(this).prevAll("input").focus();});$("#registerBirthdateError").click(function(){if($("#registerBirthMonth option:selected").val()=="Month"){$("#registerBirthMonth").focus();}else{if($("#registerBirthDay option:selected").val()=="Day"){$("#registerBirthDay").focus();}else{if($("#registerBirthYear option:selected").val()=="Year"){$("#registerBirthYear").focus();}}}});$("#registerGenderError").click(function(){$("#registerGender").focus();});$(".registrationModal :checkbox").prev().click(function(){$(this).next().click().focus();});$(".registrationModal :input").keypress(function(e){if(e.which==13||e.which==10){if($(this).attr("id").indexOf("login")!=-1){$(".registrationModal #loginButton").click();}else{if($(this).attr("id").indexOf("register")!=-1){$(".registrationModal #registerButton").click();}}}else{if(e.which==9||e.keyCode==9){if(e.shiftKey){if($(this).attr("id")=="loginEmail"&&e.shiftKey){$("#registerButton").focus();}else{if($(this).attr("id")=="registerEmail"&&e.shiftKey){$("#loginButton").focus();}else{if($(this).prevAll(":input").length>0){$(this).prevAll(":input").filter(":first").focus();}else{if($(this).parent().prevAll().find(":input").length>0){$(this).parent().prevAll().find(":input").filter(":first").focus();}}}}}else{if($(this).attr("id")=="loginButton"){$("#registerEmail").focus();}else{if($(this).attr("id")=="registerButton"){$("#loginEmail").focus();}else{if($(this).nextAll(":input").length>0){$(this).nextAll(":input").filter(":first").focus();}else{if($(this).parent().nextAll().find(":input").length>0){$(this).parent().nextAll().find(":input").filter(":first").focus();}}}}}return false;}}});}function createFirstTimeDialog(){$("#ratingFirstTimeModal").dialog({autoOpen:false,draggable:true,resizable:false,modal:true,overlay:{opacity:0.4,background:"black"},dialogClass:"ratingFirstTimeModal",position:"center",height:250,width:369,show:{effect:"fade",speed:500},hide:{effect:"fade",speed:250},open:function(){ckTrk("/clicks/firsttimemodal"+ratings_urchin_path);if(!isUserLoggedIn&&FwpConnect.networks.facebook.loggedIn){$("#ratingFirstTimeModal #promptRegister").show();$("#ratingFirstTimeModal").height(280);}},close:function(){ckTrk("/clicks/closefirsttimemodal"+ratings_urchin_path);if(!isUserLoggedIn&&FwpConnect.networks.facebook.loggedIn){$("#ratingFirstTimeModal #promptRegister").hide();$("#ratingFirstTimeModal").height(250);}},buttons:{OK:function(){if($(this).find(":checked").length>0){setCookie("showRatingsFirstTimeModal",false,null,"/",null,null);}$(this).dialog("close");}}}).show();$(".ratingFirstTimeModal .ui-resizable-handle").hide();$(".ratingFirstTimeModal .ui-dialog-container").before('<div style="position: absolute; height: 100%; width: 100%; background: transparent;"><div style="height: 4px; width: 100%; background: transparent url(http://ak.webfetti.com/v2/ratings_modal_outer_top.gif) no-repeat; overflow-y: hidden;"></div><div id="ratingModalBGSpacer" style="height: 220px; width: 100%; background: white;"></div></div>');$(".ratingFirstTimeModal .ui-dialog-buttonpane button:contains('OK')").addClass("okbutton").text("");$("#ratingFirstTimeModal #promptRegister span").click(function(){$("#registrationModal #regMode").val("none");$("#registrationModal").dialog("open");});if($(window.location.search.substring(1).split("&")).index("viewAll=true")==-1){$("#ratingFirstTimeModal img").mouseover(function(){if($("#fav_transfer_src").length==0){$("#v2_header_favorites").parent().parent().css({overflow:"hidden",position:"relative",height:25,width:34}).prepend('<div id="fav_transfer_src" style="height: 25px; width: 34px; position: absolute; float: left;"></div>');}if($("#fav_transfer_src").length&&$("#ratingFirstTimeModal img:animated").length==0){$("#fav_transfer_src").css("left",0).css("left",($("#ratingFirstTimeModal img").offset().left-$("#fav_transfer_src").offset().left+38));$("#fav_transfer_src").css("top",0).css("top",($("#ratingFirstTimeModal img").offset().top-$("#fav_transfer_src").offset().top+25));$("#fav_transfer_src").effect("transfer",{to:"#v2_header_favorites"},2000);}});}}function createAddTagsModal(){var A={width:369,height:174,lineheight:16,lrmargin:16};if($.browser.msie){A={width:369,height:174,lineheight:20,lrmargin:8};}$("#addTagsModal").css("margin-left",A.lrmargin).css("margin-right",A.lrmargin);$("#addTagsModal").dialog({autoOpen:false,draggable:true,resizable:false,modal:true,overlay:{opacity:0.4,background:"black"},dialogClass:"addTagsModal",position:"center",height:(A.height+A.lineheight*(Math.ceil($("#tagCheckboxes :checkbox").length/3))),width:A.width,show:{effect:"fade",speed:500},hide:{effect:"fade",speed:250},open:function(){ckTrk("/clicks/addtagsmodal"+ratings_urchin_path);},close:function(){ckTrk("/clicks/closeaddtagsmodal"+ratings_urchin_path);$("#suggest_tag_text").val("");},buttons:{Save:function(){if($("#tagCheckboxes :checked:not(:disabled)").length>0){var C=$("#tagCheckboxes :checked:not(:disabled)").map(function(){return $(this).attr("id").replace("tag_checkbox_","");}).get().join(",");var F=$("#tagCheckboxes :checked:not(:disabled) + span").map(function(){return $(this).text().split(" ").join("_");}).get().join("/");ckTrk("/clicks/tagging"+ratings_urchin_path+"/"+F);var D=asset_to_rate_after_login.id.split("|");tagAsset((dataSection=="quizzes"?D[4]:D[1]),C);var H=($("#tag_btn :hidden").length)?$("#tag_btn :hidden").val().split("|"):$("#tag_btn_"+asset_to_rate_after_login.id.split("|")[4]+" :hidden").val().split("|");if(H[2]!=""){H[2]+=",";}H[2]+=C;H=H.join("|");var I=asset_to_rate_after_login.id.split("|")[0];if(dataSection=="quizzes"){$("#tag_btn_"+asset_to_rate_after_login.id.split("|")[4]+" :hidden").val(H);var G=$("#tag_btn_"+asset_to_rate_after_login.id.split("|")[4]).find("img").attr("src");$("#tag_btn_"+asset_to_rate_after_login.id.split("|")[4]).find("img").attr("src",G.replace("Rest.gif","Hit.gif"));$("#tag_btn_"+asset_to_rate_after_login.id.split("|")[4])[0].className="taggedItDiv";}else{$("#tag_btn :hidden, #assetTagInfo_"+I).val(H);}if(typeof (arrVideoModules)!="undefined"||typeof (arrMusicModules)!="undefined"){var E,B;if(typeof (arrVideoModules)!="undefined"){E=arrVideoModules;}else{if(typeof (arrMusicModules)!="undefined"){E=arrMusicModules;}}for(B=0;B<E.length&&E[B].id!=I;B++){}E[B].tag=H;}}asset_tag_click({id:($("#tag_btn :hidden").length)?$("#tag_btn :hidden").val():asset_to_rate_after_login.id});submitTagSuggestion($("#suggest_tag_text").val());$(this).dialog("close");},Cancel:function(){$(this).dialog("close");}}}).show();$(".addTagsModal .ui-resizable-handle").hide();$(".addTagsModal .ui-dialog-container").before('<div style="position: absolute; height: 100%; width: 100%; background: transparent;"><div style="height: 4px; width: 100%; background: transparent url(http://ak.webfetti.com/v2/ratings_modal_outer_top.gif) no-repeat; overflow-y: hidden;"></div><div id="addTagsModalBGSpacer" style="height: '+((A.height-14)+A.lineheight*(Math.ceil($("#tagCheckboxes :checkbox").length/3)))+'px; width: 100%; background: white;"></div></div>');$("#tagCheckboxes span").click(function(){$(this).prev(":checkbox").click().triggerHandler("click");});$("#tagCheckboxes :checkbox").click(function(){if($("#tagCheckboxes :checkbox:checked").length>=10){$("#tagCheckboxes :checkbox:not(:checked)").attr("disabled",true);$("#tagCheckboxes :checkbox:not(:checked) + span").css("color","gray").css("cursor","default");$("#tagCheckboxes + div").show();if($(".addTagsModal").css("display")=="none"){$("#tagDesc1,#tagDesc2").toggle();}}else{if($("#tagCheckboxes :checkbox:checked").length==9&&!$(this).attr("checked")){$("#tagCheckboxes :checkbox:not(:checked)").attr("disabled",false);$("#tagCheckboxes :checkbox:not(:checked) + span").css("color","black").css("cursor","pointer");$("#tagCheckboxes + div").hide();}}});$("#suggest_tag_text").focus(function(){if($(this).val()=="Thank you!"){$(this).val("").css("color","black");}}).keypress(function(B){$(this).css("color","black");if(B.which==13||B.which==10){submitTagSuggestion($("#suggest_tag_text").val());}});}function submitTagSuggestion(A){if(A!=""&&A!="Thank you!"){ckTrk("/clicks/suggesttag"+ratings_urchin_path+"/"+A.split(" ").join("_"));var B=(dataSection!="quizzes")?$("#tag_btn :hidden").val().split("|")[0]:asset_to_rate_after_login.id.split("|")[0];$.get(permBaseUrl+"tagSuggestion.jhtml",{path:B,tag:A},function(D,C){});$("#suggest_tag_text").val("Thank you!").css("color","#990453");}}function createTagsViewModal(){$("#viewTagsModal").dialog({autoOpen:false,draggable:true,resizable:false,modal:true,overlay:{opacity:0.4,background:"black"},dialogClass:"viewTagsModal",position:"center",height:250,width:369,show:{effect:"fade",speed:500},hide:{effect:"fade",speed:250},open:function(){ckTrk("/clicks/viewtagsmodal"+ratings_urchin_path);},close:function(){ckTrk("/clicks/closeviewtagsmodal"+ratings_urchin_path);$(".fb_popupContainer").show();$(".fb_popupContainer .fb_pop_dialog_table").each(function(){$(this).css({left:($(window).width()-$(this).width())/2+(document.documentElement&&document.documentElement.scrollLeft||document.body&&document.body.scrollLeft||0),top:($(window).height()-$(this).height())/2+(document.documentElement&&document.documentElement.scrollTop||document.body&&document.body.scrollTop||0)});});if(reload_page_after_rate){window.location.reload();}},buttons:{OK:function(){$(this).dialog("close");}}}).show();$(".viewTagsModal .ui-resizable-handle").hide();$(".viewTagsModal .ui-dialog-container").before('<div style="position: absolute; height: 100%; width: 100%; background: transparent;"><div style="height: 4px; width: 100%; background: transparent url(http://ak.webfetti.com/v2/ratings_modal_outer_top.gif) no-repeat; overflow-y: hidden;"></div><div id="viewTagsModalBGSpacer" style="height: 120px; width: 100%; background: white;"></div></div>');$(".viewTagsModal .ui-dialog-buttonpane button:contains('OK')").addClass("okbutton").text("");$("#add_more_tags").click(function(){$("#addTagsModal").dialog("open");$("#viewTagsModal").dialog("close");});}function fakeLogin(C,B,A){if(regReturnURL==""){regReturnURL=window.location;}$(".regDisplayName").text(C);$("#header_reg_links a.registerLogin").hide();$("#header_reg_links a.viewProfile").show();$("#header_reg_links a.logout").show();isUserLoggedIn=true;setCookie("usr_info",B,new Date(new Date().getTime()+A*1000),"/",null,null,false);if(bEnableConnect){FwpConnect.logoutInternal();}}function rateAsset(A){if(bEnableConnect&&isUserLoggedIn&&!FwpConnect.adapters.facebook.loggedIn&&dataSection!="quizzes"&&assetType!="7"&&assetType!="12"&&shouldPromptToConnect()){FwpConnect.getLinkStatus("facebook",function(B){if(B){$("#promptConnectModal #promptConnectNoButton").attr("value","Not now");showPromptConnectDialog(function(){reload_page_after_rate=true;$("#promptConnectModal").dialog("close");},function(){publishAndSubmitRating(A);},dontConnectNow);}else{publishAndSubmitRating(A);}});}else{publishAndSubmitRating(A);}}function publishAndSubmitRating(B){if(bEnableConnect&&FwpConnect.adapters.facebook.loggedIn&&dataSection!="quizzes"&&assetType!="7"&&assetType!="12"){try{var A=extractAssetData("love");if(checkFeedSettings("love")&&!alreadyPublished(A.assetId)){FbPublish.publishFeed(A,null,null,FB.FeedStorySize.full,FB.RequireConnect.promptConnect,function(){saveUserActionOnAsset(A);submitRating(B);});}else{submitRating(B);}}catch(C){submitRating(B);}}else{submitRating(B);}}function submitRating(asset){if(getCookie("showRatingsFirstTimeModal")!="false"){if(!asset.path.match("quizzes/")){$("#ratingFirstTimeModal").dialog("open");}}var maybeReload=function(){if(reload_page_after_rate){if($(".asset_rating").length>1||window.location.toString().indexOf("/Generators/")==-1||window.location.toString().indexOf("/Cursors")==-1||window.location.toString().indexOf("/Smileys")==-1){window.location.reload();}}};if(asset.path.match("quizzes/")){oData={path:asset.path};url="addItemRating.jhtml?id=QUIZ_"+asset.id;}else{oData={path:asset.path};url="addRating.jhtml";}$.ajax({type:"post",data:oData,url:permBaseUrl+url,success:function(data){var dataObj=eval("("+data+")");if(dataObj.status=="success"){setCookie(dataObj.cookie.cookieName,dataObj.cookie.cookieValue,new Date(new Date().getTime()+dataObj.cookie.expires),"/",null,null,false);}maybeReload();},error:function(xhr,err,e){maybeReload();}});}function removeFavorite(assetPath){$.get(permBaseUrl+"removeRating.jhtml",{path:assetPath},function(data,status){if(status=="success"){var dataObj=eval("("+data+")");if(dataObj.status=="success"){setCookie(dataObj.cookie.cookieName,dataObj.cookie.cookieValue,new Date(new Date().getTime()+dataObj.cookie.expires),"/",null,null,false);}}});}function tagAsset(B,A){if(bEnableConnect&&isUserLoggedIn&&!FwpConnect.adapters.facebook.loggedIn&&dataSection!="quizzes"&&assetType!="7"&&assetType!="12"&&shouldPromptToConnect()){FwpConnect.getLinkStatus("facebook",function(C){if(C){$("#promptConnectModal #promptConnectNoButton").attr("value","Not now");showPromptConnectDialog(function(){reload_page_after_rate=true;$("#promptConnectModal").dialog("close");},function(){publishAndSubmitRating(asset);},dontConnectNow);}else{publishAndSubmitTags(B,A);}});}else{publishAndSubmitTags(B,A);}}function publishAndSubmitTags(B,A){if(bEnableConnect&&FwpConnect.adapters.facebook.loggedIn&&dataSection!="quizzes"&&assetType!="7"&&assetType!="12"){var C=extractAssetData("tag");if(checkFeedSettings("tag")&&!alreadyPublished(C.assetId)){FbPublish.publishFeed(C,null,null,FB.FeedStorySize.full,FB.RequireConnect.promptConnect,function(){saveUserActionOnAsset(C);submitTags(B,A);});$(".fb_popupContainer").hide();}else{submitTags(B,A);}}else{submitTags(B,A);}}function submitTags(assetPath,tags){if(assetPath.match("/")){url="addTags.jhtml";data={path:assetPath,tags:tags};}else{url="addItemTags.jhtml";data={id:"QUIZ_"+assetPath,tags:tags};}$.get(permBaseUrl+url,data,function(data,status){if(status=="success"){var dataObj=eval("("+data+")");if(dataObj.status=="success"){setCookie(dataObj.cookie.cookieName,dataObj.cookie.cookieValue,new Date(new Date().getTime()+dataObj.cookie.expires),"/",null,null,false);}}});}if(typeof log=="undefined"){try{this.log=function(){if(typeof (console)=="undefined"||(!log.data.enabled&&log.data.inArray(log.caller,log.data.enableOnce)==-1)){return ;}clearTimeout(log.data.autoclosetimeout);var A=log.data.inArray(log.caller,log.data.callstack);if(A==-1){try{if(typeof (console[arguments[0]])=="function"){console.group.apply(null,[].splice.call(arguments,1));}else{console.group.apply(null,arguments);}}catch(B){log.data.out(arguments);}if((log.data.profile&&log.data.callstack.length==0)||(log.data.profileOnce&&!log.data.profiling)){try{console.profile();}catch(B){}log.data.profileOnce=false;log.data.profiling=true;}if(log.data.time){try{console.time(""+log.data.callstack.length);}catch(B){}}log.data.callstack.push(log.caller);}else{if(A==log.data.callstack.length-1){log.data.out(arguments);}else{log.stop().data.out(arguments);}}log.data.autoclosetimeout=(setTimeout(log.data.autoclosefunc,log.data.delay));return log;};log.data={message:console.debug||console.info||console.warn||console.error,out:function(A){try{if(typeof (console[A[0]])=="function"){try{console[A[0]].apply(null,[].splice.call(A,1));}catch(C){console[A[0]]([].splice.call(A,1));}}else{try{log.data.message.apply(null,A);}catch(C){log.data.message(A);}}}catch(B){try{console.info(A);}catch(C){}}},enabled:false,enableOnce:[],enableList:[],profile:false,profileOnce:false,profiling:false,time:true,callstack:[],delay:1000,autoclosetimeout:null,autoclosefunc:function(){for(var A=log.data.callstack.length-1;A>=0;A--){if(log.data.time){try{console.timeEnd(""+A);}catch(B){}}try{console.groupEnd();}catch(B){}if(log.data.inArray(log.data.callstack.pop(),log.data.enableOnce)>=0){log.data.enableOnce.pop();}}if(log.data.profiling){try{console.profileEnd();}catch(B){}}log.data.profileOnce=log.data.profiling=false;return log;},inArray:function(C,D){for(var A=0,B=D.length;A<B;A++){if(D[A]===C){return A;}}return -1;},prepend:function(B,A){A=[].splice.call(A,0);A.unshift(B);return A;}};log.profile=function(A){if(A===false){return log;}log.data.profileOnce=true;clearTimeout(log.data.autoclosetimeout);log.data.autoclosetimeout=(setTimeout(log.data.autoclosefunc,log.data.delay));return log;};log.once=function(){if(log.data.enabled||arguments[0]===false){return log;}if(typeof arguments[0]=="string"){var A=false;for(var B=0;B<arguments.length;B++){if(log.data.inArray(arguments[B],log.data.enableList)!=-1){A=true;break;}}if(!A){return log;}}log.data.enableOnce.push(arguments.callee.caller);clearTimeout(log.data.autoclosetimeout);log.data.autoclosetimeout=(setTimeout(log.data.autoclosefunc,log.data.delay));return log;};log.addEnabledSet=function(){var B=[].splice.call(arguments,0);for(var A in B){if(log.data.inArray(B[A],log.data.enableList)==-1){log.data.enableList.push(B[A]);}}};log.removeEnabledSet=function(){var B=[].splice.call(arguments,0);for(var A in B){if(log.data.inArray(B[A],log.data.enableList)!=-1){log.data.enableList.splice(log.data.inArray(B[A],log.data.enableList),1);}}};log.stop=function(){var B=log.data.inArray(arguments.callee.caller,log.data.enableOnce),D=0;if(B==-1){B=log.data.inArray(arguments.callee.caller.caller,log.data.enableOnce);}else{D=-1;}if(B!=-1){B+=D;for(var A=log.data.callstack.length-1;A>B;A--){if(log.data.time){try{console.timeEnd(""+A);}catch(C){}}try{console.groupEnd();}catch(C){}if(log.data.inArray(log.data.callstack.pop(),log.data.enableOnce)>=0){log.data.enableOnce.pop();}}}return log;};log.stopAll=log.data.autoclosefunc;log.enable=function(){log.data.enabled=true;return log;};log.disable=function(){log.data.enabled=false;return log;};log.toggle=function(){log.data.enabled=!log.data.enabled;return log;};log.debug=function(){return log.apply(null,log.data.prepend("debug",arguments));};log.info=function(){return log.apply(null,log.data.prepend("info",arguments));};log.warn=function(){return log.apply(null,log.data.prepend("warn",arguments));};log.error=function(){return log.apply(null,log.data.prepend("error",arguments));};log.trace=function(){try{console.trace();}catch(A){}return log;};}catch(e){log=function(){};log.data={enabled:false,enabledOnce:[],enableList:[],profile:false,profileOnce:false,profiling:false,time:false,callstack:[],delay:0,autoclosetimeout:0};log.profile=log.once=log.addEnabledSet=log.removeEnabledSet=log.stop=log.stopAll=log.enable=log.disable=log.toggle=log.info=log.warn=log.error=log.trace=log.data.message=log.data.out=log.data.autoclosefunc=log.data.inArray=log.data.prepend=function(){return log;};}try{var raw=document.location.search.match(/log=([^&]*)?/);if(raw){log.data.enableList=raw[1].split(",");}}catch(e){}}(function(A){A.suggest=function(N,F){var C=A(N).attr("autocomplete","off");var E=A(document.createElement("ul"));var M=false;var D=0;var P=[];var O=0;E.addClass(F.resultsClass).appendTo("body");I();A(window).load(I).resize(I);C.blur(function(){setTimeout(function(){E.hide();},200);});try{E.bgiframe();}catch(R){}if(A.browser.mozilla){C.keypress(L);}else{C.keydown(L);}function I(){var V=C.offset();E.css({top:(V.top+N.offsetHeight)+"px",left:V.left+"px"});}function L(V){if((/27$|38$|40$/.test(V.keyCode)&&E.is(":visible"))||(/^13$|^9$/.test(V.keyCode)&&T())){if(V.preventDefault){V.preventDefault();}if(V.stopPropagation){V.stopPropagation();}V.cancelBubble=true;V.returnValue=false;switch(V.keyCode){case 38:J();break;case 40:S();break;case 9:Q();break;case 13:Q();doSearch();break;case 27:E.hide();break;}}else{if(C.val().length!=D){if(M){clearTimeout(M);}M=setTimeout(K,F.delay);D=C.val().length;}}}function K(){if(A("#header_right_bottom :radio:checked").val()=="wf"){var V=A.trim(C.val());if(V.length>=F.minchars){cached=U(V);if(cached){H(cached["items"]);}else{A.get(F.source,{q:V},function(W){E.hide();var X=B(W,V);H(X);G(V,X,W.length);});}}else{E.hide();}}}function U(W){for(var V=0;V<P.length;V++){if(P[V]["q"]==W){P.unshift(P.splice(V,1)[0]);return P[0];}}return false;}function G(Y,V,W){while(P.length&&(O+W>F.maxCacheSize)){var X=P.pop();O-=X["size"];}P.push({q:Y,size:W,items:V});O+=W;}function H(V){if(!V){return ;}if(!V.length){E.hide();return ;}var X="<li class='ac_header'><span class='ac_header_2'>relevance</span><span class='ac_header_1'>search term</span></li>";for(var W=0;W<V.length;W++){X+="<li>"+V[W]+"</li>";}E.html(X).show();E.children("li:not(.ac_header):not(.ac_footer)").mouseover(function(){E.children("li").removeClass(F.selectClass);A(this).addClass(F.selectClass);}).click(function(Y){Y.preventDefault();Y.stopPropagation();Q();});}function B(V,Z){var W=[];var b=V.split(F.delimiter);for(var Y=0;Y<b.length;Y++){var X=A.trim(b[Y]);if(X){X=X.replace(new RegExp(Z,"ig"),function(c){return'<span class="'+F.matchClass+'">'+c+"</span>";}).replace(/([^\|]*)\|([^\|]*)/,function(f,d,c){return"<span class='ac_relevance'>"+(Math.round((parseFloat(c)*10000))/100)+"%</span>"+d;});W[W.length]=X;}}return W;}function T(){if(!E.is(":visible")){return false;}var V=E.children("li."+F.selectClass);if(!V.length){V=false;}return V;}function Q(){$currentResult=T();if($currentResult){C.val($currentResult.text().replace($currentResult.find(".ac_relevance").text(),""));E.hide();if(F.onSelect){F.onSelect.apply(C[0]);}}}function S(){$currentResult=T();if($currentResult){$currentResult.removeClass(F.selectClass).nextAll(":not(.ac_footer):first").addClass(F.selectClass);}else{E.children("li:not(.ac_header):first").addClass(F.selectClass);}}function J(){$currentResult=T();if($currentResult){$currentResult.removeClass(F.selectClass).prevAll(":not(.ac_header):first").addClass(F.selectClass);}else{E.children("li:not(.ac_footer):last").addClass(F.selectClass);}}};A.fn.suggest=function(C,B){if(!C){return ;}B=B||{};B.source=C;B.delay=B.delay||100;B.resultsClass=B.resultsClass||"ac_results";B.selectClass=B.selectClass||"ac_over";B.matchClass=B.matchClass||"ac_match";B.minchars=B.minchars||2;B.delimiter=B.delimiter||"\n";B.onSelect=B.onSelect||false;B.maxCacheSize=B.maxCacheSize||65536;this.each(function(){new A.suggest(this,B);});return this;};})(jQuery);(function(B){B.fn.ajaxSubmit=function(M){if(!this.length){A("ajaxSubmit: skipping submit process - no element selected");return this;}if(typeof M=="function"){M={success:M};}M=B.extend({url:this.attr("action")||window.location.toString(),type:this.attr("method")||"GET"},M||{});var O={};this.trigger("form-pre-serialize",[this,M,O]);if(O.veto){A("ajaxSubmit: submit vetoed via form-pre-serialize trigger");return this;}if(M.beforeSerialize&&M.beforeSerialize(this,M)===false){A("ajaxSubmit: submit aborted via beforeSerialize callback");return this;}var I=this.formToArray(M.semantic);if(M.data){M.extraData=M.data;for(var E in M.data){if(M.data[E] instanceof Array){for(var F in M.data[E]){I.push({name:E,value:M.data[E][F]});}}else{I.push({name:E,value:M.data[E]});}}}if(M.beforeSubmit&&M.beforeSubmit(I,this,M)===false){A("ajaxSubmit: submit aborted via beforeSubmit callback");return this;}this.trigger("form-submit-validate",[I,this,M,O]);if(O.veto){A("ajaxSubmit: submit vetoed via form-submit-validate trigger");return this;}var D=B.param(I);if(M.type.toUpperCase()=="GET"){M.url+=(M.url.indexOf("?")>=0?"&":"?")+D;M.data=null;}else{M.data=D;}var N=this,H=[];if(M.resetForm){H.push(function(){N.resetForm();});}if(M.clearForm){H.push(function(){N.clearForm();});}if(!M.dataType&&M.target){var K=M.success||function(){};H.push(function(P){B(M.target).html(P).each(K,arguments);});}else{if(M.success){H.push(M.success);}}M.success=function(S,Q){for(var R=0,P=H.length;R<P;R++){H[R].apply(M,[S,Q,N]);}};var C=B("input:file",this).fieldValue();var L=false;for(var G=0;G<C.length;G++){if(C[G]){L=true;}}if(M.iframe||L){if(B.browser.safari&&M.closeKeepAlive){B.get(M.closeKeepAlive,J);}else{J();}}else{B.ajax(M);}this.trigger("form-submit-notify",[this,M]);return this;function J(){var T=N[0];if(B(":input[@name=submit]",T).length){alert('Error: Form elements must not be named "submit".');return ;}var R=B.extend({},B.ajaxSettings,M);var d=jQuery.extend(true,{},B.extend(true,{},B.ajaxSettings),R);var S="jqFormIO"+(new Date().getTime());var Y=B('<iframe id="'+S+'" name="'+S+'" />');var b=Y[0];if(B.browser.msie||B.browser.opera){b.src='javascript:false;document.write("");';}Y.css({position:"absolute",top:"-1000px",left:"-1000px"});var c={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(){this.aborted=1;Y.attr("src","about:blank");}};var Z=R.global;if(Z&&!B.active++){B.event.trigger("ajaxStart");}if(Z){B.event.trigger("ajaxSend",[c,R]);}if(d.beforeSend&&d.beforeSend(c,d)===false){d.global&&jQuery.active--;return ;}if(c.aborted){return ;}var Q=0;var V=0;var P=T.clk;if(P){var U=P.name;if(U&&!P.disabled){M.extraData=M.extraData||{};M.extraData[U]=P.value;if(P.type=="image"){M.extraData[name+".x"]=T.clk_x;M.extraData[name+".y"]=T.clk_y;}}}setTimeout(function(){var k=N.attr("target"),f=N.attr("action");N.attr({target:S,method:"POST",action:R.url});if(!M.skipEncodingOverride){N.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"});}if(R.timeout){setTimeout(function(){V=true;W();},R.timeout);}var h=[];try{if(M.extraData){for(var l in M.extraData){h.push(B('<input type="hidden" name="'+l+'" value="'+M.extraData[l]+'" />').appendTo(T)[0]);}}Y.appendTo("body");b.attachEvent?b.attachEvent("onload",W):b.addEventListener("load",W,false);T.submit();}finally{N.attr("action",f);k?N.attr("target",k):N.removeAttr("target");B(h).remove();}},10);function W(){if(Q++){return ;}b.detachEvent?b.detachEvent("onload",W):b.removeEventListener("load",W,false);var h=0;var k=true;try{if(V){throw"timeout";}var l,n;n=b.contentWindow?b.contentWindow.document:b.contentDocument?b.contentDocument:b.document;if(n.body==null&&!h&&B.browser.opera){h=1;Q--;setTimeout(W,100);return ;}c.responseText=n.body?n.body.innerHTML:null;c.responseXML=n.XMLDocument?n.XMLDocument:n;c.getResponseHeader=function(p){var o={"content-type":R.dataType};return o[p];};if(R.dataType=="json"||R.dataType=="script"){var f=n.getElementsByTagName("textarea")[0];c.responseText=f?f.value:c.responseText;}else{if(R.dataType=="xml"&&!c.responseXML&&c.responseText!=null){c.responseXML=X(c.responseText);}}l=B.httpData(c,R.dataType);}catch(m){k=false;B.handleError(R,c,"error",m);}if(k){R.success(l,"success");if(Z){B.event.trigger("ajaxSuccess",[c,R]);}}if(Z){B.event.trigger("ajaxComplete",[c,R]);}if(Z&&!--B.active){B.event.trigger("ajaxStop");}if(R.complete){R.complete(c,k?"success":"error");}setTimeout(function(){Y.remove();c.responseXML=null;},100);}function X(f,h){if(window.ActiveXObject){h=new ActiveXObject("Microsoft.XMLDOM");h.async="false";h.loadXML(f);}else{h=(new DOMParser()).parseFromString(f,"text/xml");}return(h&&h.documentElement&&h.documentElement.tagName!="parsererror")?h:null;}}};B.fn.ajaxForm=function(C){return this.ajaxFormUnbind().bind("submit.form-plugin",function(){B(this).ajaxSubmit(C);return false;}).each(function(){B(":submit,input:image",this).bind("click.form-plugin",function(E){var D=this.form;D.clk=this;if(this.type=="image"){if(E.offsetX!=undefined){D.clk_x=E.offsetX;D.clk_y=E.offsetY;}else{if(typeof B.fn.offset=="function"){var F=B(this).offset();D.clk_x=E.pageX-F.left;D.clk_y=E.pageY-F.top;}else{D.clk_x=E.pageX-this.offsetLeft;D.clk_y=E.pageY-this.offsetTop;}}}setTimeout(function(){D.clk=D.clk_x=D.clk_y=null;},10);});});};B.fn.ajaxFormUnbind=function(){this.unbind("submit.form-plugin");return this.each(function(){B(":submit,input:image",this).unbind("click.form-plugin");});};B.fn.formToArray=function(N){var M=[];if(this.length==0){return M;}var D=this[0];var H=N?D.getElementsByTagName("*"):D.elements;if(!H){return M;}for(var I=0,K=H.length;I<K;I++){var E=H[I];var F=E.name;if(!F){continue;}if(N&&D.clk&&E.type=="image"){if(!E.disabled&&D.clk==E){M.push({name:F+".x",value:D.clk_x},{name:F+".y",value:D.clk_y});}continue;}var O=B.fieldValue(E,true);if(O&&O.constructor==Array){for(var G=0,C=O.length;G<C;G++){M.push({name:F,value:O[G]});}}else{if(O!==null&&typeof O!="undefined"){M.push({name:F,value:O});}}}if(!N&&D.clk){var J=D.getElementsByTagName("input");for(var I=0,K=J.length;I<K;I++){var L=J[I];var F=L.name;if(F&&!L.disabled&&L.type=="image"&&D.clk==L){M.push({name:F+".x",value:D.clk_x},{name:F+".y",value:D.clk_y});}}}return M;};B.fn.formSerialize=function(C){return B.param(this.formToArray(C));};B.fn.fieldSerialize=function(D){var C=[];this.each(function(){var H=this.name;if(!H){return ;}var F=B.fieldValue(this,D);if(F&&F.constructor==Array){for(var G=0,E=F.length;G<E;G++){C.push({name:H,value:F[G]});}}else{if(F!==null&&typeof F!="undefined"){C.push({name:this.name,value:F});}}});return B.param(C);};B.fn.fieldValue=function(H){for(var G=[],E=0,C=this.length;E<C;E++){var F=this[E];var D=B.fieldValue(F,H);if(D===null||typeof D=="undefined"||(D.constructor==Array&&!D.length)){continue;}D.constructor==Array?B.merge(G,D):G.push(D);}return G;};B.fieldValue=function(C,I){var E=C.name,N=C.type,O=C.tagName.toLowerCase();if(typeof I=="undefined"){I=true;}if(I&&(!E||C.disabled||N=="reset"||N=="button"||(N=="checkbox"||N=="radio")&&!C.checked||(N=="submit"||N=="image")&&C.form&&C.form.clk!=C||O=="select"&&C.selectedIndex==-1)){return null;}if(O=="select"){var J=C.selectedIndex;if(J<0){return null;}var L=[],D=C.options;var G=(N=="select-one");var K=(G?J+1:D.length);for(var F=(G?J:0);F<K;F++){var H=D[F];if(H.selected){var M=B.browser.msie&&!(H.attributes["value"].specified)?H.text:H.value;if(G){return M;}L.push(M);}}return L;}return C.value;};B.fn.clearForm=function(){return this.each(function(){B("input,select,textarea",this).clearFields();});};B.fn.clearFields=B.fn.clearInputs=function(){return this.each(function(){var D=this.type,C=this.tagName.toLowerCase();if(D=="text"||D=="password"||C=="textarea"){this.value="";}else{if(D=="checkbox"||D=="radio"){this.checked=false;}else{if(C=="select"){this.selectedIndex=-1;}}}});};B.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=="function"||(typeof this.reset=="object"&&!this.reset.nodeType)){this.reset();}});};B.fn.enable=function(C){if(C==undefined){C=true;}return this.each(function(){this.disabled=!C;});};B.fn.selected=function(C){if(C==undefined){C=true;}return this.each(function(){var D=this.type;if(D=="checkbox"||D=="radio"){this.checked=C;}else{if(this.tagName.toLowerCase()=="option"){var E=B(this).parent("select");if(C&&E[0]&&E[0].type=="select-one"){E.find("option").selected(false);}this.selected=C;}}});};function A(){if(B.fn.ajaxSubmit.debug&&window.console&&window.console.log){window.console.log("[jquery.form] "+Array.prototype.join.call(arguments,""));}}})(jQuery);