/*! Blackbaud Design | FAF Refresh JavaScript | Last Updated: 02/17/2012 | Version: 3.0.10.2 */
var jsPath="/atf/custom/fafRefresh/v3/";document.write('<link id="faf-refresh-css" rel="stylesheet" href="'+jsPath+'faf-refresh.css" type="text/css">');document.write('<script type="text/javascript" src="'+jsPath+'faf-refresh-plugins.js?v=02012012"><\/script>');FAF={Config:{version:"3.0.10.2",lastRevised:"02/17/2012",packageType:"essentials"},Defaults:{allowButtonControl:true,allowLogoControl:true,currency:"$",fBAppId:190219204354402,fBSiteName:null,hideFacebook:false,hideHonorRoll:false,loadCss:true,twitterId:"blackbaud",twitterTitle:null,shareThisId:"b9f10667-d94c-4fbb-a8e9-acf67b7a118c",thermGoal:null,thermMinWidth:0},Methods:{initialize:function(fn){FAF.Options=$.extend(FAF.Defaults,FAF.Options);FAF.eID=this.getUrlVars()["ievent"];FAF.sID=this.getUrlVars()["supid"];FAF.tID=this.getUrlVars()["team"];FAF.protocol=window.location.protocol;FAF.host=window.location.host;FAF.root=FAF.protocol+"//"+FAF.host;FAF.path=FAF.protocol+"//"+FAF.host+window.location.pathname;FAF.thisURL=window.location.href.toLowerCase();FAF.donateBtnImagePath="https://www.kintera.org/AccountTempFiles/Account2540/475929/btnDonate.png";FAF.isLoggedIn;FAF.pathK=FAF.protocol+"//www.kintera.org"+window.location.pathname;FAF.newURL=FAF.pathK+"?ievent="+FAF.eID+"&supId=0";if((typeof FAF.sID!=="undefined")&&(FAF.sID!=="0")&&(FAF.sID!=="")){FAF.newURL=FAF.pathK+"?ievent="+FAF.eID+"&supId="+FAF.sID}if((typeof FAF.tID!=="undefined")&&(FAF.tID!=="0")&&(FAF.tID!=="")){FAF.newURL=FAF.pathK+"?ievent="+FAF.eID+"&team="+FAF.tID}if((typeof FAF.sID!=="undefined")&&(FAF.sID!=="0")&&(FAF.sID!=="")&&(typeof FAF.tID!=="undefined")&&(FAF.tID!=="0")&&(FAF.tID!=="")){FAF.newURL=FAF.pathK+"?ievent="+FAF.eID+"&supId="+FAF.sID+"&team="+FAF.tID}if(FAF.Options.loadCss==false){$("#faf-refresh-css").remove()}if(FAF.thisURL.indexOf("donorpledge.asp")>0&&FAF.Config.packageType!="starter"){document.write('<style type="text/css"><!-- .FAFBodyTable, td.FAFRightNav { display: none; } --></style>')}if(FAF.thisURL.indexOf("search/searchteampart.asp")>0&&FAF.Config.packageType!="starter"){document.write('<style type="text/css"><!-- .FAFBodyTable, td.FAFRightNav { display: none; } --></style>')}var cb=fn;this.fetchJSON(cb)},fetchJSON:function(cb){var callback=cb;if((lscache.get("fafjson"+FAF.eID)==null)||$.browser.msie){$.ajax({url:"/faf/json/event.asp?ievent="+FAF.eID,dataType:"jsonp",crossDomain:true,success:function(data){FAF.Data=data;if($.browser.msie!=true){lscache.set("fafjson"+FAF.eID,data,15)}if(callback!=undefined){callback()}}})}else{FAF.Data=lscache.get("fafjson"+FAF.eID+"");if(callback!=undefined){callback()}}},getUrlVars:function(){var vars={};var parts=window.location.href.toLowerCase().replace(/[?&]+([^=&]+)=([^&]*)/gi,function(m,key,value){vars[key]=unescape(value.replace(/\+/g," "))});return vars},checkLogin:function(){var loginHtml='<form id="FAFLoginFormHeader" name="registrationForm2" action="" method="POST"><fieldset><legend>Login to Your Friends Asking Friends Headquarters</legend><input type="text" name="username" value="Username" maxlength="100" ID="Text1" onfocus="this.value=\'\'" onblur="if(this.value == \'\') this.value=\'username\'"><input type="password" name="password" value="Password" maxlength="20" ID="Password1" onfocus="this.value=\'\'" onblur="if(this.value == \'\') this.value=\'password\'"><input type="submit" border="0" name="imageField2" id="loginSubmit" value="Login" ><input type="hidden" name="passwordRem" value="" ID="Hidden1"><input type="hidden" name="ssl" value="" ID="Hidden2"></fieldset><span class="rememberMe" style="display:none"><input type="checkbox" name="faf_rememberme" value="y" CHECKED ID="Checkbox1"> Remember me</span><span id="forgotUsername" style="display:none"> <a href="#" class="faf-forgotusername">Forgot Username?</a></span></form>';function getLoginState(){$.get("/faf/login/partMenu.asp?ievent="+FAF.eID,function(data){if($(data).find(".FAFBodyTable .highlighttitlemenu").length>0){$("#login").hide();var loginName=$(data).find(".FAFBodyTable a:contains(Logout)").parents("table table tr").next().find("table table td b:contains(Welcome)").html();var logoutLink=$(data).find(".FAFBodyTable a:contains(Logout)").closest("td").html();if(loginName!=null){var loginNameHtml=loginName+" &nbsp;&nbsp;&nbsp; "}else{var loginNameHtml=""}if(logoutLink!=null){var logoutLinkHtml=" &nbsp;&nbsp;&nbsp; "+logoutLink}else{var logoutLinkHtml=""}$("#logout").html(loginNameHtml+'<a href="'+FAF.root+"/faf/login/partMenu.asp?ievent="+FAF.eID+'">My HQ</a>'+logoutLinkHtml);$("#logout").show();isLoggedIn=true}else{$("#logout").hide();if(FAF.thisURL.indexOf("loginparticipant.asp")===-1){$("#login").show()}isLoggedIn=false}})}$(document).ready(function(){if(!$("#FAFLoginFormHeader").length){$(loginHtml).appendTo("div#login");$("div#login").hide();$('<div id="logout" style="display:none"></div>').insertAfter("div#login")}if($(".FAFLeftNavTable").length>0){if($(".newMenuTextColor:contains(Main Login)").length===0){getLoginState()}else{$("#logout").hide();if(FAF.thisURL.indexOf("loginParticipant.asp")===-1){$("#login").show()}isLoggedIn=false}}else{getLoginState()}})},rebuildPage:function(){$(document).ready(function(){$("table.FAFOuterTable2").before($("#wrapTopBar"));$("td.FAFLeftNavTd").prepend($("#leftColumn"));$("#leftColumn").css({display:"block"});$("td.FAFRightNav").prepend($("#rightColumn"));$("#rightColumn").css({display:"block"});$("td.FAFRightNav").show();if((FAF.thisURL.indexOf("partdonorreg/pledgeentry.asp")>0)&&($.browser.msie==true)){$("body").append($("#wrapFooter"))}else{$("table.FAFOuterTable").after($("#wrapFooter"))}$("#wrapFooter").css({display:"block"});$('.FAFBodyTable form[name=billingForm] table[width="400"], 				.FAFBodyTable form[name="dedicationForm"] table[width="400"], 				.FAFBodyTable table[width="400"]').attr("width","100%");$("input[name=addAmountMultiTotal]").css("width","50px");$(".FAFOuterTable > tbody > tr > td[align=center]").attr("align","left");$(".FAFBodyTable").closest("td").attr("id","wrapContent");$(".FAFBodyTable table table table td.highlighttitlemenu").parent("tr").css({"line-height":"11px"});if((FAF.thisURL.indexOf("login/partmenu.asp")>0)||(FAF.thisURL.indexOf("login/page_edit.asp")>0)||(FAF.thisURL.indexOf("login/import_image.asp")>0)||(FAF.thisURL.indexOf("login/teampageedit.asp")>0)||(FAF.thisURL.indexOf("login/teamdonationpageedit.asp")>0)||(FAF.thisURL.indexOf("emailcenter/email.asp")>0)||(FAF.thisURL.indexOf("emailimport/import_default.asp")>0)||(FAF.thisURL.indexOf("emailimport/setup_default.asp")>0)||(FAF.thisURL.indexOf("email/emaillog.asp")>0)||(FAF.thisURL.indexOf("emailcenter/communitysites.asp")>0)||(FAF.thisURL.indexOf("login/participantstats.asp")>0)||(FAF.thisURL.indexOf("login/pasteventdonationstats.asp")>0)||(FAF.thisURL.indexOf("login/genteamdonationreport.asp")>0)||(FAF.thisURL.indexOf("teamreg/captainteamreport.asp")>0)||(FAF.thisURL.indexOf("partdonorreg/pledgeentry.asp")>0)||(FAF.thisURL.indexOf("reg_new/register.asp")>0)||(FAF.thisURL.indexOf("update/updateprofile.asp")>0)||(FAF.thisURL.indexOf("update/updatepassword.asp")>0)||(FAF.thisURL.indexOf("update/updateConfirmation.asp")>0)||(FAF.thisURL.indexOf("login/addcocaptain.asp")>0)||(FAF.thisURL.indexOf("community/eventboard.asp")>0)||(FAF.thisURL.indexOf("community/postmsgfrm.asp")>0)||(FAF.thisURL.indexOf("help/dates.asp")>0)||(FAF.thisURL.indexOf("game/game.asp")>0)||(FAF.thisURL.indexOf("login/viewvproject.asp")>0)||(FAF.thisURL.indexOf("login/gadgets.asp")>0)||(FAF.thisURL.indexOf("donorreg/donorpledge.asp")>0)||(FAF.thisURL.indexOf("donorreg/donorbilling.asp")>0)||(FAF.thisURL.indexOf("search/searchteampart.asp")>0)||(FAF.thisURL.indexOf("search/searchteam.asp")>0)||(FAF.thisURL.indexOf("error/errorevent.asp")>0)||(FAF.thisURL.indexOf("reg_new/donordecognition.asp")>0)||(FAF.thisURL.indexOf("login/checkpartlogin.asp")>0)){$(".FAFBodyTable").addClass("FAFBodyTableBG")}if((FAF.thisURL.indexOf("home/default.asp")>0)||(FAF.thisURL.indexOf("help/helpaboutorg.asp")>0)||(FAF.thisURL.indexOf("help/helpeventinfo.asp")>0)||(FAF.thisURL.indexOf("sponsorasp/viewsponsors.asp")>0)||(FAF.thisURL.indexOf("help/helpfaq.asp")>0)||(FAF.thisURL.indexOf("home/ccp.asp")>0)||(FAF.thisURL.indexOf("home/waiver.asp")>0)||(FAF.thisURL.indexOf("r/default.asp")>0)||(FAF.thisURL.indexOf("search/searchparticipants.asp")>0)||(FAF.thisURL.indexOf("email/emailfriend.asp")>0)||(FAF.thisURL.indexOf("sponsorasp/catalog.asp")>0)){}else{$("#shareThisIcons").remove();$("td.FAFRightNav").hide()}if(FAF.thisURL.indexOf("login/partmenu.asp")>0){$(".FAFBodyTable li").css("list-style","none")}$('table.FAFBodyTable table td img[alt*="Blackbaud, Kintera"]').parent("a").parent("td").parent("tr").hide();$("#donationcounter").parent().hide();if(FAF.thisURL.indexOf("update/updateconfirmation.asp")>0){$("form[name=confirmationForm] table[bgcolor=#FFFFFF]").attr("bgcolor","")}if((FAF.thisURL.indexOf("donorpledge.asp")===-1)&&(FAF.thisURL.indexOf("search/searchteampart.asp")===-1)){$(".FAFBodyTable").show();$(".FAFBodyTable").css("visibility","visible")}})},therm:function(){var thermHtml='<div class="thermometer"><div id="thermGoal"><span class="eventGoalTitle">Goal:</span><span class="eventGoalVal"></span></div><div id="meterDiv"><div id="meterCounter"><span id="counterVal">0</span></div></div></div>';var meterHtml='<div id="thermGoal"><span class="eventGoalTitle">Goal:</span><span class="eventGoalVal"></span></div><div id="meterDiv"><div id="meterCounter"><span id="counterVal">0</span></div></div>';$(document).ready(function(){if(!$("div.thermometer").length){$(thermHtml).appendTo("#header")}else{if(!$("#meterDiv").length){$(meterHtml).appendTo("div.thermometer")}}var thermWidth=$("div.thermometer").width(),total=FAF.Data.event.raised,thermPxPerDollar;if(!FAF.Options.thermGoal||typeof FAF.Options.thermGoal=="undefined"||FAF.Options.thermGoal==null||FAF.Options.thermGoal==0){thermPxPerDollar=thermWidth/FAF.Data.event.goal}else{thermPxPerDollar=thermWidth/FAF.Options.thermGoal}$("#meterCounter").css({display:"block"});$(".eventGoalVal").text(FAF.Methods.formatCurrencyWSymbol(parseInt(FAF.Data.event.goal,10)));FAF.Methods.runTherm("meterDiv",total/10,total,total/60,1,"counterVal",thermPxPerDollar,thermWidth)})},testTherm:function(amount){var thermWidth=$("div.thermometer").width(),total=amount;if(typeof thermWidth!="undefined"){if(!FAF.Options.thermGoal||typeof FAF.Options.thermGoal=="undefined"||FAF.Options.thermGoal==null||FAF.Options.thermGoal==0){thermPxPerDollar=thermWidth/FAF.Data.event.goal}else{thermPxPerDollar=thermWidth/FAF.Options.thermGoal}$("#meterCounter").css({display:"block"});this.runTherm("meterDiv",total/10,total,total/60,1,"counterVal",thermPxPerDollar,thermWidth)}},runTherm:function(id,start,end,rate,delay,counter,ppx,max){var outerDiv=document.getElementById(id),counterDiv=document.getElementById(counter),starttime=new Date(),curNum=0;var update=function(){var now=new Date();var timespan=(now.valueOf()-starttime.valueOf())/50;curNum=Math.round(start+(timespan*rate));if(curNum>=end){counterDiv.innerHTML=FAF.Methods.formatCurrencyWSymbol(end);return}else{counterDiv.innerHTML=FAF.Methods.formatCurrencyWSymbol(curNum);var divWidth=curNum*ppx;if((divWidth>=FAF.Options.thermMinWidth&&divWidth<=max)){outerDiv.style.width=divWidth+"px"}setTimeout(update,delay)}};if(outerDiv!=null){outerDiv.style.width=(FAF.Options.thermMinWidth!=0&&FAF.Options.thermMinWidth!=null)?FAF.Options.thermMinWidth+"px":"0px";update()}},formatCurrencyWSymbol:function(num,symbol){symbol=symbol||FAF.Options.currency;num=num.toString().replace(/\$|\,/g,"");if(isNaN(num)){num="0"}sign=(num==(num=Math.abs(num)));num=Math.floor(num*100+0.50000000001);cents=num%100;num=Math.floor(num/100).toString();if(cents<10){cents="0"+cents}for(var i=0;i<Math.floor((num.length-(1+i))/3);i++){num=num.substring(0,num.length-(4*i+3))+","+num.substring(num.length-(4*i+3))}return(((sign)?"":"-")+symbol+num)},dynamicLinks:function(){$(document).ready(function(){$(".faf-home").attr("href",FAF.root+"/faf/home/default.asp?ievent="+FAF.eID);$(".faf-aboutorg").attr("href",FAF.root+"/faf/help/helpAboutOrg.asp?ievent="+FAF.eID);$(".faf-eventinfo").attr("href",FAF.root+"/faf/help/helpEventInfo.asp?ievent="+FAF.eID);$(".faf-sponsors").attr("href",FAF.root+"/faf/SponsorASP/ViewSponsors.asp?ievent="+FAF.eID);$(".faf-faq").attr("href",FAF.root+"/faf/help/helpFaq.asp?ievent="+FAF.eID);$(".faf-register").attr("href",FAF.root+"/faf/home/waiver.asp?ievent="+FAF.eID);$(".faf-search").attr("href",FAF.root+"/faf/search/searchParticipants.asp?ievent="+FAF.eID);$(".faf-emailfriend").attr("href",FAF.root+"/faf/email/emailFriend.asp?ievent="+FAF.eID);$(".faf-donation").attr("href",FAF.root+"/faf/donorReg/donorPledge.asp?supId=0&ievent="+FAF.eID);$(".faf-sponsorship").attr("href",FAF.root+"/faf/sponsorasp/catalog.asp?ievent="+FAF.eID);$(".faf-login").attr("href",FAF.root+"/faf/login/loginParticipant.asp?ievent="+FAF.eID);$(".faf-forgotusername").attr("href",FAF.root+"/faf/login/loginFindPassword.asp?ievent="+FAF.eID);$("#FAFLoginFormHeader").attr("action","/faf/login/checkPartLogin.asp?ievent="+FAF.eID);if(FAF.isLoggedIn===true){$(".faf-myhq").attr("href",FAF.root+"/faf/login/partMenu.asp?ievent="+FAF.eID);$(".faf-email").attr("href",FAF.root+"/faf/emailCenter/email.asp?login=lmenu&ievent="+FAF.eID);$(".faf-edit").attr("href",FAF.root+"/faf/login/page_edit.asp?login=lmenu&ievent="+FAF.eID);$(".faf-reports").attr("href",FAF.root+"/faf/login/participantStats.asp?login=lmenu&ievent="+FAF.eID);$(".faf-tools").attr("href",FAF.root+"/faf/partDonorReg/pledgeEntry.asp?login=lmenu&ievent="+FAF.eID)}else{$(".faf-myhq").attr("href",FAF.root+"href=\"javascript:redirectLoginMenu('hq')");$(".faf-email").attr("href",FAF.root+"href=\"javascript:redirectLoginMenu('email')");$(".faf-edit").attr("href",FAF.root+"href=\"javascript:redirectLoginMenu('personal')");$(".faf-reports").attr("href",FAF.root+"href=\"javascript:redirectLoginMenu('reports')");$(".faf-tools").attr("href",FAF.root+"href=\"javascript:redirectLoginMenu('tools')")}})},logoControl:function(){$(document).ready(function(){if(FAF.Options.allowLogoControl){var logoDiv=$("#logo");if(logoDiv.length){if(logoDiv.children().is("a")){$("a",logoDiv).html($("td.FAFLeftNavHeaderGraphic").html())}else{logoDiv.html($("td.FAFLeftNavHeaderGraphic").html())}$("td.FAFLeftNavHeaderGraphic img").remove()}}})},buttonControl:function(){$(document).ready(function(){if(FAF.Options.allowButtonControl){var createButtons=function(buttonsData){if($(buttonsData).length>0){var buttonHTML='<ul class="buttonMenu clearfix">';$(buttonsData).each(function(i){buttonHTML+='<li class="menuItem'+(i+1)+'">';buttonHTML+=$(this).find("b").html();buttonHTML+="</li>"});buttonHTML+="</ul>"}if($.browser.msie!=true){if(buttonHTML!=undefined){lscache.set("fafbtns"+FAF.eID,buttonHTML,15)}else{lscache.set("fafbtns"+FAF.eID,"",15)}}showButtons(buttonHTML)};var showButtons=function(buttonsHTML){if(buttonsHTML!=null){$("td.FAFLeftNavTd").prepend(buttonsHTML);$(".buttonMenu a").removeClass("newMenuTextColor")}if(FAF.thisURL.indexOf("home/default.asp")>0){$('img[src*="round_left"]').closest("table").closest("table").remove()}};if((lscache.get("fafbtns"+FAF.eID)==null)||$.browser.msie){if(FAF.thisURL.indexOf("home/default.asp")>0){createButtons($('img[src*="round_left"]').closest("table"))}else{$.get("/faf/home/default.asp?ievent="+FAF.eID,function(data){createButtons($(data).find('img[src*="round_left"]').closest("table"))})}}else{var existingButtonHtml=lscache.get("fafbtns"+FAF.eID+"");if((existingButtonHtml!="")||(existingButtonHtml!="undefined")){showButtons(existingButtonHtml)}}}})},facebook:function(selector,action){$(document).ready(function(){var doAppendFacebook=false;if(typeof fafJSONteam!="undefined"){var title="Leave an encouraging note for";var name=fafJSONteam.name;doAppendFacebook=true}if(typeof fafJSONparticipant!="undefined"){var title="Leave an encouraging note for";var name=fafJSONparticipant.name;doAppendFacebook=true}if(doAppendFacebook&&FAF.sID!==undefined){var facebookHtml='<div id="facebookComments"><!-- FACEBOOK COMMENTS PLUGIN --><h4>'+title+' <span id="fundraiser">'+name+'</span> ...</h4><div id="facebookCommentsBox"></div><!-- END FACEBOOK COMMENTS --></div>';switch(action){case"insertAfter":$(facebookHtml).insertAfter(selector);break;case"insertBefore":$(facebookHtml).insertBefore(selector);break;default:case"appendTo":$(facebookHtml).appendTo(selector);break;case"prependTo":$(facebookHtml).prependTo(selector);break}if(($("#facebookCommentsBox").length>0)&&($("#facebookCommentsBox").width()>450)){var fbCommWidth=$("#facebookCommentsBox").width()||450}else{var fbCommWidth=450}$("#facebookLikeBox").onefblike({action:"like",buttonWidth:350,pageUrl:FAF.newURL,showfaces:true,sendButton:false});if((FAF.Options.hideFacebook!=true)){$("#facebookCommentsBox").onefblike({appID:FAF.Options.fBAppId,action:"comments",buttonHeight:400,buttonWidth:fbCommWidth,siteName:FAF.Options.fBSiteName,pageUrl:FAF.newURL})}else{$("#facebookComments").hide()}}})},twitter:function(){$(document).ready(function(){if(FAF.thisURL.indexOf("home/default.asp")>=0&&typeof FAF.Options.twitterId!=="undefined"&&FAF.Options.twitterId!=null&&FAF.Options.twitterId!=""){if(FAF.Options.twitterTitle!="undefined"&&FAF.Options.twitterTitle!=null){var twitterTitleHtml=FAF.Options.twitterTitle}else{if(typeof FAF.Options.fBSiteName!="undefined"&&FAF.Options.fBSiteName!=null){var twitterTitleHtml=FAF.Options.fBSiteName+" on Twitter"}else{var twitterTitleHtml=FAF.Data.event.name+" on Twitter"}}$("td.FAFRightNav").append('<div id="rightColumnBottom"><h3 class="twitterFeedTitle"><a href="http://www.twitter.com/'+FAF.Options.twitterId+'">'+twitterTitleHtml+'</a></h3><div id="twitterFeed"></div></div>');$("#twitterFeed").jTweetsAnywhere({username:FAF.Options.twitterId,count:4})}})},shareThis:function(){$(document).ready(function(){if((FAF.thisURL.indexOf("donorreg/donorbilling.asp")===-1)&&(FAF.thisURL.indexOf("donorreg/donorRecognition.asp")===-1)&&(FAF.thisURL.indexOf("donorreg/donorconfirmation.asp")===-1)){$("head").append('<script type="text/javascript">var switchTo5x=true<\/script>');$("head").append('<script type="text/javascript" src="https://ws.sharethis.com/button/buttons.js"><\/script>');if(typeof stLight!=="undefined"){$("head").append('<script type="text/javascript">stLight.options({publisher: "'+FAF.Options.shareThisId+'"});<\/script>')}else{setTimeout(function(){if(typeof stLight!=="undefined"){$("head").append('<script type="text/javascript">stLight.options({publisher: "'+FAF.Options.shareThisId+'"});<\/script>')}else{setTimeout(function(){$("head").append('<script type="text/javascript">stLight.options({publisher: "'+FAF.Options.shareThisId+'"});<\/script>')},2000)}},2000)}if(!$("#shareThisIcons").length){if(!$("#rightColumn").length){var shareHtml='<div id="rightColumn"><div id="shareThisIcons"><span class="st_twitter_large"></span><span class="st_facebook_large"></span><span class="st_email_large"></span><span class="st_sharethis_large"></span></div></div>';$(".FAFRightNav").prepend(shareHtml)}else{$("#rightColumn").prepend('<div id="shareThisIcons"><span class="st_twitter_large"></span><span class="st_facebook_large"></span><span class="st_email_large"></span><span class="st_sharethis_large"></span></div>')}}}if($('meta[property="og:image"]').length<=0){if($("#header .logo img").length>0){var ogImageSrc=$("#header .logo img").attr("src");if(ogImageSrc.indexOf("http")!=-1){jQuery("head").append('<meta property="og:image" content="'+ogImageSrc+'"/>')}else{jQuery("head").append('<meta property="og:image" content="'+FAF.root+"/"+ogImageSrc+'"/>')}}}})},fixit:function(){$(document).ready(function(){if($.browser.msie){setTimeout(function(){$("#cboxOverlay, #stOverlay").css("height",$(document).height())},2000)}if(FAF.thisURL.indexOf("login/import_image.asp")>0){if($('.FAFOuterTable td font:contains("Sorry, your image was not uploaded because the file size was too big")').length>0){alert("Sorry, your image was not uploaded because the file size was too big (>50K) or the file type was not acceptable (jpg or gif). \n\nYou will be redirected to the previous page.");window.history.back()}}})},personalPage:function(){$(document).ready(function(){if((FAF.thisURL.indexOf("donorpledge.asp")>0)&&!($.browser.msie&&$.browser.version.substr(0,1)<7)){$(".FAFBodyTable").hide();var ppBodyTable=$(".FAFBodyTable").html(),br=new RegExp("\\<(br|BR)+\\>","g"),regamount=new RegExp("\\(\\$.+\\+\\)"),ppNonprofitName,ppDonorform,ppDonateLevels="";var txt={raised:"Amount<br />Raised",goal:"Fundraising<br />Goal",daysleft:"Days Left<br />To Give",teamlink:"My Team Page",donation:"Make a Donation",givinglevels:"Please select a giving level below:",givingamt:"Please enter a donation amount below:",otheramt:"Other Amount:",amt:"Amount:",honorroll:"Honor Roll",givebtn:"Give Now",givebtnGen:"Giving Stats",goalachieved:"Goal Achieved!",goalsurpassed:"Goal Surpassed!",printalt:"If you are unable to donate online, please print out a donation form."};var p=jQuery.extend({},fafJSONparticipant);var e=fafJSONevent;p.appealExtras=fafJSONevent.personalpage.pageextras;p.CustomLinkName=fafJSONevent.personalpage.customlinkname;p.CustomLinkUrl=fafJSONevent.personalpage.customlinkurl;p.PrintName=fafJSONevent.labels.printabledonation;p.PrintUrl=fafJSONevent.labels.printabledonationurl;p.heading1Html='<h1 class="personalPageTitle">'+p.heading1+"</h1>";p.heading2Html='<h2 id="subHeadingTxt">'+p.heading2+"</h2>";if((typeof p.raised!=="undefined")&&(p.raised!==null)){p.raisedFmt=FAF.Methods.formatCurrencyWSymbol(parseInt(p.raised,10))}if((typeof p.raisedFmt!=="undefined")&&(p.raisedFmt!==null)){p.raisedFmtHtml='<div class="dataRow clearfix row1"><div class="totalRaised"><span class="symbol"></span><span id="totalRaised" style="">'+p.raisedFmt+'</span></div><span class="lbl">'+txt.raised+"</span></div>"}else{p.raisedFmtHtml=""}if((typeof p.goal!=="undefined")&&(p.goal!==null)){p.goalFmt=FAF.Methods.formatCurrencyWSymbol(parseInt(p.goal,10))}if((typeof p.goalFmt!=="undefined")&&(p.goalFmt!==null)){p.goalFmtHtml='<div class="dataRow clearfix row2"><div class="totalGoal"><span class="symbol"></span><span id="totalGoal" style="">'+p.goalFmt+'</span></div><span class="lbl">'+txt.goal+"</span></div>";p.goalFmtNum=p.goalFmt}else{p.goalFmtHtml="";p.goalFmtNum=""}var today=new Date();var eventdate=new Date(e.event.startdate);var daysleft=Math.floor((Date.parse(eventdate)-Date.parse(today))/86400000)+1;if(daysleft>-1){p.daysLeft='<div class="dataRow clearfix row4"><div class="daysLeft"><span id="daysLeft">'+daysleft+'</span></div><span class="lbl">'+txt.daysleft+"</span></div>"}else{p.daysLeft=""}if(p.appealExtras!=""){p.appealHtml='<p id="personalAppeal">'+p.appealExtras+"<br /><br />"+p.appeal+"</p>"}else{p.appealHtml='<p id="personalAppeal">'+p.appeal+"</p>"}if((typeof p.teampagelink!==undefined)&&(p.teampagelink!=="")){p.teampagelinkHtml='<p id="teamPageTxt"><a href="'+p.teampagelink+'">'+txt.teamlink+"</a></p>"}else{p.teampagelinkHtml=""}if((typeof p.teampagelink!==undefined)&&(p.teampagelink!=="")){p.teampagelinkHtml2='<div id="teamPageButton"><a class="teamPageLink" href="'+p.teampagelink+'">'+txt.teamlink+"</a></div>"}else{p.teampagelinkHtml2=""}if((p.CustomLinkName!="")&&(p.CustomLinkUrl!="")){p.CustomLinkHtml='<span class="personalCustomLink"><a href="'+p.CustomLinkUrl+'">'+p.CustomLinkName+"</a></span>"}else{p.CustomLinkHtml=""}if($(ppBodyTable).find('table table table table table td:contains("If you are unable to donate online")').length>0){if($(ppBodyTable).find('table table table table table td:contains("If you are unable to donate online")').find("a").attr("onclick").indexOf("tmpval=y")>0){var printpdf="y"}else{var printpdf=""}if($(ppBodyTable).find('table table table table table td:contains("If you are unable to donate online")').find("a").attr("onclick").indexOf("&o=L")>0){var printorient="&o=L"}else{var printorient=""}if(p.PrintUrl!=""){if(printpdf=="y"){p.PrintHtml='<div class="printNotice"><a href="#" onclick="javascript:window.open(\''+FAF.root+"/faf/tools/donationform.asp?ievent="+FAF.eID+"&tmpid="+p.sid+"&tmpval="+printpdf+printorient+"&customlinkForPdf="+encodeURIComponent(p.PrintUrl)+"','reg','menubar=yes,scrollbars=yes,resizable=yes')\">"+p.PrintName+"</a></div>"}else{p.PrintHtml='<div class="printNotice"><a href="#" onclick="javascript:window.open(\''+p.PrintUrl+"?ievent="+FAF.eID+"&tmpid="+p.sid+"&tmpval="+printpdf+printorient+"','reg','menubar=yes,scrollbars=yes,resizable=yes')\">"+p.PrintName+"</a></div>"}}else{p.PrintHtml='<div class="printNotice"><a href="#" onclick="javascript:window.open(\''+FAF.root+"/faf/tools/donationform.asp?ievent="+FAF.eID+"&tmpid="+p.sid+"&tmpval="+printpdf+printorient+"','reg','menubar=yes,scrollbars=yes,resizable=yes')\">"+p.PrintName+"</a></div>"}}else{p.PrintHtml=""}if((p.image1!=="")&&(p.image2!=="")){p.mediaHtml='<span class="personalImage"><img src="'+p.image1+'" alt="'+p.name+' Personal Image" /></span><p id="personalImageCaption">'+p.caption+'</p><span class="personalImage"><img src="'+p.image2+'" alt="'+p.name+' Personal Image" /></span>'}else{if(p.image1!==""){if(p.image1.indexOf("youtube.com")>0){if($.browser.msie){p.mediaHtml='<span class="personalImage"><object width="240" height="150"><param name="movie" value="'+p.image1+'"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><param name="wmode" value="opaque"></param><embed src="'+p.image1+'" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" wmode="opaque" width="240" height="150"></embed></object></span>'}else{p.mediaHtml='<span class="personalImage"><object width="240" height="150"><param name="movie" value="'+p.image1+'"><param name="allowFullScreen" value="true"><param name="allowscriptaccess" value="always"><param name="wmode" value="opaque"><embed src="'+p.image1+'" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" wmode="opaque" width="240" height="150"></object></span>'}}else{p.mediaHtml='<span class="personalImage"><img src="'+p.image1+'" alt="'+p.name+' Personal Image" /></span><p id="personalImageCaption">'+p.caption+"</p>"}}else{p.mediaHtml=""}}ppDonorform=$(ppBodyTable).find("input[name=level]").closest("table");ppDonorform.find("input[name=level]").closest("tr").each(function(){var input=$(this).find("td:eq(0)").html();var text=$(this).find("td:eq(1)").html();if((typeof text!=="undefined")&&(text!==null)&&(text!==0)){text=text.replace(br," ");text=text.match(regamount);if((typeof text!=="undefined")&&(text!==null)&&(text!==0)){text=text[0].replace("(","");text=text.replace(" +)","");var textFmt=FAF.Methods.formatCurrencyWSymbol(text)}else{textFmt=""}}var label;if($(this).find("td:eq(1) a").length>0){label=$(this).find("td:eq(1) a").html();if((typeof label!=="undefined")&&(label!==null)&&(label!==0)){label.split(br)[0]}}else{label=$(this).find("td:eq(1) b").html();if((typeof label!=="undefined")&&(label!==null)&&(label!==0)){label.split(br)[0]}}ppDonateLevels+="<li>"+input+'<label for="transaction"><span class="transtext"><span class="amt">'+textFmt+"</span> "+label+"</span></label></li>"});ppDonateLevels+='<li><input name="level" type="radio" /><label for="transaction"><span class="transtext">'+txt.otheramt+' </span><span id="donateAmount"></span></label></li>';var ppDonateLevelsAlt='<li><input name="level" type="radio" /><label for="transaction"><span class="transtext">'+txt.amt+' </span><span id="donateAmount"></span></label></li>';if(($(ppBodyTable).find("input[name=level]").length>0)&&($(ppBodyTable).find("input[name=level]").val()!=0)){var ppDonateLevelsHtml='<p class="info">'+txt.givinglevels+'</p><div id="givingLevels"><ol class="options">'+ppDonateLevels+"</ol></div>"}else{var ppDonateLevelsHtml='<p class="info">'+txt.givingamt+'</p><div id="givingLevels"><ol class="options">'+ppDonateLevelsAlt+"</ol></div>"}var personalPageTemplate='<!-- NEW STUFF --><div id="PersonalPageLayourContainer" class="clearfix"><!-- start left column --><div id="lh-col">'+p.heading1Html+p.heading2Html+p.teampagelinkHtml+'<div id="socialSharingWrap" class="clearfix"><div id="socialSharingTool"><!-- SHARETHIS PLUGIN --><span class="st_sharethis_large" ></span><span class="st_email_large" ></span><span class="st_twitter_large" ></span><!-- END SHARE THIS PLUGIN --></div><!-- FACEBOOK LIKE BOX --><div id="facebookLikeBox"></div><!-- END FACEBOOK LIKE BOX --></div><div id="fundraisingThermometer" class="clearfix"><div id="progress_box" class="light_gray_white_box"><span class="top_left"></span><span class="top_right"></span><div><div id="bar"><span id="bar_progress" style="width:0%"><div id="fundraisingRaised">'+p.raisedFmt+'</div></span></div><ul><li>0%</li><li>20%</li><li>40%</li><li>60%</li><li>80%</li><li class="last">100%</li></ul></div><span class="bottom_left"></span><span class="bottom_right"></span></div><div id="fundraisingGoal">'+p.goalFmtNum+'</div></div><div id="personalImageWrapper">'+p.CustomLinkHtml+p.mediaHtml+"</div>"+p.appealHtml+'</div><!-- end of left column --><!-- start right column --><div id="rh-col">'+p.teampagelinkHtml2+'<div id="giveNowButton"><a href="#givingOverlay">'+txt.givebtn+'</a></div><div id="eventData">'+p.raisedFmtHtml+p.goalFmtHtml+'<div class="dataRow clearfix row3" style="display:none;"><div class="totalDonors"><span id="totalDonors"></span></div><span class="lbl">Generous<br />Supporters</span></div>'+p.daysLeft+'</div><div id="givingOverlay"><div id="givingOverlayInner" class="clearfix"><form name="registrationForm" class="registrationForm" action="" method="POST"><h4>'+txt.donation+"</h4>"+ppDonateLevelsHtml+'<div id="donateButton"></div>'+p.PrintHtml+'</form></div></div><!-- HONOR ROLL --><h3 class="honorRollTitle">'+txt.honorroll+'</h3><div id="honorRollFeed" class="clearfix"><div class="honorRollFeedInner clearfix"></div></div><!-- END HONOR ROLL --></div><!-- end of right column --></div><!-- end page layout container --><!-- END NEW STUFF -->';$(".FAFBodyTable").after(personalPageTemplate);$("#givingLevels .options .transtext a b").unwrap();$("#givingLevels .options li label, #givingLevels .options li span.otheramount").click(function(){$(this).prev("input").click();return false});$("form[name=registrationForm]:eq(0)").addClass("oldregform");$(".registrationForm").attr("onSubmit","return formCheck()");$(".registrationForm").attr("action",$("form[name=registrationForm]:first").attr("action"));$(".registrationForm ol").after($(".FAFBodyTable input[type=hidden]"));$("#donateAmount").append($("input[name=addAmount]"));$("#donateAmount input[name=addAmount]").attr("onblur","");$("#donateAmount input[name=addAmount]").keydown(function(){$(this).closest("label").prev("input").click()});if($.colorbox){$("#giveNowButton a").colorbox({href:"#givingOverlay",width:"550px",maxWidth:"100%",height:"75%",maxHeight:"700px",inline:true,opacity:0.75})}if($('input[name="donateToSelfCheckbox"]').length>0){$("#donateButton").html($('input[name="donateToSelfCheckbox"]').closest("table").parent().html())}else{$("#donateButton").html($("input[name=imageField]").closest("td").html())}$("#donateButton input").removeAttr("width").removeAttr("height");$("#donateButton input[name=imageField]").hide();$("#donateButton").append('<input type="button" border="0" name="imageFieldNew" id="donateSubmit" value="Donate &raquo;">');$("#donateSubmit").click(function(){if(formCheck()==true){$("#donateButton input[name=imageField]").click()}});$("#donateButton br").remove();$(".oldregform").remove();if(FAF.sID==0&&(FAF.tID==null||FAF.tID==""||FAF.tID==0)){console.log("General Donation!");$("#fundraisingThermometer").after('<div id="givingInnerlay" />');$("#givingInnerlay").append($("#givingOverlayInner"));$("#giveNowButton").hide();$("#rh-col").prepend('<h5 id="donationStats">'+txt.givebtnGen+"</h5>");$("#totalGoal").html(FAF.Methods.formatCurrencyWSymbol(parseInt(FAF.Data.event.goal,10)));$("#totalRaised").html(FAF.Methods.formatCurrencyWSymbol(parseInt(FAF.Data.event.raised,10)))}$(".registrationForm").attr("name","registrationForm");window.formPointer=document.registrationForm;window.newFormElement=$("form.registrationForm");if(((FAF.sID==0))&&((typeof FAF.tID=="undefined")||(FAF.tID==null)||(FAF.tID==0))){$("#fundraisingThermometer, h2.totalRaised, .nonprofitName").hide()}if((typeof FAF.sID=="undefined")||(FAF.sID==null)){$("#facebookComments, #socialSharingWrap").hide();$("table.FAFOuterTable2").before('<div id="wrapAlertBar"><div id="alertBar">Your Personal Page Preview - <a href="'+FAF.root+"/faf/login/page_edit.asp?login=lmenu&ievent="+FAF.eID+'">[EDIT]</a></div></div>')}if((typeof fafJSONparticipant.sid!=="undefined")&&(fafJSONparticipant.sid!==null)&&(fafJSONparticipant.sid!=0)){if((typeof p.raised!=="undefined")&&(p.raised!==null)&&(p.raised!=0)&&(typeof p.goal!=="undefined")&&(p.goal!==null)){if(p.raised/p.goal<=1){setTimeout(function(){$("#bar_progress").animate({width:(Math.round((p.raised/p.goal)*100))+"%"},2000)},1000)}else{setTimeout(function(){$("#bar_progress").animate({width:"100%"},2000)},1000)}if(p.raised/p.goal==1){setTimeout(function(){$("#bar").addClass("goalReached");$("#fundraisingGoal").after('<div id="goalAchieved">'+txt.goalachieved+"</div>")},3000)}if(p.raised/p.goal>1){setTimeout(function(){$("#bar").addClass("goalPassed");$("#fundraisingGoal").after('<div id="goalSurpassed">'+txt.goalsurpassed+"</div>")},3000)}}}if(((typeof p.raised=="undefined")||(p.raised==null)||(p.raised==0))&&((typeof p.goal=="undefined")||(p.goal==null)||(p.goal==0))){$("#fundraisingThermometer").hide()}function hideHonorRoll(){$("#eventData .row3").remove();$(".honorRollTitle, #honorRollFeed").remove()}if((typeof fafJSONparticipant.sid!=="undefined")&&(fafJSONparticipant.sid!==null)&&(fafJSONparticipant.sid!=0)&&(FAF.Options.hideHonorRoll!=true)&&($.xml2json)){$.ajax({type:"GET",cache:false,url:"/gadgets/data/honorroll.aspx?sid="+p.sid+"&eid="+FAF.eID,dataType:"html",success:function(honordata){var json=$.xml2json(honordata);if($(json.honoritem).length){$("#totalDonors").html($(json.honoritem).length);$("#PersonalPageLayourContainer .totalDonors").css({visibility:"visible"}).parent().show();var html="";var num=0;$(json.honoritem).each(function(index,honoritem){if(honoritem.scrolltypeid==1){num=num+1;html+='<li class="honorItem"><div class="gutter"><span class="honorAmount">$'+honoritem.amount+'</span><span class="honorNameFrom">'+honoritem.namefrom+'</span><br /><span class="honorNameTo">'+honoritem.nameto+"</span></div></li>"}if(honoritem.scrolltypeid==2){num=num+1;html+='<li class="honorItem"><div class="gutter"><span class="honorAmount"></span><span class="honorNameFrom">'+honoritem.namefrom+'</span><br /><span class="honorNameTo">'+honoritem.nameto+"</span></div></li>"}});$("#honorRollFeed .honorRollFeedInner").append('<ul class="honorRollList">'+html+"</ul>");$("#honorRollFeed .honorNameFrom").each(function(){$(this).html($(this).html().replace(/&nbsp;/g," ").replace(/&#160;/g," "))});if(num>4){$("#honorRollFeed").after('<div id="honorRollControls"><a href="#" id="ticker-previous">Previous</a> / <a href="#" id="ticker-next">Next</a> / <a id="ticker-stop" href="#">Stop</a> / <a id="ticker-start" href="#">Start</a></div>');$("#honorRollFeed .honorRollFeedInner").totemticker({row_height:"63px",next:"#ticker-next",previous:"#ticker-previous",stop:"#ticker-stop",start:"#ticker-start",speed:1200,interval:5000,max_items:4})}else{if(num<=0){hideHonorRoll()}}}else{hideHonorRoll()}},error:function(xhr,textStatus,errorThrown){hideHonorRoll()}})}else{hideHonorRoll()}$("#PersonalPageLayourContainer").delay(400).show(function(){$(".dataRow").each(function(){var rowWidth=$(this).width();var valWidth=$(this).find("div:first").outerWidth(true);var marg=$(this).find("span.lbl").outerWidth(true)-$(this).find("span.lbl").width();var newWidth=rowWidth-valWidth-marg-1;$(this).find("span.lbl").css({display:"inline-block",width:newWidth})})});document.title=p.name+" Fundraising Page - "+document.title}})},teamPage:function(){$(document).ready(function(){if((FAF.thisURL.indexOf("search/searchteampart.asp")>0)&&!($.browser.msie&&$.browser.version.substr(0,1)<7)){$(".FAFBodyTable").hide();var t=jQuery.extend({},fafJSONteam);var e=fafJSONevent;t.PrintName=fafJSONevent.labels.printabledonation;t.PrintUrl=fafJSONevent.labels.printabledonationurl;var ppBodyTable=$(".FAFBodyTable").html(),br=new RegExp("\\<(br|BR)+\\>","g"),regamount=new RegExp("\\(\\$.+\\+\\)"),br1=new RegExp("\\<(br|BR)+\\>"),ppNonprofitName,ppDonorform,ppDonateLevels="";var txt={raised:"Amount<br />Raised",goal:"Fundraising<br />Goal",daysleft:"Days Left<br />To Give",teamlink:"My "+e.labels.team+" Page",donation:"Make a Donation",givinglevels:"Please select a giving level below:",givingamt:"Please enter a donation amount below:",otheramt:"Other Amount:",amt:"Amount:",honorroll:"Honor Roll",givebtn:"Give Now",givebtnGen:"&laquo; Give Now",goalachieved:"Goal Achieved!",goalsurpassed:"Goal Surpassed!",recruitmentgoal:"Recruitement<br />Goal",teammembers:e.labels.team+"<br />Members:",teamlist:e.labels.team+" Members",teamlist2:"Total Raised",jointeam:"Join Our "+e.labels.team};t.heading1Html='<h1 class="personalPageTitle">'+t.heading1+"</h1>";t.heading2Html='<h2 id="subHeadingTxt">'+t.heading2+"</h2>";if((typeof t.raised!=="undefined")&&(t.raised!==null)){t.raisedFmt=FAF.Methods.formatCurrencyWSymbol(parseInt(t.raised,10))}if((typeof t.raisedFmt!=="undefined")&&(t.raisedFmt!==null)){t.raisedFmtHtml='<div class="dataRow clearfix row1"><div class="totalRaised"><span class="symbol"></span><span id="totalRaised" style="">'+t.raisedFmt+'</span></div><span class="lbl">'+txt.raised+"</span></div>"}else{t.raisedFmtHtml=""}if((typeof t.goal!=="undefined")&&(t.goal!==null)){t.goalFmt=FAF.Methods.formatCurrencyWSymbol(parseInt(t.goal,10))}if((typeof t.goalFmt!=="undefined")&&(t.goalFmt!==null)){t.goalFmtHtml='<div class="dataRow clearfix row2"><div class="totalGoal"><span class="symbol"></span><span id="totalGoal" style="">'+t.goalFmt+'</span></div><span class="lbl">'+txt.goal+"</span></div>";t.goalFmtNum=t.goalFmt}else{t.goalFmtHtml="";t.goalFmtNum=""}var today=new Date();var eventdate=new Date(e.event.startdate);var daysleft=Math.floor((Date.parse(eventdate)-Date.parse(today))/86400000)+1;if(daysleft>-1){t.daysLeft='<div class="dataRow clearfix row4"><div class="daysLeft"><span id="daysLeft">'+daysleft+'</span></div><span class="lbl">'+txt.daysleft+"</span></div>"}else{t.daysLeft=""}t.appealHtml='<p id="personalAppeal">'+t.appeal+"</p>";if((typeof t.recruitmentgoal!==undefined)&&(t.recruitmentgoal!=="")){t.recruitmentHtml='<div class="teamMembersGoal"><span id="teamMembersGoal">'+t.recruitmentgoal+'</span></div><span class="lbl">'+txt.recruitmentgoal+"</span>"}else{t.recruitmentHtml=""}if((typeof t.membersrecruited!==undefined)&&(t.membersrecruited!=="")){t.membersHtml='<div class="teamMembers"><span id="teamMembers">'+t.membersrecruited+'</span></div><span class="lbl">'+txt.teammembers+"</span>"}else{t.membersHtml=""}if((typeof t.jointeamlink!==undefined)&&(t.jointeamlink!=="")){t.jointeamHtml='<li class="joinOurTeamLink"><a href="'+t.jointeamlink+'">'+txt.jointeam+"</a></li>"}else{t.jointeamHtml=""}if((typeof t.grouppagelink!==undefined)&&(t.grouppagelink!=="")){t.grouppageHtml='<li class="groupPageLink"><a href="'+t.grouppagelink+'">Our '+e.labels.group+" Page</a></li>"}else{t.grouppageHtml=""}if((t.jointeamHtml!=="")||(t.grouppageHtml!=="")){t.teamBtnsHtml='<div id="teamButtons"><ul>'+t.jointeamHtml+t.grouppageHtml+"</ul></div>"}else{t.teamBtnsHtml=""}var teamTable=$(ppBodyTable).find('table table table table td b:contains("Members:")').closest("table").parents("table:first").parent().html();if((t.teamdonation!=="undefined")&&(t.teamdonation!==null)&&(t.teamdonation!=="")){t.teamdonationHtml="<dl><dt>"+t.teamdonation.name+"</dt><dd>"+FAF.Methods.formatCurrencyWSymbol(t.teamdonation.raised)+"</dd></dl>"}else{t.teamdonationHtml=""}if((t.teamcaptain!=="undefined")&&(t.teamcaptain!==null)&&(t.teamcaptain!=="")){t.teamcaptainHtml='<dl><dt><a href="'+t.teamcaptain.link+'">'+t.teamcaptain.name+"</a></dt><dd>"+FAF.Methods.formatCurrencyWSymbol(t.teamcaptain.raised)+"</dd></dl>"}else{t.teamcaptainHtml=""}if(t.teamcocaptains instanceof Array==true){t.teamcocaptainHtml="";$.each(t.teamcocaptains,function(i,val){t.teamcocaptainHtml='<dl><dt><a href="'+val.link+'">'+val.name+"</a></dt><dd>"+FAF.Methods.formatCurrencyWSymbol(val.raised)+"</dd></dl>"})}else{t.teamcocaptainHtml=""}if(t.teammembers instanceof Array==true){t.teammembmersHtml="";$.each(t.teammembers,function(i,val){t.teammembmersHtml+='<dl><dt><a href="'+val.link+'">'+val.name+"</a></dt><dd>"+FAF.Methods.formatCurrencyWSymbol(val.raised)+"</dd></dl>"})}else{t.teammembmersHtml="test"}t.teamList='<div id="teamList"><h3><dl><dt>'+txt.teamlist+"</dt><dd>"+txt.teamlist2+'</dd></dl></h3><div class="teamDonation">'+t.teamdonationHtml+'</div><div class="captains">'+t.teamcaptainHtml+t.teamcocaptainHtml+'</div><div class="members">'+t.teammembmersHtml+"</div></div>";if((typeof t.recruitmentgoal!=="undefined")&&(t.recruitmentgoal!==null)&&(t.recruitmentgoal!==0)&&(typeof t.membersrecruited!=="undefined")&&(t.membersrecruited!==null)&&(t.membersrecruited!==0)){t.teamMembersHtml='<div class="teamMembersMessage">We\'ve recruited <span class="teamMembers">'+t.membersrecruited+'</span> members out of our recruitment goal of <span class="teamGoal">'+t.recruitmentgoal+"</span> "+e.labels.team+" members!</div>"}else{t.teamMembersHtml=""}if((t.image1!=="")&&(t.image2!=="")&&(t.image2!=="/AccountTempFiles/")){t.mediaHtml='<span class="personalImage"><img src="'+t.image1+'" alt="'+t.name+' Personal Image" /></span><p id="personalImageCaption">'+t.caption+'</p><span class="personalImage"><img src="'+t.image2+'" alt="'+t.name+' Personal Image" /></span>'}else{if(t.image1!==""){if(t.image1.indexOf("youtube.com")>0){if($.browser.msie){t.mediaHtml='<span class="personalImage"><object width="240" height="150"><param name="movie" value="'+t.image1+'"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><param name="wmode" value="opaque"></param><embed src="'+t.image1+'" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" wmode="opaque" width="240" height="150"></embed></object></span>'}else{t.mediaHtml='<span class="personalImage"><object width="240" height="150"><param name="movie" value="'+t.image1+'"><param name="allowFullScreen" value="true"><param name="allowscriptaccess" value="always"><param name="wmode" value="opaque"><embed src="'+t.image1+'" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" wmode="opaque" width="240" height="150"></object></span>'}}else{t.mediaHtml='<span class="personalImage"><img src="'+t.image1+'" alt="'+t.name+' Personal Image" /></span><p id="personalImageCaption">'+t.caption+"</p>"}}else{t.mediaHtml=""}}var teamPageTemplate='<!-- NEW STUFF --><div id="PersonalPageLayourContainer" class="clearfix"><!-- start left column --><div id="lh-col">'+t.heading1Html+t.heading2Html+'<div id="socialSharingWrap" class="clearfix"><div id="socialSharingTool"><!-- SHARETHIS PLUGIN --><span class="st_sharethis_large" ></span><span class="st_email_large" ></span><span class="st_twitter_large" ></span><!-- END SHARE THIS PLUGIN --></div><!-- FACEBOOK LIKE BOX --><div id="facebookLikeBox"></div><!-- END FACEBOOK LIKE BOX --></div><div id="fundraisingThermometer" class="clearfix"><div id="progress_box" class="light_gray_white_box"><span class="top_left"></span><span class="top_right"></span><div><div id="bar"><span id="bar_progress" style="width:0%"><div id="fundraisingRaised">'+t.raisedFmt+'</div></span></div><ul><li>0%</li><li>20%</li><li>40%</li><li>60%</li><li>80%</li><li class="last">100%</li></ul></div><span class="bottom_left"></span><span class="bottom_right"></span></div><div id="fundraisingGoal">'+t.goalFmtNum+'</div></div><div id="personalImageWrapper">'+t.mediaHtml+"</div>"+t.appealHtml+'<div id="teamMembersList">'+t.teamList+'</div></div><!-- end of left column --><!-- start right column --><div id="rh-col">'+t.teamBtnsHtml+t.teamMembersHtml+'<div id="giveNowButton"><a href="#givingOverlay">'+txt.givebtn+'</a></div><div id="eventData">'+t.raisedFmtHtml+t.goalFmtHtml+'<div class="dataRow clearfix row3" style="display:none;"><div class="totalDonors"><span id="totalDonors"></span></div><span class="lbl">Generous<br />Supporters</span></div>'+t.daysLeft+'</div><div id="givingOverlay"><div id="givingOverlayInner" class="clearfix"><form name="registrationForm" class="registrationForm" action="" method="POST"><h4>'+txt.donation+'</h4><div id="givingLevels"><ol class="options"></ol></div><div id="donateButton"></div></form></div></div><!-- HONOR ROLL --><h3 class="honorRollTitle">'+txt.honorroll+'</h3><div id="honorRollFeed" class="clearfix"><div class="honorRollFeedInner clearfix"></div></div><!-- END HONOR ROLL --></div><!-- end of right column --></div><!-- end page layout container --><!-- END NEW STUFF -->';$(".FAFBodyTable").after(teamPageTemplate);$("#PersonalPageLayourContainer #teamButtons a").each(function(i){var i=i+1;$(this).addClass("link"+i+"");if($(this).attr("href").indexOf("&teamsName=")>0){$(this).addClass("teamPageLink")}else{if($(this).attr("href").indexOf("groupTeamList.asp")>0){$(this).addClass("groupPageLink")}}});if($.colorbox){$("#giveNowButton a").colorbox({href:"#givingOverlay",width:"550px",maxWidth:"100%",height:"75%",maxHeight:"700px",inline:true,opacity:0.75});$("#teamMembersList td").find('a:contains("General"):contains("Donation")').attr("href","#givingOverlay").colorbox({href:"#givingOverlay",width:"550px",maxWidth:"100%",height:"75%",maxHeight:"700px",inline:true,opacity:0.75})}if((typeof FAF.tID!=="undefined")&&(FAF.tID!==null)&&(FAF.tID!=0)){$.get("/faf/donorReg/donorPledge.asp?ievent="+FAF.eID+"&supId=0&team="+FAF.tID,function(teamdata){var minDonation=teamdata.split("if(formPointer.elements['addAmount'].value < ")[1];if((typeof minDonation!=="undefined")&&(minDonation!==null)&&(minDonation!=0)){minDonation=minDonation.split("){")[0];FAF.minDonation=Number(minDonation)}var teamBody=$(teamdata).find(".FAFBodyTable");var formAction=$(teamBody).find("form[name=registrationForm]").attr("action");var ppDonorform=$(teamBody).find("input[name=level]").closest("table");var ppDonateLevels="";ppDonorform.find("input[name=level]").closest("tr").each(function(){if($(this).find('input[type="radio"]').length>0){var input=$(this).find("td:eq(0)").html();var text=$(this).find("td:eq(1)").html();if((typeof text!=="undefined")&&(text!==null)&&(text!==0)){text=text.replace(br," ");text=text.match(regamount);if((typeof text!=="undefined")&&(text!==null)&&(text!==0)){text=text[0].replace("(","");text=text.replace(" +)","");var textFmt=FAF.Methods.formatCurrencyWSymbol(text)}else{textFmt=""}}var label;if($(this).find("td:eq(1) a").length>0){label=$(this).find("td:eq(1) a").html();if((typeof label!=="undefined")&&(label!==null)&&(label!==0)){label.split(br)[0]}}else{label=$(this).find("td:eq(1) b").html();if((typeof label!=="undefined")&&(label!==null)&&(label!==0)){label.split(br)[0]}}ppDonateLevels+="<li>"+input+'<label for="transaction"><span class="transtext"><span class="amt">'+textFmt+"</span> "+label+"</span></label></li>"}});ppDonateLevels+='<li><input name="level" type="radio" value=""/><label for="transaction"><span class="transtext otheramount">Other Amount: </span><span id="donateAmount"></span></label></li>';$("#givingLevels .options").append(ppDonateLevels);$("#givingLevels .options .transtext a b").unwrap();$("#givingLevels .options li label, #givingLevels .options li span.otheramount").click(function(){$(this).prev("input").click();return false});$(".registrationForm").attr("onSubmit","return customFormCheck()");$(".registrationForm").attr("action",formAction);$(".registrationForm ol").after($(teamBody).find("input[type=hidden]"));$(".registrationForm input[type=hidden][name=js]").attr("value","true");$("#donateAmount").append($(teamBody).find("input[name=addAmount]"));$("#donateAmount input[name=addAmount]").attr("onblur","");$("#donateAmount input[name=addAmount]").keydown(function(){$(this).closest("label").prev("input").click()});if($(teamBody).find('input[name="donateToSelfCheckbox"]').length>0){$("#donateButton").html($(teamBody).find('input[name="donateToSelfCheckbox"]').closest("table").parent().html())}else{$("#donateButton").html($(teamBody).find("input[name=imageField]").closest("td").html())}$("#donateButton input").removeAttr("width").removeAttr("height");$("#donateButton input[name=imageField]").hide();$("#donateButton").append('<input type="button" border="0" name="imageFieldNew" id="donateSubmit" value="Donate &raquo;">');$("#donateSubmit").click(function(){if(customFormCheck()==true){$("#donateButton input[name=imageField]").click()}});$("#donateButton br").remove();$(".registrationForm").attr("name","registrationForm");window.formPointer=document.registrationForm;window.newFormElement=$("form.registrationForm")})}if((typeof t.raised!=="undefined")&&(t.raised!==null)&&(t.raised!=0)&&(typeof t.goal!=="undefined")&&(t.goal!==null)){if(t.raised/t.goal<=1){setTimeout(function(){$("#bar_progress").animate({width:(Math.round((t.raised/t.goal)*100))+"%"},2000)},1000)}else{setTimeout(function(){$("#bar_progress").animate({width:"100%"},2000)},1000)}if(t.raised/t.goal==1){setTimeout(function(){$("#bar").addClass("goalReached");$("#fundraisingGoal").after('<div id="goalAchieved">'+txt.goalachieved+"</div>")},3000)}if(t.raised/t.goal>1){setTimeout(function(){$("#bar").addClass("goalPassed");$("#fundraisingGoal").after('<div id="goalSurpassed">'+txt.goalsurpassed+"</div>")},3000)}}if(((typeof t.raised=="undefined")||(t.raised==null)||(t.raised==0))&&((typeof t.goal=="undefined")||(t.goal==null)||(t.goal==0))){$("#fundraisingThermometer").hide()}function hideHonorRoll(){$("#eventData .row3").remove();$(".honorRollTitle, #honorRollFeed").remove()}if((typeof t.tid!=="undefined")&&(t.tid!==null)&&(t.tid!=0)&&(FAF.Options.hideHonorRoll!=true)&&($.xml2json)){$.ajax({type:"GET",cache:false,url:"/gadgets/data/honorroll.aspx?tid="+t.tid+"&eid="+FAF.eID,dataType:"html",success:function(honordata){var json=$.xml2json(honordata);if($(json.honoritem).length){$("#totalDonors").html($(json.honoritem).length);$("#PersonalPageLayourContainer .totalDonors").css({visibility:"visible"}).parent().show();var html="";var num=0;$(json.honoritem).each(function(index,honoritem){if(honoritem.scrolltypeid==1){num=num+1;html+='<li class="honorItem"><div class="gutter"><span class="honorAmount">$'+honoritem.amount+'</span><span class="honorNameFrom">'+honoritem.namefrom+'</span><br /><span class="honorNameTo">'+honoritem.nameto+"</span></div></li>"}if(honoritem.scrolltypeid==2){num=num+1;html+='<li class="honorItem"><div class="gutter"><span class="honorAmount"></span><span class="honorNameFrom">'+honoritem.namefrom+'</span><br /><span class="honorNameTo">'+honoritem.nameto+"</span></div></li>"}});$("#honorRollFeed .honorRollFeedInner").append('<ul class="honorRollList">'+html+"</ul>");$("#honorRollFeed .honorNameFrom").each(function(){$(this).html($(this).html().replace(/&nbsp;/g," ").replace(/&#160;/g," "))});if(num>4){$("#honorRollFeed").after('<div id="honorRollControls"><a href="#" id="ticker-previous">Previous</a> / <a href="#" id="ticker-next">Next</a> / <a id="ticker-stop" href="#">Stop</a> / <a id="ticker-start" href="#">Start</a></div>');$("#honorRollFeed .honorRollFeedInner").totemticker({row_height:"63px",next:"#ticker-next",previous:"#ticker-previous",stop:"#ticker-stop",start:"#ticker-start",speed:1200,interval:5000,max_items:4})}else{if(num<=0){hideHonorRoll()}}}else{hideHonorRoll()}},error:function(xhr,textStatus,errorThrown){hideHonorRoll()}})}else{hideHonorRoll()}$("#PersonalPageLayourContainer").delay(400).fadeIn("fast",function(){$(".dataRow").each(function(){var rowWidth=$(this).width();var valWidth=$(this).find("div:first").outerWidth(true);var marg=$(this).find("span.lbl").outerWidth(true)-$(this).find("span.lbl").width();var newWidth=rowWidth-valWidth-marg-1;$(this).find("span.lbl").css({display:"inline-block",width:newWidth})})});document.title=t.name+" Fundraising Page - "+document.title}})},testFundBar:function(raised,goal){if(raised&&goal){var barGoal=goal,barRaised=raised}else{if(raised){if(typeof fafJSONparticipant!="undefined"){var barGoal=fafJSONparticipant.goal,barRaised=raised}if(typeof fafJSONteam!="undefined"){var barGoal=fafJSONteam.goal,barRaised=raised}}else{if(typeof fafJSONparticipant!="undefined"){var barGoal=fafJSONparticipant.goal,barRaised=fafJSONparticipant.raised}if(typeof fafJSONteam!="undefined"){var barGoal=fafJSONteam.goal,barRaised=fafJSONteam.raised}}}if((typeof barRaised!=="undefined")&&(barRaised!==null)&&(barRaised!=0)&&(typeof barGoal!=="undefined")&&(barGoal!==null)){$("#goalAchieved, #goalSurpassed").remove();var barWidth=$("#bar").outerWidth();$("#bar_progress").width("0");$("#bar").removeClass("goalReached goalPassed");if(barRaised/barGoal<=1){$("#bar_progress").animate({width:barWidth*(barRaised/barGoal).toFixed(2)},2000,function(){$("#fundraisingRaised").html(FAF.Methods.formatCurrencyWSymbol(parseInt(barRaised,10)))})}else{$("#bar_progress").animate({width:barWidth},2000,function(){$("#fundraisingRaised").html(FAF.Methods.formatCurrencyWSymbol(parseInt(barRaised,10)))})}if(barRaised/barGoal==1){setTimeout(function(){$("#bar").addClass("goalReached");$("#fundraisingGoal").after('<div id="goalAchieved">Goal Achieved!</div>')},2000)}if(barRaised/barGoal>1){setTimeout(function(){$("#bar").addClass("goalPassed");$("#fundraisingGoal").after('<div id="goalSurpassed">Goal Surpassed!</div>')},2000)}}},myWebpage:function(){$(document).ready(function(){if((FAF.thisURL.indexOf("login/page_edit.asp")>0)||(FAF.thisURL.indexOf("login/teampageedit.asp")>0)||(FAF.thisURL.indexOf("login/teamdonationpageedit.asp")>0)||(FAF.thisURL.indexOf("login/import_image.asp")>0)){var currentUserId,currentUserPPagePreview,currentUserPPageLink,btabclose=new RegExp("\\</(b|B)+\\>");$.ajax({type:"GET",cache:true,url:"/faf/partDonorReg/pledgeEntry.asp?ievent="+FAF.eID,dataType:"html",success:function(data){currentUserId=$(data).find('form[name=partStats] td b:contains("Participant ID#:")').parent().html();if((typeof currentUserId!=="undefined")&&(currentUserId!=0)&&(typeof currentUserId!==null)){currentUserId=currentUserId.replace(btabclose,"split");currentUserId=currentUserId.split("split ")[1];currentUserId=currentUserId.replace(" ","");currentUserId=currentUserId.replace("&nbsp;","");currentUserPPagePreview="/faf/donorReg/donorPledge.asp?ievent="+FAF.eID+"&supId="+currentUserId+"&view=newpreview";currentUserPPageLink="/faf/donorReg/donorPledge.asp?ievent="+FAF.eID+"&supId="+currentUserId}if(FAF.thisURL.indexOf("login/page_edit.asp")>0){if((typeof currentUserPPagePreview!=="undefined")&&(currentUserPPagePreview!==null)&&(currentUserPPagePreview!=0)){$('.FAFBodyTable form img[alt="Preview"]').closest("a").attr("href","#");$('.FAFBodyTable form img[alt="Preview"]').closest("a").click(function(){var imageSrc=levelsArray[0].src;imageSrc=imageSrc.split("/AccountTempFiles/")[1];var newWin=window.open("","pic","resizable=yes,scrollbars=yes,width=1000,height=500,left=20,top=20");document.form1.target="pic";document.form1.action="../donorReg/donorPledge.asp?ievent="+FAF.eID+"&imgname="+imageSrc+"&getMediaFormat=image";document.form1.method="post";document.form1.submit()})}else{$(".FAFBodyTable form img[alt=Preview]").closest("a").attr("href","#")}}if((typeof currentUserPPageLink!=="undefined")&&(currentUserPPageLink!==null)&&(currentUserPPageLink!=0)){$('.FAFBodyTable td.loginmenu a:contains("View Personal Page")').attr("href",currentUserPPageLink)}else{}$('.FAFBodyTable td.loginmenu a:contains("Edit Team Donation Page")').prev("font").remove();$('.FAFBodyTable td.loginmenu a:contains("Edit Team Donation Page")').remove();var viewTeamPageLink=$('.FAFBodyTable td.loginmenu a:contains("View Team Page")').attr("href");if((typeof viewTeamPageLink!=="undefined")&&(viewTeamPageLink!==null)&&(viewTeamPageLink!=0)){viewTeamPageLink=viewTeamPageLink.replace("&page=view","")}$('.FAFBodyTable td.loginmenu a:contains("View Team Page")').attr("href",viewTeamPageLink)},error:function(xhr,textStatus,errorThrown){}})}if(FAF.thisURL.indexOf("login/page_edit.asp")>0){$(".FAFBodyTable").addClass("editPersonalPage");$('.FAFBodyTable h4:contains("Edit your ")').closest("table").closest("td").closest("table").attr("id","oldEditPP");$("#oldEditPP").before('<div id="newEditPP" />');$("#oldEditPP").after('<div id="newEditPPSub" />');$("#newEditPP").append('<div id="editpp"><div class="editppTitle"><h4></h4></div><div class="editppHeaderText"><div class="line1"><span>Header:</span></div><div class="line2"><span>Subheader:</span></div><div class="editppImgQ"></div></div>');$("#newEditPPSub").append('<div id="editppsub"><div class="editppPreview"><div class="text" /><div class="buttons" /></div><div class="editppSubmit"><div class="text" /><div class="buttons" /></div><div style="clear:both;"></div></div>');$("#editpp .editppTitle h4").html($('.FAFBodyTable h4:not(:first):contains("Edit your ")').html());$("#editpp .editppHeaderText .line1").append($('.FAFBodyTable input[name="inputHeaderTextLine1"]'));$("#editpp .editppHeaderText .line2").append($('.FAFBodyTable input[name="inputHeaderTextLine2"]'));$("#editpp .editppImgQ").append($('.FAFBodyTable select[name="videoFlag"]').closest("td").contents());$('.FAFBodyTable select[name="videoFlag"]:not(:first)').closest("tr").remove();$('.FAFBodyTable td b:contains("Finish webpage")').closest("table").after('<table><tr><td><div id="editppLeftCol"></div></td></tr></table>');$("#editppLeftCol").append("<table><tr></tr></table>");$("#editppLeftCol tr").append($('.FAFBodyTable td b:contains("Caption under image:")').closest("td"));$('#oldEditPP table td b:contains("Choose a theme")').closest("tr").hide().next().hide();$('.FAFBodyTable h4:not(:first):contains("Edit your ")').closest("tr").remove();$('.FAFBodyTable td b:contains("Header Text")').closest("tr").remove();$('.FAFBodyTable td b:contains("Line 1:")').closest("table").closest("tr").remove();$("#newEditPPSub .editppPreview .buttons").append($('.FAFBodyTable td b:contains("Preview webpage")').closest("tr").next().find("td").html());$("#newEditPPSub .editppPreview .text").prepend($('.FAFBodyTable td b:contains("Preview webpage")').closest("td").html());$('.FAFBodyTable td b:contains("Preview webpage"):first').closest("tr").next().remove();$('.FAFBodyTable td b:contains("Preview webpage"):first').closest("tr").remove();$("#newEditPPSub .editppSubmit .buttons").append($('.FAFBodyTable td b:contains("Finish webpage")').closest("tr").next().find("td").html());$("#newEditPPSub .editppSubmit .text").prepend($('.FAFBodyTable td b:contains("Finish webpage")').closest("tr").html());$('.FAFBodyTable td b:contains("Finish webpage"):first').closest("tr").next().remove();$('.FAFBodyTable td b:contains("Finish webpage"):first').closest("tr").remove();$('#editppLeftCol textarea[name="MediaText"]').attr("cols","50").attr("rows","10");$(".FAFBodyTable form img[alt=Submit]").closest("a").attr("href","javascript:DoSaveSubmitAlt()");$(".FAFBodyTable form img[alt=Submit]").closest("a").click(function(){$("textarea[name=MediaText]").val($("textarea[name=MediaText]").val().replace(/\n/g,"<br>"));DoSaveSubmit()})}if((FAF.thisURL.indexOf("login/teampageedit.asp")>0)&&(FAF.thisURL.indexOf("page=view")<1)){$(".FAFBodyTable").addClass("editTeamPage");$('.FAFBodyTable h4:contains("Edit your ")').closest("table").closest("td").closest("table").attr("id","oldEditPP");$('.FAFBodyTable h4:contains("Edit your ")').closest("table").closest("td").closest("table").before('<div id="newEditPP" />');$("#oldEditPP").after('<div id="newEditPPSub" />');$("#newEditPP").html('<div id="editpp"><div class="editppTitle"><h4></h4></div><div class="editppHeaderText"><div class="line1"><span>Header:</span></div><div class="line2"><span>Subheader:</span></div><div class="editppImgQ"></div></div>');$("#newEditPPSub:first").html('<div id="editppsub"><div class="editppCancel"></div><div class="editppPreview"></div><div class="editppSubmit"></div><div style="clear:both;"></div></div>');$("#editpp .editppTitle h4").html($('.FAFBodyTable h4:not(:first):contains("Edit your ") b').html());$("#editpp .editppHeaderText .line1").append($('.FAFBodyTable input[name="inputHeaderTextLine1"]'));$("#editpp .editppHeaderText .line2").append($('.FAFBodyTable input[name="inputHeaderTextLine2"]'));$("#editpp .editppImgQ").append($('.FAFBodyTable select[name="videoFlag"]').closest("td").clone());$('.FAFBodyTable select[name="videoFlag"]:not(:first)').closest("tr").remove();$('.FAFBodyTable h4:not(:first):contains("Edit your ")').closest("tr").remove();$('.FAFBodyTable td b:contains("Header Text")').closest("tr").remove();$('.FAFBodyTable td b:contains("Line 1:")').closest("table").closest("tr").remove();$('.FAFBodyTable img[alt="Save"]').closest("a").appendTo($("#newEditPPSub .editppSubmit"));$('.FAFBodyTable img[alt="Preview"]').closest("a").appendTo($("#newEditPPSub .editppPreview"));$('.FAFBodyTable img[alt="Cancel"]').closest("a").appendTo($("#newEditPPSub .editppCancel"));$('.FAFBodyTable b:contains("Choose a theme for your page:")').hide();if($('.FAFBodyTable td:contains("Customize your page with fun backgrounds."):last').length>0){$('.FAFBodyTable td:contains("Customize your page with fun backgrounds."):last').html($('.FAFBodyTable td:contains("Customize your page with fun backgrounds."):last').html().replace("Customize your page with fun backgrounds.",""))}$(".FAFBodyTable select[name=teampage_theme]").hide();$('.FAFBodyTable > tbody > tr > td > table[bgcolor="#FFFFFF"]').removeAttr("bgcolor");if(!$.browser.msie){$("#newEditPP").closest("td").closest("table").wrap('<form class="newForm1" name="'+$('form[name="form1"]').attr("name")+'" action="'+$('form[name="form1"]').attr("action")+'" method="POST" />');$('.FAFBodyTable form:not(".newForm1")').after($('.FAFBodyTable form:not(".newForm1")').contents());$('.FAFBodyTable form:not(".newForm1"):empty').remove();$('.FAFBodyTable form:not(".newForm1")').attr("name","");$('.FAFBodyTable form:not(".newForm1")').attr("action","");$('.FAFBodyTable form:not(".newForm1")').attr("method","")}$('#oldEditPP input[name="teampage_img_caption"]').attr("size","48");$('#oldEditPP textarea[name="teampage_img_text"]').attr("cols","50").attr("rows","10");if($("textarea[name=teampage_img_text]").length>0){$("textarea[name=teampage_img_text]").val($("textarea[name=teampage_img_text]").val().replace(/<br>/g,"\n"))}$(".FAFBodyTable form img[alt=Save]").closest("a").attr("href","javascript:DoSaveSubmitAlt()");$(".FAFBodyTable form img[alt=Save]").closest("a").click(function(){$("textarea[name=teampage_img_text]").val($("textarea[name=teampage_img_text]").val().replace(/\n/g,"<br>"));DoSaveSubmit()})}if(FAF.thisURL.indexOf("update/updateprofile.asp")>0){$('.FAFBodyTable table table table tr td:contains("Show Money Raised to Date on ")').next().find('input[type="checkbox"]').attr("checked",true);$('.FAFBodyTable table table table tr td:contains("Show Money Raised to Date on ")').closest("tr").hide()}})},customTurnPage:function(){if(theCount==imagesCache.length-1){theCount=0}else{theCount++}document.customdance.src=imagesCache[theCount].src;document.customdance.alt=imagesCache[theCount].alt;setTimeout("FAF.Methods.customTurnPage()",2000)},newRightColumn:function(){if(FAF.thisURL.indexOf("home/default.asp")>0){$("td.FAFRightNav").wrapInner('<div id="rightColOriginal"></div>');var rco=$("#rightColOriginal");$("#rightColOriginal").hide();$("#rightColOriginal").before('<div id="rightColNew" class="clearfix"></div>');var rcn=$("#rightColNew");$(rcn).append('<div id="topLists"></div>');$("#topLists").append('<div id="sponsor-logos" class="toplist"><h4>Special Thanks To:</h4><div class="top-body sponsor"></div></div>');$("#topLists").append('<div id="top-individuals" class="toplist"><h4>Top Individuals</h4><div class="top-body"><ol></ol><span class="more-link"><a href="/faf/search/searchParticipants.asp?ievent='+FAF.eID+'">Find more individuals &raquo;</a></span></div></div>');$("#topLists").append('<div id="top-companies" class="toplist"><h4>Top Companies</h4><div class="top-body"><ol></ol><span class="more-link"><a href="/faf/teams/groupStatisticsList.asp?ievent='+FAF.eID+'">Find more companies &raquo;</a></span></div></div>');$("#topLists").append('<div id="top-teams" class="toplist"><h4>Top Teams</h4><div class="top-body"><ol></ol><span class="more-link"><a href="/faf/teams/groupTeamStats.asp?ievent='+FAF.eID+'">Find more teams &raquo;</a></span></div></div>');if($.isFunction(window.turnPage)){$("#sponsor-logos .sponsor").append('<a onclick="onClickImg()" href="#"><img width="100" height="85" border="0" alt=" Logo" src="http://www.kintera.org/AccountTempFiles//account403555/images/sponsorplaceholder.gif" name="customdance"></a>');FAF.Methods.customTurnPage();$('#rightcol_orig table:eq(1) table tr:eq(0):contains("Special Thanks to:")').parent().find("tr:eq(1) td a").remove()}var top_ind_table=$(rco).find('table.FAFRightPanelInnerTbl tr:contains("Top Fundraisers")').closest("table");var top_ind_list="";if($('tr:eq(1):contains("Rewards")',top_ind_table).length>0){var top_ind_reward='<span class="rewards">'+$('tr:eq(1):contains("Rewards") td:eq(0)',top_ind_table).html()+" "+$('tr:eq(1):contains("Rewards") td:eq(1)',top_ind_table).html()+"</span>";$("#top-individuals .top-body ol").before(top_ind_reward);$("tr:gt(1):not(:last)",top_ind_table).each(function(){if($("td:eq(1)",this).size()>0){top_ind_list+="<li>"+$("td:eq(1)",this).html()+"</li>"}else{top_ind_list+="<li>"+$("td:eq(0)",this).html()+"</li>"}})}else{$("tr:gt(0):not(:last)",top_ind_table).each(function(){if($("td:eq(1)",this).size()>0){top_ind_list+="<li>"+$("td:eq(1)",this).html()+"</li>"}else{top_ind_list+="<li>"+$("td:eq(0)",this).html()+"</li>"}})}$("#top-individuals .top-body ol").append(top_ind_list);var top_comp_table=$(rco).find('table.FAFRightPanelInnerTbl tr:contains("Company Rank")').closest("table");var top_comp_list="";if($('tr:eq(1):contains("Rewards")',top_comp_table).length>0){var top_comp_reward='<span class="rewards">'+$('tr:eq(1):contains("Rewards") td:eq(0)',top_comp_table).html()+" "+$('tr:eq(1):contains("Rewards") td:eq(1)',top_comp_table).html()+"</span>";$("#top-companies .top-body ol").before(top_comp_reward);$("tr:gt(1):not(:last)",top_comp_table).each(function(){if($("td:eq(1)",this).size()>0){top_comp_list+="<li>"+$("td:eq(1)",this).html()+"</li>"}else{top_comp_list+="<li>"+$("td:eq(0)",this).html()+"</li>"}})}else{$("tr:gt(0):not(:last)",top_comp_table).each(function(){if($("td:eq(1)",this).size()>0){top_comp_list+="<li>"+$("td:eq(1)",this).html()+"</li>"}else{top_comp_list+="<li>"+$("td:eq(0)",this).html()+"</li>"}})}$("#top-companies .top-body ol").append(top_comp_list);var top_team_table=$(rco).find('table.FAFRightPanelInnerTbl tr:contains("'+FAF.Data.labels.team+' Rank")').closest("table");var top_team_list="";if($('tr:eq(1):contains("Rewards")',top_team_table).length>0){var top_team_reward='<span class="rewards">'+$('tr:eq(1):contains("Rewards") td:eq(0)',top_team_table).html()+" "+$('tr:eq(1):contains("Rewards") td:eq(1)',top_team_table).html()+"</span>";$("#top-teams .top-body ol").before(top_team_reward);$("tr:gt(1):not(:last)",top_team_table).each(function(){if($("td:eq(1)",this).size()>0){top_team_list+="<li>"+$("td:eq(1)",this).html()+"</li>"}else{top_team_list+="<li>"+$("td:eq(0)",this).html()+"</li>"}})}else{$("tr:gt(0):not(:last)",top_team_table).each(function(){if($("td:eq(1)",this).size()>0){top_team_list+="<li>"+$("td:eq(1)",this).html()+"</li>"}else{top_team_list+="<li>"+$("td:eq(0)",this).html()+"</li>"}})}$("#top-teams .top-body ol").append(top_team_list);$("#top-individuals .top-body ol:empty, #top-companies .top-body ol:empty, #top-teams .top-body ol:empty").parent().parent().hide();$("#sponsor-logos .top-body:empty").parent().hide();$("#sponsor-logos").append('<div class="top-right-bot"></div>');$("#top-individuals").append('<div class="top-right-bot"></div>');$("#top-teams").append('<div class="top-right-bot"></div>');$(rcn).append('<div class="clear">&nbsp;</div>');$(".FAFRightNav").show()}}}};FAF.Starter=function(callback){FAF.Config.packageType="starter";if(typeof FAF.Options.loadCss=="undefined"){FAF.Options.loadCss=false}FAF.Methods.initialize(function(){FAF.Methods.logoControl();if(callback!=undefined){callback()}FAF.Methods.dynamicLinks();FAF.Methods.fixit()})};FAF.Essentials=function(callback){FAF.Config.packageType="essentials";FAF.Methods.initialize(function(){FAF.Methods.logoControl();FAF.Methods.buttonControl();FAF.Methods.therm();FAF.Methods.checkLogin();FAF.Methods.rebuildPage();FAF.Methods.personalPage();FAF.Methods.teamPage();FAF.Methods.shareThis();FAF.Methods.facebook("#lh-col");FAF.Methods.twitter();FAF.Methods.myWebpage();if(callback!=undefined){callback()}FAF.Methods.dynamicLinks();FAF.Methods.fixit()})};function testTherm(amount){FAF.Methods.testTherm(amount)}function testConfig(){console.log("Config: ",FAF.Config);console.log("Options: ",FAF.Options);console.log("Event Data: ",FAF.Data);if(typeof fafJSONteam!="undefined"){console.log("Team Data: ",fafJSONteam)}if(typeof fafJSONparticipant!="undefined"){console.log("Participant Data: ",fafJSONparticipant)}}window.log=function(){log.history=log.history||[];log.history.push(arguments);if(this.console){arguments.callee=arguments.callee.caller;var newarr=[].slice.call(arguments);(typeof console.log==="object"?log.apply.call(console.log,console,newarr):console.log.apply(console,newarr))}};(function(b){function c(){}for(var d="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,timeStamp,profile,profileEnd,time,timeEnd,trace,warn".split(","),a;a=d.pop();){b[a]=b[a]||c}})((function(){try{console.log();return window.console}catch(err){return window.console={}}})());function newWrite(str){if(str.indexOf("Applet")==-1){return""+str+""}else{return""}}if(!($.browser.msie&&$.browser.version.substr(0,1)<8)){document.write=function(w){return function(s){w.call(this,newWrite(s))}}(document.write)}else{document.write=function(w){return function(s){w.call(this,newWrite(s))}}}function formatCurrency(strValue,doCents){strValue=strValue.toString().replace(/\$|\,/g,"");dblValue=parseFloat(strValue);blnSign=(dblValue==(dblValue=Math.abs(dblValue)));dblValue=Math.floor(dblValue*100+0.50000000001);intCents=dblValue%100;strCents=intCents.toString();dblValue=Math.floor(dblValue/100).toString();if(intCents<10){strCents="0"+strCents}for(var i=0;i<Math.floor((dblValue.length-(1+i))/3);i++){dblValue=dblValue.substring(0,dblValue.length-(4*i+3))+","+dblValue.substring(dblValue.length-(4*i+3))}if(doCents){return(((blnSign)?"":"-")+dblValue+"."+strCents)}else{return(((blnSign)?"":"-")+dblValue)}}var lscache=function(){var CACHESUFFIX="-cacheexpiration";var supportsStorage=function(){try{return !!localStorage.getItem}catch(e){return false}}();var supportsJSON=(window.JSON!=null);function expirationKey(key){return key+CACHESUFFIX}function currentTime(){return Math.floor((new Date().getTime())/60000)}return{set:function(key,value,time){if(!supportsStorage){return}if(typeof value!="string"){if(!supportsJSON){return}try{value=JSON.stringify(value)}catch(e){return}}try{localStorage.setItem(key,value)}catch(e){if(e.name==="QUOTA_EXCEEDED_ERR"||e.name=="NS_ERROR_DOM_QUOTA_REACHED"){var storedKey,storedKeys=[];for(var i=0;i<localStorage.length;i++){storedKey=localStorage.key(i);if(storedKey.indexOf(CACHESUFFIX)>-1){var mainKey=storedKey.split(CACHESUFFIX)[0];storedKeys.push({key:mainKey,expiration:parseInt(localStorage[storedKey],10)})}}storedKeys.sort(function(a,b){return(a.expiration-b.expiration)});for(var i=0,len=Math.min(30,storedKeys.length);i<len;i++){localStorage.removeItem(storedKeys[i].key);localStorage.removeItem(expirationKey(storedKeys[i].key))}localStorage.setItem(key,value)}else{return}}if(time){localStorage.setItem(expirationKey(key),currentTime()+time)}else{localStorage.removeItem(expirationKey(key))}},get:function(key){if(!supportsStorage){return null}function parsedStorage(key){if(supportsJSON){try{var value=JSON.parse(localStorage.getItem(key));return value}catch(e){return localStorage.getItem(key)}}else{return localStorage.getItem(key)}}if(localStorage.getItem(expirationKey(key))){var expirationTime=parseInt(localStorage.getItem(expirationKey(key)),10);if(currentTime()>=expirationTime){localStorage.removeItem(key);localStorage.removeItem(expirationKey(key));return null}else{return parsedStorage(key)}}else{if(localStorage.getItem(key)){return parsedStorage(key)}}return null},remove:function(key){if(!supportsStorage){return null}localStorage.removeItem(key);localStorage.removeItem(expirationKey(key))}}}();
