if(!this.JSON){this.JSON={};
}(function(){function f(n){return n<10?"0"+n:n;
}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null;
};
String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf();
};
}var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;
function quote(string){escapable.lastIndex=0;
return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];
return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4);
})+'"':'"'+string+'"';
}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];
if(value&&typeof value==="object"&&typeof value.toJSON==="function"){value=value.toJSON(key);
}if(typeof rep==="function"){value=rep.call(holder,key,value);
}switch(typeof value){case"string":return quote(value);
case"number":return isFinite(value)?String(value):"null";
case"boolean":case"null":return String(value);
case"object":if(!value){return"null";
}gap+=indent;
partial=[];
if(Object.prototype.toString.apply(value)==="[object Array]"){length=value.length;
for(i=0;
i<length;
i+=1){partial[i]=str(i,value)||"null";
}v=partial.length===0?"[]":gap?"[\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"]":"["+partial.join(",")+"]";
gap=mind;
return v;
}if(rep&&typeof rep==="object"){length=rep.length;
for(i=0;
i<length;
i+=1){k=rep[i];
if(typeof k==="string"){v=str(k,value);
if(v){partial.push(quote(k)+(gap?": ":":")+v);
}}}}else{for(k in value){if(Object.hasOwnProperty.call(value,k)){v=str(k,value);
if(v){partial.push(quote(k)+(gap?": ":":")+v);
}}}}v=partial.length===0?"{}":gap?"{\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"}":"{"+partial.join(",")+"}";
gap=mind;
return v;
}}if(typeof JSON.stringify!=="function"){JSON.stringify=function(value,replacer,space){var i;
gap="";
indent="";
if(typeof space==="number"){for(i=0;
i<space;
i+=1){indent+=" ";
}}else{if(typeof space==="string"){indent=space;
}}rep=replacer;
if(replacer&&typeof replacer!=="function"&&(typeof replacer!=="object"||typeof replacer.length!=="number")){throw new Error("JSON.stringify");
}return str("",{"":value});
};
}if(typeof JSON.parse!=="function"){JSON.parse=function(text,reviver){var j;
function walk(holder,key){var k,v,value=holder[key];
if(value&&typeof value==="object"){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);
if(v!==undefined){value[k]=v;
}else{delete value[k];
}}}}return reviver.call(holder,key,value);
}text=String(text);
cx.lastIndex=0;
if(cx.test(text)){text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4);
});
}if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");
return typeof reviver==="function"?walk({"":j},""):j;
}throw new SyntaxError("JSON.parse");
};
}}());
(function($){var isObject=function(x){return(typeof x==="object")&&!(x instanceof Array)&&(x!==null);
};
$.extend({getJSONCookie:function(cookieName){var cookieData=$.cookie(cookieName);
return cookieData?JSON.parse(cookieData):{};
},setJSONCookie:function(cookieName,data,options){var cookieData="";
options=$.extend({expires:90,path:"/"},options);
if(!isObject(data)){throw new Error("JSONCookie data must be an object");
}return $.cookie(cookieName,JSON.stringify(data),options);
},removeJSONCookie:function(cookieName){return $.cookie(cookieName,null);
},JSONCookie:function(cookieName,data,options){if(data){$.setJSONCookie(cookieName,data,options);
}return $.getJSONCookie(cookieName);
}});
})(jQuery);
jQuery.cookie=function(name,value,options){if(typeof value!="undefined"){options=options||{};
if(value===null){value="";
options.expires=-1;
}var expires="";
if(options.expires&&(typeof options.expires=="number"||options.expires.toUTCString)){var date;
if(typeof options.expires=="number"){date=new Date();
date.setTime(date.getTime()+(options.expires*24*60*60*1000));
}else{date=options.expires;
}expires="; expires="+date.toUTCString();
}var path=options.path?"; path="+(options.path):"";
var domain=options.domain?"; domain="+(options.domain):"";
var secure=options.secure?"; secure":"";
document.cookie=[name,"=",encodeURIComponent(value),expires,path,domain,secure].join("");
}else{var cookieValue=null;
if(document.cookie&&document.cookie!=""){var cookies=document.cookie.split(";");
for(var i=0;
i<cookies.length;
i++){var cookie=jQuery.trim(cookies[i]);
if(cookie.substring(0,name.length+1)==(name+"=")){cookieValue=decodeURIComponent(cookie.substring(name.length+1));
break;
}}}return cookieValue;
}};
if(window.jQuery&&!window.jQuery.createTemplate){(function(jQuery){var Template=function(s,includes,settings){this._tree=[];
this._param={};
this._includes=null;
this._templates={};
this._templates_code={};
this.settings=jQuery.extend({disallow_functions:false,filter_data:true,filter_params:false,runnable_functions:false,clone_data:true,clone_params:true},settings);
this.f_cloneData=(this.settings.f_cloneData!==undefined)?(this.settings.f_cloneData):(TemplateUtils.cloneData);
this.f_escapeString=(this.settings.f_escapeString!==undefined)?(this.settings.f_escapeString):(TemplateUtils.escapeHTML);
this.splitTemplates(s,includes);
if(s){this.setTemplate(this._templates_code.MAIN,includes,this.settings);
}this._templates_code=null;
};
Template.prototype.version="0.7.8";
Template.DEBUG_MODE=true;
Template.prototype.splitTemplates=function(s,includes){var reg=/\{#template *(\w*?)( .*)*\}/g;
var iter,tname,se;
var lastIndex=null;
var _template_settings=[];
while((iter=reg.exec(s))!=null){lastIndex=reg.lastIndex;
tname=iter[1];
se=s.indexOf("{#/template "+tname+"}",lastIndex);
if(se==-1){throw new Error('jTemplates: Template "'+tname+'" is not closed.');
}this._templates_code[tname]=s.substring(lastIndex,se);
_template_settings[tname]=TemplateUtils.optionToObject(iter[2]);
}if(lastIndex===null){this._templates_code.MAIN=s;
return;
}for(var i in this._templates_code){if(i!="MAIN"){this._templates[i]=new Template();
}}for(var i in this._templates_code){if(i!="MAIN"){this._templates[i].setTemplate(this._templates_code[i],jQuery.extend({},includes||{},this._templates||{}),jQuery.extend({},this.settings,_template_settings[i]));
this._templates_code[i]=null;
}}};
Template.prototype.setTemplate=function(s,includes,settings){if(s==undefined){this._tree.push(new TextNode("",1,this));
return;
}s=s.replace(/[\n\r]/g,"");
s=s.replace(/\{\*.*?\*\}/g,"");
this._includes=jQuery.extend({},this._templates||{},includes||{});
this.settings=new Object(settings);
var node=this._tree;
var op=s.match(/\{#.*?\}/g);
var ss=0,se=0;
var e;
var literalMode=0;
var elseif_level=0;
for(var i=0,l=(op)?(op.length):(0);
i<l;
++i){var this_op=op[i];
if(literalMode){se=s.indexOf("{#/literal}");
if(se==-1){throw new Error("jTemplates: No end of literal.");
}if(se>ss){node.push(new TextNode(s.substring(ss,se),1,this));
}ss=se+11;
literalMode=0;
i=jQuery.inArray("{#/literal}",op);
continue;
}se=s.indexOf(this_op,ss);
if(se>ss){node.push(new TextNode(s.substring(ss,se),literalMode,this));
}var ppp=this_op.match(/\{#([\w\/]+).*?\}/);
var op_=RegExp.$1;
switch(op_){case"elseif":++elseif_level;
node.switchToElse();
case"if":e=new opIF(this_op,node);
node.push(e);
node=e;
break;
case"else":node.switchToElse();
break;
case"/if":while(elseif_level){node=node.getParent();
--elseif_level;
}case"/for":case"/foreach":node=node.getParent();
break;
case"foreach":e=new opFOREACH(this_op,node,this);
node.push(e);
node=e;
break;
case"for":e=opFORFactory(this_op,node,this);
node.push(e);
node=e;
break;
case"continue":case"break":node.push(new JTException(op_));
break;
case"include":node.push(new Include(this_op,this._includes));
break;
case"param":node.push(new UserParam(this_op));
break;
case"cycle":node.push(new Cycle(this_op));
break;
case"ldelim":node.push(new TextNode("{",1,this));
break;
case"rdelim":node.push(new TextNode("}",1,this));
break;
case"literal":literalMode=1;
break;
case"/literal":if(Template.DEBUG_MODE){throw new Error("jTemplates: Missing begin of literal.");
}break;
default:if(Template.DEBUG_MODE){throw new Error("jTemplates: unknown tag: "+op_+".");
}}ss=se+this_op.length;
}if(s.length>ss){node.push(new TextNode(s.substr(ss),literalMode,this));
}};
Template.prototype.get=function(d,param,element,deep){++deep;
var $T=d,_param1,_param2;
if(this.settings.clone_data){$T=this.f_cloneData(d,{escapeData:(this.settings.filter_data&&deep==1),noFunc:this.settings.disallow_functions},this.f_escapeString);
}if(!this.settings.clone_params){_param1=this._param;
_param2=param;
}else{_param1=this.f_cloneData(this._param,{escapeData:(this.settings.filter_params),noFunc:false},this.f_escapeString);
_param2=this.f_cloneData(param,{escapeData:(this.settings.filter_params&&deep==1),noFunc:false},this.f_escapeString);
}var $P=jQuery.extend({},_param1,_param2);
var $Q=(element!=undefined)?(element):({});
$Q.version=this.version;
var ret="";
for(var i=0,l=this._tree.length;
i<l;
++i){ret+=this._tree[i].get($T,$P,$Q,deep);
}--deep;
return ret;
};
Template.prototype.setParam=function(name,value){this._param[name]=value;
};
TemplateUtils=function(){};
TemplateUtils.escapeHTML=function(txt){return txt.replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;");
};
TemplateUtils.cloneData=function(d,filter,f_escapeString){if(d==null){return d;
}switch(d.constructor){case Object:var o={};
for(var i in d){o[i]=TemplateUtils.cloneData(d[i],filter,f_escapeString);
}if(!filter.noFunc){if(d.hasOwnProperty("toString")){o.toString=d.toString;
}}return o;
case Array:var o=[];
for(var i=0,l=d.length;
i<l;
++i){o[i]=TemplateUtils.cloneData(d[i],filter,f_escapeString);
}return o;
case String:return(filter.escapeData)?(f_escapeString(d)):(d);
case Function:if(filter.noFunc){if(Template.DEBUG_MODE){throw new Error("jTemplates: Functions are not allowed.");
}else{return undefined;
}}default:return d;
}};
TemplateUtils.optionToObject=function(optionText){if(optionText===null||optionText===undefined){return{};
}var o=optionText.split(/[= ]/);
if(o[0]===""){o.shift();
}var obj={};
for(var i=0,l=o.length;
i<l;
i+=2){obj[o[i]]=o[i+1];
}return obj;
};
var TextNode=function(val,literalMode,template){this._value=val;
this._literalMode=literalMode;
this._template=template;
};
TextNode.prototype.get=function(d,param,element,deep){var __t=this._value;
if(!this._literalMode){var __template=this._template;
var $T=d;
var $P=param;
var $Q=element;
__t=__t.replace(/\{(.*?)\}/g,function(__0,__1){try{var __tmp=eval(__1);
if(typeof __tmp=="function"){if(__template.settings.disallow_functions||!__template.settings.runnable_functions){return"";
}else{__tmp=__tmp($T,$P,$Q);
}}return(__tmp===undefined)?(""):(String(__tmp));
}catch(e){if(Template.DEBUG_MODE){if(e instanceof JTException){e.type="subtemplate";
}throw e;
}return"";
}});
}return __t;
};
var opIF=function(oper,par){this._parent=par;
oper.match(/\{#(?:else)*if (.*?)\}/);
this._cond=RegExp.$1;
this._onTrue=[];
this._onFalse=[];
this._currentState=this._onTrue;
};
opIF.prototype.push=function(e){this._currentState.push(e);
};
opIF.prototype.getParent=function(){return this._parent;
};
opIF.prototype.switchToElse=function(){this._currentState=this._onFalse;
};
opIF.prototype.get=function(d,param,element,deep){var $T=d;
var $P=param;
var $Q=element;
var ret="";
try{var tab=(eval(this._cond))?(this._onTrue):(this._onFalse);
for(var i=0,l=tab.length;
i<l;
++i){ret+=tab[i].get(d,param,element,deep);
}}catch(e){if(Template.DEBUG_MODE||(e instanceof JTException)){throw e;
}}return ret;
};
opFORFactory=function(oper,par,template){if(oper.match(/\{#for (\w+?) *= *(\S+?) +to +(\S+?) *(?:step=(\S+?))*\}/)){oper="{#foreach opFORFactory.funcIterator as "+RegExp.$1+" begin="+(RegExp.$2||0)+" end="+(RegExp.$3||-1)+" step="+(RegExp.$4||1)+" extData=$T}";
return new opFOREACH(oper,par,template);
}else{throw new Error('jTemplates: Operator failed "find": '+oper);
}};
opFORFactory.funcIterator=function(i){return i;
};
var opFOREACH=function(oper,par,template){this._parent=par;
this._template=template;
oper.match(/\{#foreach (.+?) as (\w+?)( .+)*\}/);
this._arg=RegExp.$1;
this._name=RegExp.$2;
this._option=RegExp.$3||null;
this._option=TemplateUtils.optionToObject(this._option);
this._onTrue=[];
this._onFalse=[];
this._currentState=this._onTrue;
};
opFOREACH.prototype.push=function(e){this._currentState.push(e);
};
opFOREACH.prototype.getParent=function(){return this._parent;
};
opFOREACH.prototype.switchToElse=function(){this._currentState=this._onFalse;
};
opFOREACH.prototype.get=function(d,param,element,deep){try{var $T=d;
var $P=param;
var $Q=element;
var fcount=eval(this._arg);
var key=[];
var mode=typeof fcount;
if(mode=="object"){var arr=[];
jQuery.each(fcount,function(k,v){key.push(k);
arr.push(v);
});
fcount=arr;
}var extData=(this._option.extData!==undefined)?(eval(this._option.extData)):(($T!=null)?($T):({}));
var s=Number(eval(this._option.begin)||0),e;
var step=Number(eval(this._option.step)||1);
if(mode!="function"){e=fcount.length;
}else{if(this._option.end===undefined||this._option.end===null){e=Number.MAX_VALUE;
}else{e=Number(eval(this._option.end))+((step>0)?(1):(-1));
}}var ret="";
var i,l;
if(this._option.count){var tmp=s+Number(eval(this._option.count));
e=(tmp>e)?(e):(tmp);
}if((e>s&&step>0)||(e<s&&step<0)){var iteration=0;
var _total=(mode!="function")?(Math.ceil((e-s)/step)):undefined;
var ckey,cval;
for(;
((step>0)?(s<e):(s>e));
s+=step,++iteration){ckey=key[s];
if(mode!="function"){cval=fcount[s];
}else{cval=fcount(s);
if(cval===undefined||cval===null){break;
}}if((typeof cval=="function")&&(this._template.settings.disallow_functions||!this._template.settings.runnable_functions)){continue;
}if((mode=="object")&&(ckey in Object)){continue;
}var prevValue=extData[this._name];
extData[this._name]=cval;
extData[this._name+"$index"]=s;
extData[this._name+"$iteration"]=iteration;
extData[this._name+"$first"]=(iteration==0);
extData[this._name+"$last"]=(s+step>=e);
extData[this._name+"$total"]=_total;
extData[this._name+"$key"]=(ckey!==undefined&&ckey.constructor==String)?(this._template.f_escapeString(ckey)):(ckey);
extData[this._name+"$typeof"]=typeof cval;
for(i=0,l=this._onTrue.length;
i<l;
++i){try{ret+=this._onTrue[i].get(extData,param,element,deep);
}catch(ex){if(ex instanceof JTException){switch(ex.type){case"continue":i=l;
break;
case"break":i=l;
s=e;
break;
default:throw e;
}}else{throw e;
}}}delete extData[this._name+"$index"];
delete extData[this._name+"$iteration"];
delete extData[this._name+"$first"];
delete extData[this._name+"$last"];
delete extData[this._name+"$total"];
delete extData[this._name+"$key"];
delete extData[this._name+"$typeof"];
delete extData[this._name];
extData[this._name]=prevValue;
}}else{for(i=0,l=this._onFalse.length;
i<l;
++i){ret+=this._onFalse[i].get($T,param,element,deep);
}}return ret;
}catch(e){if(Template.DEBUG_MODE||(e instanceof JTException)){throw e;
}return"";
}};
var JTException=function(type){this.type=type;
};
JTException.prototype=Error;
JTException.prototype.get=function(d){throw this;
};
var Include=function(oper,includes){oper.match(/\{#include (.*?)(?: root=(.*?))?\}/);
this._template=includes[RegExp.$1];
if(this._template==undefined){if(Template.DEBUG_MODE){throw new Error("jTemplates: Cannot find include: "+RegExp.$1);
}}this._root=RegExp.$2;
};
Include.prototype.get=function(d,param,element,deep){var $T=d;
var $P=param;
try{return this._template.get(eval(this._root),param,element,deep);
}catch(e){if(Template.DEBUG_MODE||(e instanceof JTException)){throw e;
}}return"";
};
var UserParam=function(oper){oper.match(/\{#param name=(\w*?) value=(.*?)\}/);
this._name=RegExp.$1;
this._value=RegExp.$2;
};
UserParam.prototype.get=function(d,param,element,deep){var $T=d;
var $P=param;
var $Q=element;
try{param[this._name]=eval(this._value);
}catch(e){if(Template.DEBUG_MODE||(e instanceof JTException)){throw e;
}param[this._name]=undefined;
}return"";
};
var Cycle=function(oper){oper.match(/\{#cycle values=(.*?)\}/);
this._values=eval(RegExp.$1);
this._length=this._values.length;
if(this._length<=0){throw new Error("jTemplates: cycle has no elements");
}this._index=0;
this._lastSessionID=-1;
};
Cycle.prototype.get=function(d,param,element,deep){var sid=jQuery.data(element,"jTemplateSID");
if(sid!=this._lastSessionID){this._lastSessionID=sid;
this._index=0;
}var i=this._index++%this._length;
return this._values[i];
};
jQuery.fn.setTemplate=function(s,includes,settings){if(s.constructor===Template){return jQuery(this).each(function(){jQuery.data(this,"jTemplate",s);
jQuery.data(this,"jTemplateSID",0);
});
}else{return jQuery(this).each(function(){jQuery.data(this,"jTemplate",new Template(s,includes,settings));
jQuery.data(this,"jTemplateSID",0);
});
}};
jQuery.fn.setTemplateURL=function(url_,includes,settings){var s=jQuery.ajax({url:url_,async:false}).responseText;
return jQuery(this).setTemplate(s,includes,settings);
};
jQuery.fn.setTemplateElement=function(elementName,includes,settings){var s=jQuery("#"+elementName).val();
if(s==null){s=jQuery("#"+elementName).html();
s=s.replace(/&lt;/g,"<").replace(/&gt;/g,">");
}s=jQuery.trim(s);
s=s.replace(/^<\!\[CDATA\[([\s\S]*)\]\]>$/im,"$1");
s=s.replace(/^<\!--([\s\S]*)-->$/im,"$1");
return jQuery(this).setTemplate(s,includes,settings);
};
jQuery.fn.hasTemplate=function(){var count=0;
jQuery(this).each(function(){if(jQuery.getTemplate(this)){++count;
}});
return count;
};
jQuery.fn.removeTemplate=function(){jQuery(this).processTemplateStop();
return jQuery(this).each(function(){jQuery.removeData(this,"jTemplate");
});
};
jQuery.fn.setParam=function(name,value){return jQuery(this).each(function(){var t=jQuery.getTemplate(this);
if(t===undefined){if(Template.DEBUG_MODE){throw new Error("jTemplates: Template is not defined.");
}else{return;
}}t.setParam(name,value);
});
};
jQuery.fn.processTemplate=function(d,param){return jQuery(this).each(function(){var t=jQuery.getTemplate(this);
if(t===undefined){if(Template.DEBUG_MODE){throw new Error("jTemplates: Template is not defined.");
}else{return;
}}jQuery.data(this,"jTemplateSID",jQuery.data(this,"jTemplateSID")+1);
jQuery(this).html(t.get(d,param,this,0));
});
};
jQuery.fn.processTemplateURL=function(url_,param,options){var that=this;
options=jQuery.extend({type:"GET",async:true,cache:false},options);
jQuery.ajax({url:url_,type:options.type,data:options.data,dataFilter:options.dataFilter,async:options.async,cache:options.cache,timeout:options.timeout,dataType:"json",success:function(d){var r=jQuery(that).processTemplate(d,param);
if(options.on_success){options.on_success(r);
}},error:options.on_error,complete:options.on_complete});
return this;
};
var Updater=function(url,param,interval,args,objs,options){this._url=url;
this._param=param;
this._interval=interval;
this._args=args;
this.objs=objs;
this.timer=null;
this._options=options||{};
var that=this;
jQuery(objs).each(function(){jQuery.data(this,"jTemplateUpdater",that);
});
this.run();
};
Updater.prototype.run=function(){this.detectDeletedNodes();
if(this.objs.length==0){return;
}var that=this;
jQuery.getJSON(this._url,this._args,function(d){var r=jQuery(that.objs).processTemplate(d,that._param);
if(that._options.on_success){that._options.on_success(r);
}});
this.timer=setTimeout(function(){that.run();
},this._interval);
};
Updater.prototype.detectDeletedNodes=function(){this.objs=jQuery.grep(this.objs,function(o){if(jQuery.browser.msie){var n=o.parentNode;
while(n&&n!=document){n=n.parentNode;
}return n!=null;
}else{return o.parentNode!=null;
}});
};
jQuery.fn.processTemplateStart=function(url,param,interval,args,options){return new Updater(url,param,interval,args,this,options);
};
jQuery.fn.processTemplateStop=function(){return jQuery(this).each(function(){var updater=jQuery.data(this,"jTemplateUpdater");
if(updater==null){return;
}var that=this;
updater.objs=jQuery.grep(updater.objs,function(o){return o!=that;
});
jQuery.removeData(this,"jTemplateUpdater");
});
};
jQuery.extend({createTemplate:function(s,includes,settings){return new Template(s,includes,settings);
},createTemplateURL:function(url_,includes,settings){var s=jQuery.ajax({url:url_,async:false}).responseText;
return new Template(s,includes,settings);
},getTemplate:function(element){return jQuery.data(element,"jTemplate");
},processTemplateToText:function(template,data,parameter){return template.get(data,parameter,undefined,0);
},jTemplatesDebugMode:function(value){Template.DEBUG_MODE=value;
}});
})(jQuery);
}(function(){$c={GeoIpCookie:"_GeoIpIMM",DisplayedPanel:undefined,Countries:undefined,Regions:[],Smileys:undefined,Pictos:undefined,Me:{Contacts:[],Correspondant:undefined},Messages:{RefreshBlock:false,LastUserId:0,Waiting:[],Remove:function(userId){for(i=0;
i<this.Waiting.length;
i++){if(this.Waiting.Values[i].Id==userId){this.Waiting.Values.splice(i,1);
this.Waiting.length--;
this.Waiting.total--;
}}}},Search:{CurrentPage:0,Result:[],PageSize:50,PageCount:0,Active:false,Criteria:undefined,RefreshBlock:false},GeoSearch:{Map:undefined,Markers:[],InfoWindow:undefined,Active:false,Loaded:false,AutoSearch:false},Users:{RefreshBlock:false,MaxCount:40,KeepCount:30,All:[],Add:function(user){user.LastViewed=new Date().getTime();
if(this.All.length>this.MaxCount){this.Purge();
}this.All.unshift(user);
},Purge:function(){this.All.sort(function(a,b){if(a.LastViewed==b.LastViewed){return 0;
}return a.LastViewed>b.LastViewed?-1:1;
});
this.All=this.All.slice(0,this.KeepCount);
},GetByUserId:function(id){for(i=0;
i<this.All.length;
i++){if(id==this.All[i].Id){this.All[i].LastViewed=new Date().getTime();
return this.All[i];
}}return undefined;
}},MediaServer:{GetPhotoURL:function(masterStore,photoId,height,width){var imgURL="http://pictures.tchatche.com/mediaweb/";
if(masterStore.toLowerCase()=="contentmoderation"){imgURL="http://img.tchatche.com/m123images/";
}return imgURL.concat("getImage?masterStore=",masterStore,"&id=",photoId,"&h=",height,"&hMax=",height,"&w=",width,"&wMax=",width,"&maxSize=-1");
}},Constants:{User:{Media:{Web:0,SMS:1,Minitel:2,IMode:3,Doja:7,Wap:4,Bot:5,MIDP:10,IPhone:11,Android:12,Bada:13,IPad:14,Vodafone:100},BalStatus:{Purged:-20,Unsubscribed:-10,Censored:-7,ValidationInProgress:-6,ToValidate:-3,Created:0,Validated:1,SMS:2},Gender:{Male:0,Female:1,Couple:2},Type:{Photo:1,Member:2,Blog:4,Webcam:8}},Contact:{Type:{Buddy:1,UnWanted:2}},Message:{Type:{Text:0,Audio:1,Event:2,History:3},Status:{Sent:-1,Unread:0,Read:1,Warning:2,Lost:3}},Dedication:{Type:{None:-1,Temporary:0,User:1,Advertisement:2},Status:{NotApplicable:-1,ModerationInProgress:1,Moderated:0,NotYetModerated:2,Rejected:3}}}};
})();
(function(){jQuery.fn.extend({_templatePath:undefined,DataBind:function(data,callback){CallBack=callback||function(){};
if(this.length===0){if($imm.Debug===true){$imm.HandleError({error:"Warning: DataBind",request:{Data:data,CallBack:CallBack.toString()}},"DataBind");
}return;
}if(jQuery.cachedTemplates===undefined){jQuery.cachedTemplates=[];
}var id=this.get(0).id;
if(jQuery.cachedTemplates[id]===undefined){jQuery.cachedTemplates[id]=this.html();
}if(data!==undefined&&data.Keys!==undefined){data=jQuery.ObjMerge(data);
}this.setTemplate(jQuery.cachedTemplates[id],null,{disallow_functions:true,filter_data:false,filter_params:false}).processTemplate(data);
CallBack();
return this;
},BindTemplate:function(data,callback){CallBack=callback||function(){};
if(this.length===0){if($imm.Debug===true){$imm.HandleError({error:"Warning: BindTemplate",request:{Data:data,CallBack:CallBack.toString()}},"BindTemplate");
}return;
}if(data!==undefined&&data.Keys!==undefined){data=jQuery.ObjMerge(data);
}if(jQuery.cachedTemplates===undefined){jQuery.cachedTemplates=[];
}var id=this.get(0).id;
if(jQuery.cachedTemplates[id]===undefined){jQuery.get(jQuery._temlatePath+id+".aspx",function(res){jQuery.cachedTemplates[id]=res;
jQuery("#"+id).setTemplate(jQuery.cachedTemplates[id],null,{disallow_functions:true,filter_data:false,filter_params:false}).processTemplate(data);
CallBack();
});
}else{this.setTemplate(jQuery.cachedTemplates[id],null,{disallow_functions:true,filter_data:false,filter_params:false}).processTemplate(data);
CallBack();
}return this;
},slideHorizontal:function(option){this.animate({width:option},{duration:"slow"});
return this;
}});
jQuery.extend({ObjMerge:function(obj){var out=[];
if(obj==null||obj.Values==undefined||obj.Keys==undefined){return obj;
}jQuery.each(obj.Values,function(i,o){out[i]={};
jQuery.each(obj.Keys,function(ii,oo){out[i][oo]=o[ii];
});
});
delete (obj.Keys);
obj.Values=out;
return obj;
},makeRange:function(start,stop){var vals=[];
for(i=start;
i<=stop;
i++){vals.push(i);
}return vals;
},makeGuid:function(){return"xxxxxxxx-xxxx-yxxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(c){var r=Math.random()*16|0,v=c=="x"?r:(r&3|8);
return v.toString(16);
}).toUpperCase();
}});
})();
(function(){$webcam={CheckTicket:function(otherId){jQuery("#infos").slideUp("fast");
var code=jQuery("#TicketTextbox").val();
var url="webcam.aspx/CheckMpTicket";
if(code==""||code.length<6){jQuery("#infos").text($t.WebCams.InvalidTicket).slideDown();
return;
}if(code.length==7){url="webcam.aspx/CheckAboTicket";
}jQuery("#TicketTextbox").val("");
jQuery.ajax({type:"POST",url:url,data:"{code:'"+code+"'}",contentType:"application/json; charset=utf-8",dataType:"json",success:function(msg){var result=jQuery.parseJSON(msg.d);
if(result.status==200){parent.$imm.SendCamInvitation(otherId);
}else{jQuery("#infos").text(result.content).slideDown();
}}});
}};
})();
function MeexupURL(StatsURL,MediaID){if(StatsURL==undefined){StatsURL="";
}if(MediaID==undefined){MediaID=0;
}var _baseURL="http://www.meexup.com/Rencontres";
var _gender="Femmes";
var _maxi=99;
var _mini=18;
var _country=$c.Me.Country;
var _department=$c.Me.Localization;
var _region="";
var _age=$c.Me.Age;
var _sex=$c.Me.Sex;
switch(this._country){case"FRA":this._country="France";
break;
case"BEL":this._country="Belgique";
this._department="";
break;
case"LUX":this._country="Luxembourg";
this._department="";
break;
case"CHE":this._country="Suisse";
this._department="";
break;
default:window.open(StatsURL+this._baseURL+"?mediaID="+MediaID,"meexup");
return;
}if(this._sex===0){this._gender="Femmes";
this._mini=(this._age>50)?(this._age-10):(this._age-6);
this._maxi=(this._age+2);
}else{if(this._sex==1){this._gender="Hommes";
this._mini=(this._age-2);
this._maxi=(this._age>40)?(this._age+10):(this._age+6);
}else{window.open(StatsURL+this._baseURL+"?mediaID="+MediaID,"meexup");
return;
}}this._mini=(this._mini<18)?18:this._mini;
this._mini=(this._mini>99)?99:this._mini;
this._maxi=(this._maxi<18)?18:this._maxi;
this._maxi=(this._maxi>99)?99:this._maxi;
window.open(StatsURL+this._baseURL+"/"+this._pays+"/"+this._region+"/"+this._department+"/"+this._gender+"/"+this._mini+","+this._maxi+"/?mediaID="+MediaID,"meexup");
}/*
 * Modernizr JavaScript library 1.5
 * http://www.modernizr.com/
 *
 * Copyright (c) 2009-2010 Faruk Ates - http://farukat.es/
 * Dual-licensed under the BSD and MIT licenses.
 * http://www.modernizr.com/license/
 *
 * Featuring major contributions by
 * Paul Irish  - http://paulirish.com
 */
window.Modernizr=(function(window,doc,undefined){var version="1.5",ret={},enableHTML5=false,fontfaceCheckDelay=75,docElement=doc.documentElement,mod="modernizr",m=doc.createElement(mod),m_style=m.style,f=doc.createElement("input"),canvas="canvas",canvastext="canvastext",rgba="rgba",hsla="hsla",multiplebgs="multiplebgs",backgroundsize="backgroundsize",borderimage="borderimage",borderradius="borderradius",boxshadow="boxshadow",opacity="opacity",cssanimations="cssanimations",csscolumns="csscolumns",cssgradients="cssgradients",cssreflections="cssreflections",csstransforms="csstransforms",csstransforms3d="csstransforms3d",csstransitions="csstransitions",fontface="fontface",geolocation="geolocation",video="video",audio="audio",input="input",inputtypes=input+"types",svg="svg",smil="smil",svgclippaths=svg+"clippaths",background="background",backgroundColor=background+"Color",canPlayType="canPlayType",localstorage="localStorage",sessionstorage="sessionStorage",applicationcache="applicationCache",webWorkers="webworkers",hashchange="hashchange",crosswindowmessaging="crosswindowmessaging",historymanagement="historymanagement",draganddrop="draganddrop",websqldatabase="websqldatabase",indexedDB="indexedDB",websockets="websockets",smile=":)",tostring=Object.prototype.toString,prefixes=" -o- -moz- -ms- -webkit- -khtml- ".split(" "),tests={},inputs={},attrs={},classes=[],isEventSupported=(function(){var TAGNAMES={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"},cache={};
function isEventSupported(eventName,element){var canCache=(arguments.length==1);
if(canCache&&cache[eventName]){return cache[eventName];
}element=element||document.createElement(TAGNAMES[eventName]||"div");
eventName="on"+eventName;
var isSupported=(eventName in element);
if(!isSupported&&element.setAttribute){element.setAttribute(eventName,"return;");
isSupported=typeof element[eventName]=="function";
}element=null;
return canCache?(cache[eventName]=isSupported):isSupported;
}return isEventSupported;
})();
var _hasOwnProperty=({}).hasOwnProperty,hasOwnProperty;
if(typeof _hasOwnProperty!=="undefined"&&typeof _hasOwnProperty.call!=="undefined"){hasOwnProperty=function(object,property){return _hasOwnProperty.call(object,property);
};
}else{hasOwnProperty=function(object,property){return((property in object)&&typeof object.constructor.prototype[property]==="undefined");
};
}function set_css(str){m_style.cssText=str;
}function set_css_all(str1,str2){return set_css(prefixes.join(str1+";")+(str2||""));
}function contains(str,substr){return(""+str).indexOf(substr)!==-1;
}function test_props(props,callback){for(var i in props){if(m_style[props[i]]!==undefined&&(!callback||callback(props[i],m))){return true;
}}}function test_props_all(prop,callback){var uc_prop=prop.charAt(0).toUpperCase()+prop.substr(1),props=[prop,"Webkit"+uc_prop,"Moz"+uc_prop,"O"+uc_prop,"ms"+uc_prop,"Khtml"+uc_prop];
return !!test_props(props,callback);
}tests[canvas]=function(){return !!doc.createElement(canvas).getContext;
};
tests[canvastext]=function(){return !!(tests[canvas]()&&typeof doc.createElement(canvas).getContext("2d").fillText=="function");
};
tests[geolocation]=function(){return !!navigator.geolocation;
};
tests[crosswindowmessaging]=function(){return !!window.postMessage;
};
tests[websqldatabase]=function(){var result=!!window.openDatabase;
if(result){try{result=!!openDatabase("testdb","1.0","html5 test db",200000);
}catch(err){result=false;
}}return result;
};
tests[indexedDB]=function(){return !!window[indexedDB];
};
tests[hashchange]=function(){return isEventSupported(hashchange,window)&&(document.documentMode===undefined||document.documentMode>7);
};
tests[historymanagement]=function(){return !!(window.history&&history.pushState);
};
tests[draganddrop]=function(){return isEventSupported("drag")&&isEventSupported("dragstart")&&isEventSupported("dragenter")&&isEventSupported("dragover")&&isEventSupported("dragleave")&&isEventSupported("dragend")&&isEventSupported("drop");
};
tests[websockets]=function(){return("WebSocket" in window);
};
tests[rgba]=function(){set_css(background+"-color:rgba(150,255,150,.5)");
return contains(m_style[backgroundColor],rgba);
};
tests[hsla]=function(){set_css(background+"-color:hsla(120,40%,100%,.5)");
return contains(m_style[backgroundColor],rgba);
};
tests[multiplebgs]=function(){set_css(background+":url(//:),url(//:),red url(//:)");
return new RegExp("(url\\s*\\(.*?){3}").test(m_style[background]);
};
tests[backgroundsize]=function(){return test_props_all(background+"Size");
};
tests[borderimage]=function(){return test_props_all("borderImage");
};
tests[borderradius]=function(){return test_props_all("borderRadius","",function(prop){return contains(prop,"orderRadius");
});
};
tests[boxshadow]=function(){return test_props_all("boxShadow");
};
tests[opacity]=function(){set_css_all("opacity:.5");
return contains(m_style[opacity],"0.5");
};
tests[cssanimations]=function(){return test_props_all("animationName");
};
tests[csscolumns]=function(){return test_props_all("columnCount");
};
tests[cssgradients]=function(){var str1=background+"-image:",str2="gradient(linear,left top,right bottom,from(#9f9),to(white));",str3="linear-gradient(left top,#9f9, white);";
set_css((str1+prefixes.join(str2+str1)+prefixes.join(str3+str1)).slice(0,-str1.length));
return contains(m_style.backgroundImage,"gradient");
};
tests[cssreflections]=function(){return test_props_all("boxReflect");
};
tests[csstransforms]=function(){return !!test_props(["transformProperty","WebkitTransform","MozTransform","OTransform","msTransform"]);
};
tests[csstransforms3d]=function(){var ret=!!test_props(["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"]);
if(ret){var st=document.createElement("style"),div=doc.createElement("div");
st.textContent="@media ("+prefixes.join("transform-3d),(")+"modernizr){#modernizr{height:3px}}";
doc.getElementsByTagName("head")[0].appendChild(st);
div.id="modernizr";
docElement.appendChild(div);
ret=div.offsetHeight===3;
st.parentNode.removeChild(st);
div.parentNode.removeChild(div);
}return ret;
};
tests[csstransitions]=function(){return test_props_all("transitionProperty");
};
tests[fontface]=function(){var fontret;
if(
/*@cc_on@if(@_jscript_version>=5)!@end@*/
0){fontret=true;
}else{var st=doc.createElement("style"),spn=doc.createElement("span"),size,isFakeBody=false,body=doc.body,callback,isCallbackCalled;
st.textContent="@font-face{font-family:testfont;src:url('data:font/ttf;base64,AAEAAAAMAIAAAwBAT1MvMliohmwAAADMAAAAVmNtYXCp5qrBAAABJAAAANhjdnQgACICiAAAAfwAAAAEZ2FzcP//AAMAAAIAAAAACGdseWYv5OZoAAACCAAAANxoZWFk69bnvwAAAuQAAAA2aGhlYQUJAt8AAAMcAAAAJGhtdHgGDgC4AAADQAAAABRsb2NhAIQAwgAAA1QAAAAMbWF4cABVANgAAANgAAAAIG5hbWUgXduAAAADgAAABPVwb3N03NkzmgAACHgAAAA4AAECBAEsAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAACAAMDAAAAAAAAgAACbwAAAAoAAAAAAAAAAFBmRWQAAAAgqS8DM/8zAFwDMwDNAAAABQAAAAAAAAAAAAMAAAADAAAAHAABAAAAAABGAAMAAQAAAK4ABAAqAAAABgAEAAEAAgAuqQD//wAAAC6pAP///9ZXAwAAAAAAAAACAAAABgBoAAAAAAAvAAEAAAAAAAAAAAAAAAAAAAABAAIAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEACoAAAAGAAQAAQACAC6pAP//AAAALqkA////1lcDAAAAAAAAAAIAAAAiAogAAAAB//8AAgACACIAAAEyAqoAAwAHAC6xAQAvPLIHBADtMrEGBdw8sgMCAO0yALEDAC88sgUEAO0ysgcGAfw8sgECAO0yMxEhESczESMiARDuzMwCqv1WIgJmAAACAFUAAAIRAc0ADwAfAAATFRQWOwEyNj0BNCYrASIGARQGKwEiJj0BNDY7ATIWFX8aIvAiGhoi8CIaAZIoN/43KCg3/jcoAWD0JB4eJPQkHh7++EY2NkbVRjY2RgAAAAABAEH/+QCdAEEACQAANjQ2MzIWFAYjIkEeEA8fHw8QDxwWFhwWAAAAAQAAAAIAAIuYbWpfDzz1AAsEAAAAAADFn9IuAAAAAMWf0i797/8zA4gDMwAAAAgAAgAAAAAAAAABAAADM/8zAFwDx/3v/98DiAABAAAAAAAAAAAAAAAAAAAABQF2ACIAAAAAAVUAAAJmAFUA3QBBAAAAKgAqACoAWgBuAAEAAAAFAFAABwBUAAQAAgAAAAEAAQAAAEAALgADAAMAAAAQAMYAAQAAAAAAAACLAAAAAQAAAAAAAQAhAIsAAQAAAAAAAgAFAKwAAQAAAAAAAwBDALEAAQAAAAAABAAnAPQAAQAAAAAABQAKARsAAQAAAAAABgAmASUAAQAAAAAADgAaAUsAAwABBAkAAAEWAWUAAwABBAkAAQBCAnsAAwABBAkAAgAKAr0AAwABBAkAAwCGAscAAwABBAkABABOA00AAwABBAkABQAUA5sAAwABBAkABgBMA68AAwABBAkADgA0A/tDb3B5cmlnaHQgMjAwOSBieSBEYW5pZWwgSm9obnNvbi4gIFJlbGVhc2VkIHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgT3BlbiBGb250IExpY2Vuc2UuIEtheWFoIExpIGdseXBocyBhcmUgcmVsZWFzZWQgdW5kZXIgdGhlIEdQTCB2ZXJzaW9uIDMuYmFlYzJhOTJiZmZlNTAzMiAtIHN1YnNldCBvZiBKdXJhTGlnaHRiYWVjMmE5MmJmZmU1MDMyIC0gc3Vic2V0IG9mIEZvbnRGb3JnZSAyLjAgOiBKdXJhIExpZ2h0IDogMjMtMS0yMDA5YmFlYzJhOTJiZmZlNTAzMiAtIHN1YnNldCBvZiBKdXJhIExpZ2h0VmVyc2lvbiAyIGJhZWMyYTkyYmZmZTUwMzIgLSBzdWJzZXQgb2YgSnVyYUxpZ2h0aHR0cDovL3NjcmlwdHMuc2lsLm9yZy9PRkwAQwBvAHAAeQByAGkAZwBoAHQAIAAyADAAMAA5ACAAYgB5ACAARABhAG4AaQBlAGwAIABKAG8AaABuAHMAbwBuAC4AIAAgAFIAZQBsAGUAYQBzAGUAZAAgAHUAbgBkAGUAcgAgAHQAaABlACAAdABlAHIAbQBzACAAbwBmACAAdABoAGUAIABPAHAAZQBuACAARgBvAG4AdAAgAEwAaQBjAGUAbgBzAGUALgAgAEsAYQB5AGEAaAAgAEwAaQAgAGcAbAB5AHAAaABzACAAYQByAGUAIAByAGUAbABlAGEAcwBlAGQAIAB1AG4AZABlAHIAIAB0AGgAZQAgAEcAUABMACAAdgBlAHIAcwBpAG8AbgAgADMALgBiAGEAZQBjADIAYQA5ADIAYgBmAGYAZQA1ADAAMwAyACAALQAgAHMAdQBiAHMAZQB0ACAAbwBmACAASgB1AHIAYQBMAGkAZwBoAHQAYgBhAGUAYwAyAGEAOQAyAGIAZgBmAGUANQAwADMAMgAgAC0AIABzAHUAYgBzAGUAdAAgAG8AZgAgAEYAbwBuAHQARgBvAHIAZwBlACAAMgAuADAAIAA6ACAASgB1AHIAYQAgAEwAaQBnAGgAdAAgADoAIAAyADMALQAxAC0AMgAwADAAOQBiAGEAZQBjADIAYQA5ADIAYgBmAGYAZQA1ADAAMwAyACAALQAgAHMAdQBiAHMAZQB0ACAAbwBmACAASgB1AHIAYQAgAEwAaQBnAGgAdABWAGUAcgBzAGkAbwBuACAAMgAgAGIAYQBlAGMAMgBhADkAMgBiAGYAZgBlADUAMAAzADIAIAAtACAAcwB1AGIAcwBlAHQAIABvAGYAIABKAHUAcgBhAEwAaQBnAGgAdABoAHQAdABwADoALwAvAHMAYwByAGkAcAB0AHMALgBzAGkAbAAuAG8AcgBnAC8ATwBGAEwAAAAAAgAAAAAAAP+BADMAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAQACAQIAEQt6ZXJva2F5YWhsaQ==')}";
doc.getElementsByTagName("head")[0].appendChild(st);
spn.setAttribute("style","font:99px _,arial,helvetica;position:absolute;visibility:hidden");
if(!body){body=docElement.appendChild(doc.createElement(fontface));
isFakeBody=true;
}spn.innerHTML="........";
spn.id="fonttest";
body.appendChild(spn);
size=spn.offsetWidth*spn.offsetHeight;
spn.style.font="99px testfont,_,arial,helvetica";
fontret=size!==spn.offsetWidth*spn.offsetHeight;
function delayedCheck(){if(!body.parentNode){return;
}fontret=ret[fontface]=size!==spn.offsetWidth*spn.offsetHeight;
docElement.className=docElement.className.replace(/(no-)?fontface\b/,"")+(fontret?" ":" no-")+fontface;
}setTimeout(delayedCheck,fontfaceCheckDelay);
setTimeout(delayedCheck,fontfaceCheckDelay*2);
addEventListener("load",function(){delayedCheck();
(isCallbackCalled=true)&&callback&&callback(fontret);
setTimeout(function(){if(!isFakeBody){body=spn;
}body.parentNode.removeChild(body);
st.parentNode.removeChild(st);
},50);
},false);
}ret._fontfaceready=function(fn){(isCallbackCalled||fontret)?fn(fontret):(callback=fn);
};
return fontret||size!==spn.offsetWidth;
};
tests[video]=function(){var elem=doc.createElement(video),bool=!!elem[canPlayType];
if(bool){bool=new Boolean(bool);
bool.ogg=elem[canPlayType]('video/ogg; codecs="theora"');
bool.h264=elem[canPlayType]('video/mp4; codecs="avc1.42E01E"');
bool.webm=elem[canPlayType]('video/webm; codecs="vp8, vorbis"');
}return bool;
};
tests[audio]=function(){var elem=doc.createElement(audio),bool=!!elem[canPlayType];
if(bool){bool=new Boolean(bool);
bool.ogg=elem[canPlayType]('audio/ogg; codecs="vorbis"');
bool.mp3=elem[canPlayType]("audio/mpeg;");
bool.wav=elem[canPlayType]('audio/wav; codecs="1"');
bool.m4a=elem[canPlayType]("audio/x-m4a;")||elem[canPlayType]("audio/aac;");
}return bool;
};
tests[localstorage]=function(){return("localStorage" in window)&&window[localstorage]!==null;
};
tests[sessionstorage]=function(){try{return("sessionStorage" in window)&&window[sessionstorage]!==null;
}catch(e){return false;
}};
tests[webWorkers]=function(){return !!window.Worker;
};
tests[applicationcache]=function(){var cache=window[applicationcache];
return !!(cache&&(typeof cache.status!="undefined")&&(typeof cache.update=="function")&&(typeof cache.swapCache=="function"));
};
tests[svg]=function(){return !!doc.createElementNS&&!!doc.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect;
};
tests[smil]=function(){return !!doc.createElementNS&&/SVG/.test(tostring.call(doc.createElementNS("http://www.w3.org/2000/svg","animate")));
};
tests[svgclippaths]=function(){return !!doc.createElementNS&&/SVG/.test(tostring.call(doc.createElementNS("http://www.w3.org/2000/svg","clipPath")));
};
function webforms(){ret[input]=(function(props){for(var i=0,len=props.length;
i<len;
i++){attrs[props[i]]=!!(props[i] in f);
}return attrs;
})("autocomplete autofocus list placeholder max min multiple pattern required step".split(" "));
ret[inputtypes]=(function(props){for(var i=0,bool,len=props.length;
i<len;
i++){f.setAttribute("type",props[i]);
bool=f.type!=="text";
if(bool){f.value=smile;
if(/tel|search/.test(f.type)){}else{if(/url|email/.test(f.type)){bool=f.checkValidity&&f.checkValidity()===false;
}else{bool=f.value!=smile;
}}}inputs[props[i]]=!!bool;
}return inputs;
})("search tel url email datetime date month week time datetime-local number range color".split(" "));
}for(var feature in tests){if(hasOwnProperty(tests,feature)){classes.push(((ret[feature.toLowerCase()]=tests[feature]())?"":"no-")+feature.toLowerCase());
}}if(!ret[input]){webforms();
}ret.addTest=function(feature,test){feature=feature.toLowerCase();
if(ret[feature]){return;
}test=!!(test());
docElement.className+=" "+(test?"":"no-")+feature;
ret[feature]=test;
return ret;
};
set_css("");
m=f=null;
if(enableHTML5&&(function(){var elem=doc.createElement("div");
elem.innerHTML="<elem></elem>";
return elem.childNodes.length!==1;
})()){(function(p,e){function q(a,b){if(g[a]){g[a].styleSheet.cssText+=b;
}else{var c=r[l],d=e[j]("style");
d.media=a;
c.insertBefore(d,c[l]);
g[a]=d;
q(a,b);
}}function s(a,b){for(var c=new RegExp("\\b("+m+")\\b(?!.*[;}])","gi"),d=function(k){return".iepp_"+k;
},h=-1;
++h<a.length;
){b=a[h].media||b;
s(a[h].imports,b);
q(b,a[h].cssText.replace(c,d));
}}function t(){for(var a,b=e.getElementsByTagName("*"),c,d,h=new RegExp("^"+m+"$","i"),k=-1;
++k<b.length;
){if((a=b[k])&&(d=a.nodeName.match(h))){c=new RegExp("^\\s*<"+d+"(.*)\\/"+d+">\\s*$","i");
i.innerHTML=a.outerHTML.replace(/\r|\n/g," ").replace(c,a.currentStyle.display=="block"?"<div$1/div>":"<span$1/span>");
c=i.childNodes[0];
c.className+=" iepp_"+d;
c=f[f.length]=[a,c];
a.parentNode.replaceChild(c[1],c[0]);
}}s(e.styleSheets,"all");
}function u(){for(var a=-1,b;
++a<f.length;
){f[a][1].parentNode.replaceChild(f[a][0],f[a][1]);
}for(b in g){r[l].removeChild(g[b]);
}g={};
f=[];
}for(var r=e.documentElement,i=e.createDocumentFragment(),g={},m="abbr|article|aside|audio|canvas|command|datalist|details|figure|figcaption|footer|header|hgroup|keygen|mark|meter|nav|output|progress|section|source|summary|time|video",n=m.split("|"),f=[],o=-1,l="firstChild",j="createElement";
++o<n.length;
){e[j](n[o]);
i[j](n[o]);
}i=i.appendChild(e[j]("div"));
p.attachEvent("onbeforeprint",t);
p.attachEvent("onafterprint",u);
})(this,doc);
}ret._enableHTML5=enableHTML5;
ret._version=version;
docElement.className=docElement.className.replace(/\bno-js\b/,"")+" js";
docElement.className+=" "+classes.join(" ");
$.setJSONCookie("_features",ret);
return ret;
})(this,this.document);
