var Echo_EndPointUrl="http://cdn.theechosystem.com",Echo_MerchantSettings,Echo_FacebookAppId,Echo_FacebookUserId,Echo_AccessToken,Echo_TwitterUserId,Echo_SocialStatusCode,Echo_MerchantId,Echo_EnableEchoShare=false,Echo_EnableEchoAsk=false,Echo_EnableSocialCenter=false,Echo_ShowSocialCenter=false,Echo_IncludeSocialCenter=false,Echo_InitSettings,Echo_ShortUrl,Echo_IsSocialVisitor=false,Echo_ExternalId,Echo_VisitTrackingCompleted=false,Echo_ProductName,Echo_Caption,Echo_Description,Echo_ImageUrl,Echo_ProductUrl,Echo_RedirectUrl,Echo_TrackFrom,Echo_TrackTo,Echo_TrackChannelCode,Echo_RaisingTrackingEvent=false,Echo_Title;function Echo_Init(a){Echo_SetUserIsSocialVisitor();Echo_FacebookAppId=a.AppId;Echo_InitSettings=a;Echo_FacebookInit();SetFacebookContainer();if(a.ShowSocialCenter){Echo_ShowSocialCenter=true}if(a.IncludeSocialCenter){Echo_IncludeSocialCenter=true}Echo_GetMerchantSetting();setTimeout(function(){if(!Echo_GetCookie("SessionId")){Echo_SetCookie("SessionId",Math.random(),1)}},500)}function Echo_NoReturn(){}function SetFacebookContainer(){$JEcho("body").append("<div id='EchoLikeFull' style='position: absolute; left:-10000px;'></div>");$JEcho("#EchoLikeFull").css({position:"absolute",left:"-10000px"});$JEcho("#EchoLikeFull").append('<div class="fb-like" data-href="'+Echo_InitSettings.FanPageUrl+'" data-width="255" data-show-faces="true"></div>');$JEcho("body").append("<div id='EchoLike' style='position: absolute; left:-10000px;'></div>");$JEcho("#EchoLike").css({position:"absolute",left:"-10000px"});$JEcho("#EchoLike").append('<div class="fb-like" data-href="'+Echo_InitSettings.FanPageUrl+"\" send='false' data-layout='button_count' width='100' show_faces=\"false\"></div>")}function Echo_FacebookInit(){FB.init({appId:Echo_FacebookAppId,cookie:true,status:true,xfbml:true});FB.getLoginStatus(function(a){if(a.authResponse){Echo_FacebookUserId=a.authResponse.userID;Echo_AccessToken=a.authResponse.accessToken}})}function Echo_GetMerchantSetting(){Echo_ServiceCall("/Consumer/MerchantSetting?merchantAppId="+Echo_FacebookAppId+"&callBack=Echo_SetMerchantSetting",1000)}function Echo_SetMerchantSetting(a){Echo_MerchantSettings=a;Echo_MerchantId=a.Merchant.Id;Echo_EnableEchoShare=a.Merchant.EnableEchoShare;Echo_EnableEchoAsk=a.Merchant.EnableEchoAsk;Echo_EnableSocialCenter=a.Merchant.SocialCenterEnabled;var c=((Echo_EnableSocialCenter==="true")&&Echo_IncludeSocialCenter);var b=(Echo_EnableEchoAsk||Echo_EnableEchoShare)&&(Echo_InitSettings.ProductName!=null||Echo_InitSettings.ShareMany);if(c){var d=document.createElement("link");d.setAttribute("rel","stylesheet");d.setAttribute("type","text/css");d.setAttribute("href",Echo_EndPointUrl+"/Script/LoadSocialCenterCSS?merchantAppId="+Echo_FacebookAppId);if(typeof d!="undefined"){document.getElementsByTagName("head")[0].appendChild(d)}$JEcho("head").append($JEcho('<link rel="stylesheet" href="'+Echo_EndPointUrl+'/Content/SocialCenter/Css/Scroll/jquery.jscrollpane.css" type="text/css" media="screen" />'));Echo_LoadSocialCenter()}else{if(!Echo_IsValid(Echo_GetConsumerId())){Echo_SaveConsumer()}else{Echo_VisitTracking()}}if(b||c){Echo_LoadEchoShare()}if(Echo_GetQueryString("echo")!=null){Echo_TrackReferral()}else{Echo_SetEchoTrackPack()}}function Echo_SaveConsumer(a,b){if(!Echo_IsValid(b)){b=false}if(!Echo_IsValid(a)){a="Echo_SetConsumer"}var c="/Consumer/SaveConsumer?merchantId="+Echo_MerchantId;if(Echo_IsValid(Echo_GetConsumerId())){c+="&consumerId="+Echo_GetConsumerId()}if(Echo_IsValid(Echo_FacebookUserId)){c+="&facebookId="+Echo_FacebookUserId;if(Echo_IsValid(Echo_AccessToken)){c+="&accountType=FB&externalId="+Echo_FacebookUserId+"&token="+Echo_AccessToken}}if(Echo_IsValid(Echo_GetCookie("TwitterId"))){c+="&twitterId="+Echo_GetCookie("TwitterId")}if(Echo_IsValid(Echo_GetCookie("EmailId"))){c+="&emailId="+Echo_GetCookie("EmailId")}if(Echo_IsValid(b)){c+="&isLoggingIn="+b}c+="&isSocialVisitor="+Echo_IsSocialVisitor+"&referringLink="+document.referrer+"&callBack="+a;Echo_ServiceCall(c,null)}function Echo_SetConsumer(a){Echo_SetCookie("ConsumerId",a.ConsumerId,10000);Echo_ConsumerName=a.FirstName;Echo_SetSocialStatusCode(a.SocialProfileType);Echo_VisitTracking();Echo_SetEchoTrackPack()}function Echo_SetUserIsSocialVisitor(){if(Echo_GetEchoTrackPackProp("IsSocialVisitor")=="true"){Echo_IsSocialVisitor=true}else{$JEcho.getScript("https://www.facebook.com/AmICurrentlyLoggedIn",function(){Echo_IsSocialVisitor=true})}}function Echo_SetEchoTrackPack(){if(Echo_IsValid(Echo_GetEchoTrackPackProp("From"))){Echo_TrackFrom=Echo_GetEchoTrackPackProp("From")}if(Echo_IsValid(Echo_GetEchoTrackPackProp("To"))){Echo_TrackTo=Echo_GetEchoTrackPackProp("To")}if(Echo_IsValid(Echo_GetEchoTrackPackProp("Channel"))){Echo_TrackChannelCode=Echo_GetEchoTrackPackProp("Channel")}if(Echo_IsValid(Echo_GetEchoTrackPackProp("ExternalId"))){Echo_ExternalId=Echo_GetEchoTrackPackProp("ExternalId")}if(Echo_IsValid(Echo_GetEchoTrackPackProp("Title"))){Echo_Title=Echo_GetEchoTrackPackProp("Title")}if(Echo_IsValid(Echo_GetEchoTrackPackProp("Url"))){Echo_Url=Echo_GetEchoTrackPackProp("Url")}var a=new Object();a.MerchantId=Echo_MerchantId;a.ReferringLink=escape(document.referrer);a.Url=Echo_GetCleanUrl();a.IsSocialVisitor=Echo_IsSocialVisitor;a.ConfirmationNo=Echo_GenerateConfirmationNumber();if(Echo_IsValid(Echo_FacebookUserId)){a.FacebookId=Echo_FacebookUserId}if(Echo_IsValid(Echo_AccessToken)){a.AccessToken=Echo_AccessToken}if(Echo_IsValid(Echo_GetCookie("SessionId"))){a.SessionId=Echo_GetCookie("SessionId")}if(Echo_IsValid(Echo_GetConsumerId())){a.ConsumerId=Echo_GetCookie("ConsumerId")}if(Echo_IsValid(Echo_TrackFrom)){a.From=Echo_TrackFrom}if(Echo_IsValid(Echo_TrackTo)){a.To=Echo_TrackTo}if(Echo_IsValid(Echo_TrackChannelCode)){a.Channel=Echo_TrackChannelCode}if(Echo_IsValid(Echo_ExternalId)){a.ExternalId=Echo_ExternalId}if(Echo_IsValid(Echo_Title)){a.Title=Echo_Title}else{a.Title=Echo_GetTitle()}Echo_SetCookie("EchoTrackPack",Echo_SerializeObject(a),14)}function Echo_TrackReferral(){if(Echo_GetQueryString("echo")==null){return}var a=Echo_Decrypt(Echo_GetQueryString("echo"),"0103");Echo_TrackTo=Echo_GetQueryStringDecrypted("To",a);Echo_TrackFrom=Echo_GetQueryStringDecrypted("From",a);Echo_TrackChannelCode=Echo_GetQueryStringDecrypted("ChannelCode",a);Echo_RedirectUrl=Echo_GetQueryStringDecrypted("RedirectUrl",a);switch(Echo_TrackChannelCode){case"EMS":Echo_ExternalId=Echo_GetCookie("EmailId");break;case"FFA":case"FFS":case"FWA":case"FWS":if(Echo_IsValid(Echo_ExternalId)){Echo_ExternalId=Echo_FacebookUserId}else{if(Echo_IsValid(Echo_TrackTo)){Echo_ExternalId=Echo_TrackTo}}break;case"TWA":case"TWS":Echo_ExternalId=Echo_GetCookie("TwitterId");break;default:return}var b="/Consumer/ReferralTracking?merchantId="+Echo_MerchantId+"&isSocialVisitor="+Echo_IsSocialVisitor+"&url="+Echo_GetCleanUrl()+"&referringLink="+document.referrer+"&callBack=Echo_NoReturn";if(Echo_IsValid(Echo_ExternalId)){b+="&externalId="+Echo_ExternalId}if(Echo_IsValid(Echo_TrackChannelCode)){b+="&channelCode="+Echo_TrackChannelCode}b+="&title="+Echo_GetTitle();if(Echo_IsValid(Echo_TrackFrom)){b+="&from="+Echo_TrackFrom+"&to="+Echo_TrackTo}if(Echo_IsValid(Echo_AccessToken)){b+="&accessToken="+Echo_AccessToken}Echo_ServiceCall(b,null);Echo_SetEchoTrackPack();if(Echo_IsValid(Echo_RedirectUrl)){document.location=unescape(Echo_RedirectUrl)}}function Echo_VisitTracking(){if(!Echo_RaisingTrackingEvent&&Echo_VisitTrackingCompleted){return}Echo_VisitTrackingCompleted=true;Echo_RaisingTrackingEvent=false;var a="/Consumer/VisitTracking?merchantId="+Echo_MerchantId+"&isSocialVisitor="+Echo_IsSocialVisitor+"&isNewSession="+Echo_IsNewSession();if(Echo_IsValid(Echo_GetConsumerId())){a+="&consumerId="+Echo_GetConsumerId()}if((Echo_IsValid(Echo_FacebookUserId)&&Echo_IsValid(Echo_AccessToken))){a+="&facebookId="+Echo_FacebookUserId+"&accessToken="+Echo_AccessToken}else{if(Echo_IsValid(Echo_GetCookie("SessionId"))){a+="&sessionId="+Echo_GetCookie("SessionId")}}a+="&referringLink="+document.referrer+"&url="+Echo_GetCleanUrl()+"&title="+Echo_GetTitle();Echo_ServiceCall(a,null)}function Echo_GetConsumer(a){var b="/Consumer/GetConsumer?consumerId="+Echo_GetConsumerId()+"&callBack="+a}function Echo_GetSocialStatusCode(a){var b="/Consumer/GetSocialStatusCode?merchantId="+Echo_MerchantId+"&callBack="+a+"&isSocialVisitor="+Echo_IsSocialVisitor+"&referringLink="+document.referrer;if(Echo_IsValid(Echo_FacebookUserId)){b+="&facebookId="+Echo_FacebookUserId}if(Echo_IsValid(Echo_AccessToken)){b+="&accessToken="+Echo_AccessToken}if(Echo_IsValid(Echo_GetConsumerId())){b+="&consumerId="+Echo_GetConsumerId()}Echo_ServiceCall(b,null)}function Echo_SetSocialStatusCode(a){Echo_SocialStatusCode=a}function Echo_GetConsumerId(){return Echo_GetCookie("ConsumerId")}function Echo_GetUpdatedConusmerDetails(a){Echo_ServiceCall("/Consumer/GetConsumerLite?merchantId="+Echo_MerchantId+"&facebookId="+a+"&callBack=Echo_SetUpdatedConusmerDetails",null)}function Echo_SetUpdatedConusmerDetails(a){if(a!="undefined"){return}Echo_SetCookie("ConsumerId",a.ConsumerId,90);Echo_ConsumerName=a.FirstName}function Echo_ServiceCall(b,a){var c=document.createElement("script");var d=Echo_EndPointUrl+b+"&AntiCache="+Math.random();c.setAttribute("src",d);c.setAttribute("type","text/javascript");if(a!=null){setTimeout(function(){document.body.appendChild(c)},a)}else{document.body.appendChild(c)}}function Echo_SetCookie(a,b,c){var e=new Date();e.setDate(e.getDate()+c);var d=escape(b)+((c==null)?"":"; expires="+e.toUTCString()+"; path=/");document.cookie=a+"="+d}function Echo_GetCookie(a){var c,d,e,b=document.cookie.split(";");for(c=0;c<b.length;c++){d=b[c].substr(0,b[c].indexOf("="));e=b[c].substr(b[c].indexOf("=")+1);d=d.replace(/^\s+|\s+$/g,"");if(d==a){return unescape(e)}}return null}function Echo_RemoveChars(a){if(a!=null){return a.replace(/&#\d\d\d;/g,"")}}function Echo_RemoveHtml(a){a=a.replace(/&(lt|gt);/g,function(d,c){return(c=="lt")?"<":">"});var b=a.replace(/<\/?[^>]+(>|$)/g," ").replace(/  /g," ");return b}function Echo_Encrypt(l,h){if(h==null||h.length<=0){return null}var g="";for(var c=0;c<h.length;c++){g+=h.charCodeAt(c).toString()}var k=Math.floor(g.length/5);var f=parseInt(g.charAt(k)+g.charAt(k*2)+g.charAt(k*3)+g.charAt(k*4)+g.charAt(k*5));var d=Math.ceil(h.length/2);var e=Math.pow(2,31)-1;if(f<2){return null}var j=Math.round(Math.random()*1000000000)%100000000;g+=j;while(g.length>10){g=(parseInt(g.substring(0,10))+parseInt(g.substring(10,g.length))).toString()}g=(f*g+d)%e;var a="";var b="";for(var c=0;c<l.length;c++){a=parseInt(l.charCodeAt(c)^Math.floor((g/e)*255));if(a<16){b+="0"+a.toString(16)}else{b+=a.toString(16)}g=(f*g+d)%e}j=j.toString(16);while(j.length<8){j="0"+j}b+=j;return b}function Echo_Decrypt(k,g){if(k==null||k.length<8){return""}if(g==null||g.length<=0){return""}var f="";for(var b=0;b<g.length;b++){f+=g.charCodeAt(b).toString()}var j=Math.floor(f.length/5);var e=parseInt(f.charAt(j)+f.charAt(j*2)+f.charAt(j*3)+f.charAt(j*4)+f.charAt(j*5));var c=Math.round(g.length/2);var d=Math.pow(2,31)-1;var h=parseInt(k.substring(k.length-8,k.length),16);k=k.substring(0,k.length-8);f+=h;while(f.length>10){f=(parseInt(f.substring(0,10))+parseInt(f.substring(10,f.length))).toString()}f=(e*f+c)%d;var a="";for(var b=0;b<k.length;b+=2){enc_chr=parseInt(parseInt(k.substring(b,b+2),16)^Math.floor((f/d)*255));a+=String.fromCharCode(enc_chr);f=(e*f+c)%d}return a}function Echo_GetQueryString(a){hu=window.location.search.substring(1);gy=hu.split("&");for(i=0;i<gy.length;i++){ft=gy[i].split("=");if(ft[0]==a){return ft[1]}}}function Echo_GetQueryStringDecrypted(a,b){hu=b;gy=hu.split("&");for(i=0;i<gy.length;i++){ft=gy[i].split("=");if(ft[0]==a){return ft[1]}}}function Echo_SerializeObject(a){var c="{";for(var b in a){if(a.hasOwnProperty(b)){c+='"'+b+'":"'+a[b]+'",'}}c=c.substring(0,c.length-1);c+="}";return escape(c)}function Echo_GetEchoTrackPackProp(a){var b=Echo_GetCookie("EchoTrackPack");if(!b){return""}var c=$JEcho.parseJSON(unescape(b));for(var d in c){if(c.hasOwnProperty(d)){if(d==a){return c[a]}}}}function Echo_GetCleanUrl(){var a;if(Echo_ProductUrl!=null){a=Echo_ProductUrl}else{a=document.URL}if(Echo_GetQueryString("echo")!=null){a=a.split("&echo=",1).toString()}return escape(a)}function Echo_GetTitle(){if(Echo_IsValid(Echo_ProductName)){return Echo_ProductName}if(Echo_IsValid(document.title)){return document.title}return"N/A"}function Echo_IsValid(a){if(a==undefined||a==null){return false}if(typeof a=="string"){return(a.replace(/^\s+|\s+$/g,"")!=""&&a!="null"&&a!="undefined")}return true}function Echo_IsNewSession(){return !Echo_IsValid(document.referrer)||document.referrer.split("/")[2].indexOf(location.host)==-1}function Echo_GenerateConfirmationNumber(){var a=function(){return(((1+Math.random())*65536)|0).toString(16).substring(1)};return(a()+a()+"-"+a()+"-"+a()+"-"+a()+"-"+a()+a()+a())}function Echo_GetViewPortHeight(){if(typeof window.innerHeight!="undefined"){return window.innerHeight}if(typeof document.documentElement!="undefined"&&typeof document.documentElement.clientWidth!="undefined"&&document.documentElement.clientWidth!=0){return document.documentElement.clientHeight}return document.getElementsByTagName("body")[0].clientHeight}function Echo_GetMetaDescription(){var a="";var b=document.getElementsByTagName("meta");for(var c=0,d=b.length;c<d;c++){if(b[c].name.toLowerCase()=="description"){a=b[c]}}if(Echo_IsValid(a.content)){return a.content}return""}var Echo_ModalCurrentContext,Echo_Message,Echo_ToFriendId,Echo_FacebookFriends,Echo_ToName,Echo_ToEmail,Echo_FromName,Echo_FromEmail,Echo_EnableFacebookShareSelf=true,Echo_EnableFacebookShareTargeted=true,Echo_EnableTwitterShare=true,Echo_EnableEmailShare=true;function Echo_LoadEchoShare(){Echo_LoadExternals();Echo_ProductName=Echo_InitSettings.ProductName;Echo_Caption=Echo_RemoveChars(Echo_InitSettings.ProductCap);Echo_Description=Echo_RemoveChars(Echo_InitSettings.ProductDesc);Echo_ImageUrl=Echo_InitSettings.ProductImage;if(Echo_InitSettings.EnableTwitterShare==false){Echo_EnableTwitterShare=false}if(Echo_InitSettings.EnableFacebookShareSelf==false){Echo_EnableFacebookShareSelf=false}if(Echo_InitSettings.EnableFacebookShareTargeted==false){Echo_EnableFacebookShareTargeted=false}if(Echo_InitSettings.EnableEmailShare==false){Echo_EnableEmailShare=false}setTimeout(function(){Echo_LoadClientSide()},1000)}function Echo_ShareMany(d,a,b,c,e,f){Echo_ProductName=d;Echo_Caption=a;Echo_Description=b;Echo_ImageUrl=c;if(typeof(e)!="undefined"){Echo_ProductUrl=e}else{Echo_ProductUrl=document.URL}if(typeof(f)!="undefined"){Echo_RedirectUrl=f}Echo_ModalCurrentContext="Share";Echo_ShowModal()}function Echo_HideModal(){$JEcho("#EchoModal").fadeOut(1000);setTimeout(function(){$JEcho("#EchoModal").remove();$JEcho("#EchoModal").dialog("close")},1000)}function Echo_LoadClientSide(){if($JEcho("#Social-Core2").length==0){$JEcho("body").append('<div id="Social-Core2" />')}$JEcho("#Social-Core2").append('<div id="EchoButtons" />');$JEcho("#Social-Core2").append('<div id="EchoModals" />');if(Echo_InitSettings.ShareMany==false||Echo_InitSettings.ShareMany==undefined){if(Echo_MerchantSettings.Merchant.EnableEchoAsk=="true"){$JEcho(document).ready(function(){$JEcho("#EchoButtons").append('<span style="float:left;"><a href="javascript:Echo_ModalCurrentContext=\'Ask\';Echo_ShowModal();"><img src="'+Echo_EndPointUrl+"/Content/Uploads/"+Echo_MerchantSettings.Merchant.AskBtnSource+'" /></a></span>')})}if(Echo_MerchantSettings.Merchant.EnableEchoShare=="true"&&Echo_IsValid(Echo_ProductName)){$JEcho(document).ready(function(){$JEcho("#EchoButtons").append('<span style="float:left;"><a href="javascript:Echo_ModalCurrentContext=\'Share\';Echo_ShowModal();"><img src="'+Echo_EndPointUrl+"/Content/Uploads/"+Echo_MerchantSettings.Merchant.ShareBtnSource+'" /></a></span>')})}}}function Echo_LoadExternals(){$JEcho.getScript(Echo_EndPointUrl+"/Content/Javascript/AutoComplete.js");$JEcho("head").append($JEcho('<link rel="stylesheet" href="'+Echo_EndPointUrl+'/Content/Css/SocialCore.css" type="text/css" media="screen" />'))}function Echo_ShowModal(){Echo_CreateEchoModal();switch(Echo_ModalCurrentContext){case"Ask":Echo_CreateAskHome();break;case"Share":Echo_CreateShareHome();break}Echo_ServiceCall("/Consumer/SaveModalLaunch?merchantId="+Echo_MerchantId+"&modalType="+Echo_ModalCurrentContext,null);$JEcho("#EchoModal").dialog("open")}function Echo_CreateEchoModal(){$JEcho("#EchoModals").html("");$JEcho("#EchoModals").append('<div id="EchoModal" />');$JEcho("#EchoModal").css({"float":"left",display:"none","font-family":"Arial","font-size":"13px",color:"#000000","text-align":"left",position:" absolute",margin:"0",padding:"0","z-index":"9999"});var e='<div id="EchoCloseModal" style="overflow:visible;float:left;width:100%;text-align:right;margin-top:-18px;margin-left:18px;"><img src="'+Echo_EndPointUrl+'/Content/Images/CloseModal.png" onclick="javascript:Echo_HideModal();" id="ImgCloseModal" /></div>';var d="";var c="";var a="";var b="";$JEcho("#EchoModal").dialog({modal:true,position:["center",200],autoOpen:false,draggable:false});switch(Echo_ModalCurrentContext){case"Ask":e+=Echo_MerchantSettings.Merchant.AskHtmlLayout;if(Echo_MerchantSettings.Merchant.ShowAskIcon=="true"){d+='<img src="'+Echo_EndPointUrl+"/Content/Images/"+Echo_MerchantSettings.Merchant.AskIcon+'" style="padding:0px 60px 10px 0px;" />'}d+='<a href="javascript:Echo_CreateAskSelf();"><img src="'+Echo_EndPointUrl+"/Content/Images/"+Echo_MerchantSettings.Merchant.BtnAskSelfOff+'" id="BtnAskSelf" style="'+Echo_MerchantSettings.Merchant.AskNavStyle+'"  /></a>';d+='<a href="javascript:Echo_CreateAskTargeted();"><img src="'+Echo_EndPointUrl+"/Content/Images/"+Echo_MerchantSettings.Merchant.BtnAskTargetedOff+'" id="BtnAskTargeted" style="'+Echo_MerchantSettings.Merchant.AskNavStyle+'" /></a>';d+='<a href="javascript:Echo_Authenticate(\'CreateAskTwitter\');"><img src="'+Echo_EndPointUrl+"/Content/Images/"+Echo_MerchantSettings.Merchant.BtnAskTwitterOff+'" id="BtnAskTwitter" style="'+Echo_MerchantSettings.Merchant.AskNavStyle+'" /></a>';$JEcho("#EchoModal").css({"-moz-box-shadow":Echo_MerchantSettings.Merchant.AskModalBorderShadow,"-webkit-box-shadow":Echo_MerchantSettings.Merchant.AskModalBorderShadow,"box-shadow":Echo_MerchantSettings.Merchant.AskModalBorderShadow,"-moz-border-radius":Echo_MerchantSettings.Merchant.AskModalBorderRadius,"border-radius":Echo_MerchantSettings.Merchant.AskModalBorderRadius,border:Echo_MerchantSettings.Merchant.AskModalBorder,"background-color":Echo_MerchantSettings.Merchant.AskModalBgColor});$JEcho("#EchoModal").dialog({width:Echo_MerchantSettings.Merchant.AskModalWidth,minWidth:Echo_MerchantSettings.Merchant.AskModalWidth,maxWidth:Echo_MerchantSettings.Merchant.AskModalWidth,minHeight:Echo_MerchantSettings.Merchant.AskModalHeight});break;case"Share":e+=Echo_MerchantSettings.Merchant.ShareHtmlLayout;d+='<img src="'+Echo_EndPointUrl+"/Content/Images/"+Echo_MerchantSettings.Merchant.ShareIcon+'" style="padding:0px 60px 10px 0px;" />';if(Echo_EnableFacebookShareSelf){d+='<a href="javascript:Echo_CreateShareSelf();"><img src="'+Echo_EndPointUrl+"/Content/Images/"+Echo_MerchantSettings.Merchant.BtnShareSelfOff+'" id="BtnShareSelf" style="'+Echo_MerchantSettings.Merchant.ShareNavStyle+'" /></a>'}if(Echo_EnableFacebookShareTargeted){d+='<a href="javascript:Echo_CreateShareTargeted();"><img src="'+Echo_EndPointUrl+"/Content/Images/"+Echo_MerchantSettings.Merchant.BtnShareTargetedOff+'" id="BtnShareTargeted" style="'+Echo_MerchantSettings.Merchant.ShareNavStyle+'" /></a>'}if(Echo_MerchantSettings.Merchant.ShareEnableTwitter!="false"&&Echo_EnableTwitterShare){d+='<a href="javascript:Echo_Authenticate(\'CreateShareTwitter\');"><img src="'+Echo_EndPointUrl+"/Content/Images/"+Echo_MerchantSettings.Merchant.BtnShareTwitterOff+'" id="BtnShareTwitter" style="'+Echo_MerchantSettings.Merchant.ShareNavStyle+'" /></a>'}if(Echo_EnableEmailShare){d+='<a href="javascript:Echo_CreateShareEmail();"><img src="'+Echo_EndPointUrl+"/Content/Images/"+Echo_MerchantSettings.Merchant.BtnShareEmailOff+'" id="BtnShareEmail" style="'+Echo_MerchantSettings.Merchant.ShareNavStyle+'" /></a>'}$JEcho("#EchoModal").css({"-moz-box-shadow":Echo_MerchantSettings.Merchant.ShareModalBorderShadow,"-webkit-box-shadow":Echo_MerchantSettings.Merchant.ShareModalBorderShadow,"box-shadow":Echo_MerchantSettings.Merchant.ShareModalBorderShadow,"-moz-border-radius":Echo_MerchantSettings.Merchant.ShareModalBorderRadius,"border-radius":Echo_MerchantSettings.Merchant.ShareModalBorderRadius,border:Echo_MerchantSettings.Merchant.ShareModalBorder,"background-color":Echo_MerchantSettings.Merchant.ShareModalBgColor});$JEcho("#EchoModal").dialog({width:Echo_MerchantSettings.Merchant.ShareModalWidth,minWidth:Echo_MerchantSettings.Merchant.ShareModalWidth,maxWidth:Echo_MerchantSettings.Merchant.ShareModalWidth,minHeight:Echo_MerchantSettings.Merchant.ShareModalHeight});break}if(Echo_MerchantSettings.Merchant.EnableUserWelcome=="true"){if(UserWelcome!=null){c=UserWelcome}else{c="Oh hi, stranger"}}if(Echo_MerchantSettings.Merchant.EnableProductDisplay=="true"){a+=Echo_GetProductInfo()}if(Echo_MerchantSettings.Merchant.EnablePoweredBy=="true"){b+='<a href="http://www.TheEchoSystem.com?Origin=EchoShare&MerchantId='+Echo_MerchantId+'" target="x"><img src="'+Echo_EndPointUrl+"/Content/Images/"+Echo_MerchantSettings.Merchant.PoweredByImage+'" alt="Powered by The Echo System" title="Powered by The Echo System" /></a>'}$JEcho("#EchoModal").html(e);$JEcho("#EchoNav").html(d);$JEcho("#EchoHeader").html(c);$JEcho("#EchoContent").html(a);$JEcho("#EchoFooter").html(b)}function Echo_CreateQuestionModal(){$JEcho("head").append($JEcho('<link rel="stylesheet" href="'+SystemStyles+'" type="text/css" media="screen" />'));$JEcho("#Social-Core2").append('<div id="EchoModalQuestion" />');$JEcho("#EchoModalQuestion").css({border:"1px solid #999999"});$JEcho("#EchoModalQuestion").dialog({modal:true,position:["center",100],autoOpen:false,draggable:false,minWidth:600,minHeight:450})}function Echo_AskGoHome(){Echo_SetNavigation("NA");Echo_CreateAskHome()}function Echo_CreateAskHome(){var a="";a+='<table style="width:100%;padding:8px;margin:0;">';a+='<tr><td style="'+Echo_MerchantSettings.Merchant.TxtSectionHeader+'">Ask Your Social Network</td></tr>';a+='<tr><td style="'+Echo_MerchantSettings.Merchant.TxtSectionSubHeader+'">Get quick and reliable advice from your friends.<br />Click a tab to get started.</td></tr>';a+="<tr>";a+="</table>";$JEcho("#EchoContent").html(a)}function Echo_CreateAskSelf(){Echo_SetNavigation("BtnAskSelf");if(Echo_FacebookUserId!=null){var a='<form name="FrmAskSelf">';a+='<table style="width:100%;padding:8px;margin:0;">';a+='<tr><td colspan="2" style="'+Echo_MerchantSettings.Merchant.TxtSectionHeader+'">Ask Your Facebook Network</td></tr>';a+='<tr><td colspan="2" style="'+Echo_MerchantSettings.Merchant.TxtSectionSubHeader+'">Get quick and reliable advice from your friends.</td></tr>';a+="<tr>";a+='<td width="55"><img src="http://graph.facebook.com/'+Echo_FacebookUserId+'/picture" /></td>';a+='<td><textarea name="message" style="width:98%;height:45px;"></textarea></td>';a+="</tr>";if(Echo_MerchantSettings.Merchant.EnableProductDisplay=="true"){a+='<tr><td colspan="2">'+Echo_GetProductInfo();+"</td></tr>"}a+="<tr>";a+='<td colspan="2" align="right"><input type="button" id="BtnSendAskSelf" value="Submit" style="'+Echo_MerchantSettings.Merchant.InputButtonStyle+'"> <a href="javascript:Echo_AskGoHome();" style="'+Echo_MerchantSettings.Merchant.LnkCancelStyles+'">Cancel</a></td>';a+="</tr>";a+="</table>";a+="</form>";$JEcho("#EchoContent").html(a);$JEcho("input#BtnSendAskSelf").click(function(){Echo_Message=document.FrmAskSelf.message.value;if(Echo_Message!=""&&Echo_AccessToken!=null){$JEcho("#EchoContent").html(Echo_WhileSending());Echo_SaveAsk(Echo_FacebookUserId,Echo_FacebookUserId,Echo_FacebookUserId,"FWA",Echo_Message,"","FB",Echo_FacebookUserId,Echo_GetCookie("TwitterId"),Echo_GetCookie("EmailId"),1000);Echo_ServiceCall("/Consumer/FacebookPost?facebookId="+Echo_FacebookUserId+"&accessToken="+Echo_AccessToken+"&message="+escape(Echo_Message)+"&link="+Echo_MakeTrackingUrl(Echo_FacebookUserId,Echo_FacebookUserId,"FWA","true")+"&picture="+Echo_ImageUrl+"&name="+escape(Echo_ProductName)+"&caption="+escape(Echo_Caption)+"&description="+escape(Echo_Description),1000);setTimeout(function(){$JEcho("#EchoContent").html(Echo_ThankYouMsg("Thank you for sharing!"))},1000)}else{alert("Oops, all fields are required")}})}else{$JEcho("#EchoContent").html(Echo_WhileConnecting());Echo_FacebookLogin("CreateAskSelf")}}function Echo_CreateAskTargeted(){Echo_SetNavigation("BtnAskTargeted");if(Echo_FacebookUserId!=null){$JEcho("#EchoContent").html(Echo_WhileGettingFriends());Echo_GetFriends();setTimeout(function(){var a='<form name="FrmAskTargeted">';a+='<input type="hidden" name="SendTo" id="SendTo" value="">';a+='<table style="width:100%;padding:8px;margin:0;">';a+='<tr><td colspan="2" style="'+Echo_MerchantSettings.Merchant.TxtSectionHeader+'">Ask Your Facebook Network</td></tr>';a+='<tr><td colspan="2" style="'+Echo_MerchantSettings.Merchant.TxtSectionSubHeader+'">Get quick and reliable advice from your friends.</td></tr>';a+="<tr>";a+='<td width="80" style="'+Echo_MerchantSettings.Merchant.TxtLabelStyles+'">To:</td>';a+='<td><input type="text" id="FriendSearch"></td>';a+="</tr>";a+="<tr>";a+='<td style="'+Echo_MerchantSettings.Merchant.TxtLabelStyles+'">Message:</td>';a+='<td><textarea name="message" style="width:98%;height:45px;"></textarea></td>';a+="</tr>";if(Echo_MerchantSettings.Merchant.EnableProductDisplay=="true"){a+='<tr><td colspan="2">'+Echo_GetProductInfo();+"</td></tr>"}a+="<tr>";a+='<td colspan="2" align="right"><input type="button" id="BtnSendShareTargeted" value="Submit" style="'+Echo_MerchantSettings.Merchant.InputButtonStyle+'"> <a href="javascript:Echo_AskGoHome();" style="'+Echo_MerchantSettings.Merchant.LnkCancelStyles+'">Cancel</a></td>';a+="</tr>";a+="</table>";a+="</form>";$JEcho("#EchoContent").html(a);$JEcho("#FriendSearch").autocomplete(Echo_FacebookFriends,{minChars:0,width:200,matchContains:"word",autoFill:false,formatItem:function(d,b,c){return'<img src="'+d.image+'" width="40" align="left" style="padding-right:4px;" />  '+d.name},formatMatch:function(d,b,c){return d.name},formatResult:function(b){return b.name}});$JEcho("#FriendSearch").result(function(c,b,d){$JEcho("input#SendTo").val(b.id);setTimeout(function(){$JEcho("textarea#message").focus()},1)});$JEcho("input#BtnSendShareTargeted").click(function(){Echo_Message=document.FrmAskTargeted.message.value;Echo_ToFriendId=document.FrmAskTargeted.SendTo.value;if(Echo_Message!=""&&Echo_ToFriendId!=null&&Echo_AccessToken!=null){$JEcho("#EchoContent").html(Echo_WhileSending());Echo_SaveAsk(Echo_FacebookUserId,Echo_FacebookUserId,Echo_ToFriendId,"FFA",Echo_Message,"","FB",Echo_FacebookUserId,Echo_GetCookie("TwitterId"),Echo_GetCookie("EmailId"),1000);Echo_ServiceCall("/Consumer/FacebookPost?facebookId="+Echo_ToFriendId+"&accessToken="+Echo_AccessToken+"&message="+escape(Echo_Message)+"&link="+Echo_MakeTrackingUrl(Echo_ToFriendId,Echo_FacebookUserId,"FFA","true")+"&picture="+Echo_ImageUrl+"&name="+escape(Echo_ProductName)+"&caption="+escape(Echo_Caption)+"&description="+escape(Echo_Description),null);setTimeout(function(){$JEcho("#EchoContent").html(Echo_ThankYouMsg("Thank you for sharing!"))},1000)}else{alert("Oops, all fields are required")}})},2000)}else{$JEcho("#EchoContent").html(Echo_WhileConnecting());Echo_FacebookLogin("CreateAskTargeted")}}function Echo_CreateAskTwitter(){if(Echo_GetCookie("TwitterId")){Echo_SetNavigation("BtnAskTwitter");Echo_CreateShortUrl("A",Echo_MakeTrackingUrl(Echo_GetCookie("TwitterId"),Echo_GetCookie("TwitterId"),"TWA","false"));setTimeout(function(){var a='<form name="FrmAskTwitter">';a+='<table style="width:100%;padding:8px;margin:0;">';a+='<tr><td colspan="2" style="'+Echo_MerchantSettings.Merchant.TxtSectionHeader+'">Ask Your Twitter Followers</td></tr>';a+='<tr><td colspan="2" style="'+Echo_MerchantSettings.Merchant.TxtSectionSubHeader+'">Get quick and reliable advice from your friends.</td></tr>';a+="<tr>";a+='<td width="80" style="'+Echo_MerchantSettings.Merchant.TxtLabelStyles+'">Message:</td>';a+='<td><textarea name="message" id="message" style="width:98%;height:45px;">Does anyone have the '+Echo_ProductName+"? "+Echo_ShortUrl+" "+Echo_MerchantSettings.Merchant.TwitterAtMessage+"</textarea></td>";a+="</tr>";if(Echo_MerchantSettings.Merchant.EnableProductDisplay=="true"){a+='<tr><td colspan="2">'+Echo_GetProductInfo();+"</td></tr>"}a+="<tr>";a+='<td colspan="2" align="right"><span id="counter" style="margin-right:8px;"></span><input type="button" id="BtnSendTwitter" value="Submit" style="'+Echo_MerchantSettings.Merchant.InputButtonStyle+'"> <a href="javascript:Echo_AskGoHome();" style="'+Echo_MerchantSettings.Merchant.LnkCancelStyles+'">Cancel</a></td>';a+="</tr>";a+="</table>";a+="</form>";$JEcho("#EchoContent").html(a);$JEcho("input#BtnSendTwitter").click(function(){Echo_Message=document.FrmAskTwitter.message.value;if(Echo_Message!=null){$JEcho("#EchoContent").html(Echo_WhileSending());Echo_SaveAsk(Echo_GetCookie("TwitterId"),Echo_GetCookie("TwitterId"),Echo_GetCookie("TwitterId"),"TWA",Echo_Message,"","TW",Echo_FacebookUserId,Echo_GetCookie("TwitterId"),Echo_GetCookie("EmailId"),1000);Echo_ServiceCall("/Consumer/SendTweet?merchantId="+Echo_MerchantId+"&twitterId="+Echo_GetCookie("TwitterId")+"&msg="+escape(Echo_Message)+"&callBack=Echo_NoReturn",2000);setTimeout(function(){$JEcho("#EchoContent").html(Echo_ThankYouMsg("Thank you for sharing!"))},1000)}});$JEcho(document).ready(function(){var b=$JEcho("#message").val();var d=b.length*100;var e=(d/140);var c=140-b.length;$JEcho("#counter").html(c);$JEcho("#message").keyup(function(){b=$JEcho("#message").val();d=b.length*100;e=(d/140);c=140-b.length;if(c<0){$JEcho("span#counter").css({color:"#600"});$JEcho("input#BtnSendTwitter").attr("disabled","disabled")}else{$JEcho("span#counter").css({color:"#999"});$JEcho("input#BtnSendTwitter").removeAttr("disabled","disabled")}$JEcho("#counter").html(c);return false})})},1000)}else{$JEcho("#EchoContent").html("<p>&nbsp;</p><center><p><b>Uh oh!</b><br />You need to allow Twitter access to use this option.</p></center>")}}function Echo_ShareGoHome(){Echo_SetNavigation("NA");Echo_CreateShareHome()}function Echo_CreateShareHome(){var a="";a+='<table style="width:100%;padding:8px;margin:0;">';a+='<tr><td style="'+Echo_MerchantSettings.Merchant.TxtSectionHeader+'">Share With Your Social Network</td></tr>';a+='<tr><td style="'+Echo_MerchantSettings.Merchant.TxtSectionSubHeader+'">Click a tab to get started.</td></tr>';a+="<tr><td>";if(Echo_MerchantSettings.Merchant.EnableProductDisplay=="true"){a+="<tr><td>"+Echo_GetProductInfo()+"</td></tr>"}a+="</td></tr>";a+="</table>";$JEcho("#EchoContent").html(a)}function Echo_CreateShareSelf(){Echo_SetNavigation("BtnShareSelf");if(Echo_FacebookUserId!=null){var a="";a+='<form name="FrmShareSelf">';a+='<table style="width:100%;padding:0;margin:0;" cellpadding="1" cellspacing="1">';a+='<tr><td><img src="http://graph.facebook.com/'+Echo_FacebookUserId+'/picture"></td><td><textarea name="message" cols="56" rows="3"></textarea></td></tr>';a+='<tr><td></td><td><input type="button" id="BtnSendShareSelf" value="Submit" style="'+Echo_MerchantSettings.Merchant.InputButtonStyle+'"> <a href="javascript:Echo_ShareGoHome();" style="'+Echo_MerchantSettings.Merchant.LnkCancelStyles+'">Cancel</a></td></tr>';if(Echo_MerchantSettings.Merchant.EnableProductDisplay=="true"){a+='<tr><td colspan="2">'+Echo_GetProductInfo();+"</td></tr>"}a+="</table>";a+="</form>";$JEcho("#EchoContent").html(a);$JEcho("input#BtnSendShareSelf").click(function(){Echo_Message=document.FrmShareSelf.message.value;if(Echo_Message!=""&&Echo_AccessToken!=null){$JEcho("#EchoContent").html(Echo_WhileSending());Echo_SaveShare(Echo_FacebookUserId,"FB",Echo_FacebookUserId,Echo_GetCookie("Twitter"),Echo_GetCookie("EmailId"),Echo_FacebookUserId,Echo_FacebookUserId,"FWS",1000);Echo_ServiceCall("/Consumer/FacebookPost?facebookId="+Echo_FacebookUserId+"&accessToken="+Echo_AccessToken+"&message="+escape(Echo_Message)+"&link="+Echo_MakeTrackingUrl(Echo_FacebookUserId,Echo_FacebookUserId,"FWS","true")+"&picture="+Echo_ImageUrl+"&name="+escape(Echo_ProductName)+"&caption="+escape(Echo_Caption)+"&description="+escape(Echo_Description),500);setTimeout(function(){$JEcho("#EchoContent").html(Echo_ThankYouMsg("Thank you for sharing!"))},1000)}else{alert("Oops, all fields are required")}})}else{$JEcho("#EchoContent").html(Echo_WhileConnecting());Echo_FacebookLogin("CreateShareSelf")}}function Echo_CreateShareTargeted(){Echo_SetNavigation("BtnShareTargeted");if(Echo_FacebookUserId!=null){$JEcho("#EchoContent").html(Echo_WhileGettingFriends());Echo_GetFriends();setTimeout(function(){var a="";a+='<form name="FrmShareTargeted">';a+='<table style="width:100%;padding:0;margin:0;" cellpadding="1" cellspacing="1">';a+='<tr><td><b>Friend:</b><br /><input type="text" id="FriendSearch" style="width:200px;"> <img src="" id="FriendSearchPic" style="width:0px;height:0px;"></td></tr>';a+='<tr><td><b>Message:</b><br /><textarea name="message" id="message" cols="56" rows="4"></textarea></td></tr>';a+='<tr><td><input type="button" id="BtnSendShareTargeted" value="Submit" style="'+Echo_MerchantSettings.Merchant.InputButtonStyle+'"> <a href="javascript:Echo_ShareGoHome();" style="'+Echo_MerchantSettings.Merchant.LnkCancelStyles+'">Cancel</a></td></tr>';if(Echo_MerchantSettings.Merchant.EnableProductDisplay=="true"){a+="<tr><td>"+Echo_GetProductInfo();+"</td></tr>"}a+='<input type="hidden" name="SendTo" id="SendTo" value="">';a+="</table>";a+="</form>";$JEcho("#EchoContent").html(a);$JEcho("#FriendSearch").autocomplete(Echo_FacebookFriends,{minChars:0,width:200,matchContains:"word",autoFill:false,formatItem:function(d,b,c){return'<img src="'+d.image+'" width="50" align="left" style="padding-right:4px;" />  <span style="color:#000000;">'+d.name+"</span>"},formatMatch:function(d,b,c){return d.name},formatResult:function(b){return b.name}});$JEcho("#FriendSearch").result(function(c,b,d){$JEcho("input#SendTo").val(b.id);$JEcho("img#FriendSearchPic").attr("src","http://graph.facebook.com/"+b.id+"/picture").attr("style","width:20px;margin-bottom:-5px;");setTimeout(function(){$JEcho("textarea#message").focus()},1)});$JEcho("input#BtnSendShareTargeted").click(function(){Echo_Message=document.FrmShareTargeted.message.value;Echo_ToFriendId=document.FrmShareTargeted.SendTo.value;if(Echo_Message!=""&&Echo_ToFriendId!=null&&Echo_AccessToken!=null){$JEcho("#EchoContent").html(Echo_WhileSending());Echo_SaveShare(Echo_FacebookUserId,"FB",Echo_FacebookUserId,Echo_GetCookie("Twitter"),Echo_GetCookie("EmailId"),Echo_FacebookUserId,Echo_ToFriendId,"FFS",1000);Echo_ServiceCall("/Consumer/FacebookPost?facebookId="+Echo_ToFriendId+"&accessToken="+Echo_AccessToken+"&message="+escape(Echo_Message)+"&link="+Echo_MakeTrackingUrl(Echo_ToFriendId,Echo_FacebookUserId,"FFS","true")+"&picture="+Echo_ImageUrl+"&name="+escape(Echo_ProductName)+"&caption="+escape(Echo_Caption)+"&description="+escape(Echo_Description),null);setTimeout(function(){$JEcho("#EchoContent").html(Echo_ThankYouMsg("Thank you for sharing!"))},1000)}else{alert("Oops, all fields are required")}})},2000)}else{$JEcho("#EchoContent").html(Echo_WhileConnecting());Echo_FacebookLogin("CreateShareTargeted")}}function Echo_CreateShareTwitter(){if(Echo_GetCookie("TwitterId")){Echo_SetNavigation("BtnShareTwitter");Echo_CreateShortUrl("S",Echo_MakeTrackingUrl(Echo_GetCookie("TwitterId"),Echo_GetCookie("TwitterId"),"TWS","false"));setTimeout(function(){var a='<form name="FrmSendTwitter">';a+='<table style="width:100%;padding:0;margin:0;" cellpadding="1" cellspacing="1">';a+="<tr><td><b>Message:</b><br />";a+='<textarea name="message" id="message" cols="56" rows="4">I wanted to share this: '+Echo_ProductName+" - "+Echo_ShortUrl+" "+Echo_MerchantSettings.Merchant.TwitterAtMessage+"</textarea></td></tr>";a+='<tr><td style="vertical-align:middle;"><span id="counter"></span> <input type="button" id="BtnSendTwitter" value="Publish" style="'+Echo_MerchantSettings.Merchant.InputButtonStyle+'"> <a href="javascript:Echo_ShareGoHome();" style="'+Echo_MerchantSettings.Merchant.LnkCancelStyles+'">Cancel</a></td></tr>';if(Echo_MerchantSettings.Merchant.EnableProductDisplay=="true"){a+="<tr><td>"+Echo_GetProductInfo();+"</td></tr>"}a+="</table>";a+="</form>";$JEcho("#EchoContent").html(a);$JEcho("input#BtnSendTwitter").click(function(){Echo_Message=document.FrmSendTwitter.message.value;if(Echo_Message!=null){$JEcho("#EchoContent").html(Echo_WhileSending());Echo_SaveShare(Echo_GetCookie("TwitterId"),"TW",Echo_FacebookUserId,Echo_GetCookie("Twitter"),Echo_GetCookie("EmailId"),Echo_GetCookie("TwitterId"),Echo_GetCookie("TwitterId"),"TWS",1000);Echo_ServiceCall("/Consumer/SendTweet?merchantId="+Echo_MerchantId+"&twitterId="+Echo_GetCookie("TwitterId")+"&msg="+escape(Echo_Message)+"&callBack=Echo_NoReturn",2000);setTimeout(function(){$JEcho("#EchoContent").html(Echo_ThankYouMsg("Thank you for sharing!"))},1000)}});$JEcho(document).ready(function(){var b=$JEcho("#message").val();var d=b.length*100;var e=(d/140);var c=140-b.length;$JEcho("#counter").html(c);$JEcho("#message").keyup(function(){b=$JEcho("#message").val();d=b.length*100;e=(d/140);c=140-b.length;if(c<0){$JEcho("span#counter").css({color:"#600"});$JEcho("input#BtnSendTwitter").attr("disabled","disabled")}else{$JEcho("span#counter").css({color:"#999"});$JEcho("input#BtnSendTwitter").removeAttr("disabled","disabled")}$JEcho("#counter").html(c);return false})})},1000)}else{$JEcho("#EchoContent").html("<p>&nbsp;</p><center><p><b>Uh oh!</b><br />You need to allow Twitter access to use this option.</p></center>")}}function Echo_CreateShareEmail(){Echo_SetNavigation("BtnShareEmail");var a='<form name="FrmEmail"><table style="width:100%;padding:0;margin:0;" cellpadding="1" cellspacing="1">';a+='<tr><td><b>To Name:</b><br /><input type="text" name="ToName" value=""></td>';a+='<td><b>To Email:</b><br /><input type="text" name="ToEmail" value=""></td></tr>';a+='<tr><td><b>From Name:</b><br /><input type="text" name="FromName" value=""></td>';a+='<td><b>From Email:</b><br /><input type="text" name="FromEmail" value=""></td></tr>';a+='<tr><td colspan="2"><b>Message:</b><br /><textarea name="Message" cols="56" rows="4"></textarea></td><tr>';a+='<tr><td colspan="2"><input type="button" id="BtnSendEmail" value="Send" style="'+Echo_MerchantSettings.Merchant.InputButtonStyle+'"> <a href="javascript:Echo_ShareGoHome();" style="'+Echo_MerchantSettings.Merchant.LnkCancelStyles+'">Cancel</a></td></tr></table>';if(Echo_MerchantSettings.Merchant.EnableProductDisplay=="true"){a+='<tr><td colspan="2">'+Echo_GetProductInfo();+"</td></tr>"}a+="</form>";$JEcho("#EchoContent").html(a);$JEcho("input#BtnSendEmail").click(function(){var f=document.FrmEmail.ToName.value;var e=document.FrmEmail.ToEmail.value;var c=document.FrmEmail.FromName.value;var b=document.FrmEmail.FromEmail.value;var d=document.FrmEmail.Message.value;if(f!=""&&e!=""&&c!=""&&b!=""&&d!=""){$JEcho("#EchoContent").html(Echo_WhileSending());Echo_SaveShare(b,"EM",Echo_FacebookUserId,Echo_GetCookie("Twitter"),Echo_GetCookie("EmailId"),b,e,"EMS",1000);Echo_ServiceCall("/Consumer/SendEmail?merchantId="+Echo_MerchantId+"&toName="+escape(f)+"&toEmail="+e+"&fromName="+escape(c)+"&fromEmail="+b+"&message="+escape(d)+"&productName="+escape(Echo_ProductName)+"&productUrl="+Echo_MakeTrackingUrl(e,b,"EMS","false")+"&productDisplayUrl="+document.URL+"&productImageUrl="+Echo_ImageUrl+"&callBack=Echo_NoReturn",3000);Echo_SetCookie("EmailId",b,30);setTimeout(function(){$JEcho("#EchoContent").html('<center><p>&nbsp;</p><p><b>Thank you for sharing!</b></p><p><a href="javascript:Echo_HideModal();" style="'+Echo_MerchantSettings.Merchant.LnkCancelStyles+'">Close this window</a></p></center>')},1000)}else{alert("All fields are required")}})}function Echo_Authenticate(a){switch(a){case"CreateAskTwitter":Echo_SetNavigation("BtnAskTwitter");break;case"CreateShareTwitter":Echo_SetNavigation("BtnShareTwitter");break}$JEcho("#EchoContent").html(Echo_WhileConnecting());if(!Echo_GetCookie("TwitterId")){var b=Echo_GetCookie("SessionId");var d=window.open(Echo_EndPointUrl+"/Consumer/OAuthorize?merchantId="+Echo_MerchantId+"&sessionId="+b,null,"height=750,width=500");var c=self.setInterval(function(){if(d.closed){window.clearInterval(c);Echo_NextAction(a,b)}},250)}else{switch(a){case"CreateAskTwitter":Echo_CreateAskTwitter();break;case"CreateShareTwitter":Echo_CreateShareTwitter();break}}}function Echo_NextAction(a,b){Echo_ServiceCall("/Consumer/GetTwitterId?sessionId="+b+"&callBack=Echo_SetTwitterId",null);setTimeout(function(){switch(a){case"CreateAskTwitter":Echo_CreateAskTwitter();break;case"CreateShareTwitter":Echo_CreateShareTwitter();break}},500)}function Echo_SetTwitterId(a){Echo_SetCookie("TwitterId",a,30)}function Echo_GetProductInfo(){if(Echo_ProductUrl==null){Echo_ProductUrl=document.URL}return'<p class="ProductInfo"><img src="'+Echo_ImageUrl+'" width="80" align="left" style="padding:0px 6px 0px 2px;" /><span style="'+Echo_MerchantSettings.Merchant.TxtProductHeaderStyle+'">'+Echo_ProductName+'</span><br /><span style="'+Echo_MerchantSettings.Merchant.TxtProductDescriptionStyle+'">'+Echo_Caption.substring(0,150)+"</span>...</p>"}function Echo_FacebookLogin(a){FB.getLoginStatus(function(b){if(b.authResponse){Echo_FacebookUserId=b.authResponse.userID;Echo_AccessToken=b.authResponse.accessToken;setTimeout(function(){Echo_GetUserInfo()},1000);setTimeout(function(){Echo_SetCookie("Echo_FacebookUserId",Echo_FacebookUserId,30);Echo_FacebookNextAction(a)},1000)}else{FB.login(function(d){if(d.authResponse){Echo_FacebookUserId=d.authResponse.userID;Echo_AccessToken=d.authResponse.accessToken;setTimeout(function(){Echo_GetUserInfo()},1000);setTimeout(function(){Echo_SetCookie("Echo_FacebookUserId",Echo_FacebookUserId,30);Echo_FacebookNextAction(a)},1000);var c=((Echo_EnableSocialCenter==="true")&&Echo_IncludeSocialCenter);Echo_SaveConsumer(c?"Echo_SetConsumerAndUpdateMessage":null,true)}else{$JEcho("#EchoContent").html("<p>&nbsp;</p><center><p><b>Uh oh!</b><br />You need to Facebook Connect to use this option.</p></center>")}},{scope:"email,user_birthday,user_location,publish_stream"})}})}function Echo_FacebookNextAction(a){switch(a){case"CreateAskSelf":Echo_CreateAskSelf();break;case"CreateAskTargeted":Echo_CreateAskTargeted();break;case"CreateAskTwitter":Echo_CreateAskTwitter();break;case"CreateShareSelf":Echo_CreateShareSelf();break;case"CreateShareTargeted":Echo_CreateShareTargeted();break;case"CreateShareTwitter":Echo_CreateShareTwitter();break;case"CreateShareEmail":Echo_CreateShareEmail();break}}function Echo_GetUserInfo(){Echo_ServiceCall("/Consumer/GetInfo?merchantId="+Echo_MerchantId+"&accountType=FB&externalId="+Echo_GetCookie("Echo_FacebookUserId")+"&token="+Echo_AccessToken+"&callBack=Echo_SetUserInfo",1000)}function Echo_SetUserInfo(a){if(Echo_MerchantSettings.Merchant.EnableUserWelcome=="true"){userWelcome="Welcome, <b>"+a+"</b>!";$JEcho("#EchoHeader").html(userWelcome)}}function Echo_GetFriends(){Echo_ServiceCall("/Consumer/GetFriends?socialType=FB&facebookUserId="+Echo_FacebookUserId+"&token="+Echo_AccessToken+"&callBack=Echo_SetFriends",null)}function Echo_SetFriends(a){Echo_FacebookFriends=a}function Echo_WhileGettingFriends(){return'<center><p>&nbsp;</p><p><b>Loading friends...</b><br />This should only take a second.</p><img src="'+Echo_EndPointUrl+'/Content/Images/Loading.gif" /></p></center>'}function Echo_WhileConnecting(){return'<center><p>&nbsp;</p><p><b>Connecting...</b><br />This should only take a second.</p><img src="'+Echo_EndPointUrl+'/Content/Images/Loading.gif" /></p></center>'}function Echo_WhileSending(){return'<center><p>&nbsp;</p><p><b>Sending...</b><br />This should only take a second.</p><p><img src="'+Echo_EndPointUrl+'/Content/Images/Loading.gif" /></p><center>'}function Echo_ThankYouMsg(a){return"<center><p>&nbsp;</p><p><b>"+a+'</b></p><p><a href="#" onclick="javascript:Echo_HideModal();" style="'+Echo_MerchantSettings.Merchant.LnkCancelStyles+'">Close this window</a></p><center>'}function Echo_SetNavigation(a){$JEcho("#BtnAskSelf").attr("src",""+Echo_EndPointUrl+"/Content/Images/"+Echo_MerchantSettings.Merchant.BtnAskSelfOff);$JEcho("#BtnAskTargeted").attr("src",""+Echo_EndPointUrl+"/Content/Images/"+Echo_MerchantSettings.Merchant.BtnAskTargetedOff);$JEcho("#BtnAskTwitter").attr("src",""+Echo_EndPointUrl+"/Content/Images/"+Echo_MerchantSettings.Merchant.BtnAskTwitterOff);$JEcho("#BtnShareSelf").attr("src",""+Echo_EndPointUrl+"/Content/Images/"+Echo_MerchantSettings.Merchant.BtnShareSelfOff);$JEcho("#BtnShareTargeted").attr("src",""+Echo_EndPointUrl+"/Content/Images/"+Echo_MerchantSettings.Merchant.BtnShareTargetedOff);$JEcho("#BtnShareTwitter").attr("src",""+Echo_EndPointUrl+"/Content/Images/"+Echo_MerchantSettings.Merchant.BtnShareTwitterOff);$JEcho("#BtnShareEmail").attr("src",""+Echo_EndPointUrl+"/Content/Images/"+Echo_MerchantSettings.Merchant.BtnShareEmailOff);if(a!="NA"){var b;switch(a){case"BtnAskSelf":b=Echo_MerchantSettings.Merchant.BtnAskSelfOn;break;case"BtnAskTargeted":b=Echo_MerchantSettings.Merchant.BtnAskTargetedOn;break;case"BtnAskTwitter":b=Echo_MerchantSettings.Merchant.BtnAskTwitterOn;break;case"BtnShareSelf":b=Echo_MerchantSettings.Merchant.BtnShareSelfOn;break;case"BtnShareTargeted":b=Echo_MerchantSettings.Merchant.BtnShareTargetedOn;break;case"BtnShareTwitter":b=Echo_MerchantSettings.Merchant.BtnShareTwitterOn;break;case"BtnShareEmail":b=Echo_MerchantSettings.Merchant.BtnShareEmailOn;break}$JEcho("#"+a).attr("src",""+Echo_EndPointUrl+"/Content/Images/"+b)}}function Echo_MakeTrackingUrl(d,b,a,c){var f=Echo_ProductUrl||document.location.href;var h="From="+b+"&To="+d+"&ChannelCode="+a+"&ShowQuestion="+c;if(Echo_IsValid(Echo_RedirectUrl)){h+="&RedirectUrl="+escape(Echo_RedirectUrl)}var e="echo="+Echo_Encrypt(h,"0103");var g;if(f.indexOf("?")==-1){g=escape(f+"?"+e)}else{g=escape(f+"&"+e)}return g}function Echo_CreateShortUrl(b,a){Echo_ServiceCall("/Consumer/CreateUrl?merchantId="+Echo_MerchantId+"&type="+b+"&longUrl="+a+"&callBack=Echo_SetShortUrl",0)}function Echo_SetShortUrl(a){Echo_ShortUrl=a}function Echo_SaveShare(e,a,f,j,d,g,h,b,c){var k="/Consumer/ShareTracking?merchantId="+Echo_MerchantId+"&url="+escape(document.URL)+"&channelCode="+b+"&title="+Echo_ProductName+"&from="+g+"&to="+h+"&referringLink="+document.referrer+"&accountType="+a+"&externalId="+e+"&isSocialVisitor="+Echo_IsSocialVisitor;if(Echo_IsValid(Echo_AccessToken)){k+="&accessToken="+Echo_AccessToken}if(Echo_IsValid(f)){k+="&facebookId="+f}if(Echo_IsValid(j)){k+="&twitterId="+j}if(Echo_IsValid(d)){k+="&emailId="+d}Echo_ServiceCall(k,c)}function Echo_SaveAsk(e,g,k,b,j,h,a,f,l,d,c){var m="/Consumer/AskTracking?merchantId="+Echo_MerchantId+"&externalId="+e+"&url="+escape(document.URL)+"&channelCode="+b+"&title="+Echo_ProductName+"&from="+g+"&to="+k+"&question="+j+"&options="+h+"&referringLink="+document.referrer+"&accountType="+a+"&isSocialVisitor="+Echo_IsSocialVisitor;if(Echo_IsValid(Echo_AccessToken)){m+="&accessToken="+Echo_AccessToken}if(Echo_IsValid(f)){m+="&facebookId="+f}if(Echo_IsValid(l)){m+="&twitterId="+l}if(Echo_IsValid(d)){m+="&emailId="+d}Echo_ServiceCall(m,c)}var Echo_CurrentMessageId,Echo_SocialCenterObject,Echo_CloseSocialCenter=true,Echo_IsFirstSocialCenterPopOut=true,Echo_RaisingSocialCenterTrackingEvent=false,Echo_SocialCenterHiddenRange="-282px",Echo_SocialCenterComments;function Echo_LoadSocialCenter(){Echo_InitializeSocialCenter()}function Echo_InitializeSocialCenter(){var a="/Consumer/InitializeSocialCenter?merchantId="+Echo_MerchantId+"&referringLink="+document.referrer+"&callBack=Echo_SetSocialCenter&isSocialVisitor="+Echo_IsSocialVisitor+"&isNewSession="+Echo_IsNewSession();if(Echo_IsValid(Echo_FacebookUserId)){a+="&facebookId="+Echo_FacebookUserId}if(Echo_IsValid(Echo_AccessToken)){a+="&accessToken="+Echo_AccessToken}if(Echo_IsValid(Echo_GetConsumerId())){a+="&consumerId="+Echo_GetConsumerId()}Echo_ServiceCall(a,null)}function Echo_SetSocialCenter(b,a){Echo_SocialCenterObject=b;if(Echo_IsValid(a)){Echo_SocialCenterComments=a}$JEcho("body").append("<div id='EchoSocialCenter' class='EchoSocialCenterFull'><div id='EchoFirstTier' class='EchoTier'><div id='EchoFirstTierInner'><div id='EchoLogo'></div><div class='EchoDivider'></div><div id='EchoShareThisContainer'><div id='EchoShareThis'><div id='EchoShareThisButton'><span id='EchoShareThisText'>Share This Page </span><span id='EchoShareSocialIcons' /></div></div></div></div></div><div class='EchoClear'></div><div id='EchoCallOut'><div id='EchoTabContainer'><div id='EchoIndicator'></div><div class='EchoClear'></div><div id='EchoTab'></div><div class='EchoClear'></div></div><div id='EchoCalloutContentContainer'><div id='EchoPromoContainer'><span id='EchoOfferMessage' class='EchoPromoText'>You have a personalized offer!</span><span id='EchoStepLabel' class='EchoPromoText'>Step:</span><span id='EchoSteps'></span></div><div id='EchoMessageBoxContainer'><div id='EchoMessageBoxOutter'><div id='EchoMessageBoxInner'><div id='EchoContentHolder'><div id='EchoMessageContent'></div></div><div id='EchoFacebookConnectButton'></div><div id='EchoFacebookLikeButton'></div></div></div></div><div class='EchoClear'></div></div></div><div id='EchoSecondTier' class='EchoTier'><div class='EchoTierBorder'></div><div id='EchoFacePile' class='EchoSocialCenterModule'></div><div id='secondDivider' class='EchoDivider'></div><div id='EchoNewsFeedContainer' class='EchoSocialCenterModule'><div id='EchoNewsFeedHeader'><span id='NewsFeedHeaderText'></span></div><div id='EchoNewsFeedContent' class='scroll-pane'><table id='EchoNewsFeed'></table></div></div></div></div>");if(Echo_MerchantSettings.Merchant.DisableConnect=="true"){$JEcho("#EchoFacebookConnectButton").remove();$JEcho("#EchoFacebookLikeButton").remove()}$JEcho("#EchoShareThisButton").click(function(){Echo_ShareMany(Echo_IsValid(Echo_ProductName)?Echo_ProductName:document.title,Echo_IsValid(Echo_Caption)?Echo_Caption:Echo_GetMetaDescription(),Echo_IsValid(Echo_Description)?Echo_Description:"",Echo_IsValid(Echo_ImageUrl)?Echo_ImageUrl:"https://graph.facebook.com/"+Echo_MerchantSettings.Merchant.FanPageId+"/picture",Echo_IsValid(Echo_ProductUrl)?Echo_ProductUrl:document.URL)});$JEcho("#EchoTabContainer").click(function(){if(Echo_CloseSocialCenter||Echo_IsFirstSocialCenterPopOut){if(Echo_IsFirstSocialCenterPopOut){Echo_CloseSocialCenter=true;Echo_IsFirstSocialCenterPopOut=false}Echo_OpenPanelNow()}else{Echo_ClosePanelNow()}});$JEcho("#EchoSocialCenter").mouseenter(function(){if(Echo_IsFirstSocialCenterPopOut){Echo_CloseSocialCenter=false}}).mouseleave(function(){if(Echo_IsFirstSocialCenterPopOut){Echo_PanelClosePos(5000);Echo_CloseSocialCenter=true}});$JEcho("#EchoFacebookConnectButton").click(Echo_SocialCenterFacebookLogin);$JEcho("#EchoLike").css({position:"absolute",left:"-10000px"});$JEcho("#EchoLikeFull").css({position:"absolute",left:"-10000px"});Echo_SetNewsFeed();Echo_SetConsumerDetails();Echo_SetMessage();Echo_SetAlertMessage();Echo_FormatSocialCenter();$JEcho("#EchoSocialCenter").css({right:Echo_SocialCenterHiddenRange});if(Echo_ShowSocialCenter&&Echo_IsNewSession()){setTimeout(function(){if(Echo_IsFirstSocialCenterPopOut){Echo_PanelOpenPos(0)}},2500);Echo_PanelClosePos(10000)}$JEcho("#EchoNewsFeedContent").jScrollPane({autoReinitialise:true})}function Echo_SetConsumerDetails(){Echo_SetCookie("ConsumerId",Echo_SocialCenterObject.ConsumerId,10000);Echo_SocialStatusCode=Echo_SocialCenterObject.SocialStatus;Echo_VisitTracking()}function Echo_SetMessage(){$JEcho("#EchoFacebookConnectButton").hide();$JEcho("#EchoFacebookLikeButton").html("");$JEcho("#EchoMessageContainer a").unbind("click");if(Echo_UserIsLoggedIn()){if(Echo_SocialStatusCode=="FA"||Echo_SocialStatusCode=="FS"){$JEcho("#EchoSteps").html("1 2 <b><u>3</u></b>");$JEcho("#EchoMessageContent").html(Echo_SocialCenterObject.EngageHtml);if(Echo_RaisingSocialCenterTrackingEvent){Echo_SocialCenterTracking(Echo_CurrentMessageId,"BC")}Echo_CurrentMessageId=Echo_SocialCenterObject.MessageId;Echo_SocialCenterTracking(Echo_CurrentMessageId,"ES");$JEcho("#EchoMessageContainer a").click(function(){Echo_SocialCenterTracking(null,"EC")})}else{$JEcho("#EchoSteps").html("1 <b><u>2</u></b> 3");$JEcho("#EchoMessageContent").html(Echo_SocialCenterObject.BeAFanHtml);if(Echo_RaisingSocialCenterTrackingEvent){Echo_SocialCenterTracking(Echo_CurrentMessageId,"CC")}Echo_CurrentMessageId=Echo_SocialCenterObject.MessageId;$JEcho("#EchoFacebookLikeButton").html($JEcho("#EchoLike").html());Echo_SocialCenterTracking(Echo_CurrentMessageId,"BS")}}else{if(Echo_SocialStatusCode=="FA"||Echo_SocialStatusCode=="FS"){$JEcho("#EchoMessageContent").html(Echo_SocialCenterObject.EngageHtml);Echo_CurrentMessageId=Echo_SocialCenterObject.MessageId}else{if(Echo_SocialStatusCode=="ME"){$JEcho("#EchoMessageContent").html(Echo_SocialCenterObject.BeAFanHtml);if(Echo_RaisingSocialCenterTrackingEvent){Echo_SocialCenterTracking(Echo_CurrentMessageId,"CC")}Echo_CurrentMessageId=Echo_SocialCenterObject.MessageId;$JEcho("#EchoFacebookLikeButton").html($JEcho("#EchoLike").html());Echo_SocialCenterTracking(Echo_CurrentMessageId,"BS")}else{$JEcho("#EchoSteps").html("<b><u>1</u></b> 2 3");$JEcho("#EchoMessageContent").html(Echo_SocialCenterObject.ConnectHtml);Echo_CurrentMessageId=Echo_SocialCenterObject.MessageId;Echo_SocialCenterTracking(Echo_CurrentMessageId,"CS");$JEcho("#EchoFacebookConnectButton").show()}}}if(Echo_MerchantSettings.Merchant.DisableConnect=="true"){$JEcho("#EchoFacebookConnectButton").remove();$JEcho("#EchoFacebookLikeButton").remove();$JEcho("#EchoOfferMessage").hide();$JEcho("#EchoStepLabel").hide();$JEcho("#EchoSteps").html("")}}function Echo_SetNewsFeed(c){if(Echo_SocialCenterComments==null||Echo_SocialCenterComments.data.length==0){return}var d='<table id="EchoNewsFeed">';for(i=0;i<=4;i++){if(!Echo_SocialCenterComments.data[i]){break}var b="";if(Echo_SocialCenterComments.data[i].type=="link"){var e=Echo_SocialCenterComments.data[i].link;if(Echo_IsValid(Echo_SocialCenterComments.data[i].name)){e=Echo_SocialCenterComments.data[i].name}b='<div class="EchoNewsFeedLinkBox"><a class="EchoNewsFeedLink" target="_blank" href="'+Echo_SocialCenterComments.data[i].link+'"><span class="EchoPageHeader">'+e+"</span>";if(Echo_IsValid(Echo_SocialCenterComments.data[i].description)){b+='<p style="color: #415454">'+Echo_SocialCenterComments.data[i].description+"</p>"}b+="</div>"}else{if(Echo_SocialCenterComments.data[i].type=="photo"){b='<a href="'+Echo_SocialCenterComments.data[i].link+'" target="_blank"><img class="EchoCommentImage" src="'+Echo_SocialCenterComments.data[i].picture+' alt="" /></a>'}}var a="";if(Echo_IsValid(Echo_SocialCenterComments.data[i].message)){a=Echo_SocialCenterComments.data[i].message}d+='<tr><td class="EchoNewsFeedLogo"><a  target=\'_blank\' href="https://www.facebook.com/'+Echo_SocialCenterComments.data[i].from.id+'"><img class="EchoNewsFeedProfile" src="https://graph.facebook.com/'+Echo_SocialCenterComments.data[i].from.id+'/picture"/></td><td class="EchoRightCell"><span class="EchoPageHeader">'+Echo_SocialCenterComments.data[i].from.name+'</span></a><span class="EchoCommentMessage">'+a+"</span>"+b+'<p><img class="EchoNewsFeedIcon" src="'+Echo_SocialCenterComments.data[i].icon+'" />'+Echo_ConvertFBTime(Echo_SocialCenterComments.data[i].created_time)+"</p></td></tr>"}d+="</table>";$JEcho("#EchoNewsFeedContent").html(d);$JEcho("#EchoNewsFeed a").click(function(){Echo_SocialCenterTracking(null,"SC")});$JEcho("#EchoNewsFeedContent").css({height:(Echo_GetViewPortHeight()-417)+"px"})}function Echo_SetAlertMessage(){if(!Echo_SocialCenterObject.AlertMessage){$JEcho("#EchoAlertMessage").hide();return}$JEcho("#EchoAlertMessage").html(Echo_SocialCenterObject.AlertMessage.Body);Echo_SocialCenterTracking(Echo_SocialCenterObject.AlertMessage.Id,"AS");$JEcho("#EchoAlertMessage a").click(function(){Echo_SocialCenterTracking(Echo_SocialCenterObject.AlertMessage.Id,"AC")})}function Echo_SocialCenterTracking(a,b){if(!Echo_IsNewSession()&&!Echo_RaisingSocialCenterTrackingEvent){return}var c="/Consumer/SocialCenterTracking?merchantId="+Echo_MerchantId+"&type="+b+"&consumerId="+Echo_GetConsumerId()+"&messageId="+a+"&isSocialVisitor="+Echo_IsSocialVisitor+"&referringLink="+document.referrer+"&isEventRaise="+Echo_RaisingSocialCenterTrackingEvent+"&callBack=Echo_SocialCenterTrackingCallBack";if(Echo_IsValid(Echo_AccessToken)){c+="&accessToken="+Echo_AccessToken}if(Echo_IsValid(Echo_FacebookUserId)){c+="&facebookId="+Echo_FacebookUserId}if(Echo_IsValid(Echo_TwitterUserId)){c+="&twitterId="+Echo_TwitterUserId}Echo_ServiceCall(c,null);Echo_RaisingSocialCenterTrackingEvent=false}function Echo_SocialCenterTrackingCallBack(a,b){Echo_SetCookie("ConsumerId",a,90);Echo_SetSocialStatusCode(b)}function Echo_PanelOpenPos(a){$JEcho("#EchoTab").css({"background-position":"-17px 0"});setTimeout(function(){$JEcho("#EchoSocialCenter").animate({right:"0px"},{duration:400,queue:false})},a)}function Echo_PanelClosePos(a){setTimeout(function(){if(Echo_CloseSocialCenter){Echo_SetPanelClosedState();if(Echo_IsFirstSocialCenterPopOut){Echo_IsFirstSocialCenterPopOut=false}}},a)}function Echo_SetPanelClosedState(){$JEcho("#EchoTab").css({"background-position":"0 0"});$JEcho("#EchoSocialCenter").animate({right:Echo_SocialCenterHiddenRange},{duration:400,queue:false})}function Echo_ClosePanelNow(){Echo_CloseSocialCenter=true;Echo_PanelClosePos(0)}function Echo_OpenPanelNow(){Echo_CloseSocialCenter=false;Echo_PanelOpenPos(0)}function Echo_LikeTracking(a){var b="/Consumer/LikeTracking?merchantId="+Echo_MerchantId+"&consumerId="+Echo_GetConsumerId()+"&like="+a+"&callBack=Echo_UpdateMessage";if(Echo_IsValid(Echo_FacebookUserId)){b+="&facebookId="+Echo_FacebookUserId}if(Echo_IsValid(Echo_AccessToken)){b+="&accessToken="+Echo_AccessToken}b+="&isSocialVisitor="+Echo_IsSocialVisitor+"&referringLink="+document.referrer;Echo_ServiceCall(b,null)}function Echo_FormatSocialCenter(){$JEcho("#EchoLikeImage").attr("src","https://graph.facebook.com/"+Echo_MerchantSettings.Merchant.FanPageId+"/picture");$JEcho("#EchoLikeTitle").attr("href","https://facebook.com/"+Echo_MerchantSettings.Merchant.FanPageId);$JEcho("#EchoFacebookFeedHeaderLink").attr("href","https://facebook.com/"+Echo_MerchantSettings.Merchant.FanPageId);$JEcho("#NewsFeedHeaderText").text(Echo_MerchantSettings.Merchant.Name+"'s Wall");$JEcho("#EchoFacePile").html($JEcho("#EchoLikeFull").html());if(Echo_MerchantSettings.Merchant.SocialCenterFloatRight=="true"||!Echo_IsValid(Echo_SocialCenterComments)){Echo_SocialCenterHiddenRange="-289px";$JEcho("#EchoNewsFeedContainer").hide();$JEcho("#secondDivider").hide();$JEcho(".EchoTier").css({"border-width":"7px"});var a=((Echo_GetViewPortHeight()*0.5)-373/2)+"px";$JEcho("#EchoSocialCenter").css({top:a});$JEcho("#EchoSocialCenter").removeClass("EchoSocialCenterFull");$JEcho("#EchoFirstTier").addClass("echoTierFloatTop");$JEcho("#EchoSecondTier").addClass("echoTierFloatBottom")}}FB.Event.subscribe("edge.create",function(a){Echo_RaisingSocialCenterTrackingEvent=Echo_RaisingTrackingEvent=true;Echo_LikeTracking(true)});FB.Event.subscribe("edge.remove",function(a){Echo_RaisingTrackingEvent=Echo_IsSocialVisitor=true;Echo_LikeTracking(false)});function Echo_SetConsumerAndUpdateMessage(a){Echo_SetCookie("ConsumerId",a.ConsumerId,10000);Echo_UpdateMessage(a.SocialProfileType)}function Echo_UpdateMessage(a){Echo_SetSocialStatusCode(a);Echo_SetMessage();Echo_SaveConsumer()}function Echo_SocialCenterFacebookLogin(){Echo_CloseSocialCenter=false;FB.getLoginStatus(function(a){if(a.authResponse){Echo_FacebookUserId=a.authResponse.userID;Echo_AccessToken=a.authResponse.accessToken}else{FB.login(function(b){if(b.authResponse){if(Echo_IsSocialVisitor){Echo_RaisingTrackingEvent=true}Echo_RaisingSocialCenterTrackingEvent=Echo_IsSocialVisitor=true;Echo_FacebookUserId=b.authResponse.userID;Echo_AccessToken=b.authResponse.accessToken;Echo_SaveConsumer("Echo_SetConsumerAndUpdateMessage",true)}else{}},{scope:"email,user_birthday,user_location,publish_stream"})}})}function Echo_LogoutFacebook(){FB.logout(function(a){Echo_SocialStatusCode="SV";Echo_FacebookUserId=null;Echo_AccessToken=null;$JEcho("#EchoUserInfo").html("");Echo_GetSocialStatusCode("Echo_UpdateMessage")})}function Echo_UserIsLoggedIn(){return(Echo_FacebookUserId!=null&&!isNaN(Echo_FacebookUserId))}function Echo_ConvertFBTime(b){var a=b.split("-",3);return a[1]+"/"+a[2].split("T")[0]+"/"+a[0]}(function(a){var f={pos:[-260,-260]},e=3,c=document,g=c.documentElement,b=c.body,d,h;function j(){if(this===f.elem){f.pos=[-260,-260];f.elem=false;e=3}}a.event.special.mwheelIntent={setup:function(){var k=a(this).bind("mousewheel",a.event.special.mwheelIntent.handler);if(this!==c&&this!==g&&this!==b){k.bind("mouseleave",j)}k=null;return true},teardown:function(){a(this).unbind("mousewheel",a.event.special.mwheelIntent.handler).unbind("mouseleave",j);return true},handler:function(l,k){var m=[l.clientX,l.clientY];if(this===f.elem||Math.abs(f.pos[0]-m[0])>e||Math.abs(f.pos[1]-m[1])>e){f.elem=this;f.pos=m;e=250;clearTimeout(h);h=setTimeout(function(){e=10},200);clearTimeout(d);d=setTimeout(function(){e=3},1500);l=a.extend({},l,{type:"mwheelIntent"});return a.event.handle.apply(this,arguments)}}};a.fn.extend({mwheelIntent:function(k){return k?this.bind("mwheelIntent",k):this.trigger("mwheelIntent")},unmwheelIntent:function(k){return this.unbind("mwheelIntent",k)}});a(function(){b=c.body;a(c).bind("mwheelIntent.mwheelIntentDefault",a.noop)})})(jQuery);
/* Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net) * Licensed under the MIT License (LICENSE.txt). * Version: 3.0.4 * Requires: 1.2.2+*/
(function(a){var c=["DOMMouseScroll","mousewheel"];a.event.special.mousewheel={setup:function(){if(this.addEventListener){for(var d=c.length;d;){this.addEventListener(c[--d],b,false)}}else{this.onmousewheel=b}},teardown:function(){if(this.removeEventListener){for(var d=c.length;d;){this.removeEventListener(c[--d],b,false)}}else{this.onmousewheel=null}}};a.fn.extend({mousewheel:function(d){return d?this.bind("mousewheel",d):this.trigger("mousewheel")},unmousewheel:function(d){return this.unbind("mousewheel",d)}});function b(h){var j=h||window.event,d=[].slice.call(arguments,1),e=0,k=true,f=0,g=0;h=a.event.fix(j);h.type="mousewheel";if(h.wheelDelta){e=h.wheelDelta/120}if(h.detail){e=-h.detail/3}g=e;if(j.axis!==undefined&&j.axis===j.HORIZONTAL_AXIS){g=0;f=-1*e}if(j.wheelDeltaY!==undefined){g=j.wheelDeltaY/120}if(j.wheelDeltaX!==undefined){f=-1*j.wheelDeltaX/120}d.unshift(h,e,f,g);return a.event.handle.apply(this,d)}})(jQuery);(function(e,d,f){e.fn.jScrollPane=function(b){function a(bh,bC){var be,bG=this,bV,a0,bO,a2,bL,bX,bU,bF,aa,aS,ba,bp,bq,bn,br,s,bN,a6,bT,bK,c,a7,aR,a3,bm,bv,a9,bd,bS,bb,aY,bj,bw,aZ=true,bE=true,aW=false,bt=false,a5=bh.clone(false,false).empty(),aL=e.fn.mwheelIntent?"mwheelIntent.jsp":"mousewheel.jsp";aY=bh.css("paddingTop")+" "+bh.css("paddingRight")+" "+bh.css("paddingBottom")+" "+bh.css("paddingLeft");bj=(parseInt(bh.css("paddingLeft"),10)||0)+(parseInt(bh.css("paddingRight"),10)||0);function a8(p){var k,m,l,h,g,o,n=false,j=false;be=p;if(bV===f){g=bh.scrollTop();o=bh.scrollLeft();bh.css({overflow:"hidden",padding:0});a0=bh.innerWidth()+bj;bO=bh.innerHeight();bh.width(a0);bV=e('<div class="jspPane" />').css("padding",aY).append(bh.children());a2=e('<div class="jspContainer" />').css({width:a0+"px",height:bO+"px"}).append(bV).appendTo(bh)}else{bh.css("width","");n=be.stickToBottom&&bu();j=be.stickToRight&&bf();h=bh.innerWidth()+bj!=a0||bh.outerHeight()!=bO;if(h){a0=bh.innerWidth()+bj;bO=bh.innerHeight();a2.css({width:a0+"px",height:bO+"px"})}if(!h&&bw==bL&&bV.outerHeight()==bX){bh.width(a0);return}bw=bL;bV.css("width","");bh.width(a0);a2.find(">.jspVerticalBar,>.jspHorizontalBar").remove().end()}bV.css("overflow","auto");if(p.contentWidth){bL=p.contentWidth}else{bL=bV[0].scrollWidth}bX=bV[0].scrollHeight;bV.css("overflow","");bU=bL/a0;bF=bX/bO;aa=bF>1;aS=bU>1;if(!(aS||aa)){bh.removeClass("jspScrollable");bV.css({top:0,width:a2.width()-bj});bz();bi();bI();bQ();aX()}else{bh.addClass("jspScrollable");k=be.maintainPosition&&(bq||s);if(k){m=aO();l=aK()}aU();bW();bk();if(k){bA(j?(bL-a0):m,false);by(n?(bX-bO):l,false)}bs();aT();a4();if(be.enableKeyboardNavigation){bJ()}if(be.clickOnTrack){bD()}bg();if(be.hijackInternalLinks){bx()}}if(be.autoReinitialise&&!bb){bb=setInterval(function(){a8(be)},be.autoReinitialiseDelay)}else{if(!be.autoReinitialise&&bb){clearInterval(bb)}}g&&bh.scrollTop(0)&&by(g,false);o&&bh.scrollLeft(0)&&bA(o,false);bh.trigger("jsp-initialised",[aS||aa])}function aU(){if(aa){a2.append(e('<div class="jspVerticalBar" />').append(e('<div class="jspCap jspCapTop" />'),e('<div class="jspTrack" />').append(e('<div class="jspDrag" />').append(e('<div class="jspDragTop" />'),e('<div class="jspDragBottom" />'))),e('<div class="jspCap jspCapBottom" />')));bN=a2.find(">.jspVerticalBar");a6=bN.find(">.jspTrack");ba=a6.find(">.jspDrag");if(be.showArrows){a7=e('<a class="jspArrow jspArrowUp" />').bind("mousedown.jsp",aQ(0,-1)).bind("click.jsp",aM);aR=e('<a class="jspArrow jspArrowDown" />').bind("mousedown.jsp",aQ(0,1)).bind("click.jsp",aM);if(be.arrowScrollOnHover){a7.bind("mouseover.jsp",aQ(0,-1,a7));aR.bind("mouseover.jsp",aQ(0,1,aR))}a1(a6,be.verticalArrowPositions,a7,aR)}bK=bO;a2.find(">.jspVerticalBar>.jspCap:visible,>.jspVerticalBar>.jspArrow").each(function(){bK-=e(this).outerHeight()});ba.hover(function(){ba.addClass("jspHover")},function(){ba.removeClass("jspHover")}).bind("mousedown.jsp",function(g){e("html").bind("dragstart.jsp selectstart.jsp",aM);ba.addClass("jspActive");var h=g.pageY-ba.position().top;e("html").bind("mousemove.jsp",function(j){bP(j.pageY-h,false)}).bind("mouseup.jsp mouseleave.jsp",bc);return false});bB()}}function bB(){a6.height(bK+"px");bq=0;bT=be.verticalGutter+a6.outerWidth();bV.width(a0-bT-bj);try{if(bN.position().left===0){bV.css("margin-left",bT+"px")}}catch(g){}}function bW(){if(aS){a2.append(e('<div class="jspHorizontalBar" />').append(e('<div class="jspCap jspCapLeft" />'),e('<div class="jspTrack" />').append(e('<div class="jspDrag" />').append(e('<div class="jspDragLeft" />'),e('<div class="jspDragRight" />'))),e('<div class="jspCap jspCapRight" />')));a3=a2.find(">.jspHorizontalBar");bm=a3.find(">.jspTrack");bn=bm.find(">.jspDrag");if(be.showArrows){bd=e('<a class="jspArrow jspArrowLeft" />').bind("mousedown.jsp",aQ(-1,0)).bind("click.jsp",aM);bS=e('<a class="jspArrow jspArrowRight" />').bind("mousedown.jsp",aQ(1,0)).bind("click.jsp",aM);if(be.arrowScrollOnHover){bd.bind("mouseover.jsp",aQ(-1,0,bd));bS.bind("mouseover.jsp",aQ(1,0,bS))}a1(bm,be.horizontalArrowPositions,bd,bS)}bn.hover(function(){bn.addClass("jspHover")},function(){bn.removeClass("jspHover")}).bind("mousedown.jsp",function(g){e("html").bind("dragstart.jsp selectstart.jsp",aM);bn.addClass("jspActive");var h=g.pageX-bn.position().left;e("html").bind("mousemove.jsp",function(j){bR(j.pageX-h,false)}).bind("mouseup.jsp mouseleave.jsp",bc);return false});bv=a2.innerWidth();aV()}}function aV(){a2.find(">.jspHorizontalBar>.jspCap:visible,>.jspHorizontalBar>.jspArrow").each(function(){bv-=e(this).outerWidth()});bm.width(bv+"px");s=0}function bk(){if(aS&&aa){var g=bm.outerHeight(),h=a6.outerWidth();bK-=g;e(a3).find(">.jspCap:visible,>.jspArrow").each(function(){bv+=e(this).outerWidth()});bv-=h;bO-=h;a0-=g;bm.parent().append(e('<div class="jspCorner" />').css("width",g+"px"));bB();aV()}if(aS){bV.width((a2.outerWidth()-bj)+"px")}bX=bV.outerHeight();bF=bX/bO;if(aS){a9=Math.ceil(1/bU*bv);if(a9>be.horizontalDragMaxWidth){a9=be.horizontalDragMaxWidth}else{if(a9<be.horizontalDragMinWidth){a9=be.horizontalDragMinWidth}}bn.width(a9+"px");br=bv-a9;aP(s)}if(aa){c=Math.ceil(1/bF*bK);if(c>be.verticalDragMaxHeight){c=be.verticalDragMaxHeight}else{if(c<be.verticalDragMinHeight){c=be.verticalDragMinHeight}}ba.height(c+"px");bp=bK-c;aN(bq)}}function a1(h,k,g,n){var m="before",j="after",l;if(k=="os"){k=/Mac/.test(navigator.platform)?"after":"split"}if(k==m){j=k}else{if(k==j){m=k;l=g;g=n;n=l}}h[m](g)[j](n)}function aQ(g,j,h){return function(){bo(g,j,this,h);this.blur();return false}}function bo(k,j,n,m){n=e(n).addClass("jspActive");var l,h,g=true,o=function(){if(k!==0){bG.scrollByX(k*be.arrowButtonSpeed)}if(j!==0){bG.scrollByY(j*be.arrowButtonSpeed)}h=setTimeout(o,g?be.initialDelay:be.arrowRepeatFreq);g=false};o();l=m?"mouseout.jsp":"mouseup.jsp";m=m||e("html");m.bind(l,function(){n.removeClass("jspActive");h&&clearTimeout(h);h=null;m.unbind(l)})}function bD(){bQ();if(aa){a6.bind("mousedown.jsp",function(m){if(m.originalTarget===f||m.originalTarget==m.currentTarget){var k=e(this),n=k.offset(),l=m.pageY-n.top-bq,h,g=true,o=function(){var r=k.offset(),t=m.pageY-r.top-c/2,p=bO*be.scrollPagePercent,q=bp*p/(bX-bO);if(l<0){if(bq-q>t){bG.scrollByY(-p)}else{bP(t)}}else{if(l>0){if(bq+q<t){bG.scrollByY(p)}else{bP(t)}}else{j();return}}h=setTimeout(o,g?be.initialDelay:be.trackClickRepeatFreq);g=false},j=function(){h&&clearTimeout(h);h=null;e(document).unbind("mouseup.jsp",j)};o();e(document).bind("mouseup.jsp",j);return false}})}if(aS){bm.bind("mousedown.jsp",function(m){if(m.originalTarget===f||m.originalTarget==m.currentTarget){var k=e(this),n=k.offset(),l=m.pageX-n.left-s,h,g=true,o=function(){var r=k.offset(),t=m.pageX-r.left-a9/2,p=a0*be.scrollPagePercent,q=br*p/(bL-a0);if(l<0){if(s-q>t){bG.scrollByX(-p)}else{bR(t)}}else{if(l>0){if(s+q<t){bG.scrollByX(p)}else{bR(t)}}else{j();return}}h=setTimeout(o,g?be.initialDelay:be.trackClickRepeatFreq);g=false},j=function(){h&&clearTimeout(h);h=null;e(document).unbind("mouseup.jsp",j)};o();e(document).bind("mouseup.jsp",j);return false}})}}function bQ(){if(bm){bm.unbind("mousedown.jsp")}if(a6){a6.unbind("mousedown.jsp")}}function bc(){e("html").unbind("dragstart.jsp selectstart.jsp mousemove.jsp mouseup.jsp mouseleave.jsp");if(ba){ba.removeClass("jspActive")}if(bn){bn.removeClass("jspActive")}}function bP(h,g){if(!aa){return}if(h<0){h=0}else{if(h>bp){h=bp}}if(g===f){g=be.animateScroll}if(g){bG.animate(ba,"top",h,aN)}else{ba.css("top",h);aN(h)}}function aN(g){if(g===f){g=ba.position().top}a2.scrollTop(0);bq=g;var k=bq===0,h=bq==bp,j=g/bp,l=-j*(bX-bO);if(aZ!=k||aW!=h){aZ=k;aW=h;bh.trigger("jsp-arrow-change",[aZ,aW,bE,bt])}bM(k,h);bV.css("top",l);bh.trigger("jsp-scroll-y",[-l,k,h]).trigger("scroll")}function bR(g,h){if(!aS){return}if(g<0){g=0}else{if(g>br){g=br}}if(h===f){h=be.animateScroll}if(h){bG.animate(bn,"left",g,aP)}else{bn.css("left",g);aP(g)}}function aP(g){if(g===f){g=bn.position().left}a2.scrollTop(0);s=g;var k=s===0,j=s==br,h=g/br,l=-h*(bL-a0);if(bE!=k||bt!=j){bE=k;bt=j;bh.trigger("jsp-arrow-change",[aZ,aW,bE,bt])}bH(k,j);bV.css("left",l);bh.trigger("jsp-scroll-x",[-l,k,j]).trigger("scroll")}function bM(g,h){if(be.showArrows){a7[g?"addClass":"removeClass"]("jspDisabled");aR[h?"addClass":"removeClass"]("jspDisabled")}}function bH(g,h){if(be.showArrows){bd[g?"addClass":"removeClass"]("jspDisabled");bS[h?"addClass":"removeClass"]("jspDisabled")}}function by(j,g){var h=j/(bX-bO);bP(h*bp,g)}function bA(g,j){var h=g/(bL-a0);bR(h*br,j)}function aJ(v,p,h){var m,j,k,w=0,u=0,g,o,n,r,q,t;try{m=e(v)}catch(l){return}j=m.outerHeight();k=m.outerWidth();a2.scrollTop(0);a2.scrollLeft(0);while(!m.is(".jspPane")){w+=m.position().top;u+=m.position().left;m=m.offsetParent();if(/^body|html$/i.test(m[0].nodeName)){return}}g=aK();n=g+bO;if(w<g||p){q=w-be.verticalGutter}else{if(w+j>n){q=w-bO+j+be.verticalGutter}}if(q){by(q,h)}o=aO();r=o+a0;if(u<o||p){t=u-be.horizontalGutter}else{if(u+k>r){t=u-a0+k+be.horizontalGutter}}if(t){bA(t,h)}}function aO(){return -bV.position().left}function aK(){return -bV.position().top}function bu(){var g=bX-bO;return(g>20)&&(g-aK()<10)}function bf(){var g=bL-a0;return(g>20)&&(g-aO()<10)}function aT(){a2.unbind(aL).bind(aL,function(k,l,j,g){var h=s,m=bq;bG.scrollBy(j*be.mouseWheelSpeed,-g*be.mouseWheelSpeed,false);return h==s&&m==bq})}function bz(){a2.unbind(aL)}function aM(){return false}function bs(){bV.find(":input,a").unbind("focus.jsp").bind("focus.jsp",function(g){aJ(g.target,false)})}function bi(){bV.find(":input,a").unbind("focus.jsp")}function bJ(){var k,g,j=[];aS&&j.push(a3[0]);aa&&j.push(bN[0]);bV.focus(function(){bh.focus()});bh.attr("tabindex",0).unbind("keydown.jsp keypress.jsp").bind("keydown.jsp",function(n){if(n.target!==this&&!(j.length&&e(n.target).closest(j).length)){return}var m=s,l=bq;switch(n.keyCode){case 40:case 38:case 34:case 32:case 33:case 39:case 37:k=n.keyCode;h();break;case 35:by(bX-bO);k=null;break;case 36:by(0);k=null;break}g=n.keyCode==k&&m!=s||l!=bq;return !g}).bind("keypress.jsp",function(l){if(l.keyCode==k){h()}return !g});if(be.hideFocus){bh.css("outline","none");if("hideFocus" in a2[0]){bh.attr("hideFocus",true)}}else{bh.css("outline","");if("hideFocus" in a2[0]){bh.attr("hideFocus",false)}}function h(){var m=s,l=bq;switch(k){case 40:bG.scrollByY(be.keyboardSpeed,false);break;case 38:bG.scrollByY(-be.keyboardSpeed,false);break;case 34:case 32:bG.scrollByY(bO*be.scrollPagePercent,false);break;case 33:bG.scrollByY(-bO*be.scrollPagePercent,false);break;case 39:bG.scrollByX(be.keyboardSpeed,false);break;case 37:bG.scrollByX(-be.keyboardSpeed,false);break}g=m!=s||l!=bq;return g}}function bI(){bh.attr("tabindex","-1").removeAttr("tabindex").unbind("keydown.jsp keypress.jsp")}function bg(){if(location.hash&&location.hash.length>1){var j,g,h=escape(location.hash);try{j=e(h)}catch(k){return}if(j.length&&bV.find(h)){if(a2.scrollTop()===0){g=setInterval(function(){if(a2.scrollTop()>0){aJ(h,true);e(document).scrollTop(a2.position().top);clearInterval(g)}},50)}else{aJ(h,true);e(document).scrollTop(a2.position().top)}}}}function aX(){e("a.jspHijack").unbind("click.jsp-hijack").removeClass("jspHijack")}function bx(){aX();e("a[href^=#]").addClass("jspHijack").bind("click.jsp-hijack",function(){var h=this.href.split("#"),g;if(h.length>1){g=h[1];if(g.length>0&&bV.find("#"+g).length>0){aJ("#"+g,true);return false}}})}function a4(){var h,g,k,j,l,m=false;a2.unbind("touchstart.jsp touchmove.jsp touchend.jsp click.jsp-touchclick").bind("touchstart.jsp",function(n){var o=n.originalEvent.touches[0];h=aO();g=aK();k=o.pageX;j=o.pageY;l=false;m=true}).bind("touchmove.jsp",function(q){if(!m){return}var p=q.originalEvent.touches[0],o=s,n=bq;bG.scrollTo(h+k-p.pageX,g+j-p.pageY);l=l||Math.abs(k-p.pageX)>5||Math.abs(j-p.pageY)>5;return o==s&&n==bq}).bind("touchend.jsp",function(n){m=false}).bind("click.jsp-touchclick",function(n){if(l){l=false;return false}})}function bl(){var h=aK(),g=aO();bh.removeClass("jspScrollable").unbind(".jsp");bh.replaceWith(a5.append(bV.children()));a5.scrollTop(h);a5.scrollLeft(g)}e.extend(bG,{reinitialise:function(g){g=e.extend({},be,g);a8(g)},scrollToElement:function(h,g,j){aJ(h,g,j)},scrollTo:function(h,j,g){bA(h,g);by(j,g)},scrollToX:function(g,h){bA(g,h)},scrollToY:function(h,g){by(h,g)},scrollToPercentX:function(g,h){bA(g*(bL-a0),h)},scrollToPercentY:function(g,h){by(g*(bX-bO),h)},scrollBy:function(g,j,h){bG.scrollByX(g,h);bG.scrollByY(j,h)},scrollByX:function(k,h){var g=aO()+Math[k<0?"floor":"ceil"](k),j=g/(bL-a0);bR(j*br,h)},scrollByY:function(k,h){var g=aK()+Math[k<0?"floor":"ceil"](k),j=g/(bX-bO);bP(j*bp,h)},positionDragX:function(h,g){bR(h,g)},positionDragY:function(g,h){bP(g,h)},animate:function(g,k,l,j){var h={};h[k]=l;g.animate(h,{duration:be.animateDuration,easing:be.animateEase,queue:false,step:j})},getContentPositionX:function(){return aO()},getContentPositionY:function(){return aK()},getContentWidth:function(){return bL},getContentHeight:function(){return bX},getPercentScrolledX:function(){return aO()/(bL-a0)},getPercentScrolledY:function(){return aK()/(bX-bO)},getIsScrollableH:function(){return aS},getIsScrollableV:function(){return aa},getContentPane:function(){return bV},scrollToBottom:function(g){bP(bp,g)},hijackInternalLinks:function(){bx()},destroy:function(){bl()}});a8(bC)}b=e.extend({},e.fn.jScrollPane.defaults,b);e.each(["mouseWheelSpeed","arrowButtonSpeed","trackClickSpeed","keyboardSpeed"],function(){b[this]=b[this]||b.speed});return this.each(function(){var c=e(this),h=c.data("jsp");if(h){h.reinitialise(b)}else{h=new a(c,b);c.data("jsp",h)}})};e.fn.jScrollPane.defaults={showArrows:false,maintainPosition:true,stickToBottom:false,stickToRight:false,clickOnTrack:true,autoReinitialise:false,autoReinitialiseDelay:500,verticalDragMinHeight:0,verticalDragMaxHeight:99999,horizontalDragMinWidth:0,horizontalDragMaxWidth:99999,contentWidth:f,animateScroll:false,animateDuration:300,animateEase:"linear",hijackInternalLinks:false,verticalGutter:4,horizontalGutter:4,mouseWheelSpeed:0,arrowButtonSpeed:0,arrowRepeatFreq:50,arrowScrollOnHover:false,trackClickSpeed:0,trackClickRepeatFreq:70,verticalArrowPositions:"split",horizontalArrowPositions:"split",enableKeyboardNavigation:true,hideFocus:false,keyboardSpeed:0,initialDelay:300,speed:30,scrollPagePercent:0.8}})(jQuery,this);
