(function(a){a.fn.placeHoldize=function(){function b(){var e=a(this);if(!((d||!e.attr("placeholder"))&&!e.is("textarea"))){var f=e.attr("placeholder");if(e.val().length<=0||e.val()==f){e.val("");e.removeAttr("placeholder").addClass("placeholder-visible");e.val(f)}else e.removeClass("placeholder-visible").addClass("placeholder-hidden");e.addClass("placeholdized");e.focus(function(){var g=a(this);if(g.val()===f){g.val("");g.removeClass("placeholder-visible").addClass("placeholder-hidden")}});e.blur(function(){var g=
a(this);if(g.val()===""){g.val(f);g.removeClass("placeholder-hidden").addClass("placeholder-visible")}else g.removeClass("placeholder-visible").addClass("placeholder-hidden")})}}function c(e){e.closest("form").submit(function(){var f=a(this);f.data("placeHoldize.submitHandlerCalled")||f.find(".placeholder-visible").val("").data("placeHoldize.submitHandlerCalled",true)});return true}var d=function(e){return e.placeholder===""&&e.placeholder!==undefined}(document.createElement("input"));return function(){this.each(function(){b.call(this)});
c(this);return this}}()})(jQuery);String.prototype.htmlEntities=function(){return this.replace(/</g,"&lt;").replace(/>/g,"&gt;")};String.prototype.endsWith=function(a){return this.match(a+"$")==a};function numberWithCommas(a){return a.toString().replace(/\B(?=(?:\d{3})+(?!\d))/g,",")}
(function(a,b){navigator.userAgent.toLowerCase().indexOf("chrome")>-1&&b("head").append(b('<link type="text/css" rel="stylesheet" href="/css/chrome.css" media="screen" />'));b(document).ready(function(){b("input[placeholder], textarea[placeholder]").placeHoldize()});a.isIE=function(c){var d=navigator.appName==="Microsoft Internet Explorer";if(d&&c){d=navigator.userAgent.match(/MSIE ([0-9]{1,}[\.0-9]{0,})/)[1];return parseFloat(d)<=c}return d}})(window.CS=window.CS||{},jQuery);window.onload=function(){Fat.fade_all()};
if(!Array.indexOf)Array.prototype.indexOf=function(a){for(var b=0;b<this.length;b++)if(this[b]==a)return b;return-1};function getStyle(a){if(a.currentStyle)return a.currentStyle.backgroundColor;if(document.defaultView)return document.defaultView.getComputedStyle(a,"").getPropertyValue("background-color");return null}function disableFormSubmissions(a){$("form#"+a).unbind("submit");$("form#"+a).submit(function(){return false})}
function enableFormSubmissions(a){$("form#"+a).unbind("submit");$("form#"+a).submit(function(){return true})}function removePx(a){return parseInt(a.replace("px",""))}function toggleEdit(){$("#accountDetailsHead").toggle();$("#accountDetails").toggle();$("#editAccountHead").toggle();$("#editAccount").toggle();$("#apiKey").toggle();$("#editAccount").is(":visible")&&$("#companyName").select()}
function togglePassword(){$("#options").toggle();$("#editPassword").toggle();$("#editPassword").is(":visible")&&$("#oldpassword").select()}function toggleAPI(){$("#options").toggle();$("#generateKey").toggle()}function showInvoice(a){window.open(a,"preview","height=580,width=700,resizable=yes,scrollbars=yes,menubar=yes,toolbar=yes");return false}function changeClient(a,b){var c=a.split(",");location.replace("/admin/changeClient.aspx?ID="+c[0]+"&name="+b+"&al="+c[1])}
function clientSwitcher(a){$("#clientName").toggle();$("#clientDropDown").toggle();loadChangeClient(a);return false}function loadChangeClient(a){$.ajax({url:"/pageElements/clientDropDown.aspx?clientName="+encodeURIComponent(a),type:"GET",success:function(b){$("#clientDropDown").replaceWith(b)}})}function submitForm(a){return $(a).submit()}function toggle(a){a.is(":visible")?a.hide():a.show()}
function checkSendingCampaigns(){var a=true;for(i=0;i<sendingCampaigns.length;i++)if(sendingCampaigns[i]!=""){checkSendingCampaign(sendingCampaigns[i],i,false);a=false}for(abi=0;abi<sendingABCampaigns.length;abi++)if(sendingABCampaigns[abi]!=""){checkSendingCampaign(sendingABCampaigns[abi],abi,true);a=false}a||setTimeout("checkSendingCampaigns()",5E3)}
function checkSendingCampaign(a,b,c){var d,e="";if(c){d="absending"+b;e="&ab=true"}else d="sending"+b;$("#"+d).load("/reports/pageElements/checkSendingCampaign.aspx?ID="+a+"&n="+b+"&overview=true"+e,null,function(f){checkLoadSentCampaign(f,a,b,c)})}function checkLoadSentCampaign(a,b,c,d){if(a.indexOf("deliverPercent")<0&&a.indexOf("queuedCampaign")<0)if(d)sendingABCampaigns[c]="";else sendingCampaigns[c]=""}
function checkUnschedule(a){confirm("Are you sure you want to move this campaign back to drafts?")&&location.replace("default.aspx?cID="+a+"&action=unschedule");return false}function hideDelete(a){$("#"+a+"_delete").hide()}function hideit(a){$("#"+a).hide()}function showit(a){$("#"+a).show()}function showDelete(a){$("#"+a+"_delete").show()}var newwindow;
function launchHelp(a,b){b=b?b:"";newwindow=window.open("/help/popup.aspx?t="+a+b,"name","height=600,width=800,resizable=yes,scrollbars=yes");window.focus&&newwindow.focus();return false}function launchPreview(a){newwindow=window.open(a,"preview","height=500,width=700,resizable=yes,scrollbars=yes");window.focus&&newwindow.focus();return false}
function launchPreviewB(a){newwindow=window.open(a,"previewB","height=500,width=700,resizable=yes,scrollbars=yes");window.focus&&newwindow.focus();return false}function clearSearchBox(a){a=="Summarize your question/problem in one sentence"&&$("#search").val("")}function showSearchText(a){a==""&&$("#search").val("Summarize your question/problem in one sentence")}function searchFocus(){$("#search").addClass("searchFieldOn");$("#search").select()}
function searchLoseFocus(){$("#search").removeClass("searchFieldOn")}
function tabToNextField(){$("input, select, textarea").live("focus",function(){}).keydown(function(a){if(a.keyCode=="9"||a.keyCode=="9"&&a.shiftKey){var b=a.keyCode=="9"&&a.shiftKey?-1:1;$(a.currentTarget).blur();a.preventDefault();a=$("button,input,textarea,select").filter(":visible").filter(":enabled").filter(function(){return $(this).css("visibility")!="hidden"});var c=$.inArray(this,a);c<a.length-1?$(a[c+b]).focus():$(".greybutton").focus()}})}$&&$.ajaxSetup({cache:false});
function ajax(a,b,c,d,e,f,g){g||(g="html");e=e?$("#"+e).serialize():"";$.ajax({url:a,type:b,data:e,dataType:g,cache:false,beforeSend:function(){f&&f()},success:function(h){c&&$("#"+c).html(h);d&&d(h)}})}
(function(a){function b(d){var e;if(d&&d.constructor==Array&&d.length==3)return d;if(e=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(d))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(d))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(d))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(d))return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)];if(/rgba\(0, 0, 0, 0\)/.exec(d))return c.transparent;return c[a.trim(d).toLowerCase()]}a.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(d,e){a.fx.step[e]=function(f){if(!f.colorInit){var g;g=f.elem;var h=e,j;do{j=a.curCSS(g,h);if(j!=""&&j!="transparent"||a.nodeName(g,
"body"))break;h="backgroundColor"}while(g=g.parentNode);g=b(j);f.start=g;f.end=b(f.end);f.colorInit=true}f.elem.style[e]="rgb("+[Math.max(Math.min(parseInt(f.pos*(f.end[0]-f.start[0])+f.start[0]),255),0),Math.max(Math.min(parseInt(f.pos*(f.end[1]-f.start[1])+f.start[1]),255),0),Math.max(Math.min(parseInt(f.pos*(f.end[2]-f.start[2])+f.start[2]),255),0)].join(",")+")"}});var c={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);
var Fat={make_hex:function(a,b,c){a=a.toString(16);if(a.length==1)a="0"+a;b=b.toString(16);if(b.length==1)b="0"+b;c=c.toString(16);if(c.length==1)c="0"+c;return"#"+a+b+c},fade_all:function(){for(var a=document.getElementsByTagName("*"),b=0;b<a.length;b++){var c=a[b],d=/fade-?(\w{3,6})?/.exec(c.className);if(d){d[1]||(d[1]="");c.id&&Fat.fade_element(c.id,null,null,"#"+d[1])}}},fade_element:function(a,b,c,d,e){b||(b=30);c||(c=800);if(!d||d=="#")d="#ffff33";e||(e=this.get_bgcolor(a));b=Math.round(b*
(c/1E3));var f=c/=b,g=0;if(d.length<7)d+=d.substr(1,3);if(e.length<7)e+=e.substr(1,3);var h=parseInt(d.substr(1,2),16),j=parseInt(d.substr(3,2),16);d=parseInt(d.substr(5,2),16);for(var k=parseInt(e.substr(1,2),16),o=parseInt(e.substr(3,2),16),p=parseInt(e.substr(5,2),16),l,m,n;g<b;){l=Math.floor(h*((b-g)/b)+k*(g/b));m=Math.floor(j*((b-g)/b)+o*(g/b));n=Math.floor(d*((b-g)/b)+p*(g/b));l=this.make_hex(l,m,n);setTimeout("Fat.set_bgcolor('"+a+"','"+l+"')",f);g++;f=c*g}setTimeout("Fat.set_bgcolor('"+a+
"','"+e+"')",f)},set_bgcolor:function(a,b){document.getElementById(a).style.backgroundColor=b},get_bgcolor:function(a){for(a=document.getElementById(a);a;){var b,c=getStyle(a);if(c!=null&&!c.match(/rgba\s*\(0\s*,\s*0\s*,\s*0\s*,\s*0\)/))b=c;if(a.currentStyle)b=a.currentStyle.backgroundColor;if(b!=""&&b!="transparent"&&b!==undefined||a.tagName=="BODY")break;a=a.parentNode}if(b==undefined||b==""||b=="transparent")b="#FFFFFF";if(a=b.match(/rgb\s*\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)/))b=
this.make_hex(parseInt(a[1]),parseInt(a[2]),parseInt(a[3]));else if(a=b.match(/rgba\s*\((\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\)/))b=this.make_hex(parseInt(a[1]),parseInt(a[2]),parseInt(a[3]));return b}};if(typeof deconcept=="undefined")var deconcept={};if(typeof deconcept.util=="undefined")deconcept.util={};if(typeof deconcept.SWFObjectUtil=="undefined")deconcept.SWFObjectUtil={};
deconcept.SWFObject=function(a,b,c,d,e,f,g,h,j,k){if(document.getElementById){this.DETECT_KEY=k?k:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params={};this.variables={};this.attributes=[];a&&this.setAttribute("swf",a);b&&this.setAttribute("id",b);c&&this.setAttribute("width",c);d&&this.setAttribute("height",d);e&&this.setAttribute("version",new deconcept.PlayerVersion(e.toString().split(".")));this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();
if(!window.opera&&document.all&&this.installedVer.major>7)deconcept.SWFObject.doPrepUnload=true;f&&this.addParam("bgcolor",f);this.addParam("quality",g?g:"high");this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);this.setAttribute("xiRedirectUrl",h?h:window.location);this.setAttribute("redirectUrl","");j&&this.setAttribute("redirectUrl",j)}};
deconcept.SWFObject.prototype={useExpressInstall:function(a){this.xiSWFPath=!a?"expressinstall.swf":a;this.setAttribute("useExpressInstall",true)},setAttribute:function(a,b){this.attributes[a]=b},getAttribute:function(a){return this.attributes[a]},addParam:function(a,b){this.params[a]=b},getParams:function(){return this.params},addVariable:function(a,b){this.variables[a]=b},getVariable:function(a){return this.variables[a]},getVariables:function(){return this.variables},getVariablePairs:function(){var a=
[],b,c=this.getVariables();for(b in c)a[a.length]=b+"="+c[b];return a},getSWFHTML:function(){var a="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath)}a='<embed type="application/x-shockwave-flash" src="'+this.getAttribute("swf")+'" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'" style="'+this.getAttribute("style")+'"';a+=
' id="'+this.getAttribute("id")+'" name="'+this.getAttribute("id")+'" ';var b=this.getParams();for(var c in b)a+=[c]+'="'+b[c]+'" ';c=this.getVariablePairs().join("&");if(c.length>0)a+='flashvars="'+c+'"';a+="/>"}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath)}a='<object id="'+this.getAttribute("id")+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+
'" style="'+this.getAttribute("style")+'">';a+='<param name="movie" value="'+this.getAttribute("swf")+'" />';b=this.getParams();for(c in b)a+='<param name="'+c+'" value="'+b[c]+'" />';c=this.getVariablePairs().join("&");if(c.length>0)a+='<param name="flashvars" value="'+c+'" />';a+="</object>"}return a},write:function(a){if(this.getAttribute("useExpressInstall"))if(this.installedVer.versionIsValid(new deconcept.PlayerVersion([6,0,65]))&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",
true);this.addVariable("MMredirectURL",encodeURIComponent(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title)}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){(typeof a=="string"?document.getElementById(a):a).innerHTML=this.getSWFHTML();navigator.plugins&&navigator.mimeTypes.length||(window[this.getAttribute("id")]=document.getElementById(this.getAttribute("id")));
return true}else this.getAttribute("redirectUrl")!=""&&document.location.replace(this.getAttribute("redirectUrl"));return false}};
deconcept.SWFObjectUtil.getPlayerVersion=function(){var a=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var b=navigator.plugins["Shockwave Flash"];if(b&&b.description)a=new deconcept.PlayerVersion(b.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."))}else if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){b=1;for(var c=3;b;)try{c++;b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+c);a=new deconcept.PlayerVersion([c,
0,0])}catch(d){b=null}}else{try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(e){try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");a=new deconcept.PlayerVersion([6,0,21]);b.AllowScriptAccess="always"}catch(f){if(a.major==6)return a}try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(g){}}if(b!=null)a=new deconcept.PlayerVersion(b.GetVariable("$version").split(" ")[1].split(","))}return a};
deconcept.PlayerVersion=function(a){this.major=a[0]!=null?parseInt(a[0]):0;this.minor=a[1]!=null?parseInt(a[1]):0;this.rev=a[2]!=null?parseInt(a[2]):0};deconcept.PlayerVersion.prototype.versionIsValid=function(a){if(this.major<a.major)return false;if(this.major>a.major)return true;if(this.minor<a.minor)return false;if(this.minor>a.minor)return true;if(this.rev<a.rev)return false;return true};
deconcept.util={getRequestParameter:function(a){var b=document.location.search||document.location.hash;if(a==null)return b;if(b){b=b.substring(1).split("&");for(var c=0;c<b.length;c++)if(b[c].substring(0,b[c].indexOf("="))==a)return b[c].substring(b[c].indexOf("=")+1)}return""}};deconcept.SWFObjectUtil.cleanupSWFs=function(){for(var a=document.getElementsByTagName("OBJECT"),b=a.length-1;b>=0;b--){a[b].style.display="none";for(var c in a[b])if(typeof a[b][c]=="function")a[b][c]=function(){}}};
if(deconcept.SWFObject.doPrepUnload)if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs)};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true}if(!document.getElementById&&document.all)document.getElementById=function(a){return document.all[a]};
var getQueryParamValue=deconcept.util.getRequestParameter,FlashObject=deconcept.SWFObject,SWFObject=deconcept.SWFObject;$.extend({getUrlVars:function(){for(var a=[],b,c=window.location.href.slice(window.location.href.indexOf("?")+1).split("&"),d=0;d<c.length;d++){b=c[d].split("=");a.push(b[0]);a[b[0]]=b[1]}return a},getUrlVar:function(a){return $.getUrlVars()[a]}});var lastJson=null;
hideMessages=function(a){if(lastJson!==null){a=jQuery.extend(true,{hide:function(b,c){jQuery(b.elementID).hide();if(c)for(var d in c)if(c[d]&&typeof c[d]==="string"){var e=jQuery("#"+c[d]),f=e.attr(b.classAttr)===undefined||e.attr(b.classAttr)===""?b.defaultClass:e.attr("errorClass");f&&e.removeClass(f)}},errorSetup:{elementID:"#errorDiv",classAttr:"errorClass",defaultClass:"clearfixError"},successSetup:{elementID:"#successDiv"}},a);lastJson.each(function(){var b=this.Errors;b&&a.hide(a.errorSetup,
b.Fields);(b=this.SuccessMessages)&&a.hide(a.successSetup,b.Fields)});lastJson=null}};
jQuery.fn.parseJson=function(a){var b=function(c,d){d&&d!==null&&d.Messages!==null&&d.Messages.length>0&&c.renderer(d.Messages,d.Fields)};a=jQuery.extend(true,{onSuccess:function(){},onError:function(){},onRedirect:function(c){window.location.replace(c)},onWait:function(){},errorSetup:{elementID:"#errorDiv",titleID:"failure",titleAttrs:'class="fade-f8acac"',messagesID:"failureMessage",title:"Sorry, the following errors occurred...",classAttr:"errorClass",defaultClass:"clearfixError",renderer:function(c,
d){var e='<div id="'+this.titleID+'" '+this.titleAttrs+">\n<h3>"+this.title+"</h3>\n</div>\n";e+='<div class="'+this.messagesID+'">\n<ol>\n';for(var f in c)if(c[f]&&typeof c[f]==="string")e+="<li>"+c[f]+"</li>";e+="</ol>\n</div>";jQuery(this.elementID).html(e);jQuery(this.elementID).show();for(f in d)if(d[f]&&typeof d[f]==="string"){e=jQuery("#"+d[f]);var g=e.attr(this.classAttr)===undefined?this.defaultClass:e.attr("errorClass");e.addClass(g)}}}},a);this.each(function(){b(a.errorSetup,this.Errors);
b(a.warningSetup,this.Warnings);b(a.successSetup,this.SuccessMessages);switch(this.Status){case "Error":a.onError(this);break;case "Success":a.onSuccess(this);break;case "Redirect":a.onRedirect(this.RedirectUrl.replace(/&amp;/g,"&"));break;case "Wait":a.onWait(this.RedirectUrl.replace(/&amp;/g,"&"));break}});lastJson=this};jQuery.fn.ajaxUpload=function(a){a=jQuery.extend({loading:function(){},onComplete:function(){},onStart:function(){},type:"json"},a);return this.each(function(){jQuery(this).submit(function(){a.onStart(this);var b="upload_"+Math.round(Math.random()*1E6),c=jQuery('<iframe style="display:none" name="'+b+'" id="'+b+'"></iframe>');jQuery(document.body).append(c);jQuery(this).attr("target",b);a.loading();$("#"+b).load(function(){var d=jQuery(this).contents().find("body").html();switch(a.type){case "json":d=
eval("("+d+")");a.onComplete(d);break}setTimeout(function(){jQuery("#"+b).remove()},200)})})})};if(!window.CS)window.CS={};
CS.PaymentDetails=function(){function a(){$("#"+d.overlayScreenID).show();hideMessages()}function b(){window.location.replace(d.successUrl)}function c(e){$(eval("("+e+")")).parseJson({errorSetup:{title:d.errorHeading},onError:function(){$("#"+d.overlayScreenID).hide()},onWait:function(f){if(f!="")d.pollingUrl=f;setTimeout(function(){ajax(d.pollingUrl,"GET","",c,"",null)},5E3)},onSuccess:function(){d.successAjaxUrl?$.ajax({url:d.successAjaxUrl,type:"POST",dataType:"html",complete:b}):b()},successSetup:{renderer:function(){}}})}
var d={errorHeading:"Sorry, we couldn't save your card details because...",existingCardIDs:["existingCard"],editCardIDs:["editCard"]};return{settings:function(){return d},setup:function(e){var f={errorHeading:e.errorHeading?e.errorHeading:d.ErrorHeading,existingCardIDs:$.merge(d.existingCardIDs,e.existingCardIDs?e.existingCardIDs:[]),editCardIDs:$.merge(d.editCardIDs,e.editCardIDs?e.editCardIDs:[])};return d=$.extend(e,f)},submitForm:function(){tHeight=$(window).height();lHeight=$("#"+d.overlayContentID).height();
$("#"+d.overlayContentID).css("margin-top",[tHeight-lHeight-90]/2+"px");$("#"+d.overlayScreenID).css("height",tHeight+1590+"px");scroll(0,0);ajax(d.submitUrl,"POST","",c,d.formID,a)},toggleEdit:function(){for(var e=0;e<d.existingCardIDs.length;e++)toggle($("#"+d.existingCardIDs[e]));for(e=0;e<d.editCardIDs.length;e++)toggle($("#"+d.editCardIDs[e]));this.editingCard()?this.setSaveCard():this.resetSaveCard()},editingCard:function(){return $("#editCard").is(":visible")},resetSaveCard:function(){$("#savecard").val(false)},
setSaveCard:function(){$("#savecard").val(true)}}}();if(!window.CS)window.CS={};CS.MonthlyRates=function(){return{checkWhichPlan:function(a,b,c){var d=a;switch(a){case b:d=a+1;break;case c:d=a-1;break}$(".tier"+d+",.tier"+(d+1)+",.tier"+(d-1)).removeClass("cs_textra");$("#cs_monthly_table .tier"+a).addClass("cs_tactive")}}}();if(!window.CS)window.CS={};CS.ConfirmRemoveCard=function(){function a(c){$(c).parseJson({errorSetup:{title:"Sorry, we couldn't remove your payment details because..."},onSuccess:function(){window.location.replace(b.successUrl)}})}var b;return{setup:function(c){b=c},removeCard:function(){$.ajax({url:b.submitUrl,type:"POST",data:$("#deletePaymentDetails").serialize(),dataType:"json",success:a})}}}();

