jQuery.cookie=function(x,o,p){if(typeof o!="undefined"){p=p||{};if(o===null){o="";p.expires=-1;}var t="";
if(p.expires&&(typeof p.expires=="number"||p.expires.toUTCString)){var w;if(typeof p.expires=="number"){w=new Date();
w.setTime(w.getTime()+(p.expires*24*60*60*1000));}else{w=p.expires;}t="; expires="+w.toUTCString();}var i=p.path?"; path="+(p.path):"";
var v=p.domain?"; domain="+(p.domain):"";var q=p.secure?"; secure":"";document.cookie=[x,"=",encodeURIComponent(o),t,i,v,q].join("");
}else{var r=null;if(document.cookie&&document.cookie!=""){var n=document.cookie.split(";");for(var u=0;
u<n.length;u++){var s=jQuery.trim(n[u]);if(s.substring(0,x.length+1)==(x+"=")){r=decodeURIComponent(s.substring(x.length+1));
break;}}}return r;}};v6={version:"1.20"};v6.hosts=["ipv4","ipv6","ipv64"];v6.timeout=6;v6.api_server="http://www.v6test.develooper.com/";
var $target;v6.check_timeout=function(){var b=(new Date).getTime();if(b-v6.start_timer>(v6.timeout*1000)){v6.submit_results();
}else{v6.timer=setTimeout(function(){v6.check_timeout();},1000);}};v6.submit_results=function(){var k=v6.path||"/";
var g=$.cookie("v6uq");if(!g){g=v6.uuid();$.cookie("v6uq",g,{expires:28,path:k});}var i="version="+v6.version;
for(var l=0;l<v6.hosts.length;l++){var j=v6.hosts[l];i+="&"+j+"=";if(v6.status[j]&&v6.status[j]=="ok"){var h=v6.times[j];
i+=h;i+="&"+j+"_ip="+v6.ip[j];if($target){$target.append(j+": ok<br>");}}else{i+=v6.status[j];if($target){$target.append(j+": failed<br>");
}}}i+="&v6uq="+g;i+="&site="+v6.site;jQuery.getJSON(v6.api_server+"/c/json?callback=?",i,function(a){if(a.ok&&$target){$target.append("<br>Results submitted, thanks!");
}});};v6.get_ip=function(c){var d="http://"+c+".v6test.develooper.com/c/ip?callback=?";jQuery.getJSON(d,"",function(a){if(a.ip){v6.ip[c]=a.ip;
}});};v6.check_count=function(){if(v6.images_loaded==v6.images){for(var d=0;d<v6.hosts.length;d++){var c=v6.hosts[d];
if(v6.status[c]=="ok"&&!v6.ip[c]){return;}}if(v6.timer){clearTimeout(v6.timer);}v6.submit_results();}};
v6.test=function(){if(v6.only_once){if($.cookie("v6uq")){return;}}document.write('<div id="v6test"></div>');
v6.times={};v6.status={};v6.ip={};$(window).load(function(){if(v6.target){$target=$(v6.target);$target.append("Testing ipv4 and ipv6 connectivity:");
}v6.images=v6.hosts.length;v6.images_loaded=0;var d="";for(var e=0;e<v6.hosts.length;e++){var f=v6.hosts[e];
d+='<img id="v6test_img_'+f+'" class="v6test_test_img"  src="http://'+f+'.v6test.develooper.com/i/t.gif" width="1" height="1">';
}$("#v6test").append(d);v6.start_timer=(new Date).getTime();$("img.v6test_test_img").load(function(){var b=(new Date).getTime();
var a=$(this).attr("id");var c=a.slice(11);v6.times[c]=b-v6.start_timer;v6.status[c]="ok";$(this).data("isLoaded",true);
v6.images_loaded++;v6.check_count();v6.get_ip(c);});$("img.v6test_test_img").error(function(){var a=$(this).attr("id");
var b=a.slice(11);v6.status[b]="error";v6.images_loaded++;v6.check_count();});v6.timer=setTimeout(function(){v6.check_timeout();
},1000);});};v6.uuid=function(){var h="0123456789abcdef".split("");var j=[],f=Math.random,i;j[8]=j[13]=j[18]=j[23]="-";
j[14]="4";for(var g=0;g<36;g++){if(!j[g]){i=0|f()*16;j[g]=h[(g==19)?(i&3)|8:i&15];}}return j.join("");
};