var vwo_$=vwo_$||jQuery||$,_vis_opt_server_url=("https:"==document.location.protocol?"https://":"http://")+"dev.visualwebsiteoptimizer.com/",_vis_opt_experiment_ready=false,_vis_opt_combination_chosen="",_vis_opt_swap_timeout;if(typeof _vwo_exp_ids=="undefined"){var _vwo_exp_ids=[],_vwo_exp={};}var _vwo_clicks=0,_vwo_api_section_callback={};
typeof _vis_opt_domain=="undefined"&&(_vis_opt_domain=_vis_opt_tld(document.URL));function _vis_opt_pause(d){for(var c=new Date,d=c.getTime()+d;c.getTime()<d;){c=new Date;}}function _vis_opt_to_abs_url(f){var e=location,g,h;if(/^\w+:/.test(f)){return f;}g=e.protocol+"//"+e.host;if(f.indexOf("/")==0){return g+f;
}e=e.pathname.replace(/\/[^\/]*$/,"");if(h=f.match(/\.\.\//g)){f=f.substring(h.length*3);for(h=h.length;h--;){e=e.substring(0,e.lastIndexOf("/"));}}return g+e+"/"+f;}function _vis_opt_regex_escape(b){if(!arguments.callee.sRE){arguments.callee.sRE=RegExp("(\\/|\\.|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\)","g");
}return b.replace(arguments.callee.sRE,"\\$1");}function _vis_opt_object_size(e){var c=0,f;for(f in e){e.hasOwnProperty(f)&&c++;}return c;}function _vis_opt_remove_www(d,c){typeof c=="undefined"&&(c=false);d=d.toLowerCase();(matches=d.match(/(http.?):\/\/(www\.)?(.*)/))&&matches.length==4&&(d=matches[1]+"://"+matches[3]);
c&&(d=d.replace(/(^\*?|\/\/)www\./i,"$1"));return d;}function _vis_opt_clean_url(d,c){typeof c=="undefined"&&(c=false);return typeof _vis_opt_url!="undefined"&&!c?_vis_opt_url:d=d.replace(/^(.*[^\*])(\/(home|default|index)\..{3,4})(\?.*)*$/i,"$1$4");}function _vis_opt_current_url(){if(typeof _vis_opt_url!="undefined"){return _vis_opt_url;
}var d=window.location.href,c=d.indexOf(window.location.hash)||d.length,d=d.substr(0,c),d=d.replace(/^(.*)(\?_vis_test_id=\d+.*)$/,"$1"),d=d.replace(/^(.*)(&_vis_test_id=\d+.*)$/,"$1");d.slice(-1)=="/"&&(d=d.slice(0,-1));return d;}function _vis_opt_match_wildcard(f,e,g){typeof g=="undefined"&&(g=false);
e.indexOf("?")==-1&&e.indexOf("=")==-1&&(f=f.replace(/^(.*)(\?.*)$/,"$1"));f.charAt(f.length-1)=="/"&&(f=f.substring(0,f.length-1));e.charAt(e.length-1)=="/"&&(e=e.substring(0,e.length-1),e=e.replace(/\/\?/,"?"));var h="^"+_vis_opt_regex_escape(e).replace(/\*/g,"(.*)")+"$";if(RegExp(h,"gi").test(f)){return g?RegExp(h,"gi").exec(f):true;
}else{if(f=_vis_opt_remove_www(f),e=_vis_opt_remove_www(e,1),h="^"+_vis_opt_regex_escape(e).replace(/\*/g,"(.*)")+"$",RegExp(h,"gi").test(f)){return g?RegExp(h,"gi").exec(f):true;}else{if(e.search(/\*/)==-1&&(h=_vis_opt_remove_www(_vis_opt_to_abs_url(f)),h==e||h==_vis_opt_clean_url(e,1))){return true;
}f=_vis_opt_clean_url(f);e=_vis_opt_clean_url(e,1);h="^"+_vis_opt_regex_escape(e).replace(/\*/g,"(.*)")+"$";return RegExp(h,"gi").test(f)?g?RegExp(h,"gi").exec(f):true:false;}}}function _vis_opt_createCookie(g,f,j,l){typeof _vis_opt_cookieDays!="undefined"&&!isNaN(parseFloat(_vis_opt_cookieDays))&&isFinite(_vis_opt_cookieDays)&&(j=_vis_opt_cookieDays);
if(j){var h=new Date;h.setTime(h.getTime()+j*86400000);h="; expires="+h.toGMTString()+";";}else{h=";";}domain=typeof _vis_opt_domain!="undefined"?" domain=."+_vis_opt_domain+";":";";document.cookie=g+"="+encodeURIComponent(f)+h+" "+domain+" path=/";typeof l!="undefined"&&_vwo_exp[l].multiple_domains&&_vis_opt_third_party(g,f,j);
}function _vis_opt_third_party(e,c,f){typeof _vwo_acc_id!="undefined"&&(url=_vis_opt_server_url+"ping_tpc.php?account="+_vwo_acc_id+"&name="+escape(e)+"&value="+escape(c)+"&days="+f+"&random="+Math.random(),/MSIE (\d+\.\d+);/.test(navigator.userAgent)?vwo_$("#vwo_iframe").attr("src",url):vwo_$("#vwo_form").attr("action",url).submit());
}function _vis_opt_readCookie(f){f+="=";for(var e=document.cookie.split(";"),g=0;g<e.length;g++){for(var h=e[g];h.charAt(0)==" ";){h=h.substring(1,h.length);}if(h.indexOf(f)==0){return decodeURIComponent(h.substring(f.length,h.length));}}return null;}function _vis_opt_cookie_enabled(){_vis_opt_createCookie("_vis_opt_test_cookie","1");
return _vis_opt_readCookie("_vis_opt_test_cookie")?true:false;}function _vis_opt_remove_id(b){(b=document.getElementById(b))&&b!=null&&b.parentNode.removeChild(b);}var _vwo_s=function(){var B=new Date,A=navigator,w=document,z=A.userAgent,t=A.vendor,q=w.createElement("a"),s=z.toLowerCase(),p=A.appVersion,o=[{s:z,sS:"Chrome",i:"Chrome"},{s:A.vendor,sS:"Apple",i:"Safari"},{p:window.opera,i:"Opera"},{s:A.vendor,sS:"KDE",i:"Konqueror"},{s:z,sS:"Firefox",i:"Firefox"},{s:z,sS:"Netscape",i:"Netscape"},{s:z,sS:"MSIE",i:"Explorer"}],n=[{s:"search.yahoo.com/",p:"p",i:1},{s:"http://www.google.",p:"q",i:2},{s:"http://www.bing.com/",p:"q",i:3},{s:".ask.com/",p:"q",i:4},{s:"http://altavista.com/",p:"q",i:5},{s:"http://www.search.com/",p:"q",i:6},{s:"http://www.baidu.com/",p:"wd",i:7},{s:"http://search.aol.com/",p:"q",i:8}],r=function(b){return typeof b!="undefined";
};return{ce:function(){return A.cookieEnabled;},U:function(){return w.URL;},R:function(){return w.referrer;},ks:function(){return this.R()!=""?q.search:"";},ors:function(){for(r=0;r<n.length;r++){if(this.R().indexOf(n[r].s)!=-1){return n[r].i;}}return 0;},rt:function(){return this.ors()?"org":this.R()?"ref":"dir";
},k:function(){if(this.ors()){var b=RegExp("[\\?&]"+n[this.ors()].p+"=([^&#]*)").exec(this.R());if(b!=null){return b[1].split("+").join(" ");}}return"";},gC:function(b){if(w.cookie.length>0&&(cs=w.cookie.indexOf(b+"="),cs!=-1)){cs=cs+b.length+1;ce=w.cookie.indexOf(";",cs);if(ce==-1){ce=w.cookie.length;
}return unescape(w.cookie.substring(cs,ce));}return"";},T:function(){return(t=this.gC("_vis_opt_s"))?(ses=parseInt(t.split("|")[0]),ses>1?"ret":"new"):"new";},qP:function(b){b=b.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");regex=RegExp("[\\?&]"+b+"=([^&#]*)");return(results=regex.exec(this.U()))?results[1]:"";
},f_in:function(d,c){return r(d)&&r(c)&&d.toLowerCase()==c.toLowerCase();},f_nin:function(d,c){return !this.f_in(d,c);},f_cs:function(d,c){return d==c;},f_ncs:function(d,c){return !this.f_cs(d,c);},f_re_i:function(d,c){if(!r(d)||!r(c)){return false;}re=RegExp(c,"i");return d.match(re)?true:false;},f_re_s:function(d,c){if(!r(d)||!r(c)){return false;
}re=RegExp(c);return d.match(re)?true:false;},f_con:function(d,c){return !r(d)||!r(c)?false:d.toLowerCase().indexOf(c.toLowerCase())>-1?true:false;},f_d_con:function(d,c){return !this.f_con(d,c);},f_b:function(b){return b?false:true;},f_n_b:function(d,c){return !this.f_b(d,c);},f_e:function(d,c){if(typeof c=="object"){for(i=0;
i<c.length;i++){if(this.f_in(d,c[i])){return true;}}return false;}else{return this.f_in(d,c);}},wk:function(){return s.search("webkit")>-1?true:false;},de:function(){return s.search("ipod")>-1?"ipod":s.search("ipad")>-1&&this.wk()?"ipad":s.search("iphone")>-1?"iphone":s.search("android")>-1?"android":s.search("googletv")>-1?"googletv":s.search("symbian")>-1||s.search("series60")>-1||s.search("series70")>-1||s.search("series80")>-1||s.search("series90")>-1?"symbian":s.search("blackberry")>-1||s.search("vnd.rim")>-1?"blackberry":"";
},os:function(){if(p.indexOf("Win")!=-1){return"windows";}if(p.indexOf("Mac")!=-1){return"macOS";}if(p.indexOf("X11")!=-1){return"unix";}if(p.indexOf("Linux")!=-1){return"linux";}},b:function(){return this.sS(o)||"";},sS:function(f){for(var e=0;e<f.length;e++){var h=f[e].s,g=f[e].p;if(h){if(h.indexOf(f[e].sS)!=-1){return f[e].i;
}}else{if(g){return f[e].i;}}}},jv:function(b){return window[b];},ua:function(){return z;},DoW:function(){return B.getDay().toString();},Hr:function(){return B.getHours();},Co:function(){return typeof _vwo_geo!="undefined"&&typeof _vwo_geo.country!="undefined"?_vwo_geo.country:"";},Re:function(){return typeof _vwo_geo!="undefined"&&typeof _vwo_geo.region!="undefined"?_vwo_geo.region:"";
},Ci:function(){return typeof _vwo_geo!="undefined"&&typeof _vwo_geo.city!="undefined"?_vwo_geo.city:"";}};};_vwo_s().gC("_vis_opt_test_cookie")||((v=_vwo_s().gC("_vis_opt_s"))?(ses=parseInt(v.split("|")[0]),_vis_opt_createCookie("_vis_opt_s",ses+1+"|",100)):_vis_opt_createCookie("_vis_opt_s","1|",100));
_vis_opt_createCookie("_vis_opt_test_cookie",1);function _vis_opt_is_split(a){var b=_vis_opt_preview_combination(a);if(_vwo_exp[a].type=="SPLIT_URL"&&(_vwo_exp[a].status=="RUNNING"||b)){var d=_vis_opt_readCookie("_vis_opt_exp_"+a+"_split"),c=0;if(d&&_vis_opt_match_wildcard(_vis_opt_current_url(),_vwo_exp[a].sections[1].variations[d])){combination=_vis_opt_readCookie("_vis_opt_exp_"+a+"_combi");
if(!combination&&!b){if(typeof(_vwo_exp[a].sections["1"].segment!="undefined")&&typeof(_vwo_exp[a].sections["1"].segment[d]!="undefined")&&!eval(_vwo_exp[a].sections["1"].segment[d])){return;}c=1;_vis_opt_register_hit(d,a);_vis_opt_createCookie("_vis_opt_exp_"+a+"_combi",d,100,a);}else{return true;}return c==0?false:true;
}}return false;}function _vis_opt_eligible(a){if(_vis_opt_preview_combination(a)){return true;}if(_vis_opt_readCookie("_vis_opt_exp_"+a+"_combi")){return true;}typeof _vwo_exp[a].segment_eligble=="undefined"&&eval("_vwo_exp['"+a+"'].segment_eligble = "+_vwo_exp[a].segment_code);return _vwo_exp[a].segment_eligble;
}function _vis_opt_tld(b){url_pieces=b.split("/");domain=url_pieces[2];domain_pieces=domain.split(".");return top_level_domain=domain_pieces[domain_pieces.length-2]&&(domain_pieces[domain_pieces.length-2]=="co"||domain_pieces[domain_pieces.length-2]=="org"||domain_pieces[domain_pieces.length-2]=="com")?domain_pieces[domain_pieces.length-3]+"."+domain_pieces[domain_pieces.length-2]+"."+domain_pieces[domain_pieces.length-1]:domain_pieces[domain_pieces.length-2]+"."+domain_pieces[domain_pieces.length-1];
}function isBot(){return typeof navigator.userAgent!="undefined"&&navigator.userAgent.toLowerCase().indexOf("bot")>-1?true:false;}function _vis_opt_top_initialize(){var f,e;if(_vis_opt_cookie_enabled()&&!isBot()){for(var g=0;g<_vwo_exp_ids.length;g++){e=_vwo_exp_ids[g];_vwo_exp[e].multiple_domains&&vwo_$("#vwo_iframe").length==0&&(vwo_$("<form>",{action:_vis_opt_server_url+"ping_tpc.php",target:"vwo_iframe",enctype:"application/x-www-form-urlencoded",method:"post",id:"vwo_form",style:"display:none"}).appendTo("head"),vwo_$("<iframe>",{src:_vis_opt_server_url+"ping_tpc.php",height:"1px",width:"1px",border:"0",id:"vwo_iframe",name:"vwo_iframe",style:"position: absolute; left: -2000px; display: none"}).appendTo("head"));
typeof _vwo_exp[e].third_party_exclude!="undefined"&&_vis_opt_createCookie("_vis_opt_exp_"+e+"_exclude","1",100);typeof _vwo_exp[e].third_party_combi!="undefined"&&_vis_opt_createCookie("_vis_opt_exp_"+e+"_combi",_vwo_exp[e].third_party_combi,100);if(typeof _vwo_exp[e].third_party_goals!="undefined"){for(f=0;
f<_vwo_exp[e].third_party_goals.length;f++){_vis_opt_createCookie("_vis_opt_exp_"+e+"_goal_"+_vwo_exp[e].third_party_goals[f],"1",100);}}if(typeof _vwo_exp[e].third_party!=="undefined"){for(f=1;f<=_vis_opt_object_size(_vwo_exp[e].third_party);f++){_vis_opt_createCookie(_vwo_exp[e].third_party[f].name,_vwo_exp[e].third_party[f].value,100);
}}to_include=_vis_opt_readCookie("_vis_opt_exp_"+e+"_combi");_vwo_exp[e].ready=false;if(!_vis_opt_readCookie("_vis_opt_exp_"+e+"_exclude")||_vis_opt_preview_combination(e)){for(_vwo_goal_id in _vwo_exp[e].goals){isNaN(parseInt(_vwo_goal_id))||_vwo_exp[e].goals[_vwo_goal_id].type=="SEPARATE_PAGE"&&_vis_opt_match_wildcard(_vis_opt_current_url(),_vwo_exp[e].goals[_vwo_goal_id].url)&&_vis_opt_register_conversion(_vwo_goal_id,e);
}if(_vis_opt_is_split(e)){_vwo_exp[e].ready=true;}else{if(Math.random()>_vwo_exp[e].pc_traffic/100&&_vis_opt_preview_combination(e)==false&&!to_include){_vis_opt_createCookie("_vis_opt_exp_"+e+"_exclude","1",100,e);}else{if(_vis_opt_eligible(e)||to_include){if(_vwo_exp[e].type=="SPLIT_URL"&&_vis_opt_do_experiment_here(e)&&(_vwo_exp[e].status=="RUNNING"||_vis_opt_preview_combination(e))){_vwo_exp[e].ready=true,_vis_opt_split_url(e);
}else{if(_vwo_exp[e].type!="SPLIT_URL"&&_vis_opt_do_experiment_here(e)&&(_vwo_exp[e].status=="RUNNING"||_vis_opt_preview_combination(e))){_vis_opt_combination_chosen=_vis_opt_preview_combination(e);_vwo_exp[e].combination_chosen=_vis_opt_combination_chosen;if(!_vwo_exp[e].combination_chosen){_vwo_exp[e].combination_chosen=_vis_opt_readCookie("_vis_opt_exp_"+e+"_combi");
}if(!_vwo_exp[e].combination_chosen){_vwo_exp[e].combination_chosen=_vis_opt_choose_combination(e);}if(!_vwo_exp[e].combination_chosen){continue;}vwo_$("#vwo_temp").length==0&&vwo_$("head").append("<span style='display:none' id='vwo_temp'></span>");if(_vwo_exp[e].type=="VISUAL_AB"&&_vwo_exp[e].combination_chosen!="1"){f=vwo_$.parseJSON(_vwo_exp[e].sections["1"].variations[_vwo_exp[e].combination_chosen]);
for(var h=0;h<f.length;h++){document.write("<style class='_vis_opt_hidden'>"+f[h].xpath+" { visibility: hidden } </style>");}}else{for(h=1;h<=_vis_opt_object_size(_vwo_exp[e].sections);h++){document.write("<style class='_vis_opt_hidden'>"+_vwo_exp[e].sections[h].path+" { visibility: hidden } </style>");
}}_vis_opt_element_loaded(e);}if(_vis_opt_do_experiment_here(e)&&(_vwo_exp[e].status=="RUNNING"||_vis_opt_preview_combination(e))){_vwo_exp[e].ready=true;}}}}}}}_vis_opt_legacy_variables_set();}}function _vis_opt_element_loaded(b){_vis_opt_bottom_render_combination(_vwo_exp[b].combination_chosen,b);_vwo_exp[b].timeout=setTimeout("_vis_opt_element_loaded("+b+")",50);
}function _vis_opt_do_experiment_here(d){var c=typeof _vis_opt_url=="undefined"?document.URL:_vis_opt_url;if(typeof _vis_opt_settings_loaded=="undefined"){return false;}return _vwo_exp[d].exclude_url&&(pattern_to_match=RegExp(_vwo_exp[d].exclude_url,"gi"),pattern_to_match.test(c))?false:_vis_opt_match_wildcard(_vis_opt_current_url(),_vwo_exp[d].url_pattern);
}function _vis_opt_register_conversion(f,e,g){g=typeof g=="undefined"?"":"&r="+g;typeof f=="undefined"&&(f=1);typeof e=="undefined"&&(e=_vwo_exp_ids[0]);if(!_vis_opt_readCookie("_vis_opt_exp_"+e+"_goal_"+f)&&_vis_opt_readCookie("_vis_opt_exp_"+e+"_combi")){var h=_vis_opt_readCookie("_vis_opt_exp_"+e+"_combi");
vwo_$.getJSON(_vis_opt_server_url+"log_conversion.php?experiment_id="+e+"&account_id="+_vwo_acc_id+"&goal_id="+f+"&combination="+h+g+"&jsoncallback=?",function(){});_vis_opt_createCookie("_vis_opt_exp_"+e+"_goal_"+f,"1",100,e);}}function _vis_opt_goal_conversion(d){if(!isNaN(parseInt(d))){for(var c=0;
c<_vwo_exp_ids.length;c++){id=_vwo_exp_ids[c],typeof _vwo_exp[id].goals[d]=="object"&&_vis_opt_register_conversion(d,id);}}}function _vis_opt_preview_combination(){var b=window.location.href;return b.match(/.*_vis_opt_preview_combination=(.*)$/)?b.replace(/.*_vis_opt_preview_combination=(.*)$/,"$1"):false;
}function _vis_opt_choose_combination(a){if(typeof _vwo_exp[a].combination_chosen!="undefined"&&_vwo_exp[a].combination_chosen){return _vwo_exp[a].combination_chosen;}var b={},d=0,c;for(c in _vwo_exp[a].combs){if(!isNaN(parseFloat(_vwo_exp[a].combs[c]))&&(!(_vwo_exp[a].type=="VISUAL_AB"||_vwo_exp[a].type=="SPLIT_URL")||!(typeof _vwo_exp[a].sections["1"].segment!=="undefined"&&typeof(_vwo_exp[a].sections["1"].segment[c]!="undefined"))||eval(_vwo_exp[a].sections["1"].segment[c]))){b[c]=d+_vwo_exp[a].combs[c],d+=_vwo_exp[a].combs[c];
}}var e=Math.random();d>0&&d!=1&&(e*=d);for(c in b){if(!isNaN(parseFloat(_vwo_exp[a].combs[c]))&&e<=b[c]){return c;}}return false;}function _vis_opt_redirect_to(f,e){var g=_vis_opt_match_wildcard(_vis_opt_current_url(),_vwo_exp[f].url_pattern,true);if(!g||g.length==1){to_redirect=e;}else{to_redirect="";
var h=e.split("*");for(i=1;i<h.length;i++){to_redirect+=h[i-1]+g[i];}to_redirect+=h[h.length-1];}to_redirect=to_redirect.replace(/\*/g,"");if(document.URL.indexOf("?")!=-1){if(to_redirect.indexOf("?")==-1){params=document.URL.replace(/^(.*)(\?.*)$/,"$2"),to_redirect+=params;}else{for(k in from_url_vars=_vis_opt_getUrlVars(document.URL),to_url_vars=_vis_opt_getUrlVars(to_redirect),from_url_vars){typeof to_url_vars[k]=="undefined"&&(to_redirect+="&"+k+"="+from_url_vars[k]);
}}}document.URL.indexOf("#")!=-1&&to_redirect.indexOf("#")==-1&&(params=document.URL.replace(/^(.*)(#.*)$/,"$2"),to_redirect+=params);window.location.replace(to_redirect);}function _vis_opt_getUrlVars(f){var e={};f.indexOf("#")!=-1&&(f=f.slice(0,f.indexOf("#")));for(var g=f.slice(f.indexOf("?")+1).split("&"),h=0;
h<g.length;h++){f=g[h].split("="),e[f[0]]=f[1];}return e;}function _vis_opt_split_url(e){var c=_vis_opt_preview_combination(e);c||(c=_vis_opt_readCookie("_vis_opt_exp_"+e+"_combi"));if(c){if(!(c.split(",").length>1||isNaN(parseInt(c.split(",")[0])))){var f=parseInt(c.split(",")[0]);f!=1&&(document.write("<style class='_vis_opt_hidden'> body { visibility: hidden } </style>"),_vis_opt_createCookie("_vis_opt_exp_"+e+"_split",c,100,e),_vis_opt_redirect_to(e,_vwo_exp[e].sections[1].variations[f]));
}}else{if(c=_vis_opt_choose_combination(e)){f=parseInt(c.split(",")[0]),_vwo_exp[e].multiple_domains&&f!=1?(_vis_opt_createCookie("_vis_opt_exp_"+e+"_split",c,100,e),vwo_$("#vwo_iframe").bind("load",function(){_vis_opt_redirect_to(e,_vwo_exp[e].sections[1].variations[f]);})):f!=1?(_vis_opt_createCookie("_vis_opt_exp_"+e+"_split",c,100,e),_vis_opt_redirect_to(e,_vwo_exp[e].sections[1].variations[f])):_vis_opt_preview_combination(e)||(_vis_opt_register_hit(c,e),_vis_opt_createCookie("_vis_opt_exp_"+e+"_combi",c,100,e));
}}}function _vis_opt_get_XPath(g,f){f=f||[];if(f.length==0&&g.id){return f.push("#"+g.id),f;}g.parentNode&&(f=_vis_opt_get_XPath(g.parentNode,f));if(g.previousSibling){var j=1,l=g.previousSibling;do{vwo_$(l).is("._vwo_variation")||l.nodeType==1&&j++,l=l.previousSibling;}while(l);j==1&&(j=null);}else{if(g.nextSibling){l=g.nextSibling;
do{vwo_$(l).is("._vwo_variation")?l=l.previousSibling:l.nodeType==1?(j=1,l=null):(j=null,l=l.previousSibling);}while(l);}}if(g.nodeType==1){typeof j=="undefined"&&(j=1);j<1&&(j=1);l="";l=[];if(g.nodeName.toLowerCase()=="html"||g.nodeName.toLowerCase()=="body"){l=g.nodeName.toLowerCase();}else{if(g.id){l=g.nodeName.toLowerCase()+"#"+g.id;
}else{l.push("*:first-child");for(var h=2;h<=j;h++){h==j?l.push(g.nodeName.toLowerCase()):l.push("*");}l=l.join("+");}}f.push(l);}return f;}function _vis_opt_monitor_clicks(){vwo_$("*").live("click",function(g){for(var f,j=false,l,h=0;h<_vwo_exp_ids.length;h++){if(l=_vwo_exp_ids[h],_vwo_exp[l].status=="RUNNING"){if(_vwo_exp[l].clickmap){_vwo_clicks++;
if(this.tagName.toLowerCase()=="a"||vwo_$(this).parents("a").length>0){j=true;}combination=_vis_opt_readCookie("_vis_opt_exp_"+l+"_combi");x=g.pageX-vwo_$(this).offset().left;y=g.pageY-vwo_$(this).offset().top;x_percent=Math.round(1000*x/vwo_$(this).width())/1000;y_percent=Math.round(1000*y/vwo_$(this).height())/1000;
if(x_percent<0||x_percent>1){x_percent=0.5;}if(y_percent<0||y_percent>1){y_percent=0.5;}combination&&_vwo_clicks<=3&&vwo_$.getJSON(_vis_opt_server_url+"log_clickmap.php?experiment_id="+l+"&account_id="+_vwo_acc_id+"&combination="+combination+"&url="+encodeURIComponent(document.URL)+"&path="+encodeURIComponent(_vis_opt_get_XPath(this).join(">"))+"&x="+x_percent+"&y="+y_percent+"&jsoncallback=?",function(){});
}if(this.tagName.toLowerCase()!="a"){if(vwo_$(this).parents("a").length>0){_vwo_goal_url=vwo_$(vwo_$(this).parents("a")[0]).attr("href");}else{continue;}}else{_vwo_goal_url=vwo_$(this).attr("href");}typeof _vwo_goal_url=="undefined"&&(_vwo_goal_url="");for(f in _vwo_exp[l].goals){if(!isNaN(parseInt(f))&&(_vwo_exp[l].goals[f].type=="ON_PAGE"||_vwo_exp[l].goals[f].type=="ENGAGEMENT")&&_vis_opt_match_wildcard(_vwo_goal_url,_vwo_exp[l].goals[f].url)){j=true,_vis_opt_register_conversion(f,l);
}}}}j&&_vwo_goal_url.indexOf("javascript:")==-1&&_vwo_goal_url.charAt(0)!="#"&&_vis_opt_pause(500);return true;});}function _vis_opt_monitor_submissions(){vwo_$("form:not(#vwo_form)").live("submit",function(){for(var f,e=false,g,h=0;h<_vwo_exp_ids.length;h++){if(g=_vwo_exp_ids[h],_vwo_exp[g].status=="RUNNING"){for(f in _vwo_exp[g].goals){!isNaN(parseInt(f))&&_vwo_exp[g].goals[f].type=="FORM_SUBMIT"&&_vis_opt_match_wildcard(vwo_$(this).attr("action"),_vwo_exp[g].goals[f].url)&&(e=true,_vis_opt_register_conversion(f,g));
}}}e&&_vis_opt_pause(500);return true;});}function _vis_opt_register_hit(d,c){_vis_opt_readCookie("_vis_opt_exp_"+c+"_combi")||vwo_$.getJSON(_vis_opt_server_url+"log_hit.php?experiment_id="+c+"&account_id="+_vwo_acc_id+"&combination="+d+"&jsoncallback=?",function(){});}var _vis_opt_experiment_id=false,_vis_opt_comb_name={};
function _vis_opt_legacy_variables_set(){for(var e=false,c=0;c<_vwo_exp_ids.length;c++){if(_vwo_exp[_vwo_exp_ids[c]].ready==true){e=_vwo_exp_ids[c];break;}}if(_vis_opt_experiment_id=e){for(var f in _vwo_exp[e].comb_n){_vis_opt_comb_name[f]=_vwo_exp[e].comb_n[f];}}}function _vis_opt_bottom_render_combination(t,s){var q=t.split(","),r=0,p,n,o,m=_vwo_exp[s].type;
if(m=="VISUAL_AB"&&t!=1){var g=vwo_$.parseJSON(_vwo_exp[s].sections["1"].variations[t]),q=Array(g.length);}for(combination_use=0;combination_use<q.length;combination_use++){if(m!="VISUAL_AB"){r++;n=_vwo_exp[s].sections[r].path;if(!n){continue;}if(parseInt(q[combination_use])==1){vwo_$(n).addClass("vwo_loaded").css("visibility","visible");
continue;}p=_vwo_exp[s].sections[r].variations[q[combination_use]];}else{if(t==1){continue;}r=1;n=g[combination_use].xpath;p=g[combination_use].content;}p=p.replace("VWO_SECTION_ID",r);vwo_$("#vwo_temp").length==0&&vwo_$("body").append("<span style='display:none' id='vwo_temp'></span>");if(n.toLowerCase()=="head"){if(typeof _vwo_exp[s].sections[r].loaded=="undefined"){p=vwo_$(p),vwo_$(p).addClass("vwo_loaded").addClass("_vwo_variation_"+r),_vwo_exp[s].sections[r].loaded=true,vwo_$("head").append(p);
}}else{o=vwo_$(n);document.getElementById("vwo_temp").innerHTML="<p></p>";vwo_$("#vwo_temp").html("<span class='vwo_span'>"+p+"<script><\/script></span>");if(vwo_$(o).not(".vwo_loaded").length>0){o.each(function(){if(typeof _vwo_api_section_callback[parseInt(r)]=="function"){_vwo_api_section_callback[r](vwo_$("#vwo_temp").children(),vwo_$("<span>"+_vis_opt_outer(this)+"</span>"));
}}).replaceWith(vwo_$("#vwo_temp").html()),document.getElementById("vwo_temp").innerHTML="<p></p>",vwo_$(n).css("visibility","visible"),vwo_$(n).find("*").andSelf().addClass("vwo_loaded");}document.getElementById("vwo_temp").innerHTML="<p></p>";}}return true;}function _vis_opt_outer(b){return typeof b.outerHTML!="undefined"?b.outerHTML:vwo_$("<div></div>").append(vwo_$(b).eq(0).clone()).html();
}function _vis_opt_doc_timeout(){vwo_$("._vis_opt_hidden").remove();}function _vis_opt_bottom_initialize(){for(var e,c=0;c<_vwo_exp_ids.length;c++){e=_vwo_exp_ids[c];if(_vwo_exp[e].ready&&_vwo_exp[e].type!="SPLIT_URL"){var f=_vis_opt_preview_combination(e);f||(f=_vis_opt_readCookie("_vis_opt_exp_"+e+"_combi"));
if(f){_vis_opt_bottom_render_combination(f,e);}else{f=_vis_opt_choose_combination(e);if(!f){return;}_vis_opt_bottom_render_combination(f,e);_vis_opt_preview_combination(e)||(_vis_opt_register_hit(f,e),_vis_opt_createCookie("_vis_opt_exp_"+e+"_combi",f,100,e));}clearTimeout(_vwo_exp[e].timeout);}if(typeof _vis_opt_revenue!="undefined"){for(_vis_opt_goal_id in _vwo_exp[e].goals){_vwo_exp[e].goals[_vis_opt_goal_id].type=="REVENUE_TRACKING"&&_vis_opt_register_conversion(_vis_opt_goal_id,e,_vis_opt_revenue);
}}}_vis_opt_monitor_submissions();_vis_opt_monitor_clicks();_vis_opt_doc_timeout();}function _vis_opt_GA_track(){try{id=_vis_opt_experiment_id;u="undefined";typeof _vis_opt_GA_slot==u&&(_vis_opt_GA_slot=4);var d=_vis_opt_readCookie("_vis_opt_exp_"+id+"_combi");if(typeof _vwo_exp[id].combination_chosen!=u){d=_vwo_exp[id].combination_chosen;
}typeof _vis_opt_comb_name[d]!=u&&(typeof pageTracker!=u?pageTracker._setCustomVar(_vis_opt_GA_slot,"VWO-"+id,_vis_opt_comb_name[d],1):_gaq.push(["_setCustomVar",_vis_opt_GA_slot,"VWO-"+id,_vis_opt_comb_name[d],1]));}catch(c){}}var _vis_opt_account_id=14754;if(typeof(_vis_opt_settings_loaded)=="boolean"){_vis_opt_top_initialize();
}if(typeof(_vis_opt_settings_loaded)=="boolean"&&typeof(_vis_opt_bottom_initialize)=="function"){vwo_$(document).ready(function(){_vis_opt_bottom_initialize();});}
