

function XHRConnection(){var conn=false;var debug=false;var datas=new String();var areaId=new String();var xmlObj;var xmlLoad;try{conn=new XMLHttpRequest();}
catch(error){if(debug){alert('Erreur lors de la tentative de cr?ation de l\'objet \nnew XMLHttpRequest()\n\n'+error);}
try{conn=new ActiveXObject("Microsoft.XMLHTTP");}
catch(error){if(debug){alert('Erreur lors de la tentative de cr?ation de l\'objet \nnew ActiveXObject("Microsoft.XMLHTTP")\n\n'+error);}
try{conn=new ActiveXObject("Msxml2.XMLHTTP");}
catch(error){if(debug){alert('Erreur lors de la tentative de cr?ation de l\'objet \nnew ActiveXObject("Msxml2.XMLHTTP")\n\n'+error);}
conn=false;}}}
this.setDebugOff=function(){debug=false;};this.setDebugOn=function(){debug=true;};this.resetData=function(){datas=new String();datas='';};this.appendData=function(pfield,pvalue){datas+=(datas.length==0)?pfield+"="+escape(pvalue):"&"+pfield+"="+escape(pvalue);};this.setRefreshArea=function(id){areaId=id;};this.createXMLObject=function(){try{xmlDoc=document.implementation.createDocument("","",null);xmlLoad='onload';}
catch(error){try{xmlDoc=new ActiveXObject("Microsoft.XMLDOM");xmlLoad='onreadystatechange ';}
catch(error){if(debug){alert('Erreur lors de la tentative de cr?ation de l\'objet XML\n\n');}
return false;}}
return xmlDoc;}
this.setXMLObject=function(obj){if(obj==undefined){if(debug){alert('Param?tre manquant lors de l\'appel de la m?thode setXMLObject');}
return false;}
try{xmlObj=obj;}
catch(error){if(debug){alert('Erreur lors de l\'affectation de l\'objet XML dans la m?thode setXMLObject');}}}
this.loadXML=function(xml,callBack){if(!conn)return false;if(xmlObj&&xml){if(typeof callBack=="function"){if(xmlLoad=='onload'){xmlObj.onload=function(){callBack(xmlObj);}}
else{xmlObj.onreadystatechange=function(){if(xmlObj.readyState==4)callBack(xmlObj)}}}
xmlObj.load(xml);return;}}
this.sendAndLoad=function(Url,httpMode,callBack){httpMode=httpMode.toUpperCase();conn.onreadystatechange=function(){if(conn.readyState==4&&conn.status==200){if(typeof callBack=="function"){callBack(conn);return;}
else if(areaId.length>0){try{document.getElementById(areaId).innerHTML=conn.responseText;}
catch(error){if(debug){alert('Echec, '+areaId+' n\'est pas un objet valide');}}
return;}}};switch(httpMode){case"GET":try{Url=(datas.length>0)?Url+"?"+datas:Url;conn.open("GET",Url,true);conn.send(null);}
catch(error){if(debug){alert('Echec lors de la transaction avec '+Url+' via la m?thode GET');}
return false;}
break;case"POST":try{conn.open("POST",Url,true);conn.setRequestHeader("Content-Type","application/x-www-form-urlencoded");conn.send(datas);}
catch(error){if(debug){alert('Echec lors de la transaction avec '+Url+' via la mthode POST');}
return false;}
break;default:return false;break;}
return true;};return this;}

function ShowDegrade()
{var classElements=new Array();var els=document.getElementsByTagName("span");var pattern=new RegExp("(^|\\s)degrade(\\s|$)");for(i=0;i<els.length;i++){if(pattern.test(els[i].className)){els[i].style.visibility='visible';}}}
if(window.attachEvent){window.attachEvent("onload",ShowDegrade);}

function correctPNG()
{var arVersion=navigator.appVersion.split("MSIE")
var version=parseFloat(arVersion[1])
if((version>=5.5)&&(document.body.filters))
{var folder=document.getElementById("folderDiv");if(folder!=null)
{var images=folder.getElementsByTagName("img");for(var i=0;i<images.length;i++)
{var img=images[i]
var imgName=img.src.toUpperCase()
if(imgName.substring(imgName.length-3,imgName.length)=="PNG")
{var imgID=(img.id)?"id='"+img.id+"' ":""
var imgClass=(img.className)?"class='"+img.className+"' ":""
var imgTitle=(img.title)?"title='"+img.title+"' ":"title='"+img.alt+"' "
var imgStyle="display:inline-block;"+img.style.cssText
if(img.align=="left")imgStyle="float:left;"+imgStyle
if(img.align=="right")imgStyle="float:right;"+imgStyle
if(img.parentElement.href)imgStyle="cursor:hand;"+imgStyle
var strNewHTML="<span "+imgID+imgClass+imgTitle
+" style=\""+"width:"+img.width+"px; height:"+img.height+"px;"+imgStyle+";"
+"filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
+"(src=\'"+img.src+"\', sizingMethod='scale');\"></span>"
img.outerHTML=strNewHTML
i=i-1}}}}}
if(window.attachEvent){window.attachEvent("onload",correctPNG);}

var pathname=location.pathname;var myDomain=pathname.substring(0,pathname.lastIndexOf('/'))+'/';var date_exp=new Date();date_exp.setTime(date_exp.getTime()+(365*24*3600*1000));var adserver_test=true;function getCookieValMain(offset){var endstr=document.cookie.indexOf(";",offset);if(endstr==-1)
endstr=document.cookie.length;return unescape(document.cookie.substring(offset,endstr));}
function GetCookieMain(name){var arg=name+"=";var alen=arg.length;var clen=document.cookie.length;var i=0;while(i<clen)
{var j=i+alen;if(document.cookie.substring(i,j)==arg)
return getCookieValMain(j);i=document.cookie.indexOf(" ",i)+1;if(i==0)break;}
return false;}
function SetCookieMain(name,value){expires=new Date();expires.setTime(expires.getTime()+99999999999);path="/";domain=false;secure=false;var curCookie=name+"="+escape(value)+
((expires)?"; expires="+expires.toGMTString():"")+
((path)?"; path="+path:"")+
((domain)?"; domain="+domain:"")+
((secure)?"; secure":"");document.cookie=curCookie;}
function getCookieVal(offset){var endstr=document.cookie.indexOf(";",offset);if(endstr==-1)
endstr=document.cookie.length;return unescape(document.cookie.substring(offset,endstr));}
function GetCookie(name){var arg=name+"=";var alen=arg.length;var clen=document.cookie.length;var i=0;while(i<clen)
{var j=i+alen;if(document.cookie.substring(i,j)==arg)
return getCookieVal(j);i=document.cookie.indexOf(" ",i)+1;if(i==0)break;}
return false;}
function SetCookie(name,value){expires=new Date();expires.setTime(expires.getTime()+99999999999);path="/";domain=false;secure=false;var curCookie=name+"="+escape(value)+
((expires)?"; expires="+expires.toGMTString():"")+
((path)?"; path="+path:"")+
((domain)?"; domain="+domain:"")+
((secure)?"; secure":"");document.cookie=curCookie;}

function linkAjout(){if(window.location.href.indexOf("zoneCommentairesNew")<0){window.location.assign(window.location.href+"#zoneCommentairesNew");}}
function goto_secrets(){var item=document.leftredirectobjectif.focusStar.value;window.document.location.href=item;}
function redirect(){var item=document.redirectform.objet.value;window.document.location.href=item;}
function redirect_destination(){var itemdestination=document.redirectdestination.destination.value;window.document.location.href=itemdestination;}
function redirect_objectif(){var itemobjectif=document.redirectobjectif.objectif.value;window.document.location.href=itemobjectif;}
function leftredirect_destination(){var itemdestination=document.leftredirectdestination.destination.value;window.document.location.href=itemdestination;}
function leftredirect_objectif(){var itemobjectif=document.leftredirectobjectif.objectif.value;window.document.location.href=itemobjectif;}
function rightredirect_destination(){var itemdestination=document.rightredirectdestination.destination.value;window.document.location.href=itemdestination;}
function SOSrightredirect_destination(){var itemdestination=document.SOSrightredirectdestination.SOS.value;window.document.location.href=itemdestination;}
function show_calories(elt){var obj=elt.value;alert(obj);}
function deplacer(l1,l2,Kcal){var Sel_Obj=l1.options[l1.options.selectedIndex].text;var liste_Sel=l2.length;if(liste_Sel>0){for(i=0;i<liste_Sel;i++){if(l2.options[i].text==Sel_Obj){var pass="non";break;}}}
if(l1.options[l1.options.selectedIndex].value=="forbidden"){alert("Vous ne pouvez pas choisir une rubrique");}
else if(pass=="non"){alert("Vous ne pouvez pas choisir deux aliments identiques pour ce repas");}
else if(l1.options.selectedIndex>=0){o=new Option(l1.options[l1.options.selectedIndex].text,l1.options[l1.options.selectedIndex].value);l2.options[l2.options.length]=o;if(Kcal.value<=0){Kcal.value=0;ActualKcal=parseInt(Kcal.value);}
else{ActualKcal=parseInt(Kcal.value);}
AddKcal=parseInt(l1.options[l1.options.selectedIndex].value);AddedKcal=ActualKcal+AddKcal;Kcal.value=null;Kcal.value=AddedKcal;Kcal.focus();if(document.form.Kcal.value<=0){document.form.Kcal.value=0;}
if(document.form.Kcaldeux.value<=0){document.form.Kcaldeux.value=0;}
if(document.form.Kcaltrois.value<=0){document.form.Kcaltrois.value=0;}
if(document.form.Kcalquatre.value<=0){document.form.Kcalquatre.value=0;}
document.form.TotalKcal.value=parseInt(document.form.Kcal.value)+parseInt(document.form.Kcaldeux.value)+parseInt(document.form.Kcaltrois.value)+parseInt(document.form.Kcalquatre.value);}}
function supprimer(l1,Kcal){if(l1.options.selectedIndex>=0){if(Kcal.value<=0){Kcal.value=0;ActualKcal=parseInt(Kcal.value);}
else{ActualKcal=parseInt(Kcal.value);}
SupprKcal=parseInt(l1.options[l1.options.selectedIndex].value);SuppressedKcal=ActualKcal-SupprKcal;Kcal.value=null;Kcal.value=SuppressedKcal;Kcal.focus();l1.options[l1.options.selectedIndex]=null;if(document.form.Kcal.value<=0){document.form.Kcal.value=0;}
if(document.form.Kcaldeux.value<=0){document.form.Kcaldeux.value=0;}
if(document.form.Kcaltrois.value<=0){document.form.Kcaltrois.value=0;}
if(document.form.Kcalquatre.value<=0){document.form.Kcalquatre.value=0;}
document.form.TotalKcal.value=parseInt(document.form.Kcal.value)+parseInt(document.form.Kcaldeux.value)+parseInt(document.form.Kcaltrois.value)+parseInt(document.form.Kcalquatre.value);}}
function clear_all(){var count_liste1=document.form.liste_art_choisis.length;for(i=0;i<=count_liste1;i++){document.form.liste_art_choisis.options[0]=null;}
var count_liste2=document.form.liste_art_choisisdeux.length;for(i=0;i<=count_liste2;i++){document.form.liste_art_choisisdeux.options[0]=null;}
var count_liste3=document.form.liste_art_choisistrois.length;for(i=0;i<=count_liste3;i++){document.form.liste_art_choisistrois.options[0]=null;}
var count_liste4=document.form.liste_art_choisisquatre.length;for(i=0;i<=count_liste4;i++){document.form.liste_art_choisisquatre.options[0]=null;}}
function slideShow(slide,nbTotal){for(i=1;i<(nbTotal+1);i++)
if(i==slide)
document.getElementById('slide'+i).style.display="block";else
document.getElementById('slide'+i).style.display="none";}
function slideShowPeople(slide,nbTotal){for(i=0;i<(nbTotal+1);i++)
if(i==slide)
document.getElementById('slide'+i).style.display="block";else
document.getElementById('slide'+i).style.display="none";}
function slideShowDouble(slide,nbTotal){for(i=0;i<(nbTotal+1);i++)
if(i==slide)
{document.getElementById('image'+i).style.display="block";document.getElementById('slide'+i).style.display="block";}
else
{document.getElementById('image'+i).style.display="none";document.getElementById('slide'+i).style.display="none";}}
function prec(nbTotal){for(i=1;i<(nbTotal+1);i++)
if(document.getElementById('slide'+i).style.display=="block")
if(i==1)show=nbTotal;else show=i-1;slideShow(show,nbTotal);}
function suiv(nbTotal){for(i=1;i<(nbTotal+1);i++)
if(document.getElementById('slide'+i).style.display=="block")
if(i==nbTotal)show=1;else show=i+1;slideShow(show,nbTotal);}
function check_objectif(){var item=document.go_menu_personnalise.objectif_calorique.value;if((item>3000)||(item<1500)){alert("Votre apport calorique doit se situer entre 1500 et 3000 calories");}
else{document.go_menu_personnalise.submit();}}
function valider(){var item=document.go_menu_personnalise.objectif_calorique.value;if((item>3000)||(item<1500)){alert("Votre apport calorique doit se situer entre 1500 et 3000 calories");return false;}
else{return true;}}
function popupWindow(url){window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=850,height=600,screenX=150,screenY=150,top=100,left=150')}
function visualisationPopUp(url){window.open(url)}
function ShowOrHideCadres(show,nomClasse,masquer,afficher)
{if(document.getElementById(show).innerHTML==afficher)
{var mesStyle="float:left;border-color:#FF0000;border-style:solid;border-width:1px";ChangeClassNameBorder(nomClasse,mesStyle);document.getElementById(show).innerHTML=masquer;}
else if(document.getElementById(show).innerHTML==masquer)
{var mesStyle="";ChangeClassNameBorder(nomClasse,mesStyle);document.getElementById(show).innerHTML=afficher;}}
function ChangeClassNameBorder(nomClass,mesStyle)
{var elems=document.getElementsByTagName("div");for(var i=0;(elem=elems[i]);i++)
{if(elem.className==nomClass)
{if(document.all)
{elem.style.cssText=mesStyle;}
else
elem.setAttribute('style',mesStyle);}}}
function BlocMouseOver(id)
{if(toAffiche==0)
{if(document.all)
{document.getElementById(id).style.cssText='position:absolute;float:left; top:20%; left:20%;z-index:1000;width:50%; height:50%;display:block;';}
else
document.getElementById(id).setAttribute('style','position:absolute;float:left; top:20%; left:20%;z-index:1000;width:50%; height:50%;display:block;')}}
function BlocMouseOut(id)
{if(toAffiche==0)
{document.getElementById(id).style.display="none";}}
function MyRoleOver(nomClasse)
{if(toAffiche==1)
{OutLineClass('image_programmable','display:none');document.getElementById('my_rollover_button').value="Afficher les blocs";toAffiche=0;return;}
else
{OutLineClass('image_programmable','position:absolute;float:left; top:20%; left:20%;z-index:1000;width:50%; height:50%;display:block;');document.getElementById('my_rollover_button').value="Cacher les blocs";toAffiche=1;return;}}
function OutLineClass(nomClass,outlineText)
{var elems=document.getElementsByTagName("div");for(var i=0;(elem=elems[i]);i++)
{if(elem.className==nomClass)
{if(document.all)
{elem.style.cssText=outlineText;}
else
{elem.setAttribute('style',outlineText);}}}}
function rq_play(redirect_url,design)
{var userId=GetCookie('id_joueur');var status_requalification=GetCookie('status_requalification_'+userId);if(status_requalification=='updated'){if(redirect_url!="false"&&redirect_url!=false){window.location.href=redirect_url;}}else{var delimiter='?';var url='/elle/action/requalificationJeux';if(design!="false"&&design!=false){url=url+delimiter+"design="+design;delimiter='&';}
if(redirect_url!="false"&&redirect_url!=false){url=url+delimiter+"redirect_url="+redirect_url;}
Modalbox.show(url,{title:'Vos informations',width:575,height:600,overlayClose:false,transitions:false});}
return false;}
function callModalBox(url,ModalBoxOptions){document.body.style.cursor="wait";var opt={method:'get',onSuccess:function(t){document.body.style.cursor="default";Modalbox.show(t.responseText,ModalBoxOptions);},on404:function(t){},onFailure:function(t){}};new Ajax.Request(url,opt);}
function rq_play_coreg(redirect_url,design)
{var userId=GetCookie('id_joueur');var status_requalification=GetCookie('status_coregistration_'+userId);if(status_requalification=='updated'){if(redirect_url!="false"&&redirect_url!=false){window.location.href=redirect_url;}}else{var delimiter='?';var url='/elle/action/coregistration';if(design!="false"&&design!=false){url=url+delimiter+"design="+design;delimiter='&';}
if(redirect_url!="false"&&redirect_url!=false){url=url+delimiter+"redirect_url="+redirect_url;}
Modalbox.show(url,{title:'Vos informations',width:575,height:600,overlayClose:false,transitions:false});}
return false;}
function rq_check_form(redirect_url){var radio_flag=false;var entry_radio=false;var name_radio;var complete_form=false;$A(document.getElementsByClassName('qualif_check')).each(function(element){if(element.name.indexOf('date_de_naissance',0)!=-1){$('date_de_naissance_label').style.color='';}else{$(element.id.replace('input','label')).style.color='';}
if(element.type=='radio'){var label_radio=element.name+'_label';$(label_radio).style.color='';}
if(element.type=='radio'){if(element.name!=name_radio){if(entry_radio&&!radio_flag){var label_radio=name_radio+'_label';$(label_radio).style.color='red';}
radio_flag=false;entry_radio=true;if(element.checked){radio_flag=true;}
name_radio=element.name;}else{if(!radio_flag){if(element.checked){radio_flag=true;}}}}else{if(entry_radio&&!radio_flag){$(name_radio+'_label').style.color='red';complete_form=true;}
entry_radio=false;radio_flag=false;if(element.value==''){if(element.name.indexOf('date_de_naissance',0)==-1){$(element.id.replace('input','label')).style.color='red';}else{$('date_de_naissance_label').style.color='red';}
complete_form=true;}}});if(complete_form){alert('Veuillez compl�ter le formulaire\n pour valider votre participation');return false;}
new Ajax.Updater('MB_content','/elle/action/requalificationJeux',{asynchronous:true,parameters:Form.serialize('modifyform'),onComplete:function(){if(redirect_url!="false"&&redirect_url!=false){window.location.href=redirect_url;}
Modalbox.hide();}});return false;}
function rq_check_form_coreg(redirect_url){var radio_flag=false;var entry_radio=false;var name_radio;var complete_form=false;$A(document.getElementsByClassName('qualif_check')).each(function(element){if(element.name.indexOf('date_de_naissance',0)!=-1){$('date_de_naissance_label').style.color='';}else{$(element.id.replace('input','label')).style.color='';}
if(element.type=='radio'){var label_radio=element.name+'_label';$(label_radio).style.color='';}
if(element.type=='radio'){if(element.name!=name_radio){if(entry_radio&&!radio_flag){var label_radio=name_radio+'_label';$(label_radio).style.color='red';}
radio_flag=false;entry_radio=true;if(element.checked){radio_flag=true;}
name_radio=element.name;}else{if(!radio_flag){if(element.checked){radio_flag=true;}}}}else{if(entry_radio&&!radio_flag){$(name_radio+'_label').style.color='red';complete_form=true;}
entry_radio=false;radio_flag=false;if(element.value==''){if(element.name.indexOf('date_de_naissance',0)==-1){$(element.id.replace('input','label')).style.color='red';}else{$('date_de_naissance_label').style.color='red';}
complete_form=true;}}});if(complete_form){alert('Veuillez compl�ter le formulaire\n pour valider votre participation');return false;}
new Ajax.Updater('MB_content','/elle/action/coregistration',{asynchronous:true,parameters:Form.serialize('modifyform'),onComplete:function(){if(redirect_url!="false"&&redirect_url!=false){window.location.href=redirect_url;}
Modalbox.hide();}});return false;}
function reload_pub(picture_id)
{iframe_height=200;if(jQuery("span.pub"))
{iframe_height=jQuery("span.pub").height();}
jQuery('.pub').html('<iframe allowtransparency="true" width="300" height="'+iframe_height+'"  frameborder="0" scrolling="no" framespacing="0" noresize="true" vspace="0" marginheight="0" marginwidth="0" border="0" src="http://www.elle.fr/elle/ajaxext/pub?publicite=droite&nodeid='+picture_id+'"></iframe>');jQuery('body').append('<iframe scrolling="no" frameborder="0" width="1" height="1"  border="0" marginheight="0" marginwidth="0" noresize="true" vspace="0" framespacing="0" src="http://www.elle.fr/elle/ajaxext/pub?publicite=habillage&nodeid='+picture_id+'"></iframe>');try{var pageTracker=_gat._getTracker("UA-10092519-1");pageTracker._setDomainName(".elle.fr");pageTracker._trackPageview();}catch(err){}
if(wreport_ok==1){var w_counter=new wreport_counter(WRP_SECTION,WRP_SUBSECTION,WRP_ID,WRP_ACC,WRP_CHANNEL,WRP_SECTION_GRP,WRP_SUBSECTION_GRP);w_counter.add_content(WRP_CONTENT);w_counter.count();}
cm_arg="http://stat3.cybermonitor.com/ellev3_v?c="+WRP_SECTION;if(WRP_SUBSECTION)cm_arg+="&p="+WRP_SUBSECTION;if(WRP_CONTENT)cm_arg+="&l3="+WRP_CONTENT;cm_arg+="&l4=";cm_i=new Image(1,1);cm_i.src=cm_arg;}
function getTagA2d(){return 98994;}

if(typeof deconcept=="undefined"){var deconcept=new Object();}
if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}
if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}
deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){if(!document.getElementById){return;}
this.DETECT_KEY=_b?_b:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}
if(id){this.setAttribute("id",id);}
if(w){this.setAttribute("width",w);}
if(h){this.setAttribute("height",h);}
if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}
this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(c){this.addParam("bgcolor",c);}
var q=_8?_8:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",_7);this.setAttribute("doExpressInstall",false);var _d=(_9)?_9:window.location;this.setAttribute("xiRedirectUrl",_d);this.setAttribute("redirectUrl","");if(_a){this.setAttribute("redirectUrl",_a);}};deconcept.SWFObject.prototype={setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16.push(key+"="+_18[key]);}
return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");}
_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}
var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");}
_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}
var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}
return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}
if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}
return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}
catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}
catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}
catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}
return _23;};deconcept.PlayerVersion=function(_27){this.major=_27[0]!=null?parseInt(_27[0]):0;this.minor=_27[1]!=null?parseInt(_27[1]):0;this.rev=_27[2]!=null?parseInt(_27[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}
if(this.major>fv.major){return true;}
if(this.minor<fv.minor){return false;}
if(this.minor>fv.minor){return true;}
if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_29){var q=document.location.search||document.location.hash;if(q){var _2b=q.substring(1).split("&");for(var i=0;i<_2b.length;i++){if(_2b[i].substring(0,_2b[i].indexOf("="))==_29){return _2b[i].substring((_2b[i].indexOf("=")+1));}}}
return"";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){if(window.opera||!document.all){return;}
var _2d=document.getElementsByTagName("OBJECT");for(var i=0;i<_2d.length;i++){_2d[i].style.display="none";for(var x in _2d[i]){if(typeof _2d[i][x]=="function"){_2d[i][x]=function(){};}}}};deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};if(typeof window.onunload=="function"){var _30=window.onunload;window.onunload=function(){deconcept.SWFObjectUtil.cleanupSWFs();_30();};}else{window.onunload=deconcept.SWFObjectUtil.cleanupSWFs;}};if(typeof window.onbeforeunload=="function"){var oldBeforeUnload=window.onbeforeunload;window.onbeforeunload=function(){deconcept.SWFObjectUtil.prepUnload();oldBeforeUnload();};}else{window.onbeforeunload=deconcept.SWFObjectUtil.prepUnload;}
if(Array.prototype.push==null){Array.prototype.push=function(_31){this[this.length]=_31;return this.length;};}
var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;

/*
 * jQuery JavaScript Library v1.3.2
 * http://jquery.com/
 *
 * Copyright (c) 2009 John Resig
 * Dual licensed under the MIT and GPL licenses.
 * http://docs.jquery.com/License
 *
 * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
 * Revision: 6246
 */
(function(){var
window=this,undefined,_jQuery=window.jQuery,_$=window.$,jQuery=window.jQuery=window.$=function(selector,context){return new jQuery.fn.init(selector,context);},quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,isSimple=/^.[^:#\[\.,]*$/;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;this.context=selector;return this;}
if(typeof selector==="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1])
selector=jQuery.clean([match[1]],context);else{var elem=document.getElementById(match[3]);if(elem&&elem.id!=match[3])
return jQuery().find(selector);var ret=jQuery(elem||[]);ret.context=document;ret.selector=selector;return ret;}}else
return jQuery(context).find(selector);}else if(jQuery.isFunction(selector))
return jQuery(document).ready(selector);if(selector.selector&&selector.context){this.selector=selector.selector;this.context=selector.context;}
return this.setArray(jQuery.isArray(selector)?selector:jQuery.makeArray(selector));},selector:"",jquery:"1.3.2",size:function(){return this.length;},get:function(num){return num===undefined?Array.prototype.slice.call(this):this[num];},pushStack:function(elems,name,selector){var ret=jQuery(elems);ret.prevObject=this;ret.context=this.context;if(name==="find")
ret.selector=this.selector+(this.selector?" ":"")+selector;else if(name)
ret.selector=this.selector+"."+name+"("+selector+")";return ret;},setArray:function(elems){this.length=0;Array.prototype.push.apply(this,elems);return this;},each:function(callback,args){return jQuery.each(this,callback,args);},index:function(elem){return jQuery.inArray(elem&&elem.jquery?elem[0]:elem,this);},attr:function(name,value,type){var options=name;if(typeof name==="string")
if(value===undefined)
return this[0]&&jQuery[type||"attr"](this[0],name);else{options={};options[name]=value;}
return this.each(function(i){for(name in options)
jQuery.attr(type?this.style:this,name,jQuery.prop(this,options[name],type,i,name));});},css:function(key,value){if((key=='width'||key=='height')&&parseFloat(value)<0)
value=undefined;return this.attr(key,value,"curCSS");},text:function(text){if(typeof text!=="object"&&text!=null)
return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text));var ret="";jQuery.each(text||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8)
ret+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this]);});});return ret;},wrapAll:function(html){if(this[0]){var wrap=jQuery(html,this[0].ownerDocument).clone();if(this[0].parentNode)
wrap.insertBefore(this[0]);wrap.map(function(){var elem=this;while(elem.firstChild)
elem=elem.firstChild;return elem;}).append(this);}
return this;},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html);});},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html);});},append:function(){return this.domManip(arguments,true,function(elem){if(this.nodeType==1)
this.appendChild(elem);});},prepend:function(){return this.domManip(arguments,true,function(elem){if(this.nodeType==1)
this.insertBefore(elem,this.firstChild);});},before:function(){return this.domManip(arguments,false,function(elem){this.parentNode.insertBefore(elem,this);});},after:function(){return this.domManip(arguments,false,function(elem){this.parentNode.insertBefore(elem,this.nextSibling);});},end:function(){return this.prevObject||jQuery([]);},push:[].push,sort:[].sort,splice:[].splice,find:function(selector){if(this.length===1){var ret=this.pushStack([],"find",selector);ret.length=0;jQuery.find(selector,this[0],ret);return ret;}else{return this.pushStack(jQuery.unique(jQuery.map(this,function(elem){return jQuery.find(selector,elem);})),"find",selector);}},clone:function(events){var ret=this.map(function(){if(!jQuery.support.noCloneEvent&&!jQuery.isXMLDoc(this)){var html=this.outerHTML;if(!html){var div=this.ownerDocument.createElement("div");div.appendChild(this.cloneNode(true));html=div.innerHTML;}
return jQuery.clean([html.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0];}else
return this.cloneNode(true);});if(events===true){var orig=this.find("*").andSelf(),i=0;ret.find("*").andSelf().each(function(){if(this.nodeName!==orig[i].nodeName)
return;var events=jQuery.data(orig[i],"events");for(var type in events){for(var handler in events[type]){jQuery.event.add(this,type,events[type][handler],events[type][handler].data);}}
i++;});}
return ret;},filter:function(selector){return this.pushStack(jQuery.isFunction(selector)&&jQuery.grep(this,function(elem,i){return selector.call(elem,i);})||jQuery.multiFilter(selector,jQuery.grep(this,function(elem){return elem.nodeType===1;})),"filter",selector);},closest:function(selector){var pos=jQuery.expr.match.POS.test(selector)?jQuery(selector):null,closer=0;return this.map(function(){var cur=this;while(cur&&cur.ownerDocument){if(pos?pos.index(cur)>-1:jQuery(cur).is(selector)){jQuery.data(cur,"closest",closer);return cur;}
cur=cur.parentNode;closer++;}});},not:function(selector){if(typeof selector==="string")
if(isSimple.test(selector))
return this.pushStack(jQuery.multiFilter(selector,this,true),"not",selector);else
selector=jQuery.multiFilter(selector,this);var isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!selector.nodeType;return this.filter(function(){return isArrayLike?jQuery.inArray(this,selector)<0:this!=selector;});},add:function(selector){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),typeof selector==="string"?jQuery(selector):jQuery.makeArray(selector))));},is:function(selector){return!!selector&&jQuery.multiFilter(selector,this).length>0;},hasClass:function(selector){return!!selector&&this.is("."+selector);},val:function(value){if(value===undefined){var elem=this[0];if(elem){if(jQuery.nodeName(elem,'option'))
return(elem.attributes.value||{}).specified?elem.value:elem.text;if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type=="select-one";if(index<0)
return null;for(var i=one?index:0,max=one?index+1:options.length;i<max;i++){var option=options[i];if(option.selected){value=jQuery(option).val();if(one)
return value;values.push(value);}}
return values;}
return(elem.value||"").replace(/\r/g,"");}
return undefined;}
if(typeof value==="number")
value+='';return this.each(function(){if(this.nodeType!=1)
return;if(jQuery.isArray(value)&&/radio|checkbox/.test(this.type))
this.checked=(jQuery.inArray(this.value,value)>=0||jQuery.inArray(this.name,value)>=0);else if(jQuery.nodeName(this,"select")){var values=jQuery.makeArray(value);jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,values)>=0||jQuery.inArray(this.text,values)>=0);});if(!values.length)
this.selectedIndex=-1;}else
this.value=value;});},html:function(value){return value===undefined?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(value);},replaceWith:function(value){return this.after(value).remove();},eq:function(i){return this.slice(i,+i+1);},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","));},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},andSelf:function(){return this.add(this.prevObject);},domManip:function(args,table,callback){if(this[0]){var fragment=(this[0].ownerDocument||this[0]).createDocumentFragment(),scripts=jQuery.clean(args,(this[0].ownerDocument||this[0]),fragment),first=fragment.firstChild;if(first)
for(var i=0,l=this.length;i<l;i++)
callback.call(root(this[i],first),this.length>1||i>0?fragment.cloneNode(true):fragment);if(scripts)
jQuery.each(scripts,evalScript);}
return this;function root(elem,cur){return table&&jQuery.nodeName(elem,"table")&&jQuery.nodeName(cur,"tr")?(elem.getElementsByTagName("tbody")[0]||elem.appendChild(elem.ownerDocument.createElement("tbody"))):elem;}}};jQuery.fn.init.prototype=jQuery.fn;function evalScript(i,elem){if(elem.src)
jQuery.ajax({url:elem.src,async:false,dataType:"script"});else
jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"");if(elem.parentNode)
elem.parentNode.removeChild(elem);}
function now(){return+new Date;}
jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options;if(typeof target==="boolean"){deep=target;target=arguments[1]||{};i=2;}
if(typeof target!=="object"&&!jQuery.isFunction(target))
target={};if(length==i){target=this;--i;}
for(;i<length;i++)
if((options=arguments[i])!=null)
for(var name in options){var src=target[name],copy=options[name];if(target===copy)
continue;if(deep&&copy&&typeof copy==="object"&&!copy.nodeType)
target[name]=jQuery.extend(deep,src||(copy.length!=null?[]:{}),copy);else if(copy!==undefined)
target[name]=copy;}
return target;};var exclude=/z-?index|font-?weight|opacity|zoom|line-?height/i,defaultView=document.defaultView||{},toString=Object.prototype.toString;jQuery.extend({noConflict:function(deep){window.$=_$;if(deep)
window.jQuery=_jQuery;return jQuery;},isFunction:function(obj){return toString.call(obj)==="[object Function]";},isArray:function(obj){return toString.call(obj)==="[object Array]";},isXMLDoc:function(elem){return elem.nodeType===9&&elem.documentElement.nodeName!=="HTML"||!!elem.ownerDocument&&jQuery.isXMLDoc(elem.ownerDocument);},globalEval:function(data){if(data&&/\S/.test(data)){var head=document.getElementsByTagName("head")[0]||document.documentElement,script=document.createElement("script");script.type="text/javascript";if(jQuery.support.scriptEval)
script.appendChild(document.createTextNode(data));else
script.text=data;head.insertBefore(script,head.firstChild);head.removeChild(script);}},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()==name.toUpperCase();},each:function(object,callback,args){var name,i=0,length=object.length;if(args){if(length===undefined){for(name in object)
if(callback.apply(object[name],args)===false)
break;}else
for(;i<length;)
if(callback.apply(object[i++],args)===false)
break;}else{if(length===undefined){for(name in object)
if(callback.call(object[name],name,object[name])===false)
break;}else
for(var value=object[0];i<length&&callback.call(value,i,value)!==false;value=object[++i]){}}
return object;},prop:function(elem,value,type,i,name){if(jQuery.isFunction(value))
value=value.call(elem,i);return typeof value==="number"&&type=="curCSS"&&!exclude.test(name)?value+"px":value;},className:{add:function(elem,classNames){jQuery.each((classNames||"").split(/\s+/),function(i,className){if(elem.nodeType==1&&!jQuery.className.has(elem.className,className))
elem.className+=(elem.className?" ":"")+className;});},remove:function(elem,classNames){if(elem.nodeType==1)
elem.className=classNames!==undefined?jQuery.grep(elem.className.split(/\s+/),function(className){return!jQuery.className.has(classNames,className);}).join(" "):"";},has:function(elem,className){return elem&&jQuery.inArray(className,(elem.className||elem).toString().split(/\s+/))>-1;}},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name];}
callback.call(elem);for(var name in options)
elem.style[name]=old[name];},css:function(elem,name,force,extra){if(name=="width"||name=="height"){var val,props={position:"absolute",visibility:"hidden",display:"block"},which=name=="width"?["Left","Right"]:["Top","Bottom"];function getWH(){val=name=="width"?elem.offsetWidth:elem.offsetHeight;if(extra==="border")
return;jQuery.each(which,function(){if(!extra)
val-=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0;if(extra==="margin")
val+=parseFloat(jQuery.curCSS(elem,"margin"+this,true))||0;else
val-=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0;});}
if(elem.offsetWidth!==0)
getWH();else
jQuery.swap(elem,props,getWH);return Math.max(0,Math.round(val));}
return jQuery.curCSS(elem,name,force);},curCSS:function(elem,name,force){var ret,style=elem.style;if(name=="opacity"&&!jQuery.support.opacity){ret=jQuery.attr(style,"opacity");return ret==""?"1":ret;}
if(name.match(/float/i))
name=styleFloat;if(!force&&style&&style[name])
ret=style[name];else if(defaultView.getComputedStyle){if(name.match(/float/i))
name="float";name=name.replace(/([A-Z])/g,"-$1").toLowerCase();var computedStyle=defaultView.getComputedStyle(elem,null);if(computedStyle)
ret=computedStyle.getPropertyValue(name);if(name=="opacity"&&ret=="")
ret="1";}else if(elem.currentStyle){var camelCase=name.replace(/\-(\w)/g,function(all,letter){return letter.toUpperCase();});ret=elem.currentStyle[name]||elem.currentStyle[camelCase];if(!/^\d+(px)?$/i.test(ret)&&/^\d/.test(ret)){var left=style.left,rsLeft=elem.runtimeStyle.left;elem.runtimeStyle.left=elem.currentStyle.left;style.left=ret||0;ret=style.pixelLeft+"px";style.left=left;elem.runtimeStyle.left=rsLeft;}}
return ret;},clean:function(elems,context,fragment){context=context||document;if(typeof context.createElement==="undefined")
context=context.ownerDocument||context[0]&&context[0].ownerDocument||document;if(!fragment&&elems.length===1&&typeof elems[0]==="string"){var match=/^<(\w+)\s*\/?>$/.exec(elems[0]);if(match)
return[context.createElement(match[1])];}
var ret=[],scripts=[],div=context.createElement("div");jQuery.each(elems,function(i,elem){if(typeof elem==="number")
elem+='';if(!elem)
return;if(typeof elem==="string"){elem=elem.replace(/(<(\w+)[^>]*?)\/>/g,function(all,front,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:front+"></"+tag+">";});var tags=elem.replace(/^\s+/,"").substring(0,10).toLowerCase();var wrap=!tags.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!tags.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!tags.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!tags.indexOf("<td")||!tags.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!tags.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!jQuery.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--)
div=div.lastChild;if(!jQuery.support.tbody){var hasBody=/<tbody/i.test(elem),tbody=!tags.indexOf("<table")&&!hasBody?div.firstChild&&div.firstChild.childNodes:wrap[1]=="<table>"&&!hasBody?div.childNodes:[];for(var j=tbody.length-1;j>=0;--j)
if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length)
tbody[j].parentNode.removeChild(tbody[j]);}
if(!jQuery.support.leadingWhitespace&&/^\s/.test(elem))
div.insertBefore(context.createTextNode(elem.match(/^\s*/)[0]),div.firstChild);elem=jQuery.makeArray(div.childNodes);}
if(elem.nodeType)
ret.push(elem);else
ret=jQuery.merge(ret,elem);});if(fragment){for(var i=0;ret[i];i++){if(jQuery.nodeName(ret[i],"script")&&(!ret[i].type||ret[i].type.toLowerCase()==="text/javascript")){scripts.push(ret[i].parentNode?ret[i].parentNode.removeChild(ret[i]):ret[i]);}else{if(ret[i].nodeType===1)
ret.splice.apply(ret,[i+1,0].concat(jQuery.makeArray(ret[i].getElementsByTagName("script"))));fragment.appendChild(ret[i]);}}
return scripts;}
return ret;},attr:function(elem,name,value){if(!elem||elem.nodeType==3||elem.nodeType==8)
return undefined;var notxml=!jQuery.isXMLDoc(elem),set=value!==undefined;name=notxml&&jQuery.props[name]||name;if(elem.tagName){var special=/href|src|style/.test(name);if(name=="selected"&&elem.parentNode)
elem.parentNode.selectedIndex;if(name in elem&&notxml&&!special){if(set){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode)
throw"type property can't be changed";elem[name]=value;}
if(jQuery.nodeName(elem,"form")&&elem.getAttributeNode(name))
return elem.getAttributeNode(name).nodeValue;if(name=="tabIndex"){var attributeNode=elem.getAttributeNode("tabIndex");return attributeNode&&attributeNode.specified?attributeNode.value:elem.nodeName.match(/(button|input|object|select|textarea)/i)?0:elem.nodeName.match(/^(a|area)$/i)&&elem.href?0:undefined;}
return elem[name];}
if(!jQuery.support.style&&notxml&&name=="style")
return jQuery.attr(elem.style,"cssText",value);if(set)
elem.setAttribute(name,""+value);var attr=!jQuery.support.hrefNormalized&&notxml&&special?elem.getAttribute(name,2):elem.getAttribute(name);return attr===null?undefined:attr;}
if(!jQuery.support.opacity&&name=="opacity"){if(set){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+
(parseInt(value)+''=="NaN"?"":"alpha(opacity="+value*100+")");}
return elem.filter&&elem.filter.indexOf("opacity=")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100)+'':"";}
name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase();});if(set)
elem[name]=value;return elem[name];},trim:function(text){return(text||"").replace(/^\s+|\s+$/g,"");},makeArray:function(array){var ret=[];if(array!=null){var i=array.length;if(i==null||typeof array==="string"||jQuery.isFunction(array)||array.setInterval)
ret[0]=array;else
while(i)
ret[--i]=array[i];}
return ret;},inArray:function(elem,array){for(var i=0,length=array.length;i<length;i++)
if(array[i]===elem)
return i;return-1;},merge:function(first,second){var i=0,elem,pos=first.length;if(!jQuery.support.getAll){while((elem=second[i++])!=null)
if(elem.nodeType!=8)
first[pos++]=elem;}else
while((elem=second[i++])!=null)
first[pos++]=elem;return first;},unique:function(array){var ret=[],done={};try{for(var i=0,length=array.length;i<length;i++){var id=jQuery.data(array[i]);if(!done[id]){done[id]=true;ret.push(array[i]);}}}catch(e){ret=array;}
return ret;},grep:function(elems,callback,inv){var ret=[];for(var i=0,length=elems.length;i<length;i++)
if(!inv!=!callback(elems[i],i))
ret.push(elems[i]);return ret;},map:function(elems,callback){var ret=[];for(var i=0,length=elems.length;i<length;i++){var value=callback(elems[i],i);if(value!=null)
ret[ret.length]=value;}
return ret.concat.apply([],ret);}});var userAgent=navigator.userAgent.toLowerCase();jQuery.browser={version:(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,'0'])[1],safari:/webkit/.test(userAgent),opera:/opera/.test(userAgent),msie:/msie/.test(userAgent)&&!/opera/.test(userAgent),mozilla:/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent)};jQuery.each({parent:function(elem){return elem.parentNode;},parents:function(elem){return jQuery.dir(elem,"parentNode");},next:function(elem){return jQuery.nth(elem,2,"nextSibling");},prev:function(elem){return jQuery.nth(elem,2,"previousSibling");},nextAll:function(elem){return jQuery.dir(elem,"nextSibling");},prevAll:function(elem){return jQuery.dir(elem,"previousSibling");},siblings:function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem);},children:function(elem){return jQuery.sibling(elem.firstChild);},contents:function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes);}},function(name,fn){jQuery.fn[name]=function(selector){var ret=jQuery.map(this,fn);if(selector&&typeof selector=="string")
ret=jQuery.multiFilter(selector,ret);return this.pushStack(jQuery.unique(ret),name,selector);};});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(selector){var ret=[],insert=jQuery(selector);for(var i=0,l=insert.length;i<l;i++){var elems=(i>0?this.clone(true):this).get();jQuery.fn[original].apply(jQuery(insert[i]),elems);ret=ret.concat(elems);}
return this.pushStack(ret,name,selector);};});jQuery.each({removeAttr:function(name){jQuery.attr(this,name,"");if(this.nodeType==1)
this.removeAttribute(name);},addClass:function(classNames){jQuery.className.add(this,classNames);},removeClass:function(classNames){jQuery.className.remove(this,classNames);},toggleClass:function(classNames,state){if(typeof state!=="boolean")
state=!jQuery.className.has(this,classNames);jQuery.className[state?"add":"remove"](this,classNames);},remove:function(selector){if(!selector||jQuery.filter(selector,[this]).length){jQuery("*",this).add([this]).each(function(){jQuery.event.remove(this);jQuery.removeData(this);});if(this.parentNode)
this.parentNode.removeChild(this);}},empty:function(){jQuery(this).children().remove();while(this.firstChild)
this.removeChild(this.firstChild);}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments);};});function num(elem,prop){return elem[0]&&parseInt(jQuery.curCSS(elem[0],prop,true),10)||0;}
var expando="jQuery"+now(),uuid=0,windowData={};jQuery.extend({cache:{},data:function(elem,name,data){elem=elem==window?windowData:elem;var id=elem[expando];if(!id)
id=elem[expando]=++uuid;if(name&&!jQuery.cache[id])
jQuery.cache[id]={};if(data!==undefined)
jQuery.cache[id][name]=data;return name?jQuery.cache[id][name]:id;},removeData:function(elem,name){elem=elem==window?windowData:elem;var id=elem[expando];if(name){if(jQuery.cache[id]){delete jQuery.cache[id][name];name="";for(name in jQuery.cache[id])
break;if(!name)
jQuery.removeData(elem);}}else{try{delete elem[expando];}catch(e){if(elem.removeAttribute)
elem.removeAttribute(expando);}
delete jQuery.cache[id];}},queue:function(elem,type,data){if(elem){type=(type||"fx")+"queue";var q=jQuery.data(elem,type);if(!q||jQuery.isArray(data))
q=jQuery.data(elem,type,jQuery.makeArray(data));else if(data)
q.push(data);}
return q;},dequeue:function(elem,type){var queue=jQuery.queue(elem,type),fn=queue.shift();if(!type||type==="fx")
fn=queue[0];if(fn!==undefined)
fn.call(elem);}});jQuery.fn.extend({data:function(key,value){var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value===undefined){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data===undefined&&this.length)
data=jQuery.data(this[0],key);return data===undefined&&parts[1]?this.data(parts[0]):data;}else
return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value);});},removeData:function(key){return this.each(function(){jQuery.removeData(this,key);});},queue:function(type,data){if(typeof type!=="string"){data=type;type="fx";}
if(data===undefined)
return jQuery.queue(this[0],type);return this.each(function(){var queue=jQuery.queue(this,type,data);if(type=="fx"&&queue.length==1)
queue[0].call(this);});},dequeue:function(type){return this.each(function(){jQuery.dequeue(this,type);});}});
/*
 * Sizzle CSS Selector Engine - v0.9.3
 *  Copyright 2009, The Dojo Foundation
 *  Released under the MIT, BSD, and GPL Licenses.
 *  More information: http://sizzlejs.com/
 */
(function(){var chunker=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,done=0,toString=Object.prototype.toString;var Sizzle=function(selector,context,results,seed){results=results||[];context=context||document;if(context.nodeType!==1&&context.nodeType!==9)
return[];if(!selector||typeof selector!=="string"){return results;}
var parts=[],m,set,checkSet,check,mode,extra,prune=true;chunker.lastIndex=0;while((m=chunker.exec(selector))!==null){parts.push(m[1]);if(m[2]){extra=RegExp.rightContext;break;}}
if(parts.length>1&&origPOS.exec(selector)){if(parts.length===2&&Expr.relative[parts[0]]){set=posProcess(parts[0]+parts[1],context);}else{set=Expr.relative[parts[0]]?[context]:Sizzle(parts.shift(),context);while(parts.length){selector=parts.shift();if(Expr.relative[selector])
selector+=parts.shift();set=posProcess(selector,set);}}}else{var ret=seed?{expr:parts.pop(),set:makeArray(seed)}:Sizzle.find(parts.pop(),parts.length===1&&context.parentNode?context.parentNode:context,isXML(context));set=Sizzle.filter(ret.expr,ret.set);if(parts.length>0){checkSet=makeArray(set);}else{prune=false;}
while(parts.length){var cur=parts.pop(),pop=cur;if(!Expr.relative[cur]){cur="";}else{pop=parts.pop();}
if(pop==null){pop=context;}
Expr.relative[cur](checkSet,pop,isXML(context));}}
if(!checkSet){checkSet=set;}
if(!checkSet){throw"Syntax error, unrecognized expression: "+(cur||selector);}
if(toString.call(checkSet)==="[object Array]"){if(!prune){results.push.apply(results,checkSet);}else if(context.nodeType===1){for(var i=0;checkSet[i]!=null;i++){if(checkSet[i]&&(checkSet[i]===true||checkSet[i].nodeType===1&&contains(context,checkSet[i]))){results.push(set[i]);}}}else{for(var i=0;checkSet[i]!=null;i++){if(checkSet[i]&&checkSet[i].nodeType===1){results.push(set[i]);}}}}else{makeArray(checkSet,results);}
if(extra){Sizzle(extra,context,results,seed);if(sortOrder){hasDuplicate=false;results.sort(sortOrder);if(hasDuplicate){for(var i=1;i<results.length;i++){if(results[i]===results[i-1]){results.splice(i--,1);}}}}}
return results;};Sizzle.matches=function(expr,set){return Sizzle(expr,null,null,set);};Sizzle.find=function(expr,context,isXML){var set,match;if(!expr){return[];}
for(var i=0,l=Expr.order.length;i<l;i++){var type=Expr.order[i],match;if((match=Expr.match[type].exec(expr))){var left=RegExp.leftContext;if(left.substr(left.length-1)!=="\\"){match[1]=(match[1]||"").replace(/\\/g,"");set=Expr.find[type](match,context,isXML);if(set!=null){expr=expr.replace(Expr.match[type],"");break;}}}}
if(!set){set=context.getElementsByTagName("*");}
return{set:set,expr:expr};};Sizzle.filter=function(expr,set,inplace,not){var old=expr,result=[],curLoop=set,match,anyFound,isXMLFilter=set&&set[0]&&isXML(set[0]);while(expr&&set.length){for(var type in Expr.filter){if((match=Expr.match[type].exec(expr))!=null){var filter=Expr.filter[type],found,item;anyFound=false;if(curLoop==result){result=[];}
if(Expr.preFilter[type]){match=Expr.preFilter[type](match,curLoop,inplace,result,not,isXMLFilter);if(!match){anyFound=found=true;}else if(match===true){continue;}}
if(match){for(var i=0;(item=curLoop[i])!=null;i++){if(item){found=filter(item,match,i,curLoop);var pass=not^!!found;if(inplace&&found!=null){if(pass){anyFound=true;}else{curLoop[i]=false;}}else if(pass){result.push(item);anyFound=true;}}}}
if(found!==undefined){if(!inplace){curLoop=result;}
expr=expr.replace(Expr.match[type],"");if(!anyFound){return[];}
break;}}}
if(expr==old){if(anyFound==null){throw"Syntax error, unrecognized expression: "+expr;}else{break;}}
old=expr;}
return curLoop;};var Expr=Sizzle.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(elem){return elem.getAttribute("href");}},relative:{"+":function(checkSet,part,isXML){var isPartStr=typeof part==="string",isTag=isPartStr&&!/\W/.test(part),isPartStrNotTag=isPartStr&&!isTag;if(isTag&&!isXML){part=part.toUpperCase();}
for(var i=0,l=checkSet.length,elem;i<l;i++){if((elem=checkSet[i])){while((elem=elem.previousSibling)&&elem.nodeType!==1){}
checkSet[i]=isPartStrNotTag||elem&&elem.nodeName===part?elem||false:elem===part;}}
if(isPartStrNotTag){Sizzle.filter(part,checkSet,true);}},">":function(checkSet,part,isXML){var isPartStr=typeof part==="string";if(isPartStr&&!/\W/.test(part)){part=isXML?part:part.toUpperCase();for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){var parent=elem.parentNode;checkSet[i]=parent.nodeName===part?parent:false;}}}else{for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){checkSet[i]=isPartStr?elem.parentNode:elem.parentNode===part;}}
if(isPartStr){Sizzle.filter(part,checkSet,true);}}},"":function(checkSet,part,isXML){var doneName=done++,checkFn=dirCheck;if(!part.match(/\W/)){var nodeCheck=part=isXML?part:part.toUpperCase();checkFn=dirNodeCheck;}
checkFn("parentNode",part,doneName,checkSet,nodeCheck,isXML);},"~":function(checkSet,part,isXML){var doneName=done++,checkFn=dirCheck;if(typeof part==="string"&&!part.match(/\W/)){var nodeCheck=part=isXML?part:part.toUpperCase();checkFn=dirNodeCheck;}
checkFn("previousSibling",part,doneName,checkSet,nodeCheck,isXML);}},find:{ID:function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);return m?[m]:[];}},NAME:function(match,context,isXML){if(typeof context.getElementsByName!=="undefined"){var ret=[],results=context.getElementsByName(match[1]);for(var i=0,l=results.length;i<l;i++){if(results[i].getAttribute("name")===match[1]){ret.push(results[i]);}}
return ret.length===0?null:ret;}},TAG:function(match,context){return context.getElementsByTagName(match[1]);}},preFilter:{CLASS:function(match,curLoop,inplace,result,not,isXML){match=" "+match[1].replace(/\\/g,"")+" ";if(isXML){return match;}
for(var i=0,elem;(elem=curLoop[i])!=null;i++){if(elem){if(not^(elem.className&&(" "+elem.className+" ").indexOf(match)>=0)){if(!inplace)
result.push(elem);}else if(inplace){curLoop[i]=false;}}}
return false;},ID:function(match){return match[1].replace(/\\/g,"");},TAG:function(match,curLoop){for(var i=0;curLoop[i]===false;i++){}
return curLoop[i]&&isXML(curLoop[i])?match[1]:match[1].toUpperCase();},CHILD:function(match){if(match[1]=="nth"){var test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(match[2]=="even"&&"2n"||match[2]=="odd"&&"2n+1"||!/\D/.test(match[2])&&"0n+"+match[2]||match[2]);match[2]=(test[1]+(test[2]||1))-0;match[3]=test[3]-0;}
match[0]=done++;return match;},ATTR:function(match,curLoop,inplace,result,not,isXML){var name=match[1].replace(/\\/g,"");if(!isXML&&Expr.attrMap[name]){match[1]=Expr.attrMap[name];}
if(match[2]==="~="){match[4]=" "+match[4]+" ";}
return match;},PSEUDO:function(match,curLoop,inplace,result,not){if(match[1]==="not"){if(match[3].match(chunker).length>1||/^\w/.test(match[3])){match[3]=Sizzle(match[3],null,null,curLoop);}else{var ret=Sizzle.filter(match[3],curLoop,inplace,true^not);if(!inplace){result.push.apply(result,ret);}
return false;}}else if(Expr.match.POS.test(match[0])||Expr.match.CHILD.test(match[0])){return true;}
return match;},POS:function(match){match.unshift(true);return match;}},filters:{enabled:function(elem){return elem.disabled===false&&elem.type!=="hidden";},disabled:function(elem){return elem.disabled===true;},checked:function(elem){return elem.checked===true;},selected:function(elem){elem.parentNode.selectedIndex;return elem.selected===true;},parent:function(elem){return!!elem.firstChild;},empty:function(elem){return!elem.firstChild;},has:function(elem,i,match){return!!Sizzle(match[3],elem).length;},header:function(elem){return /h\d/i.test(elem.nodeName);},text:function(elem){return"text"===elem.type;},radio:function(elem){return"radio"===elem.type;},checkbox:function(elem){return"checkbox"===elem.type;},file:function(elem){return"file"===elem.type;},password:function(elem){return"password"===elem.type;},submit:function(elem){return"submit"===elem.type;},image:function(elem){return"image"===elem.type;},reset:function(elem){return"reset"===elem.type;},button:function(elem){return"button"===elem.type||elem.nodeName.toUpperCase()==="BUTTON";},input:function(elem){return /input|select|textarea|button/i.test(elem.nodeName);}},setFilters:{first:function(elem,i){return i===0;},last:function(elem,i,match,array){return i===array.length-1;},even:function(elem,i){return i%2===0;},odd:function(elem,i){return i%2===1;},lt:function(elem,i,match){return i<match[3]-0;},gt:function(elem,i,match){return i>match[3]-0;},nth:function(elem,i,match){return match[3]-0==i;},eq:function(elem,i,match){return match[3]-0==i;}},filter:{PSEUDO:function(elem,match,i,array){var name=match[1],filter=Expr.filters[name];if(filter){return filter(elem,i,match,array);}else if(name==="contains"){return(elem.textContent||elem.innerText||"").indexOf(match[3])>=0;}else if(name==="not"){var not=match[3];for(var i=0,l=not.length;i<l;i++){if(not[i]===elem){return false;}}
return true;}},CHILD:function(elem,match){var type=match[1],node=elem;switch(type){case'only':case'first':while(node=node.previousSibling){if(node.nodeType===1)return false;}
if(type=='first')return true;node=elem;case'last':while(node=node.nextSibling){if(node.nodeType===1)return false;}
return true;case'nth':var first=match[2],last=match[3];if(first==1&&last==0){return true;}
var doneName=match[0],parent=elem.parentNode;if(parent&&(parent.sizcache!==doneName||!elem.nodeIndex)){var count=0;for(node=parent.firstChild;node;node=node.nextSibling){if(node.nodeType===1){node.nodeIndex=++count;}}
parent.sizcache=doneName;}
var diff=elem.nodeIndex-last;if(first==0){return diff==0;}else{return(diff%first==0&&diff/first>=0);}}},ID:function(elem,match){return elem.nodeType===1&&elem.getAttribute("id")===match;},TAG:function(elem,match){return(match==="*"&&elem.nodeType===1)||elem.nodeName===match;},CLASS:function(elem,match){return(" "+(elem.className||elem.getAttribute("class"))+" ").indexOf(match)>-1;},ATTR:function(elem,match){var name=match[1],result=Expr.attrHandle[name]?Expr.attrHandle[name](elem):elem[name]!=null?elem[name]:elem.getAttribute(name),value=result+"",type=match[2],check=match[4];return result==null?type==="!=":type==="="?value===check:type==="*="?value.indexOf(check)>=0:type==="~="?(" "+value+" ").indexOf(check)>=0:!check?value&&result!==false:type==="!="?value!=check:type==="^="?value.indexOf(check)===0:type==="$="?value.substr(value.length-check.length)===check:type==="|="?value===check||value.substr(0,check.length+1)===check+"-":false;},POS:function(elem,match,i,array){var name=match[2],filter=Expr.setFilters[name];if(filter){return filter(elem,i,match,array);}}}};var origPOS=Expr.match.POS;for(var type in Expr.match){Expr.match[type]=RegExp(Expr.match[type].source+/(?![^\[]*\])(?![^\(]*\))/.source);}
var makeArray=function(array,results){array=Array.prototype.slice.call(array);if(results){results.push.apply(results,array);return results;}
return array;};try{Array.prototype.slice.call(document.documentElement.childNodes);}catch(e){makeArray=function(array,results){var ret=results||[];if(toString.call(array)==="[object Array]"){Array.prototype.push.apply(ret,array);}else{if(typeof array.length==="number"){for(var i=0,l=array.length;i<l;i++){ret.push(array[i]);}}else{for(var i=0;array[i];i++){ret.push(array[i]);}}}
return ret;};}
var sortOrder;if(document.documentElement.compareDocumentPosition){sortOrder=function(a,b){var ret=a.compareDocumentPosition(b)&4?-1:a===b?0:1;if(ret===0){hasDuplicate=true;}
return ret;};}else if("sourceIndex"in document.documentElement){sortOrder=function(a,b){var ret=a.sourceIndex-b.sourceIndex;if(ret===0){hasDuplicate=true;}
return ret;};}else if(document.createRange){sortOrder=function(a,b){var aRange=a.ownerDocument.createRange(),bRange=b.ownerDocument.createRange();aRange.selectNode(a);aRange.collapse(true);bRange.selectNode(b);bRange.collapse(true);var ret=aRange.compareBoundaryPoints(Range.START_TO_END,bRange);if(ret===0){hasDuplicate=true;}
return ret;};}
(function(){var form=document.createElement("form"),id="script"+(new Date).getTime();form.innerHTML="<input name='"+id+"'/>";var root=document.documentElement;root.insertBefore(form,root.firstChild);if(!!document.getElementById(id)){Expr.find.ID=function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);return m?m.id===match[1]||typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id").nodeValue===match[1]?[m]:undefined:[];}};Expr.filter.ID=function(elem,match){var node=typeof elem.getAttributeNode!=="undefined"&&elem.getAttributeNode("id");return elem.nodeType===1&&node&&node.nodeValue===match;};}
root.removeChild(form);})();(function(){var div=document.createElement("div");div.appendChild(document.createComment(""));if(div.getElementsByTagName("*").length>0){Expr.find.TAG=function(match,context){var results=context.getElementsByTagName(match[1]);if(match[1]==="*"){var tmp=[];for(var i=0;results[i];i++){if(results[i].nodeType===1){tmp.push(results[i]);}}
results=tmp;}
return results;};}
div.innerHTML="<a href='#'></a>";if(div.firstChild&&typeof div.firstChild.getAttribute!=="undefined"&&div.firstChild.getAttribute("href")!=="#"){Expr.attrHandle.href=function(elem){return elem.getAttribute("href",2);};}})();if(document.querySelectorAll)(function(){var oldSizzle=Sizzle,div=document.createElement("div");div.innerHTML="<p class='TEST'></p>";if(div.querySelectorAll&&div.querySelectorAll(".TEST").length===0){return;}
Sizzle=function(query,context,extra,seed){context=context||document;if(!seed&&context.nodeType===9&&!isXML(context)){try{return makeArray(context.querySelectorAll(query),extra);}catch(e){}}
return oldSizzle(query,context,extra,seed);};Sizzle.find=oldSizzle.find;Sizzle.filter=oldSizzle.filter;Sizzle.selectors=oldSizzle.selectors;Sizzle.matches=oldSizzle.matches;})();if(document.getElementsByClassName&&document.documentElement.getElementsByClassName)(function(){var div=document.createElement("div");div.innerHTML="<div class='test e'></div><div class='test'></div>";if(div.getElementsByClassName("e").length===0)
return;div.lastChild.className="e";if(div.getElementsByClassName("e").length===1)
return;Expr.order.splice(1,0,"CLASS");Expr.find.CLASS=function(match,context,isXML){if(typeof context.getElementsByClassName!=="undefined"&&!isXML){return context.getElementsByClassName(match[1]);}};})();function dirNodeCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){var sibDir=dir=="previousSibling"&&!isXML;for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){if(sibDir&&elem.nodeType===1){elem.sizcache=doneName;elem.sizset=i;}
elem=elem[dir];var match=false;while(elem){if(elem.sizcache===doneName){match=checkSet[elem.sizset];break;}
if(elem.nodeType===1&&!isXML){elem.sizcache=doneName;elem.sizset=i;}
if(elem.nodeName===cur){match=elem;break;}
elem=elem[dir];}
checkSet[i]=match;}}}
function dirCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){var sibDir=dir=="previousSibling"&&!isXML;for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){if(sibDir&&elem.nodeType===1){elem.sizcache=doneName;elem.sizset=i;}
elem=elem[dir];var match=false;while(elem){if(elem.sizcache===doneName){match=checkSet[elem.sizset];break;}
if(elem.nodeType===1){if(!isXML){elem.sizcache=doneName;elem.sizset=i;}
if(typeof cur!=="string"){if(elem===cur){match=true;break;}}else if(Sizzle.filter(cur,[elem]).length>0){match=elem;break;}}
elem=elem[dir];}
checkSet[i]=match;}}}
var contains=document.compareDocumentPosition?function(a,b){return a.compareDocumentPosition(b)&16;}:function(a,b){return a!==b&&(a.contains?a.contains(b):true);};var isXML=function(elem){return elem.nodeType===9&&elem.documentElement.nodeName!=="HTML"||!!elem.ownerDocument&&isXML(elem.ownerDocument);};var posProcess=function(selector,context){var tmpSet=[],later="",match,root=context.nodeType?[context]:context;while((match=Expr.match.PSEUDO.exec(selector))){later+=match[0];selector=selector.replace(Expr.match.PSEUDO,"");}
selector=Expr.relative[selector]?selector+"*":selector;for(var i=0,l=root.length;i<l;i++){Sizzle(selector,root[i],tmpSet);}
return Sizzle.filter(later,tmpSet);};jQuery.find=Sizzle;jQuery.filter=Sizzle.filter;jQuery.expr=Sizzle.selectors;jQuery.expr[":"]=jQuery.expr.filters;Sizzle.selectors.filters.hidden=function(elem){return elem.offsetWidth===0||elem.offsetHeight===0;};Sizzle.selectors.filters.visible=function(elem){return elem.offsetWidth>0||elem.offsetHeight>0;};Sizzle.selectors.filters.animated=function(elem){return jQuery.grep(jQuery.timers,function(fn){return elem===fn.elem;}).length;};jQuery.multiFilter=function(expr,elems,not){if(not){expr=":not("+expr+")";}
return Sizzle.matches(expr,elems);};jQuery.dir=function(elem,dir){var matched=[],cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1)
matched.push(cur);cur=cur[dir];}
return matched;};jQuery.nth=function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir])
if(cur.nodeType==1&&++num==result)
break;return cur;};jQuery.sibling=function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&n!=elem)
r.push(n);}
return r;};return;window.Sizzle=Sizzle;})();jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType==3||elem.nodeType==8)
return;if(elem.setInterval&&elem!=window)
elem=window;if(!handler.guid)
handler.guid=this.guid++;if(data!==undefined){var fn=handler;handler=this.proxy(fn);handler.data=data;}
var events=jQuery.data(elem,"events")||jQuery.data(elem,"events",{}),handle=jQuery.data(elem,"handle")||jQuery.data(elem,"handle",function(){return typeof jQuery!=="undefined"&&!jQuery.event.triggered?jQuery.event.handle.apply(arguments.callee.elem,arguments):undefined;});handle.elem=elem;jQuery.each(types.split(/\s+/),function(index,type){var namespaces=type.split(".");type=namespaces.shift();handler.type=namespaces.slice().sort().join(".");var handlers=events[type];if(jQuery.event.specialAll[type])
jQuery.event.specialAll[type].setup.call(elem,data,namespaces);if(!handlers){handlers=events[type]={};if(!jQuery.event.special[type]||jQuery.event.special[type].setup.call(elem,data,namespaces)===false){if(elem.addEventListener)
elem.addEventListener(type,handle,false);else if(elem.attachEvent)
elem.attachEvent("on"+type,handle);}}
handlers[handler.guid]=handler;jQuery.event.global[type]=true;});elem=null;},guid:1,global:{},remove:function(elem,types,handler){if(elem.nodeType==3||elem.nodeType==8)
return;var events=jQuery.data(elem,"events"),ret,index;if(events){if(types===undefined||(typeof types==="string"&&types.charAt(0)=="."))
for(var type in events)
this.remove(elem,type+(types||""));else{if(types.type){handler=types.handler;types=types.type;}
jQuery.each(types.split(/\s+/),function(index,type){var namespaces=type.split(".");type=namespaces.shift();var namespace=RegExp("(^|\\.)"+namespaces.slice().sort().join(".*\\.")+"(\\.|$)");if(events[type]){if(handler)
delete events[type][handler.guid];else
for(var handle in events[type])
if(namespace.test(events[type][handle].type))
delete events[type][handle];if(jQuery.event.specialAll[type])
jQuery.event.specialAll[type].teardown.call(elem,namespaces);for(ret in events[type])break;if(!ret){if(!jQuery.event.special[type]||jQuery.event.special[type].teardown.call(elem,namespaces)===false){if(elem.removeEventListener)
elem.removeEventListener(type,jQuery.data(elem,"handle"),false);else if(elem.detachEvent)
elem.detachEvent("on"+type,jQuery.data(elem,"handle"));}
ret=null;delete events[type];}}});}
for(ret in events)break;if(!ret){var handle=jQuery.data(elem,"handle");if(handle)handle.elem=null;jQuery.removeData(elem,"events");jQuery.removeData(elem,"handle");}}},trigger:function(event,data,elem,bubbling){var type=event.type||event;if(!bubbling){event=typeof event==="object"?event[expando]?event:jQuery.extend(jQuery.Event(type),event):jQuery.Event(type);if(type.indexOf("!")>=0){event.type=type=type.slice(0,-1);event.exclusive=true;}
if(!elem){event.stopPropagation();if(this.global[type])
jQuery.each(jQuery.cache,function(){if(this.events&&this.events[type])
jQuery.event.trigger(event,data,this.handle.elem);});}
if(!elem||elem.nodeType==3||elem.nodeType==8)
return undefined;event.result=undefined;event.target=elem;data=jQuery.makeArray(data);data.unshift(event);}
event.currentTarget=elem;var handle=jQuery.data(elem,"handle");if(handle)
handle.apply(elem,data);if((!elem[type]||(jQuery.nodeName(elem,'a')&&type=="click"))&&elem["on"+type]&&elem["on"+type].apply(elem,data)===false)
event.result=false;if(!bubbling&&elem[type]&&!event.isDefaultPrevented()&&!(jQuery.nodeName(elem,'a')&&type=="click")){this.triggered=true;try{elem[type]();}catch(e){}}
this.triggered=false;if(!event.isPropagationStopped()){var parent=elem.parentNode||elem.ownerDocument;if(parent)
jQuery.event.trigger(event,data,parent,true);}},handle:function(event){var all,handlers;event=arguments[0]=jQuery.event.fix(event||window.event);event.currentTarget=this;var namespaces=event.type.split(".");event.type=namespaces.shift();all=!namespaces.length&&!event.exclusive;var namespace=RegExp("(^|\\.)"+namespaces.slice().sort().join(".*\\.")+"(\\.|$)");handlers=(jQuery.data(this,"events")||{})[event.type];for(var j in handlers){var handler=handlers[j];if(all||namespace.test(handler.type)){event.handler=handler;event.data=handler.data;var ret=handler.apply(this,arguments);if(ret!==undefined){event.result=ret;if(ret===false){event.preventDefault();event.stopPropagation();}}
if(event.isImmediatePropagationStopped())
break;}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(event){if(event[expando])
return event;var originalEvent=event;event=jQuery.Event(originalEvent);for(var i=this.props.length,prop;i;){prop=this.props[--i];event[prop]=originalEvent[prop];}
if(!event.target)
event.target=event.srcElement||document;if(event.target.nodeType==3)
event.target=event.target.parentNode;if(!event.relatedTarget&&event.fromElement)
event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement;if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc.clientTop||0);}
if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode))
event.which=event.charCode||event.keyCode;if(!event.metaKey&&event.ctrlKey)
event.metaKey=event.ctrlKey;if(!event.which&&event.button)
event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)));return event;},proxy:function(fn,proxy){proxy=proxy||function(){return fn.apply(this,arguments);};proxy.guid=fn.guid=fn.guid||proxy.guid||this.guid++;return proxy;},special:{ready:{setup:bindReady,teardown:function(){}}},specialAll:{live:{setup:function(selector,namespaces){jQuery.event.add(this,namespaces[0],liveHandler);},teardown:function(namespaces){if(namespaces.length){var remove=0,name=RegExp("(^|\\.)"+namespaces[0]+"(\\.|$)");jQuery.each((jQuery.data(this,"events").live||{}),function(){if(name.test(this.type))
remove++;});if(remove<1)
jQuery.event.remove(this,namespaces[0],liveHandler);}}}}};jQuery.Event=function(src){if(!this.preventDefault)
return new jQuery.Event(src);if(src&&src.type){this.originalEvent=src;this.type=src.type;}else
this.type=src;this.timeStamp=now();this[expando]=true;};function returnFalse(){return false;}
function returnTrue(){return true;}
jQuery.Event.prototype={preventDefault:function(){this.isDefaultPrevented=returnTrue;var e=this.originalEvent;if(!e)
return;if(e.preventDefault)
e.preventDefault();e.returnValue=false;},stopPropagation:function(){this.isPropagationStopped=returnTrue;var e=this.originalEvent;if(!e)
return;if(e.stopPropagation)
e.stopPropagation();e.cancelBubble=true;},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=returnTrue;this.stopPropagation();},isDefaultPrevented:returnFalse,isPropagationStopped:returnFalse,isImmediatePropagationStopped:returnFalse};var withinElement=function(event){var parent=event.relatedTarget;while(parent&&parent!=this)
try{parent=parent.parentNode;}
catch(e){parent=this;}
if(parent!=this){event.type=event.data;jQuery.event.handle.apply(this,arguments);}};jQuery.each({mouseover:'mouseenter',mouseout:'mouseleave'},function(orig,fix){jQuery.event.special[fix]={setup:function(){jQuery.event.add(this,orig,withinElement,fix);},teardown:function(){jQuery.event.remove(this,orig,withinElement);}};});jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data);});},one:function(type,data,fn){var one=jQuery.event.proxy(fn||data,function(event){jQuery(this).unbind(event,one);return(fn||data).apply(this,arguments);});return this.each(function(){jQuery.event.add(this,type,one,fn&&data);});},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn);});},trigger:function(type,data){return this.each(function(){jQuery.event.trigger(type,data,this);});},triggerHandler:function(type,data){if(this[0]){var event=jQuery.Event(type);event.preventDefault();event.stopPropagation();jQuery.event.trigger(event,data,this[0]);return event.result;}},toggle:function(fn){var args=arguments,i=1;while(i<args.length)
jQuery.event.proxy(fn,args[i++]);return this.click(jQuery.event.proxy(fn,function(event){this.lastToggle=(this.lastToggle||0)%i;event.preventDefault();return args[this.lastToggle++].apply(this,arguments)||false;}));},hover:function(fnOver,fnOut){return this.mouseenter(fnOver).mouseleave(fnOut);},ready:function(fn){bindReady();if(jQuery.isReady)
fn.call(document,jQuery);else
jQuery.readyList.push(fn);return this;},live:function(type,fn){var proxy=jQuery.event.proxy(fn);proxy.guid+=this.selector+type;jQuery(document).bind(liveConvert(type,this.selector),this.selector,proxy);return this;},die:function(type,fn){jQuery(document).unbind(liveConvert(type,this.selector),fn?{guid:fn.guid+this.selector+type}:null);return this;}});function liveHandler(event){var check=RegExp("(^|\\.)"+event.type+"(\\.|$)"),stop=true,elems=[];jQuery.each(jQuery.data(this,"events").live||[],function(i,fn){if(check.test(fn.type)){var elem=jQuery(event.target).closest(fn.data)[0];if(elem)
elems.push({elem:elem,fn:fn});}});elems.sort(function(a,b){return jQuery.data(a.elem,"closest")-jQuery.data(b.elem,"closest");});jQuery.each(elems,function(){if(this.fn.call(this.elem,event,this.fn.data)===false)
return(stop=false);});return stop;}
function liveConvert(type,selector){return["live",type,selector.replace(/\./g,"`").replace(/ /g,"|")].join(".");}
jQuery.extend({isReady:false,readyList:[],ready:function(){if(!jQuery.isReady){jQuery.isReady=true;if(jQuery.readyList){jQuery.each(jQuery.readyList,function(){this.call(document,jQuery);});jQuery.readyList=null;}
jQuery(document).triggerHandler("ready");}}});var readyBound=false;function bindReady(){if(readyBound)return;readyBound=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);jQuery.ready();},false);}else if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);jQuery.ready();}});if(document.documentElement.doScroll&&window==window.top)(function(){if(jQuery.isReady)return;try{document.documentElement.doScroll("left");}catch(error){setTimeout(arguments.callee,0);return;}
jQuery.ready();})();}
jQuery.event.add(window,"load",jQuery.ready);}
jQuery.each(("blur,focus,load,resize,scroll,unload,click,dblclick,"+"mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,"+"change,select,submit,keydown,keypress,keyup,error").split(","),function(i,name){jQuery.fn[name]=function(fn){return fn?this.bind(name,fn):this.trigger(name);};});jQuery(window).bind('unload',function(){for(var id in jQuery.cache)
if(id!=1&&jQuery.cache[id].handle)
jQuery.event.remove(jQuery.cache[id].handle.elem);});(function(){jQuery.support={};var root=document.documentElement,script=document.createElement("script"),div=document.createElement("div"),id="script"+(new Date).getTime();div.style.display="none";div.innerHTML='   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var all=div.getElementsByTagName("*"),a=div.getElementsByTagName("a")[0];if(!all||!all.length||!a){return;}
jQuery.support={leadingWhitespace:div.firstChild.nodeType==3,tbody:!div.getElementsByTagName("tbody").length,objectAll:!!div.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!div.getElementsByTagName("link").length,style:/red/.test(a.getAttribute("style")),hrefNormalized:a.getAttribute("href")==="/a",opacity:a.style.opacity==="0.5",cssFloat:!!a.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};script.type="text/javascript";try{script.appendChild(document.createTextNode("window."+id+"=1;"));}catch(e){}
root.insertBefore(script,root.firstChild);if(window[id]){jQuery.support.scriptEval=true;delete window[id];}
root.removeChild(script);if(div.attachEvent&&div.fireEvent){div.attachEvent("onclick",function(){jQuery.support.noCloneEvent=false;div.detachEvent("onclick",arguments.callee);});div.cloneNode(true).fireEvent("onclick");}
jQuery(function(){var div=document.createElement("div");div.style.width=div.style.paddingLeft="1px";document.body.appendChild(div);jQuery.boxModel=jQuery.support.boxModel=div.offsetWidth===2;document.body.removeChild(div).style.display='none';});})();var styleFloat=jQuery.support.cssFloat?"cssFloat":"styleFloat";jQuery.props={"for":"htmlFor","class":"className","float":styleFloat,cssFloat:styleFloat,styleFloat:styleFloat,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};jQuery.fn.extend({_load:jQuery.fn.load,load:function(url,params,callback){if(typeof url!=="string")
return this._load(url);var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}
var type="GET";if(params)
if(jQuery.isFunction(params)){callback=params;params=null;}else if(typeof params==="object"){params=jQuery.param(params);type="POST";}
var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(res,status){if(status=="success"||status=="notmodified")
self.html(selector?jQuery("<div/>").append(res.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(selector):res.responseText);if(callback)
self.each(callback,[res.responseText,status,res]);}});return this;},serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return this.elements?jQuery.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type));}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:jQuery.isArray(val)?jQuery.map(val,function(val,i){return{name:elem.name,value:val};}):{name:elem.name,value:val};}).get();}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f);};});var jsc=now();jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data=null;}
return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type});},getScript:function(url,callback){return jQuery.get(url,null,callback,"script");},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json");},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={};}
return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type});},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings);},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(s){s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));var jsonp,jsre=/=\?(&|$)/g,status,data,type=s.type.toUpperCase();if(s.data&&s.processData&&typeof s.data!=="string")
s.data=jQuery.param(s.data);if(s.dataType=="jsonp"){if(type=="GET"){if(!s.url.match(jsre))
s.url+=(s.url.match(/\?/)?"&":"?")+(s.jsonp||"callback")+"=?";}else if(!s.data||!s.data.match(jsre))
s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?";s.dataType="json";}
if(s.dataType=="json"&&(s.data&&s.data.match(jsre)||s.url.match(jsre))){jsonp="jsonp"+jsc++;if(s.data)
s.data=(s.data+"").replace(jsre,"="+jsonp+"$1");s.url=s.url.replace(jsre,"="+jsonp+"$1");s.dataType="script";window[jsonp]=function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp];}catch(e){}
if(head)
head.removeChild(script);};}
if(s.dataType=="script"&&s.cache==null)
s.cache=false;if(s.cache===false&&type=="GET"){var ts=now();var ret=s.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+ts+"$2");s.url=ret+((ret==s.url)?(s.url.match(/\?/)?"&":"?")+"_="+ts:"");}
if(s.data&&type=="GET"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null;}
if(s.global&&!jQuery.active++)
jQuery.event.trigger("ajaxStart");var parts=/^(\w+:)?\/\/([^\/?#]+)/.exec(s.url);if(s.dataType=="script"&&type=="GET"&&parts&&(parts[1]&&parts[1]!=location.protocol||parts[2]!=location.host)){var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.src=s.url;if(s.scriptCharset)
script.charset=s.scriptCharset;if(!jsonp){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;success();complete();script.onload=script.onreadystatechange=null;head.removeChild(script);}};}
head.appendChild(script);return undefined;}
var requestDone=false;var xhr=s.xhr();if(s.username)
xhr.open(type,s.url,s.async,s.username,s.password);else
xhr.open(type,s.url,s.async);try{if(s.data)
xhr.setRequestHeader("Content-Type",s.contentType);if(s.ifModified)
xhr.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT");xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default);}catch(e){}
if(s.beforeSend&&s.beforeSend(xhr,s)===false){if(s.global&&!--jQuery.active)
jQuery.event.trigger("ajaxStop");xhr.abort();return false;}
if(s.global)
jQuery.event.trigger("ajaxSend",[xhr,s]);var onreadystatechange=function(isTimeout){if(xhr.readyState==0){if(ival){clearInterval(ival);ival=null;if(s.global&&!--jQuery.active)
jQuery.event.trigger("ajaxStop");}}else if(!requestDone&&xhr&&(xhr.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null;}
status=isTimeout=="timeout"?"timeout":!jQuery.httpSuccess(xhr)?"error":s.ifModified&&jQuery.httpNotModified(xhr,s.url)?"notmodified":"success";if(status=="success"){try{data=jQuery.httpData(xhr,s.dataType,s);}catch(e){status="parsererror";}}
if(status=="success"){var modRes;try{modRes=xhr.getResponseHeader("Last-Modified");}catch(e){}
if(s.ifModified&&modRes)
jQuery.lastModified[s.url]=modRes;if(!jsonp)
success();}else
jQuery.handleError(s,xhr,status);complete();if(isTimeout)
xhr.abort();if(s.async)
xhr=null;}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0)
setTimeout(function(){if(xhr&&!requestDone)
onreadystatechange("timeout");},s.timeout);}
try{xhr.send(s.data);}catch(e){jQuery.handleError(s,xhr,null,e);}
if(!s.async)
onreadystatechange();function success(){if(s.success)
s.success(data,status);if(s.global)
jQuery.event.trigger("ajaxSuccess",[xhr,s]);}
function complete(){if(s.complete)
s.complete(xhr,status);if(s.global)
jQuery.event.trigger("ajaxComplete",[xhr,s]);if(s.global&&!--jQuery.active)
jQuery.event.trigger("ajaxStop");}
return xhr;},handleError:function(s,xhr,status,e){if(s.error)s.error(xhr,status,e);if(s.global)
jQuery.event.trigger("ajaxError",[xhr,s,e]);},active:0,httpSuccess:function(xhr){try{return!xhr.status&&location.protocol=="file:"||(xhr.status>=200&&xhr.status<300)||xhr.status==304||xhr.status==1223;}catch(e){}
return false;},httpNotModified:function(xhr,url){try{var xhrRes=xhr.getResponseHeader("Last-Modified");return xhr.status==304||xhrRes==jQuery.lastModified[url];}catch(e){}
return false;},httpData:function(xhr,type,s){var ct=xhr.getResponseHeader("content-type"),xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.tagName=="parsererror")
throw"parsererror";if(s&&s.dataFilter)
data=s.dataFilter(data,type);if(typeof data==="string"){if(type=="script")
jQuery.globalEval(data);if(type=="json")
data=window["eval"]("("+data+")");}
return data;},param:function(a){var s=[];function add(key,value){s[s.length]=encodeURIComponent(key)+'='+encodeURIComponent(value);};if(jQuery.isArray(a)||a.jquery)
jQuery.each(a,function(){add(this.name,this.value);});else
for(var j in a)
if(jQuery.isArray(a[j]))
jQuery.each(a[j],function(){add(j,this);});else
add(j,jQuery.isFunction(a[j])?a[j]():a[j]);return s.join("&").replace(/%20/g,"+");}});var elemdisplay={},timerId,fxAttrs=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function genFx(type,num){var obj={};jQuery.each(fxAttrs.concat.apply([],fxAttrs.slice(0,num)),function(){obj[this]=type;});return obj;}
jQuery.fn.extend({show:function(speed,callback){if(speed){return this.animate(genFx("show",3),speed,callback);}else{for(var i=0,l=this.length;i<l;i++){var old=jQuery.data(this[i],"olddisplay");this[i].style.display=old||"";if(jQuery.css(this[i],"display")==="none"){var tagName=this[i].tagName,display;if(elemdisplay[tagName]){display=elemdisplay[tagName];}else{var elem=jQuery("<"+tagName+" />").appendTo("body");display=elem.css("display");if(display==="none")
display="block";elem.remove();elemdisplay[tagName]=display;}
jQuery.data(this[i],"olddisplay",display);}}
for(var i=0,l=this.length;i<l;i++){this[i].style.display=jQuery.data(this[i],"olddisplay")||"";}
return this;}},hide:function(speed,callback){if(speed){return this.animate(genFx("hide",3),speed,callback);}else{for(var i=0,l=this.length;i<l;i++){var old=jQuery.data(this[i],"olddisplay");if(!old&&old!=="none")
jQuery.data(this[i],"olddisplay",jQuery.css(this[i],"display"));}
for(var i=0,l=this.length;i<l;i++){this[i].style.display="none";}
return this;}},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){var bool=typeof fn==="boolean";return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle.apply(this,arguments):fn==null||bool?this.each(function(){var state=bool?fn:jQuery(this).is(":hidden");jQuery(this)[state?"show":"hide"]();}):this.animate(genFx("toggle",3),fn,fn2);},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback);},animate:function(prop,speed,easing,callback){var optall=jQuery.speed(speed,easing,callback);return this[optall.queue===false?"each":"queue"](function(){var opt=jQuery.extend({},optall),p,hidden=this.nodeType==1&&jQuery(this).is(":hidden"),self=this;for(p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden)
return opt.complete.call(this);if((p=="height"||p=="width")&&this.style){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow;}}
if(opt.overflow!=null)
this.style.overflow="hidden";opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(/toggle|show|hide/.test(val))
e[val=="toggle"?hidden?"show":"hide":val](prop);else{var parts=val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit;}
if(parts[1])
end=((parts[1]=="-="?-1:1)*end)+start;e.custom(start,end,unit);}else
e.custom(start,val,"");}});return true;});},stop:function(clearQueue,gotoEnd){var timers=jQuery.timers;if(clearQueue)
this.queue([]);this.each(function(){for(var i=timers.length-1;i>=0;i--)
if(timers[i].elem==this){if(gotoEnd)
timers[i](true);timers.splice(i,1);}});if(!gotoEnd)
this.dequeue();return this;}});jQuery.each({slideDown:genFx("show",1),slideUp:genFx("hide",1),slideToggle:genFx("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(name,props){jQuery.fn[name]=function(speed,callback){return this.animate(props,speed,callback);};});jQuery.extend({speed:function(speed,easing,fn){var opt=typeof speed==="object"?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&!jQuery.isFunction(easing)&&easing};opt.duration=jQuery.fx.off?0:typeof opt.duration==="number"?opt.duration:jQuery.fx.speeds[opt.duration]||jQuery.fx.speeds._default;opt.old=opt.complete;opt.complete=function(){if(opt.queue!==false)
jQuery(this).dequeue();if(jQuery.isFunction(opt.old))
opt.old.call(this);};return opt;},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p;},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum;}},timers:[],fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig)
options.orig={};}});jQuery.fx.prototype={update:function(){if(this.options.step)
this.options.step.call(this.elem,this.now,this);(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style)
this.elem.style.display="block";},cur:function(force){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))
return this.elem[this.prop];var r=parseFloat(jQuery.css(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.curCSS(this.elem,this.prop))||0;},custom:function(from,to,unit){this.startTime=now();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;var self=this;function t(gotoEnd){return self.step(gotoEnd);}
t.elem=this.elem;if(t()&&jQuery.timers.push(t)&&!timerId){timerId=setInterval(function(){var timers=jQuery.timers;for(var i=0;i<timers.length;i++)
if(!timers[i]())
timers.splice(i--,1);if(!timers.length){clearInterval(timerId);timerId=undefined;}},13);}},show:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());jQuery(this.elem).show();},hide:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0);},step:function(gotoEnd){var t=now();if(gotoEnd||t>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim)
if(this.options.curAnim[i]!==true)
done=false;if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(jQuery.css(this.elem,"display")=="none")
this.elem.style.display="block";}
if(this.options.hide)
jQuery(this.elem).hide();if(this.options.hide||this.options.show)
for(var p in this.options.curAnim)
jQuery.attr(this.elem.style,p,this.options.orig[p]);this.options.complete.call(this.elem);}
return false;}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=jQuery.easing[this.options.easing||(jQuery.easing.swing?"swing":"linear")](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update();}
return true;}};jQuery.extend(jQuery.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now);},_default:function(fx){if(fx.elem.style&&fx.elem.style[fx.prop]!=null)
fx.elem.style[fx.prop]=fx.now+fx.unit;else
fx.elem[fx.prop]=fx.now;}}});if(document.documentElement["getBoundingClientRect"])
jQuery.fn.offset=function(){if(!this[0])return{top:0,left:0};if(this[0]===this[0].ownerDocument.body)return jQuery.offset.bodyOffset(this[0]);var box=this[0].getBoundingClientRect(),doc=this[0].ownerDocument,body=doc.body,docElem=doc.documentElement,clientTop=docElem.clientTop||body.clientTop||0,clientLeft=docElem.clientLeft||body.clientLeft||0,top=box.top+(self.pageYOffset||jQuery.boxModel&&docElem.scrollTop||body.scrollTop)-clientTop,left=box.left+(self.pageXOffset||jQuery.boxModel&&docElem.scrollLeft||body.scrollLeft)-clientLeft;return{top:top,left:left};};else
jQuery.fn.offset=function(){if(!this[0])return{top:0,left:0};if(this[0]===this[0].ownerDocument.body)return jQuery.offset.bodyOffset(this[0]);jQuery.offset.initialized||jQuery.offset.initialize();var elem=this[0],offsetParent=elem.offsetParent,prevOffsetParent=elem,doc=elem.ownerDocument,computedStyle,docElem=doc.documentElement,body=doc.body,defaultView=doc.defaultView,prevComputedStyle=defaultView.getComputedStyle(elem,null),top=elem.offsetTop,left=elem.offsetLeft;while((elem=elem.parentNode)&&elem!==body&&elem!==docElem){computedStyle=defaultView.getComputedStyle(elem,null);top-=elem.scrollTop,left-=elem.scrollLeft;if(elem===offsetParent){top+=elem.offsetTop,left+=elem.offsetLeft;if(jQuery.offset.doesNotAddBorder&&!(jQuery.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(elem.tagName)))
top+=parseInt(computedStyle.borderTopWidth,10)||0,left+=parseInt(computedStyle.borderLeftWidth,10)||0;prevOffsetParent=offsetParent,offsetParent=elem.offsetParent;}
if(jQuery.offset.subtractsBorderForOverflowNotVisible&&computedStyle.overflow!=="visible")
top+=parseInt(computedStyle.borderTopWidth,10)||0,left+=parseInt(computedStyle.borderLeftWidth,10)||0;prevComputedStyle=computedStyle;}
if(prevComputedStyle.position==="relative"||prevComputedStyle.position==="static")
top+=body.offsetTop,left+=body.offsetLeft;if(prevComputedStyle.position==="fixed")
top+=Math.max(docElem.scrollTop,body.scrollTop),left+=Math.max(docElem.scrollLeft,body.scrollLeft);return{top:top,left:left};};jQuery.offset={initialize:function(){if(this.initialized)return;var body=document.body,container=document.createElement('div'),innerDiv,checkDiv,table,td,rules,prop,bodyMarginTop=body.style.marginTop,html='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';rules={position:'absolute',top:0,left:0,margin:0,border:0,width:'1px',height:'1px',visibility:'hidden'};for(prop in rules)container.style[prop]=rules[prop];container.innerHTML=html;body.insertBefore(container,body.firstChild);innerDiv=container.firstChild,checkDiv=innerDiv.firstChild,td=innerDiv.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(checkDiv.offsetTop!==5);this.doesAddBorderForTableAndCells=(td.offsetTop===5);innerDiv.style.overflow='hidden',innerDiv.style.position='relative';this.subtractsBorderForOverflowNotVisible=(checkDiv.offsetTop===-5);body.style.marginTop='1px';this.doesNotIncludeMarginInBodyOffset=(body.offsetTop===0);body.style.marginTop=bodyMarginTop;body.removeChild(container);this.initialized=true;},bodyOffset:function(body){jQuery.offset.initialized||jQuery.offset.initialize();var top=body.offsetTop,left=body.offsetLeft;if(jQuery.offset.doesNotIncludeMarginInBodyOffset)
top+=parseInt(jQuery.curCSS(body,'marginTop',true),10)||0,left+=parseInt(jQuery.curCSS(body,'marginLeft',true),10)||0;return{top:top,left:left};}};jQuery.fn.extend({position:function(){var left=0,top=0,results;if(this[0]){var offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=/^body|html$/i.test(offsetParent[0].tagName)?{top:0,left:0}:offsetParent.offset();offset.top-=num(this,'marginTop');offset.left-=num(this,'marginLeft');parentOffset.top+=num(offsetParent,'borderTopWidth');parentOffset.left+=num(offsetParent,'borderLeftWidth');results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};}
return results;},offsetParent:function(){var offsetParent=this[0].offsetParent||document.body;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&jQuery.css(offsetParent,'position')=='static'))
offsetParent=offsetParent.offsetParent;return jQuery(offsetParent);}});jQuery.each(['Left','Top'],function(i,name){var method='scroll'+name;jQuery.fn[method]=function(val){if(!this[0])return null;return val!==undefined?this.each(function(){this==window||this==document?window.scrollTo(!i?val:jQuery(window).scrollLeft(),i?val:jQuery(window).scrollTop()):this[method]=val;}):this[0]==window||this[0]==document?self[i?'pageYOffset':'pageXOffset']||jQuery.boxModel&&document.documentElement[method]||document.body[method]:this[0][method];};});jQuery.each(["Height","Width"],function(i,name){var tl=i?"Left":"Top",br=i?"Right":"Bottom",lower=name.toLowerCase();jQuery.fn["inner"+name]=function(){return this[0]?jQuery.css(this[0],lower,false,"padding"):null;};jQuery.fn["outer"+name]=function(margin){return this[0]?jQuery.css(this[0],lower,false,margin?"margin":"border"):null;};var type=name.toLowerCase();jQuery.fn[type]=function(size){return this[0]==window?document.compatMode=="CSS1Compat"&&document.documentElement["client"+name]||document.body["client"+name]:this[0]==document?Math.max(document.documentElement["client"+name],document.body["scroll"+name],document.documentElement["scroll"+name],document.body["offset"+name],document.documentElement["offset"+name]):size===undefined?(this.length?jQuery.css(this[0],type):null):this.css(type,typeof size==="string"?size:size+"px");};});})();

try{if(typeof jQuery.la!='object'){(function($){$.la=$.la||{};$.extend(true,$.la,{master:true,sHost:location.protocol+'//'+location.hostname,slider:{getMaxScroll:function(id)
{var maxScroll=$("#"+id).attr("scrollHeight")-$("#"+id).height();return maxScroll;},getScroll:function(id,val)
{return parseInt((val/this.getMaxScroll(id))*100,'10');},afficheScroll:function(id,id_contener)
{if(this.getMaxScroll(id_contener)>0)
{$('#'+id).show();}}},modalbox:{defaultOptions:{iWidth:500,iHeight:500,sMode:'',sFixed:'',sTitle:''},call:function(url,ModalBoxOptions,handlePub){document.location.href='#';if(url.indexOf('/')!=0){if(url.substring(0,7)!='http://'&&url.substring(0,8)!='https://'){url='/'+url;}}
var iWidth=$.la.modalbox.defaultOptions.iWidth;var iHeight=$.la.modalbox.defaultOptions.iHeight;var sMode=$.la.modalbox.defaultOptions.sMode;var sFixed=$.la.modalbox.defaultOptions.sFixed;var sTitle=$.la.modalbox.defaultOptions.sTitle;var sParams;if(url.indexOf('?')==-1){sParams=url+'?';}else{sParams=url+'&';}
if(typeof(ModalBoxOptions.title)!='undefined')sTitle=ModalBoxOptions.title;if(typeof(ModalBoxOptions.width)!='undefined')iWidth=ModalBoxOptions.width;if(typeof(ModalBoxOptions.height)!='undefined')iHeight=ModalBoxOptions.height;if(typeof(ModalBoxOptions.mode)!='undefined')
{if(ModalBoxOptions.mode=='iframe')sMode='&TB_iframe=true';else if(ModalBoxOptions.mode=='inline')sParams='#TB_inline?inlineId='+ModalBoxOptions.divID+'&';}
if(typeof(ModalBoxOptions.fixed)!='undefined'&&ModalBoxOptions.fixed)sFixed='&modal=true';sParams+='height='+iHeight+'&width='+iWidth+sMode+sFixed;if(handlePub){if($(".pub").length>0){$(".pub").hide();}}
tb_show(sTitle,sParams,false);},close:function(handlePub){if(handlePub){if($(".pub").length>0){$(".pub").show();}}
tb_remove();},show:function(html,width,height)
{document.location.href='#';$("body").append("<div id='TB_overlay'></div><div id='TB_window'></div>");$("#TB_overlay").click(tb_remove);$("#TB_window").append("<div id='TB_ajaxContent' class='TB_modal' style='width:510px;height:300px;'></div>");var TB_WIDTH=(width*1)+30;var TB_HEIGHT=(height*1)+40;$("#TB_window").css({marginLeft:'-'+parseInt((TB_WIDTH/2),10)+'px',width:TB_WIDTH+'px'});if(!(jQuery.browser.msie&&typeof XMLHttpRequest=='function')){$("#TB_window").css({marginTop:'-'+parseInt((TB_HEIGHT/2),10)+'px'});}
$("#TB_window").show();$("#TB_ajaxContent").html(html);},resize:function(params){if(typeof params.width!=='undefined'){var TB_WIDTH=(params.width*1)+30;}
if(typeof params.height!=='undefined'){var TB_HEIGHT=(params.height*1)+40;}
if(typeof params.width!=='undefined'){$("#TB_window").css({marginLeft:'-'+parseInt((TB_WIDTH/2),10)+'px',width:TB_WIDTH+'px'});}
if(typeof params.height!=='undefined'){if(!(jQuery.browser.msie&&typeof XMLHttpRequest=='function')){$("#TB_window").animate({marginTop:'-'+parseInt((TB_HEIGHT/2),10)});}
$("#TB_ajaxContent").animate({height:params.height});}},accordionSpeed:'fast',accordion:function(obj,callback){var id;for(id in obj){$('#'+id).slideUp($.la.modalbox.accordionSpeed);$('#'+id).prev('h3').children('a').removeClass("opened");}
for(id in obj){if(obj[id]==true){$('#'+id).slideDown($.la.modalbox.accordionSpeed);$('#'+id).prev('h3').children('a').addClass("opened");}}},ldapOpenCloseLoginBoxRegistered:function(id){var obj={};$("h3 + div").each(function(i){var currentId=$(this).attr('id');if(currentId!=''){obj[currentId]=false;if(currentId==id){if($('#'+id).css('display')=='none'){obj[currentId]=true;}}}});$.la.modalbox.accordion(obj,null);}},action:{messages:{notLogged:'Nous n\'avons pas pu t\'identifier. Vérifie ton pseudo et ton mot de passe.',bookmarkAdded:'Ce contenu a été ajouté aux favoris'},settings:{loginBox:{title:'Login',width:800,height:600}},onUserLogged:null,isLogged:function(){if($.la.cookie.get("user_logged")=="oui"){return true;}
return false;},verifyAuthentification:function(loginUrl,formId,params)
{if(typeof params==='undefined'){params={};}
$.extend($.la.action.settings.loginBox,params);if($.la.action.isLogged())
{if(typeof $.la.action.settings.loginBox.returnUrl!='undefined'){if(loginUrl.indexOf('iframe=1')!=-1){parent.location=$.la.action.settings.loginBox.returnUrl;}
else{document.location=$.la.action.settings.loginBox.returnUrl;}}
else{$('#'+formId).submit();}}
else
{$.la.action.baseIdForm=formId;$.la.modalbox.call(loginUrl,$.la.action.settings.loginBox);}},verfifyAuthentification:function(loginUrl,formId,params){this.verifyAuthentification(loginUrl,formId,params);},getLoginBoxByCookie:function(LayerId,editUrl,forgotUrl,registerUrl,logoutUrl,loginUrl,BaseUrl,BaseImg)
{},verifyRules:function(loginUrl,formName)
{},loginUserBox:function(loginUrl,sLoginContent,idForm)
{$.ajax({url:loginUrl,async:true,type:'POST',data:$('#'+idForm).serialize(),success:function(html){if($.la.action.isLogged())
{$.la.action.getLoginBoxByCookie('identification','/action/edit','/action/forgotpassword','/action/register','/action/logout?ReturnUrl='+$.la.sHost,'/action/login','/','/design/gulli/images/');if($.la.action.baseIdForm.substring(0,10)=='addFavoris')
{$.ajax({url:$.la.sHost+'/action/bookmark',async:true,type:'POST',data:$('#'+$.la.action.baseIdForm).serialize(),success:function(){alert($.la.action.messages.bookmarkAdded);$.la.modalbox.close();}});}
else
{$('#'+$.la.action.baseIdForm).submit();$.la.modalbox.close();}}
else
{$('#TB_ajaxContent').html(html);}}});},loginUser:function(LayerId,editUrl,forgotUrl,registerUrl,logoutUrl,loginUrl,BaseUrl,BaseImg,sLoginContent,idForm,bSeSouvenir){if(typeof(idForm)=='undefined'){idForm='mon_compte';}
$('#'+LayerId).hide();$.ajax({url:loginUrl,async:true,type:'POST',data:$('#'+idForm).serialize(),success:function(){if($.la.action.isLogged()){$.la.action.getLoginBoxByCookie(LayerId,editUrl,forgotUrl,registerUrl,logoutUrl,loginUrl,BaseUrl,BaseImg);$('#'+LayerId).show();}else{alert($.la.action.messages.notLogged);$('#'+LayerId).show();document.location.href=loginUrl;}}});if($.la.action.onUserLogged!=null){$.la.action.onUserLogged();}},RefreshLoginBoxAvatar:function(){},loginUserCommentaire:function(loginUrl,idForm,noeud)
{$.ajax({url:loginUrl,async:true,type:'POST',data:$('#'+idForm).serialize(),success:function(html)
{if($.la.action.isLogged())
{$.la.action.getLoginBoxByCookie('identification','/action/edit','/action/forgotpassword','/action/register','/action/logout?ReturnUrl='+$.la.sHost,'/action/login','/','/design/gulli/images/');$.ajax({url:$.la.sHost+'/commanage/popup_comment/'+noeud,async:true,success:function(html_comment){$('#TB_ajaxContent').html(html_comment);}});}
else
{$('#TB_ajaxContent').html(html);}}});},addFavori:function(url,loginUrl,formName,div)
{}},coreg:{messages:{completeForm:'Veuillez compléter le formulaire\n pour valider votre participation'},rq_check_form:function(param,action){var radio_flag=false;var entry_radio=false;var name_radio;var complete_form=false;var tabElement=document.getElementsByClassName('qualif_check');$('.qualif_check').each(function(i){if($(this).attr('type')=='radio')
{var obl_elt=$(this).attr('name')+'_obligatoire';if($('#'+obl_elt).val()==1)
{var label_radio=$(this).attr('name')+'_label';if($('#oui_'+$(this).attr('name')).attr('checked')||$('#non_'+$(this).attr('name')).attr('checked'))
{$('#'+label_radio).css('color','black');}
else
{$('#'+label_radio).css('color','red');complete_form=true;}}}
else
{}});}},ajax:{updater:function(url,div)
{$.ajax({url:url,success:function(html){$('#'+div).html(html);}});}},hfpvote:{voteover:function(param,id){if(id){$('#'+id).css('width',(19*param)+'px');}
else{$('#fdvote').css('width',(19*param)+'px');}},switchDiv:function(divDisplay,divNone){$('#'+divDisplay).css('display','block');$('#'+divNone).css('display','none');},reload:function(iAverage,iWeight){$.la.hfpvote.voteover(iAverage);var arr=[];for(var i=0;i<iWeight;i++){arr[i]=i+1;}
$.each(arr,function(i){$('#'+'etoileLink'+arr[i]).mouseout(function(){$.la.hfpvote.voteover(iAverage);});});},reloadCount:function(iCount,id){var newCount=iCount;if(typeof newCount!="undefined"){if(newCount>1){$('#'+id).html('/ '+newCount+' votes');}
else{$('#'+id).html('/ '+newCount+' vote');}}}},utils:{_cleanUpFlash:false,messages:{fileNeeded:'Il manque le fichier !',notAVideoFile:'Ce n\' est pas une vidéo'},debug:function(text){if(window.console&&window.console.log){window.console.log(text);}},debugConsole:function(text){if(typeof text=='object'){$.la.utils.debug($.la.utils.var_dump(text,true,1));}
else{var today=new Date();var h=today.getHours();var m=today.getMinutes();var s=today.getSeconds();if(typeof text=='string'){$.la.utils.debug(h+':'+m+':'+s+' - '+text);}
else{$.la.utils.debug(h+':'+m+':'+s);$.la.utils.debug(text);}}},var_dump:function(v,recursif,indent){recursif=typeof recursif=='undefined'?false:true;indent=typeof indent=='undefined'?0:indent;res='';for(i in v){for(var j=0;j<indent;j++){res+='>> ';}
if(recursif&&typeof v[i]=='object'){res+=i+':\n'+this.var_dump(v[i],recursif,indent+1)+'\n';}
else{res+=i+' : '+v[i]+'\n';}}
if(!indent){alert(res);}
else{return res;}
return res;},cleanUpFlash:function(){this._cleanUpFlash=true;try{$('object[cleanup!=true]').each(function(){var opaque=true;$('param',$(this)).each(function(){if($(this).attr('wmode')=='transparent'){opaque=false;}});if(opaque){var clone=$(this).clone();clone.append('<param name="wmode" value="transparent" />');clone.attr('cleanup','true');$('embed',clone).attr('wmode','transparent');$(this).replaceWith(clone);}});}
catch(e){}
try{$('embed[cleanup!=true]').each(function(){if($(this).attr('wmode')!='transparent'){var clone=$(this).clone();clone.attr('wmode','transparent');clone.attr('cleanup','true');$(this).replaceWith(clone);}});}
catch(e){}},addFavorite:function()
{var url=window.location;var titre=document.title;if(window.sidebar){window.sidebar.addPanel(titre,url,'');}
else{window.external.AddFavorite(url,titre);}
return false;},httpGet:function(key_str)
{if(window.location.search){var query=window.location.search.substr(1);var pairs=query.split("&");for(var i=0;i<pairs.length;i++){var pair=pairs[i].split("=");if(unescape(pair[0])==key_str){return unescape(pair[1]);}}}
return'';},getKey:function(key_str,str)
{if(str!=''){var query=str.substr(1);var pairs=query.split("&");for(var i=0;i<pairs.length;i++){var pair=pairs[i].split("=");if(unescape(pair[0])==key_str){return unescape(pair[1]);}}}
return'';},isNumeric:function(val){var exp=new RegExp("^[0-9]+$","g");return exp.test(val);},isDate:function(date)
{var tabDate=date.split('/');if(!$.la.utils.isNumeric(tabDate[0])){return false;}
else{var j=parseInt(tabDate[0],"10");}
if(!$.la.utils.isNumeric(tabDate[1])){return false;}
else{var m=parseInt(tabDate[1],"10");}
if(!$.la.utils.isNumeric(tabDate[2])){return false;}
else{var a=parseInt(tabDate[2],"10");}
if(isNaN(a)||isNaN(m)||isNaN(j)){return false;}
else{var fev;if((a%4===0&&a%100!==0)||(a%400===0)){fev=29;}
else{fev=28;}
var nbJours;if(fev==28){nbJours=[31,28,31,30,31,30,31,31,30,31,30,31];}
else if(fev==29){nbJours=[31,29,31,30,31,30,31,31,30,31,30,31];}
return((m>=1)&&(m<=12)&&(j>=1)&&(j<=nbJours[m-1]));}},verifMail:function(emailString)
{var pass=false;for(var j=1;j<(emailString.length);j++){if(emailString.charAt(j)=='@'){if(j<(emailString.length-4)){for(var k=j;k<(emailString.length-2);k++){if(emailString.charAt(k)=='.'){pass=true;}}}}}
return pass;},checknumber:function(atester)
{var anum=/(^\d+$)|(^\d+\.\d+$)/;if(anum.test(atester)){pass=true;}
else{pass=false;}
return pass;},isMineur:function(sD,sM,sY)
{var d=new Date();var curr_dayOfMonth=d.getDate();var curr_month=d.getMonth()+1;var curr_year=d.getFullYear();if(curr_year-sY>18||(curr_year-sY==18&&curr_month>=sM&&curr_dayOfMonth>=sD)){return false;}
else{return true;}},querystring_get:function(key,default_)
{if(default_===null){default_=null;}
var value=this.params[key];if(value===null){value=default_;}
return value;},querystring:function(qs)
{this.params={};this.get=$.la.utils.querystring_get;if(qs===null||typeof qs==='undefined'){qs=location.search.substring(1,location.search.length);}
if(qs.length===0){return;}
qs=qs.replace(/\+/g,' ');var args=qs.split('&');for(var i=0;i<args.length;i++){var value;var pair=args[i].split('=');var name=unescape(pair[0]);if(pair.length==2){value=unescape(pair[1]);}
else{value=name;}
this.params[name]=value;}},getTimeStamp:function()
{var currentTime=new Date();return currentTime.getTime();},verifyUpload:function(value_image,value_video,type,formId)
{if(type==1){if(value_image===''){alert($.la.utils.messages.fileNeeded);}else{$('#'+formId).submit();}}else{if(value_video===''){alert($.la.utils.messages.fileNeeded);}else{if(value_video.indexOf('.mov')===-1&&value_video.indexOf('.wmv')===-1&&value_video.indexOf('.mpeg')===-1&&value_video.indexOf('.avi')===-1&&value_video.indexOf('.3gp')===-1&&value_video.indexOf('.mp4')===-1&&value_video.indexOf('.ram')===-1&&value_video.indexOf('.flv')===-1){alert($.la.utils.messages.notAVideoFile);}else{$('#'+formId).submit();}}}},switchTab:function(div1,div2,classe)
{$('#'+div1).addClass(classe);$('#'+div2).removeClass(classe);},showHide:function(div1,div2)
{$('#'+div1).show();$('#'+div2).hide();},sortOptionFromSelect:function(select_id)
{var Liste=new Array();var selected_item="";var all_theme_value="";$('#'+select_id).find("option").each(function(i){Liste[i]=new Array();Liste[i][0]=$(this).text();Liste[i][1]=$(this).val();if($(this).attr("selected")==true){selected_item=$(this).val();}
if($(this).attr("id")=="all_theme"){all_theme_value=$(this).val();}});Liste=Liste.sort();$('#'+select_id).find("option").each(function(i){$(this).attr('text',Liste[i][0]);$(this).attr('value',Liste[i][1]);if(Liste[i][1]==selected_item){$(this).attr('selected','selected');}
if($(this).val()==all_theme_value){$('#all_theme').attr('id','');$(this).attr('id','all_theme');}});$('#'+select_id).prepend($("#all_theme"));},escapeHtml:function(stringToEscape)
{var newString=stringToEscape.replace(/"/g,"&quot;");newString=newString.replace(/</g,"&lt;");newString=newString.replace(/>/g,"&gt;");newString=newString.replace(/&/g,"&amp;");return newString;},trim:function(string)
{var newString=string.replace(/(?:^\s+|\s+$)/g,"");return newString;},digital:function(digi){digi=parseInt(digi,10);if(digi<=9){return"0"+digi;}
return digi;},stripslashes:function(string){return(string+'').replace(/\\(.?)/g,function(s,n1){switch(n1){case'\\':return'\\';case'0':return'\0';case'':return'';default:return n1;}});},checkImageSrc:function(classe){var src_ok=1;$('.'+classe).error(function(){var src_ok=0;});return src_ok;},str_split:function(string,split_length){if(string===undefined||!string.toString||split_length<1){return false;}
return string.toString().match(new RegExp('.{1,'+(split_length||'1')+'}','g'));},implode:function(glue,pieces){var i='',retVal='',tGlue='';if(arguments.length===1){pieces=glue;glue='';}
if(typeof(pieces)==='object'){if(pieces instanceof Array){return pieces.join(glue);}
else{for(i in pieces){retVal+=tGlue+pieces[i];tGlue=glue;}
return retVal;}}
else{return pieces;}},list:{add:function(aListArray,oElement,push){if(push){aListArray.push(oElement);}else{aListArray.unshift(oElement);}
return aListArray;},alreadyIn:function(listArray,id){return(this.find(listArray,id).length>0);},find:function(listArray,id){arr=jQuery.grep(listArray,function(n){return n.element.id==id;});return arr;},order:function(aListArray,bIsRandom){aOrderArray=[];for(x in aListArray){obj=aListArray[x];aOrderArray.push(obj.id);}
if(bIsRandom=='on'){aOrderArray.sort(function(){return 0.5-Math.random()});}
return aOrderArray;}}},cookie:{init:function(){var pathname=location.pathname;var myDomain=pathname.substring(0,pathname.lastIndexOf('/'))+'/';var date_exp=new Date();var adserver_test=true;date_exp.setTime(date_exp.getTime()+(365*24*3600*1000));var qs=new $.la.utils.querystring();var id_lien=qs.get('id_op');if(id_lien!==null){$.la.cookie.set('id_lien',id_lien);}
var regImage=qs.get('img');if(regImage!==null){$.la.cookie.set('regImage',regImage);}},getVal:function(offset)
{var endstr=document.cookie.indexOf(";",offset);if(endstr==-1){endstr=document.cookie.length;}
return unescape(document.cookie.substring(offset,endstr));},get:function(name)
{var arg=name+"=";var alen=arg.length;var clen=document.cookie.length;var i=0;while(i<clen)
{var j=i+alen;if(document.cookie.substring(i,j)==arg){return $.la.cookie.getVal(j);}
i=document.cookie.indexOf(" ",i)+1;if(i===0){break;}}
return false;},set:function(name,value,expireParam,domain)
{domain=domain||false;var expires=new Date();if(expireParam&&typeof expireParam=='object'){expires=expireParam;}
else if(typeof expireParam=='number'){expires.setTime(((expires.getTime()/1000)+expireParam)*1000);}
else{expires.setTime(expires.getTime()+99999999999);}
var path="/";var secure=false;var curCookie=name+"="+escape(value)+
((expires)?"; expires="+expires.toGMTString():"")+
((path)?"; path="+path:"")+
((domain)?"; domain="+domain:"")+
((secure)?"; secure":"");document.cookie=curCookie;},clear:function(name)
{var date=new Date();var date_del=date.setFullYear(date.getFullYear()-1000);document.cookie=name+"="+escape('')+"; expires="+date_del;}},tracking:{activeConsole:function(){if($.la.utils.httpGet('la_console')=='1'||$.la.utils.httpGet('la_console')=='0'||$.la.cookie.get('la_console')=='1'){$.la.tracking.console();}},console:function(){try{$.getScript('http://www.infobebes.com/extension/lajavascript/design/standard/javascript/jquery/jquery.la.console.js',function(){$.la.tracking._activeConsole();});}
catch(e){alert('Erreur de chargement de la console : '+e.message);}},init:function(obj){if(typeof obj.CM_SERIAL=='undefined'){obj.CM_SERIAL=$.la.tracking.cybermonitor.ids.CM_SERIAL;}
if(typeof obj.CM_CLIENT=='undefined'){obj.CM_CLIENT=$.la.tracking.cybermonitor.ids.CM_CLIENT;}
if(typeof obj.CM_TAG=='undefined'){obj.CM_TAG=$.la.tracking.cybermonitor.ids.CM_TAG;}
if(typeof obj.WRP_ID=='undefined'){obj.WRP_ID=$.la.tracking.webo.ids.WRP_ID;}
$.la.tracking.webo.init(obj.WRP_ID,obj.WRP_SECTION,obj.WRP_SUBSECTION,obj.WRP_CHANNEL,obj.WRP_CONTENT);$.la.tracking.cybermonitor.init(obj.CM_SERIAL,obj.CM_CLIENT,obj.CM_NIVEAU1,obj.CM_NIVEAU2,obj.CM_NIVEAU3,obj.CM_NIVEAU4,obj.CM_TAG);},track:function(){$.la.tracking.webo.track();$.la.tracking.cybermonitor.track();$.la.tracking.ga.track();},ga:{_ua:null,_domain:null,track:function(){var gaJsHost=(("https:"==document.location.protocol)?"https://ssl.":"http://www.");$.ajax({type:"GET",url:gaJsHost+"google-analytics.com/ga.js",dataType:'script',cache:true,success:function(){try{var pageTracker=_gat._getTracker($.la.tracking.ga._ua);pageTracker._setDomainName($.la.tracking.ga._domain);pageTracker._trackPageview();}catch(err){}}});}},cybermonitor:{ids:{CM_SERIAL:null,CM_CLIENT:null,CM_TAG:'ml'},init:function(CM_SERIAL,CM_CLIENT,CM_NIVEAU1,CM_NIVEAU2,CM_NIVEAU3,CM_NIVEAU4,CM_TAG){$.la.tracking.cybermonitor.ids.CM_SERIAL=CM_SERIAL;$.la.tracking.cybermonitor.ids.CM_CLIENT=CM_CLIENT;$.la.tracking.cybermonitor.ids.CM_NIVEAU1=CM_NIVEAU1;$.la.tracking.cybermonitor.ids.CM_NIVEAU2=CM_NIVEAU2;$.la.tracking.cybermonitor.ids.CM_NIVEAU3=CM_NIVEAU3;$.la.tracking.cybermonitor.ids.CM_NIVEAU4=CM_NIVEAU4;$.la.tracking.cybermonitor.ids.CM_TAG=CM_TAG;},setMarker:function(marker){$.la.tracking.cybermonitor.ids.CM_TAG=marker;},track:function(){$.ajax({type:"GET",url:'http://prof.estat.com/js/'+$.la.tracking.cybermonitor.ids.CM_SERIAL+'.js',dataType:'script',cache:true,success:function(){eStat_id.cmclient($.la.tracking.cybermonitor.ids.CM_CLIENT);eStat_id.niveau(1,$.la.tracking.cybermonitor.ids.CM_NIVEAU1);eStat_id.niveau(2,$.la.tracking.cybermonitor.ids.CM_NIVEAU2);eStat_id.niveau(3,$.la.tracking.cybermonitor.ids.CM_NIVEAU3);eStat_id.niveau(4,$.la.tracking.cybermonitor.ids.CM_NIVEAU4);eStat_tag.post($.la.tracking.cybermonitor.ids.CM_TAG);}});}},webo:{defaultChannel:'editorial',ids:{WRP_ID:null},track:function(){if($.la.cookie.get('la_console')=='1'||$.la.cookie.get('la_console')==1){}
else{var WRP_SECTION=$.la.tracking.webo.ids.WRP_SECTION;var WRP_SUBSECTION=$.la.tracking.webo.ids.WRP_SUBSECTION;var WRP_ID=$.la.tracking.webo.ids.WRP_ID;var WRP_ACC=$.la.tracking.webo.ids.WRP_ACC;var WRP_CHANNEL=$.la.tracking.webo.ids.WRP_CHANNEL;var WRP_SECTION_GRP=$.la.tracking.webo.ids.WRP_SECTION_GRP;var WRP_SUBSECTION_GRP=$.la.tracking.webo.ids.WRP_SUBSECTION_GRP;var WRP_CONTENT=$.la.tracking.webo.ids.WRP_CONTENT;var w_counter=new wreport_counter(WRP_SECTION,WRP_SUBSECTION,WRP_ID,WRP_ACC,WRP_CHANNEL,WRP_SECTION_GRP,WRP_SUBSECTION_GRP);w_counter.add_content(WRP_CONTENT);w_counter.count();}},init:function(iWRP_ID,sWRP_SECTION,sWRP_SUBSECTION,sWRP_CHANNEL,sWRP_CONTENT){$.la.tracking.webo.ids.WRP_ID=iWRP_ID;$.la.tracking.webo.ids.WRP_SECTION=sWRP_SECTION;$.la.tracking.webo.ids.WRP_SUBSECTION=sWRP_SUBSECTION;$.la.tracking.webo.ids.WRP_SECTION_GRP=iWRP_ID;$.la.tracking.webo.ids.WRP_SUBSECTION_GRP=sWRP_SECTION;$.la.tracking.webo.ids.WRP_CONTENT=sWRP_CONTENT;$.la.tracking.webo.ids.WRP_CHANNEL=sWRP_CHANNEL;if($.la.tracking.webo.ids.WRP_CHANNEL=='{'+"wrp_channel"+'}'){$.la.tracking.webo.ids.WRP_CHANNEL=$.la.tracking.webo.defaultChannel;}
var WRP_ACC;$.la.tracking.webo.ids.WRP_ACC=WRP_ACC;}}},promo:{skinLoaded:false,container:'#container',containerBody:'body',localCss:function(obj){return'';},localCssAfter:function(obj){return'';},showSkin:function(obj){this.skinLoaded=true;var container=obj.container;if(typeof container=='undefined'){container=$.la.promo.container;}
var containerBody=obj.containerBody;if(typeof containerBody=='undefined'){containerBody=$.la.promo.containerBody;}
$('head').append('<style type="text/css">'+$.la.promo.localCss(obj)+'\
        body{\
         background:'+obj.bodybgcolor+' url('+obj.bodybgimage+') center top no-repeat !important;\
        }\n\
        '+containerBody+'{\n\
         padding:'+obj.top+' 0 0 0 !important;\n\
         position:relative !important;\n\
         z-index:1 !important;\n\
        }\n\
        '+container+'{\
         position:relative;\
         z-index:3;\
        }\
        '+$.la.promo.localCssAfter(obj)+'</style>');if(obj.url){var o=obj;$(function(){$(container).css({position:'relative'});if(o.newwindow){$(containerBody).prepend('<a href="'+o.url+'" style="z-index:2;position:absolute;top:0;left:0;width:100%;height:'+$(document).height()+'px;" target="_blank"></a>');}
else{$(containerBody).prepend('<a href="'+o.url+'" style="z-index:2;position:absolute;top:0;left:0;width:100%;height:'+$(document).height()+'px;"></a>');}});}},wreportRefresh:function(){if(wreport_ok==1){var w_counter=new wreport_counter(WRP_SECTION,WRP_SUBSECTION,WRP_ID,WRP_ACC,WRP_CHANNEL,WRP_SECTION_GRP,WRP_SUBSECTION_GRP);w_counter.add_content(WRP_CONTENT);w_counter.count();}},bannerRefresh:function(uri,gestionHauteur){if(typeof gestionHauteur=='undefined'){gestionHauteur='gestionHauteur';}
if($('#'+gestionHauteur).length>0){$('#'+gestionHauteur).html('<iframe scrolling="no" frameborder="0" width="728" height="90"  border="0" marginheight="0" marginwidth="0" noresize="true" vspace="0" framespacing="0"  src="'+$.la.sHost+'/ajaxext/pub?publicite=banniere&uri='+uri+'"></iframe>');}},adRefresh:function(){},a2dToRegister:{},_adList:[],_adListForConsole:[],_a2dRandom:Math.random(),_adDefaultDefer:false,_adDefaultZoneDefer:{},_adDefaultForceDefer:null,_adDefaultForceZoneDefer:{},_adHost:'http://fr.a2dfp.net',_testA2d:{},prependRegister:function(placement,id,defer){if(id!=''){$.la.promo.a2dToRegister[placement]={id:id,defer:defer};}},adSetZone:function(placement,id){if(id!=''){$.la.promo.a2dToRegister[placement]={id:id};}},adLoad:function(index){if(typeof $.la.promo._adList[index]!='undefined'){$.la.promo._adWrite($.la.promo._adList[index].id);}},adsProcess:function(){for(var i=0;i<$.la.promo._adList.length;i++){if(typeof $.la.promo._adList[i]!='undefined'){if($.la.promo._adList[i].defer=='ready'){var index=i;$.la.promo._deferProcess(index);}else{$('#'+$.la.promo._adList[i].elt)._adProcess(i);}}}},testA2d:function(idCampaign){var url=document.location.href.replace('&testA2d='+idCampaign,'');url=url.replace('\?testA2d='+idCampaign,'\?');url=url.replace('?testA2d='+idCampaign,'?');if(document.location.href.indexOf('?')!=-1){document.location.href=url+'&testA2d='+idCampaign;}
else{document.location.href=url+'?testA2d='+idCampaign;}},removeTestA2d:function(idCampaign){document.location.href=document.location.href.replace(document.location.search,'');},_adRegister:function(id,defer){if(typeof id!='object'){settings={};settings.id=id;settings.defer=defer;settings.zone=null;}
else if(typeof id=='object'){settings=id;}
if(typeof settings.zone!='undefined'&&typeof $.la.promo.a2dToRegister[settings.zone]=='object'){settings.id=$.la.promo.a2dToRegister[settings.zone].id;settings.defer=$.la.promo.a2dToRegister[settings.zone].defer;}
if(typeof settings.defer=='undefined'||(settings.defer==''&&settings.defer!==false)||settings.defer=='{defer}'){if(typeof $.la.promo._adDefaultZoneDefer[settings.zone]!='undefined'){settings.defer=$.la.promo._adDefaultZoneDefer[settings.zone];}
else if($.la.promo._adDefaultDefer!=null){settings.defer=$.la.promo._adDefaultDefer;}
else{settings.defer=false;}}
if(typeof settings.defer=='undefined'||settings.defer==''||settings.defer=='{defer}'){if(typeof $.la.promo._adDefaultZoneDefer[settings.zone]!='undefined'){settings.defer=$.la.promo._adDefaultZoneDefer[settings.zone];}
else if(typeof $.la.promo._adDefaultDefer!='undefined'){settings.defer=$.la.promo._adDefaultDefer;}
else{settings.defer=$.la.promo._adDefaultDefer;}}
if(settings.zone!=null&&$.la.promo._adDefaultForceZoneDefer!=null&&typeof $.la.promo._adDefaultForceZoneDefer[settings.zone]!='undefined'){settings.defer=$.la.promo._adDefaultForceZoneDefer[settings.zone];}
else if($.la.promo._adDefaultForceDefer!=null){settings.defer=$.la.promo._adDefaultForceDefer;}
if(settings.defer=='false'){settings.defer=false;}
settings.elt=$(this).attr('id');if($.la.utils.httpGet('testA2d')&&typeof $.la.promo._testA2d[$.la.utils.httpGet('testA2d')]!='undefined'){if($.la.promo._testA2d[$.la.utils.httpGet('testA2d')][settings.zone]!=''){settings.id=$.la.promo._testA2d[$.la.utils.httpGet('testA2d')][settings.zone];}}
if(settings.defer==false){$.la.promo._adWrite(settings.id);$.la.promo._adListForConsole[$.la.promo._adListForConsole.length]=settings;}
else{$.la.promo._adList[$.la.promo._adList.length]=settings;$.la.promo._adListForConsole[$.la.promo._adListForConsole.length]=settings;}},_adProcess:function(id){var prefix='preload_ad_';try{var me=$(this)[0];me.appendChild($('div[id="'+prefix+id+'"]')[0]);}
catch(e){return;}},_adWrite:function(id){try{document.write('<scr'+'ipt type="text\/javascript" src="'+$.la.promo._adHost+'\/ad?s='+id+'&m=js&ncb='+$.la.promo._a2dRandom+'"><\/scr'+'ipt>');}
catch(e){}},_deferProcess:function(index){var i=index;$(function(){$('#'+$.la.promo._adList[i].elt)._adProcess(i);});},google:{adsense:{_scriptUrl:'http://pagead2.googlesyndication.com/pagead/show_ads.js',_params:{google_ad_client:null,google_ad_channel:null,google_ad_output:"js",google_max_num_ads:null,google_ad_type:"text",google_language:null,google_encoding:"utf8",google_feedback:"on",google_adtest:"off"},_createHtml:{container:function(sId){return'<div id="'+sId+'"></div>';},title:null,flash:null,image:null,html:null,text:null},_sContainerId:'googleAdsense',_ads:null,_info:null,_iDisplayNumber:0,_iBlocNumber:0,execute:function(){if(this._iBlocNumber==0){document.write('<script type="text/javascript">var google_adnum = 0;</script>');document.write('<script type="text/javascript">//<![CDATA[\n'
+'function google_ad_request_done(google_ads) {\n'
+'  jQuery(document).ready(function() { $.la.promo.google.adsense.display(google_ads, google_info); });\n'
+'}\n'
+'//]]></script>');}
document.write('<script type="text/javascript">\n'
+'google_ad_output = "'+this._params.google_ad_output+'";\n'
+'google_ad_type = "'+this._params.google_ad_type+'";\n'
+'google_encoding = "'+this._params.google_encoding+'";\n'
+'google_feedback = "'+this._params.google_feedback+'";\n'
+'google_language = "'+this._params.google_language+'";\n'
+'google_skip = '+(this._iBlocNumber*this._params.google_max_num_ads)+';\n'
+'\n'
+'google_ad_client = "'+this._params.google_ad_client+'";\n'
+'google_ad_channel = "'+this._params.google_ad_channel+'";\n'
+'google_max_num_ads = "'+this._params.google_max_num_ads+'";\n'
+'google_adtest = "'+this._params.google_adtest+'";\n'
+'</script>');document.write('<script type="text/javascript" src="'+this._scriptUrl+'?iNumber='+this._iBlocNumber+'"></script>');document.write(this._createHtml.container(this._sContainerId+this._iBlocNumber));this._iBlocNumber++;},display:function(google_ads,google_info){this._ads=google_ads;this._info=google_info;if(this._ads.length==0){return;}
var s='';if(this._createHtml.title!=null)s+=this._createHtml.title(this);switch(this._ads[0].type){case'flash':if(this._createHtml.flash!=null)s+=this._createHtml.flash(this);break;case'image':if(this._createHtml.image!=null)s+=this._createHtml.image(this);break;case'html':if(this._createHtml.html!=null)s+=this._createHtml.html(this);break;case'text':if(this._createHtml.text!=null)s+=this._createHtml.text(this);break;}
if(this._ads[0].bidtype=="CPC"){google_adnum=google_adnum+this._ads.length;}
$('#'+this._sContainerId+this._iDisplayNumber).html(s);this._iDisplayNumber++;},nbGoogleAds:function(){var nbGoogleAds=0;var aGoogleAdsUrl=['http://googleads.g.doubleclick.net/aclk'];try{for(var i=0;i<aGoogleAdsUrl.length;i++){nbGoogleAds+=($('a[href^="'+aGoogleAdsUrl[i]+'"]').length)/2;}}
catch(e){nbGoogleAds=-1;}
return nbGoogleAds;}}}},game:{verifchek:function(checkBoxName,objId,message)
{if(typeof message==='undefined'){message='Il faut selectionner une reponse avant de continuer !';}
var valid=0;$("input[name='"+checkBoxName+"']").each(function(i){if($(this).attr('checked'))
{valid=1;}});if(valid==0)
{alert(message);}
else
{$('#form_question_'+objId).submit();}},verifOpenQuestion:function(id,objId,message){if(typeof message==='undefined'){message='Il faut saisir un texte !';}
var i=0;var valid=0;if($("#"+id).val()!=='')
{valid=1;}
if(valid==0){alert(message);}
else{$('#form_question_'+objId).submit();}}},replay:{},buzz:{},w:{go:function(url){var newWindow=parseInt(url.charAt(0),10);var tmp=this.decrypt(url);switch(newWindow){case 3:parent.document.location.href=tmp;break;case 2:top.document.location.href=tmp;break;case 1:window.open(tmp);break;case 0:default:document.location.href=tmp;if(document.all){window.event.returnValue=false;}
break;}},decrypt:function(url){url=url.substring(1,url.length);var tmp='';var c='';for(var i=0;i<url.length;i++){c=url.charCodeAt(i);tmp+=''+String.fromCharCode(c-14);}
return tmp;}}});})(jQuery);var sHost=jQuery.la.sHost;jQuery.fn.adRegister=jQuery.la.promo._adRegister;jQuery.fn._adProcess=jQuery.la.promo._adProcess;jQuery(document).ready(jQuery.la.tracking.activeConsole);function KSL(){jQuery.la.tracking.console();}}}
catch(e){if(window.console&&window.console.log){window.console.log(e.message);}}

(function($){$.la=$.la||{};$.extend(true,$.la,{elle_comment:{afficheValid:function(){if(jQuery.trim(jQuery("#comment").val())=='Saisissez votre texte ici'){jQuery("#comment").val('');}
if(jQuery("#captchaImage").attr('src').match('commentaires/none.gif')||jQuery("#divSuccess").css("display")!="none"){if(jQuery('#rate').length>0){jQuery.la.elle_comment.afficheCommentRate(0);}
var maintenant=new Date();jQuery("#captchaImage").attr({src:"/elle/captcha/captchaShow?width=70&height=20&t="+maintenant.getTime()});jQuery("#codesecu").val('');}
jQuery("#divSuccess").css("display","none");jQuery("#comment_code_secu").css("display","block");},initCommentId:function(){jQuery('#box_comment').attr({"id":"box_comment"+object_id});},afficheConnectezVous:function(){if(GetCookieMain("user_logged")!="oui"){jQuery("#connectezvous").css("display","block");}},clickValidation:function(id,view){if((jQuery.trim(jQuery("#comment").val())=='Saisissez votre texte ici')||(jQuery.trim(jQuery("#comment").val())=='')){alert("Votre commentaire est vide.");return false;}
if(jQuery('#rate').length>0){var rateValue=jQuery('#rate').val();if(rateValue==0||rateValue=="0"){alert("Vous devez voter pour valider votre commentaire.");return false;}}
jQuery("#divSuccess").css("display","none");jQuery("#zoneCommentairesFormValid").css("display","none");jQuery('#divLoading').css("display","block");setTimeout('jQuery.la.elle_comment.valid_captcha('+id+',"'+view+'")',1000);},valid_captcha:function(id,view)
{var codesecu=jQuery('#codesecu').val();jQuery.ajax({url:'/elle/captcha/captchaAjaxValid/'+codesecu,success:function(msg){if(msg=='0'||msg==0){jQuery("#zoneCommentairesFormValid").css("display","block");jQuery('#divLoading').css("display","none");alert('Le code de sécurité saisi est incorrect.');}else{jQuery.la.elle_comment.add_comment(id,view);}}});},add_comment:function(id,view)
{if(!view)
view='list_comments';var commentValue=jQuery.la.utils.escapeHtml(encodeURIComponent(jQuery('#comment').val()));var myParameters={add:'add',comment:commentValue};if(jQuery('#rate').length>0){var rateValue=jQuery('#rate').val();myParameters={add:'add',comment:commentValue,rate:rateValue};}
jQuery.ajax({url:"/elle/commanage/add_comment/"+id+'/'+view,type:"POST",data:myParameters,success:jQuery.la.elle_comment.reload_comments});},reload_comments:function(msg)
{var res=eval('('+msg+')');if(res.res){if(jQuery("#box_comment"+res.objectid).html().indexOf("donner votre avis")!=-1){jQuery("#box_comment"+res.objectid).html(res.content);}else{jQuery("#box_comment"+res.objectid).html(res.content+jQuery("#box_comment"+res.objectid).html());}
jQuery("#comment"+res.id).slideDown();}else{alert(res.content);}
var nbComment=parseInt(jQuery("#nb_com_0").html())+1;var nbCommentTexteOld=jQuery("#nb_com_1").html();var nbCommentTexte=nbComment+" commentaire";if(nbComment>1){nbCommentTexte=nbCommentTexte+"s";}
if(nbCommentTexteOld.indexOf("avis",0)!=-1){nbCommentTexte=nbComment+" avis";}
jQuery("#nb_com_1").html("("+nbCommentTexte+")");if(jQuery("#nb_vote_haut").length>0){jQuery("#nb_vote_haut").html("<a href='#menutest'>"+nbCommentTexte+"</a>");}
jQuery("#nb_com_2").html(nbCommentTexte);jQuery("#nb_com_1").css("display","block");jQuery("#zoneCommentairesListe").css("display","block");jQuery("#comment").val('Saisissez votre texte ici');jQuery("#comment_code_secu").css("display","none");jQuery("#zoneCommentairesFormValid").css("display","block");jQuery("#divSuccess").css("display","block");jQuery("#divLoading").css("display","none");if(res.rate&&res.rate!='noRate'&&jQuery('#box_comment_'+res.rate).length>0){var oldContent=res.content;var oldContentPosition=oldContent.indexOf("id=\"",0);var newContentBefore=oldContent.substring(0,oldContentPosition);oldContent=oldContent.substring((oldContentPosition+1),oldContent.length);oldContentPosition=oldContent.indexOf("\"",0);var newContentAfter=oldContent.substring((oldContentPosition+1),oldContent.length);var monRandom=Math.round(Math.random()*10000);var newContent=newContentBefore+"id=\""+"comment_tmp_"+monRandom+"\""+newContentAfter;if(jQuery("#box_comment_"+res.rate).html().indexOf("pas de commentaire")!=-1||jQuery("#box_comment_"+res.rate).html().indexOf("pas d'avis")!=-1||jQuery("#box_comment_"+res.rate).html().indexOf("pas d´avis")!=-1||jQuery("#box_comment_"+res.rate).html().indexOf("pas d&acute;avis")!=-1){jQuery("#box_comment_"+res.rate).html(newContent);}else{jQuery("#box_comment_"+res.rate).html(newContent+jQuery("#box_comment_"+res.rate).html());}
jQuery("#comment_tmp_"+monRandom).slideDown();var nbNotes=jQuery("#lien_"+res.rate+"_text").html();var nbNotesPosition=nbNotes.indexOf("(",0);var newNoteStringBefore=nbNotes.substring(0,nbNotesPosition);nbNotes=nbNotes.substring((nbNotesPosition+1),nbNotes.length);nbNotesPosition=nbNotes.indexOf(" ",0);var newNoteStringAfter=nbNotes.substring((nbNotesPosition+1),nbNotes.length);if(nbNotesPosition==-1){nbNotesPosition=nbNotes.indexOf(")",0);newNoteStringAfter=")";}
nbNotes=nbNotes.substring(0,nbNotesPosition);nbNotes=parseInt(nbNotes)+1;jQuery("#lien_"+res.rate+"_text").html(newNoteStringBefore+"("+nbNotes+" "+newNoteStringAfter);}
jQuery.ajax({url:"/elle/commanage/add_to_forum/"+res.objectid+'/'+res.id,type:"POST",data:{texteMessage:res.texte}});},afficheCommentRate:function(param)
{if(param==0){if(document.getElementById('box_comment'+object_id)){document.getElementById('box_comment'+object_id).style.display="block";}
if(document.getElementById('box_comment')){document.getElementById('box_comment').style.display="block";}
if(document.getElementById('lien_0')){document.getElementById('lien_0').className="on";}}else{if(document.getElementById('box_comment'+object_id)){document.getElementById('box_comment'+object_id).style.display="none";}
if(document.getElementById('box_comment')){document.getElementById('box_comment').style.display="none";}
if(document.getElementById('lien_0')){document.getElementById('lien_0').className="";}}
for(i=1;i<=4;i++){if(param==i){if(document.getElementById('box_comment_'+i)){document.getElementById('box_comment_'+i).style.display="block";}
if(document.getElementById('lien_'+i)){document.getElementById('lien_'+i).className="on";}}else{if(document.getElementById('box_comment_'+i)){document.getElementById('box_comment_'+i).style.display="none";}
if(document.getElementById('lien_'+i)){document.getElementById('lien_'+i).className="";}}}},abus:function(id)
{var urlactu=document.location.href;var urlroot="http://www.elle.fr";if(urlactu.indexOf('cuisine.elle.fr')!=-1){urlroot="http://cuisine.elle.fr";}
jQuery.la.modalbox.call(urlroot+'/elle/commanage/abus/media/'+id,{title:'Signaler un abus',height:300,width:700});},init_abus:function()
{var maintenant=new Date();jQuery("#captchaImageAbus").attr({src:"/elle/captcha/captchaShow?width=70&height=20&t="+maintenant.getTime()});},check_abus:function()
{var codesecu=document.getElementById('codesecu_abus').value;var idcomment=document.getElementById('id_comment').value;jQuery.ajax({url:'/elle/commanage/ajax_valid_abus/codesecu/'+codesecu+'/idcomment/'+idcomment,success:function(msg){alert(msg);tb_remove();}});}},elle_requalif:{rq_play:function(redirect_url,design){var userId=GetCookieMain('id_joueur');var status_requalification=GetCookieMain('status_requalification_'+userId);if(status_requalification=='updated'){if(redirect_url!="false"&&redirect_url!=false){window.location.href=redirect_url;}}else{var delimiter='?';var url='/elle/action/requalificationJeux';if(design!="false"&&design!=false){url=url+delimiter+"design="+design;delimiter='&';}
if(redirect_url!="false"&&redirect_url!=false){url=url+delimiter+"redirect_url="+redirect_url;}
showModal(url,{title:'Vos informations',height:400,width:575,mode:'Ajax'});}
return false;},rq_play_coreg:function(redirect_url,design){var userId=GetCookieMain('id_joueur');var status_requalification=GetCookieMain('status_coregistration_'+userId);if(status_requalification=='updated'){if(redirect_url!="false"&&redirect_url!=false){window.location.href=redirect_url;}}else{var delimiter='?';var url='/elle/action/coregistration';if(design!="false"&&design!=false){url=url+delimiter+"design="+design;delimiter='&';}
if(redirect_url!="false"&&redirect_url!=false){url=url+delimiter+"redirect_url="+redirect_url;}
showModal(url,{title:'Vos informations',height:400,width:575,mode:'Ajax'});}
return false;},rq_check_form:function(redirect_url){var radio_flag=false;var entry_radio=false;var name_radio;var complete_form=false;jQuery(".qualif_check").each(function(i){if(this.name.indexOf('date_de_naissance',0)!=-1){jQuery('#date_de_naissance_label').css("color","");}else{jQuery('#'+this.id.replace('input','label')).css("color","");}
if(this.type=='radio'){jQuery('#'+this.name+'_label').css("color","");}
if(this.type=='radio'){if(this.name!=name_radio){if(entry_radio&&!radio_flag){jQuery('#'+name_radio+'_label').css("color","red");}
radio_flag=false;entry_radio=true;if(this.checked){radio_flag=true;}
name_radio=this.name;}else{if(!radio_flag){if(this.checked){radio_flag=true;}}}}else{if(entry_radio&&!radio_flag){jQuery('#'+name_radio+'_label').css("color","red");complete_form=true;}
entry_radio=false;radio_flag=false;if(this.value==''){if(this.name.indexOf('date_de_naissance',0)==-1){jQuery('#'+this.id.replace('input','label')).css("color","red");}else{jQuery('#date_de_naissance_label').css("color","red");}
complete_form=true;}}});if(complete_form){alert('Veuillez compl�ter le formulaire\n pour valider votre participation');return false;}
jQuery.ajax({url:"/elle/action/requalificationJeux",type:"POST",data:jQuery('#modifyform').serialize(),success:function(msg){jQuery('#TB_ajaxContent').html(msg);if(redirect_url!="false"&&redirect_url!=false){window.location.href=redirect_url;}
hideModal();}});return false;},rq_check_form_coreg:function(redirect_url){var radio_flag=false;var entry_radio=false;var name_radio;var complete_form=false;jQuery(".qualif_check").each(function(i){if(this.name.indexOf('date_de_naissance',0)!=-1){jQuery('#date_de_naissance_label').css("color","");}else{jQuery('#'+this.id.replace('input','label')).css("color","");}
if(this.type=='radio'){jQuery('#'+this.name+'_label').css("color","");}
if(this.type=='radio'){if(this.name!=name_radio){if(entry_radio&&!radio_flag){jQuery('#'+name_radio+'_label').css("color","red");}
radio_flag=false;entry_radio=true;if(this.checked){radio_flag=true;}
name_radio=this.name;}else{if(!radio_flag){if(this.checked){radio_flag=true;}}}}else{if(entry_radio&&!radio_flag){jQuery('#'+name_radio+'_label').css("color","red");complete_form=true;}
entry_radio=false;radio_flag=false;if(this.value==''){if(this.name.indexOf('date_de_naissance',0)==-1){jQuery('#'+this.id.replace('input','label')).css("color","red");}else{jQuery('#date_de_naissance_label').css("color","red");}
complete_form=true;}}});if(complete_form){alert('Veuillez compléter le formulaire\n pour valider votre participation');return false;}
jQuery.ajax({url:"/elle/action/coregistration",type:"POST",data:jQuery('#modifyform').serialize(),success:function(msg){jQuery('#TB_ajaxContent').html(msg);if(redirect_url!="false"&&redirect_url!=false){window.location.href=redirect_url;}
hideModal();}});return false;}},modalbox:{accordionSpeed:'fast',accordion:function(obj,callback){for(var id in obj){$('#'+id).slideUp($.la.modalbox.accordionSpeed);$('#'+id).prev('h3').children('a').removeClass("opened");}
for(var id in obj){if(obj[id]==true){$('#'+id).slideDown($.la.modalbox.accordionSpeed);$('#'+id).prev('h3').children('a').addClass("opened");}}},ldapOpenCloseLoginBoxRegistered:function(id){var obj={};$("h3 + div").each(function(i){var currentId=$(this).attr('id');if(currentId!=''){obj[currentId]=false;if(currentId==id){if($('#'+id).css('display')=='none'){obj[currentId]=true;}}}});$.la.modalbox.accordion(obj,null);},playCheckLog:function(url,newsOptions){if(GetCookieMain("user_logged")!="oui"){var paramGet=window.location.search.slice(1,window.location.search.length);var paramsGet=paramGet.split("&");var paramIdOp='';for(var i=0;i<paramsGet.length;i++){var paramElements=paramsGet[i].split("=");var paramName=paramElements[0];var paramValue=paramElements[1];if(paramName=="id_op"){paramIdOp=paramValue;}}
if(paramIdOp!=''){SetCookieMain("idOpModal",paramIdOp);}
SetCookieMain("newsModal",newsOptions);SetCookieMain("ReturnUrlModal",url);tb_show(null,'/action/login/Modal?width=670');}else{window.location.href=url;}}},promo:{_adDefaultDefer:false,_adDefaultZoneDefer:{'adde_flottant':'false','adde_page':'false','adde_pave':'ready','adde_minibanner':'false','adde_vignette1':'ready','adde_vignette2':'ready','adde_vignette3':'ready'},localCss:function(obj){if(obj.bodybgcolor){return'html {background:'+obj.bodybgcolor+' url("") !important; }\n';}}},elle_general:{echo:function(text){alert(text);}}});})(jQuery);

(function($){$.fn.jcarousel=function(o){return this.each(function(){new $jc(this,o);});};var defaults={vertical:false,start:1,offset:1,size:null,scroll:3,visible:null,animation:'normal',easing:'swing',auto:0,wrap:null,initCallback:null,reloadCallback:null,itemLoadCallback:null,itemFirstInCallback:null,itemFirstOutCallback:null,itemLastInCallback:null,itemLastOutCallback:null,itemVisibleInCallback:null,itemVisibleOutCallback:null,buttonNextHTML:'<div></div>',buttonPrevHTML:'<div></div>',buttonNextEvent:'click',buttonPrevEvent:'click',buttonNextCallback:null,buttonPrevCallback:null};$.jcarousel=function(e,o){this.options=$.extend({},defaults,o||{});this.locked=false;this.container=null;this.clip=null;this.list=null;this.buttonNext=null;this.buttonPrev=null;this.wh=!this.options.vertical?'width':'height';this.lt=!this.options.vertical?'left':'top';var skin='',split=e.className.split(' ');for(var i=0;i<split.length;i++){if(split[i].indexOf('jcarousel-skin')!=-1){$(e).removeClass(split[i]);var skin=split[i];break;}}
if(e.nodeName=='UL'||e.nodeName=='OL'){this.list=$(e);this.container=this.list.parent();if(this.container.hasClass('jcarousel-clip')){if(!this.container.parent().hasClass('jcarousel-container'))
this.container=this.container.wrap('<div></div>');this.container=this.container.parent();}else if(!this.container.hasClass('jcarousel-container'))
this.container=this.list.wrap('<div></div>').parent();}else{this.container=$(e);this.list=$(e).find('>ul,>ol,div>ul,div>ol');}
if(skin!=''&&this.container.parent()[0].className.indexOf('jcarousel-skin')==-1)
this.container.wrap('<div class=" '+skin+'"></div>');this.clip=this.list.parent();if(!this.clip.length||!this.clip.hasClass('jcarousel-clip'))
this.clip=this.list.wrap('<div></div>').parent();this.buttonPrev=$('.jcarousel-prev',this.container);if(this.buttonPrev.size()==0&&this.options.buttonPrevHTML!=null)
this.buttonPrev=this.clip.before(this.options.buttonPrevHTML).prev();this.buttonPrev.addClass(this.className('jcarousel-prev'));this.buttonNext=$('.jcarousel-next',this.container);if(this.buttonNext.size()==0&&this.options.buttonNextHTML!=null)
this.buttonNext=this.clip.before(this.options.buttonNextHTML).prev();this.buttonNext.addClass(this.className('jcarousel-next'));this.clip.addClass(this.className('jcarousel-clip'));this.list.addClass(this.className('jcarousel-list'));this.container.addClass(this.className('jcarousel-container'));var di=this.options.visible!=null?Math.ceil(this.clipping()/this.options.visible):null;var li=this.list.children('li');var self=this;if(li.size()>0){var wh=0,i=this.options.offset;li.each(function(){self.format(this,i++);wh+=self.dimension(this,di);});this.list.css(this.wh,wh+'px');if(!o||o.size===undefined)
this.options.size=li.size();}
this.container.css('display','block');this.buttonNext.css('display','block');this.buttonPrev.css('display','block');this.funcNext=function(){self.next();};this.funcPrev=function(){self.prev();};this.funcResize=function(){self.reload();};if(this.options.initCallback!=null)
this.options.initCallback(this,'init');if($.browser.safari){this.buttons(false,false);$(window).bind('load',function(){self.setup();});}else
this.setup();};var $jc=$.jcarousel;$jc.fn=$jc.prototype={jcarousel:'0.2.3'};$jc.fn.extend=$jc.extend=$.extend;$jc.fn.extend({setup:function(){this.first=null;this.last=null;this.prevFirst=null;this.prevLast=null;this.animating=false;this.timer=null;this.tail=null;this.inTail=false;if(this.locked)
return;this.list.css(this.lt,this.pos(this.options.offset)+'px');var p=this.pos(this.options.start);this.prevFirst=this.prevLast=null;this.animate(p,false);$(window).unbind('resize',this.funcResize).bind('resize',this.funcResize);},reset:function(){this.list.empty();this.list.css(this.lt,'0px');this.list.css(this.wh,'10px');if(this.options.initCallback!=null)
this.options.initCallback(this,'reset');this.setup();},reload:function(){if(this.tail!=null&&this.inTail)
this.list.css(this.lt,$jc.intval(this.list.css(this.lt))+this.tail);this.tail=null;this.inTail=false;if(this.options.reloadCallback!=null)
this.options.reloadCallback(this);if(this.options.visible!=null){var self=this;var di=Math.ceil(this.clipping()/this.options.visible),wh=0,lt=0;$('li',this.list).each(function(i){wh+=self.dimension(this,di);if(i+1<self.first)
lt=wh;});this.list.css(this.wh,wh+'px');this.list.css(this.lt,-lt+'px');}
this.scroll(this.first,false);},lock:function(){this.locked=true;this.buttons();},unlock:function(){this.locked=false;this.buttons();},size:function(s){if(s!=undefined){this.options.size=s;if(!this.locked)
this.buttons();}
return this.options.size;},has:function(i,i2){if(i2==undefined||!i2)
i2=i;if(this.options.size!==null&&i2>this.options.size)
i2=this.options.size;for(var j=i;j<=i2;j++){var e=this.get(j);if(!e.length||e.hasClass('jcarousel-item-placeholder'))
return false;}
return true;},get:function(i){return $('.jcarousel-item-'+i,this.list);},add:function(i,s){var e=this.get(i),old=0,add=0;if(e.length==0){var c,e=this.create(i),j=$jc.intval(i);while(c=this.get(--j)){if(j<=0||c.length){j<=0?this.list.prepend(e):c.after(e);break;}}}else
old=this.dimension(e);e.removeClass(this.className('jcarousel-item-placeholder'));typeof s=='string'?e.html(s):e.empty().append(s);var di=this.options.visible!=null?Math.ceil(this.clipping()/this.options.visible):null;var wh=this.dimension(e,di)-old;if(i>0&&i<this.first)
this.list.css(this.lt,$jc.intval(this.list.css(this.lt))-wh+'px');this.list.css(this.wh,$jc.intval(this.list.css(this.wh))+wh+'px');return e;},remove:function(i){var e=this.get(i);if(!e.length||(i>=this.first&&i<=this.last))
return;var d=this.dimension(e);if(i<this.first)
this.list.css(this.lt,$jc.intval(this.list.css(this.lt))+d+'px');e.remove();this.list.css(this.wh,$jc.intval(this.list.css(this.wh))-d+'px');},next:function(){this.stopAuto();if(this.tail!=null&&!this.inTail)
this.scrollTail(false);else
this.scroll(((this.options.wrap=='both'||this.options.wrap=='last')&&this.options.size!=null&&this.last==this.options.size)?1:this.first+this.options.scroll);},prev:function(){this.stopAuto();if(this.tail!=null&&this.inTail)
this.scrollTail(true);else
this.scroll(((this.options.wrap=='both'||this.options.wrap=='first')&&this.options.size!=null&&this.first==1)?this.options.size:this.first-this.options.scroll);},scrollTail:function(b){if(this.locked||this.animating||!this.tail)
return;var pos=$jc.intval(this.list.css(this.lt));!b?pos-=this.tail:pos+=this.tail;this.inTail=!b;this.prevFirst=this.first;this.prevLast=this.last;this.animate(pos);},scroll:function(i,a){if(this.locked||this.animating)
return;this.animate(this.pos(i),a);},pos:function(i){if(this.locked||this.animating)
return;if(this.options.wrap!='circular')
i=i<1?1:(this.options.size&&i>this.options.size?this.options.size:i);var back=this.first>i;var pos=$jc.intval(this.list.css(this.lt));var f=this.options.wrap!='circular'&&this.first<=1?1:this.first;var c=back?this.get(f):this.get(this.last);var j=back?f:f-1;var e=null,l=0,p=false,d=0;while(back?--j>=i:++j<i){e=this.get(j);p=!e.length;if(e.length==0){e=this.create(j).addClass(this.className('jcarousel-item-placeholder'));c[back?'before':'after'](e);}
c=e;d=this.dimension(e);if(p)
l+=d;if(this.first!=null&&(this.options.wrap=='circular'||(j>=1&&(this.options.size==null||j<=this.options.size))))
pos=back?pos+d:pos-d;}
var clipping=this.clipping();var cache=[];var visible=0,j=i,v=0;var c=this.get(i-1);while(++visible){e=this.get(j);p=!e.length;if(e.length==0){e=this.create(j).addClass(this.className('jcarousel-item-placeholder'));c.length==0?this.list.prepend(e):c[back?'before':'after'](e);}
c=e;var d=this.dimension(e);if(d==0){alert('jCarousel: No width/height set for items. This will cause an infinite loop. Aborting...');return 0;}
if(this.options.wrap!='circular'&&this.options.size!==null&&j>this.options.size)
cache.push(e);else if(p)
l+=d;v+=d;if(v>=clipping)
break;j++;}
for(var x=0;x<cache.length;x++)
cache[x].remove();if(l>0){this.list.css(this.wh,this.dimension(this.list)+l+'px');if(back){pos-=l;this.list.css(this.lt,$jc.intval(this.list.css(this.lt))-l+'px');}}
var last=i+visible-1;if(this.options.wrap!='circular'&&this.options.size&&last>this.options.size)
last=this.options.size;if(j>last){visible=0,j=last,v=0;while(++visible){var e=this.get(j--);if(!e.length)
break;v+=this.dimension(e);if(v>=clipping)
break;}}
var first=last-visible+1;if(this.options.wrap!='circular'&&first<1)
first=1;if(this.inTail&&back){pos+=this.tail;this.inTail=false;}
this.tail=null;if(this.options.wrap!='circular'&&last==this.options.size&&(last-visible+1)>=1){var m=$jc.margin(this.get(last),!this.options.vertical?'marginRight':'marginBottom');if((v-m)>clipping)
this.tail=v-clipping-m;}
while(i-->first)
pos+=this.dimension(this.get(i));this.prevFirst=this.first;this.prevLast=this.last;this.first=first;this.last=last;return pos;},animate:function(p,a){if(this.locked||this.animating)
return;this.animating=true;var self=this;var scrolled=function(){self.animating=false;if(p==0)
self.list.css(self.lt,0);if(self.options.wrap=='both'||self.options.wrap=='last'||self.options.size==null||self.last<self.options.size)
self.startAuto();self.buttons();self.notify('onAfterAnimation');};this.notify('onBeforeAnimation');if(!this.options.animation||a==false){this.list.css(this.lt,p+'px');scrolled();}else{var o=!this.options.vertical?{'left':p}:{'top':p};this.list.animate(o,this.options.animation,this.options.easing,scrolled);}},startAuto:function(s){if(s!=undefined)
this.options.auto=s;if(this.options.auto==0)
return this.stopAuto();if(this.timer!=null)
return;var self=this;this.timer=setTimeout(function(){self.next();},this.options.auto*1000);},stopAuto:function(){if(this.timer==null)
return;clearTimeout(this.timer);this.timer=null;},buttons:function(n,p){if(n==undefined||n==null){var n=!this.locked&&this.options.size!==0&&((this.options.wrap&&this.options.wrap!='first')||this.options.size==null||this.last<this.options.size);if(!this.locked&&(!this.options.wrap||this.options.wrap=='first')&&this.options.size!=null&&this.last>=this.options.size)
n=this.tail!=null&&!this.inTail;}
if(p==undefined||p==null){var p=!this.locked&&this.options.size!==0&&((this.options.wrap&&this.options.wrap!='last')||this.first>1);if(!this.locked&&(!this.options.wrap||this.options.wrap=='last')&&this.options.size!=null&&this.first==1)
p=this.tail!=null&&this.inTail;}
var self=this;this.buttonNext[n?'bind':'unbind'](this.options.buttonNextEvent,this.funcNext)[n?'removeClass':'addClass'](this.className('jcarousel-next-disabled')).attr('disabled',n?false:true);this.buttonPrev[p?'bind':'unbind'](this.options.buttonPrevEvent,this.funcPrev)[p?'removeClass':'addClass'](this.className('jcarousel-prev-disabled')).attr('disabled',p?false:true);if(this.buttonNext.length>0&&(this.buttonNext[0].jcarouselstate==undefined||this.buttonNext[0].jcarouselstate!=n)&&this.options.buttonNextCallback!=null){this.buttonNext.each(function(){self.options.buttonNextCallback(self,this,n);});this.buttonNext[0].jcarouselstate=n;}
if(this.buttonPrev.length>0&&(this.buttonPrev[0].jcarouselstate==undefined||this.buttonPrev[0].jcarouselstate!=p)&&this.options.buttonPrevCallback!=null){this.buttonPrev.each(function(){self.options.buttonPrevCallback(self,this,p);});this.buttonPrev[0].jcarouselstate=p;}},notify:function(evt){var state=this.prevFirst==null?'init':(this.prevFirst<this.first?'next':'prev');this.callback('itemLoadCallback',evt,state);if(this.prevFirst!==this.first){this.callback('itemFirstInCallback',evt,state,this.first);this.callback('itemFirstOutCallback',evt,state,this.prevFirst);}
if(this.prevLast!==this.last){this.callback('itemLastInCallback',evt,state,this.last);this.callback('itemLastOutCallback',evt,state,this.prevLast);}
this.callback('itemVisibleInCallback',evt,state,this.first,this.last,this.prevFirst,this.prevLast);this.callback('itemVisibleOutCallback',evt,state,this.prevFirst,this.prevLast,this.first,this.last);},callback:function(cb,evt,state,i1,i2,i3,i4){if(this.options[cb]==undefined||(typeof this.options[cb]!='object'&&evt!='onAfterAnimation'))
return;var callback=typeof this.options[cb]=='object'?this.options[cb][evt]:this.options[cb];if(!$.isFunction(callback))
return;var self=this;if(i1===undefined)
callback(self,state,evt);else if(i2===undefined)
this.get(i1).each(function(){callback(self,this,i1,state,evt);});else{for(var i=i1;i<=i2;i++)
if(i!==null&&!(i>=i3&&i<=i4))
this.get(i).each(function(){callback(self,this,i,state,evt);});}},create:function(i){return this.format('<li></li>',i);},format:function(e,i){var $e=$(e).addClass(this.className('jcarousel-item')).addClass(this.className('jcarousel-item-'+i));$e.attr('jcarouselindex',i);return $e;},className:function(c){return c+' '+c+(!this.options.vertical?'-horizontal':'-vertical');},dimension:function(e,d){var el=e.jquery!=undefined?e[0]:e;var old=!this.options.vertical?el.offsetWidth+$jc.margin(el,'marginLeft')+$jc.margin(el,'marginRight'):el.offsetHeight+$jc.margin(el,'marginTop')+$jc.margin(el,'marginBottom');if(d==undefined||old==d)
return old;var w=!this.options.vertical?d-$jc.margin(el,'marginLeft')-$jc.margin(el,'marginRight'):d-$jc.margin(el,'marginTop')-$jc.margin(el,'marginBottom');$(el).css(this.wh,w+'px');return this.dimension(el);},clipping:function(){return!this.options.vertical?this.clip[0].offsetWidth-$jc.intval(this.clip.css('borderLeftWidth'))-$jc.intval(this.clip.css('borderRightWidth')):this.clip[0].offsetHeight-$jc.intval(this.clip.css('borderTopWidth'))-$jc.intval(this.clip.css('borderBottomWidth'));},index:function(i,s){if(s==undefined)
s=this.options.size;return Math.round((((i-1)/s)-Math.floor((i-1)/s))*s)+1;}});$jc.extend({defaults:function(d){return $.extend(defaults,d||{});},margin:function(e,p){if(!e)
return 0;var el=e.jquery!=undefined?e[0]:e;if(p=='marginRight'&&$.browser.safari){var old={'display':'block','float':'none','width':'auto'},oWidth,oWidth2;$.swap(el,old,function(){oWidth=el.offsetWidth;});old['marginRight']=0;$.swap(el,old,function(){oWidth2=el.offsetWidth;});return oWidth2-oWidth;}
return $jc.intval($.css(el,p));},intval:function(v){v=parseInt(v);return isNaN(v)?0:v;}});})(jQuery);

var tb_pathToImage="http://www.elle.fr/extension/lajavascript/design/standard/images/jquery/thickbox/loadingAnimation.gif";
/*!!!!!!!!!!!!!!!! edit below this line at your own risk !!!!!!!!!!!!!!!!!!!!!!!*/
jQuery(document).ready(function(){tb_init('a.thickbox, area.thickbox, input.thickbox');imgLoader=new Image();imgLoader.src=tb_pathToImage;});function tb_init(domChunk){jQuery(domChunk).click(function(){var t=this.title||this.name||null;var a=this.href||this.alt;var g=this.rel||false;tb_show(t,a,g);this.blur();return false;});}
function tb_show(caption,url,imageGroup){jQuery(document).ready(function(){if(typeof(imgLoader)=='undefined'){tb_init('a.thickbox, area.thickbox, input.thickbox');imgLoader=new Image();imgLoader.src=tb_pathToImage;}
try{if(typeof document.body.style.maxHeight==="undefined"){jQuery("body","html").css({height:"100%",width:"100%"});jQuery("html").css("overflow","hidden");if(document.getElementById("TB_HideSelect")===null){jQuery("body").append("<iframe id='TB_HideSelect'></iframe><div id='TB_overlay'></div><div id='TB_window'></div>");jQuery("#TB_overlay").click(tb_remove);}}else{if(document.getElementById("TB_overlay")===null){jQuery("body").append("<div id='TB_overlay'></div><div id='TB_window'></div>");jQuery("#TB_overlay").click(tb_remove);}}
if(tb_detectMacXFF()){jQuery("#TB_overlay").addClass("TB_overlayMacFFBGHack");}else{jQuery("#TB_overlay").addClass("TB_overlayBG");}
if(caption===null){caption="";}
jQuery("body").append("<div id='TB_load'><img src='"+imgLoader.src+"' /></div>");jQuery('#TB_load').show();var baseURL;if(url.indexOf("?")!==-1){baseURL=url.substr(0,url.indexOf("?"));}else{baseURL=url;}
var urlString=/\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$/;var urlType=baseURL.toLowerCase().match(urlString);if(urlType=='.jpg'||urlType=='.jpeg'||urlType=='.png'||urlType=='.gif'||urlType=='.bmp'){alert("is_image");TB_PrevCaption="";TB_PrevURL="";TB_PrevHTML="";TB_NextCaption="";TB_NextURL="";TB_NextHTML="";TB_imageCount="";TB_FoundURL=false;if(imageGroup){TB_TempArray=jQuery("a[@rel="+imageGroup+"]").get();for(TB_Counter=0;((TB_Counter<TB_TempArray.length)&&(TB_NextHTML===""));TB_Counter++){var urlTypeTemp=TB_TempArray[TB_Counter].href.toLowerCase().match(urlString);if(!(TB_TempArray[TB_Counter].href==url)){if(TB_FoundURL){TB_NextCaption=TB_TempArray[TB_Counter].title;TB_NextURL=TB_TempArray[TB_Counter].href;TB_NextHTML="<span id='TB_next'>&nbsp;&nbsp;<a href='#'>Next &gt;</a></span>";}else{TB_PrevCaption=TB_TempArray[TB_Counter].title;TB_PrevURL=TB_TempArray[TB_Counter].href;TB_PrevHTML="<span id='TB_prev'>&nbsp;&nbsp;<a href='#'>&lt; Prev</a></span>";}}else{TB_FoundURL=true;TB_imageCount="Image "+(TB_Counter+1)+" of "+(TB_TempArray.length);}}}
imgPreloader=new Image();imgPreloader.onload=function(){imgPreloader.onload=null;var pagesize=tb_getPageSize();var x=pagesize[0]-150;var y=pagesize[1]-150;var imageWidth=imgPreloader.width;var imageHeight=imgPreloader.height;if(imageWidth>x){imageHeight=imageHeight*(x/imageWidth);imageWidth=x;if(imageHeight>y){imageWidth=imageWidth*(y/imageHeight);imageHeight=y;}}else if(imageHeight>y){imageWidth=imageWidth*(y/imageHeight);imageHeight=y;if(imageWidth>x){imageHeight=imageHeight*(x/imageWidth);imageWidth=x;}}
TB_WIDTH=imageWidth+30;TB_HEIGHT=imageHeight+60;jQuery("#TB_window").append("<a href='' id='TB_ImageOff' title='Close'><img id='TB_Image' src='"+url+"' width='"+imageWidth+"' height='"+imageHeight+"' alt='"+caption+"'/></a>"+"<div id='TB_caption'>"+caption+"<div id='TB_secondLine'>"+TB_imageCount+TB_PrevHTML+TB_NextHTML+"</div></div><div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton' title='Close'>close</a> or Esc Key</div>");jQuery("#TB_closeWindowButton").click(tb_remove);if(!(TB_PrevHTML==="")){function goPrev(){if(jQuery(document).unbind("click",goPrev)){jQuery(document).unbind("click",goPrev);}
jQuery("#TB_window").remove();jQuery("body").append("<div id='TB_window'></div>");tb_show(TB_PrevCaption,TB_PrevURL,imageGroup);return false;}
jQuery("#TB_prev").click(goPrev);}
if(!(TB_NextHTML==="")){function goNext(){jQuery("#TB_window").remove();jQuery("body").append("<div id='TB_window'></div>");tb_show(TB_NextCaption,TB_NextURL,imageGroup);return false;}
jQuery("#TB_next").click(goNext);}
document.onkeydown=function(e){if(e==null){keycode=event.keyCode;}else{keycode=e.which;}
if(keycode==27){tb_remove();}else if(keycode==190){if(!(TB_NextHTML=="")){document.onkeydown="";goNext();}}else if(keycode==188){if(!(TB_PrevHTML=="")){document.onkeydown="";goPrev();}}};tb_position();jQuery("#TB_load").remove();jQuery("#TB_ImageOff").click(tb_remove);jQuery("#TB_window").css({display:"block"});};imgPreloader.src=url;}else{var queryString=url.replace(/^[^\?]+\??/,'');var params=tb_parseQuery(queryString);TB_WIDTH=(params['width']*1)+30||630;TB_HEIGHT=(params['height']*1)+40||520;ajaxContentW=TB_WIDTH-30;ajaxContentH=TB_HEIGHT-45;if(url.indexOf('TB_iframe')!=-1){urlNoQuery=url.split('TB_');jQuery("#TB_iframeContent").remove();if(params['modal']!="true"){jQuery("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='Close'>close</a> or Esc Key</div></div><iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW+29)+"px;height:"+(ajaxContentH+17)+"px;' > </iframe>");}else{jQuery("#TB_overlay").unbind();jQuery("#TB_window").append("<iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW+29)+"px;height:"+(ajaxContentH+17)+"px;'> </iframe>");}}else{if(jQuery("#TB_window").css("display")!="block"){if(params['modal']!="true"){jQuery("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton'>close</a> or Esc Key</div></div><div id='TB_ajaxContent' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px'></div>");}else{jQuery("#TB_overlay").unbind();jQuery("#TB_window").append("<div id='TB_ajaxContent' class='TB_modal' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px;'></div>");}}else{jQuery("#TB_ajaxContent")[0].style.width=ajaxContentW+"px";jQuery("#TB_ajaxContent")[0].style.height=ajaxContentH+"px";jQuery("#TB_ajaxContent")[0].scrollTop=0;jQuery("#TB_ajaxWindowTitle").html(caption);}}
jQuery("#TB_closeWindowButton").click(tb_remove);if(url.indexOf('TB_inline')!=-1){jQuery("#TB_ajaxContent").append(jQuery('#'+params['inlineId']).children());jQuery("#TB_window").unload(function(){jQuery('#'+params['inlineId']).append(jQuery("#TB_ajaxContent").children());});tb_position();jQuery("#TB_load").remove();jQuery("#TB_window").css({display:"block"});}else if(url.indexOf('TB_iframe')!=-1){tb_position();if(jQuery.browser.safari){jQuery("#TB_load").remove();jQuery("#TB_window").css({display:"block"});}}else{if(location.href.indexOf('id_lien')>-1){myrandom="&random=";}else if(location.href.indexOf('?')!=false){myrandom="?random=";}else{myrandom="&random=";}
jQuery("#TB_ajaxContent").load(url+=myrandom+(new Date().getTime()),function(){tb_position();jQuery("#TB_load").remove();tb_init("#TB_ajaxContent a.thickbox");jQuery("#TB_window").css({display:"block"});});}}
if(!params['modal']){document.onkeyup=function(e){if(e==null){keycode=event.keyCode;}else{keycode=e.which;}
if(keycode==27){tb_remove();}};}}catch(e){}});}
function tb_showIframe(){jQuery("#TB_load").remove();jQuery("#TB_window").css({display:"block"});}
function tb_remove(){jQuery("#TB_imageOff").unbind("click");jQuery("#TB_closeWindowButton").unbind("click");jQuery("#TB_window").fadeOut("fast",function(){jQuery('#TB_window,#TB_overlay,#TB_HideSelect').trigger("unload").unbind().remove();});jQuery("#TB_load").remove();if(typeof document.body.style.maxHeight=="undefined"){jQuery("body","html").css({height:"auto",width:"auto"});jQuery("html").css("overflow","");}
document.onkeydown="";document.onkeyup="";return false;}
function tb_position(){jQuery("#TB_window").css({marginLeft:'-'+parseInt((TB_WIDTH/2),10)+'px',width:TB_WIDTH+'px'});if(!(jQuery.browser.msie&&jQuery.browser.version<7)){jQuery("#TB_window").css({marginTop:'-'+parseInt((TB_HEIGHT/2),10)+'px'});}}
function tb_parseQuery(query){var Params={};if(!query){return Params;}
var Pairs=query.split(/[;&]/);for(var i=0;i<Pairs.length;i++){var KeyVal=Pairs[i].split('=');if(!KeyVal||KeyVal.length!=2){continue;}
var key=unescape(KeyVal[0]);var val=unescape(KeyVal[1]);val=val.replace(/\+/g,' ');Params[key]=val;}
return Params;}
function tb_getPageSize(){var de=document.documentElement;var w=window.innerWidth||self.innerWidth||(de&&de.clientWidth)||document.body.clientWidth;var h=window.innerHeight||self.innerHeight||(de&&de.clientHeight)||document.body.clientHeight;arrayPageSize=[w,h];return arrayPageSize;}
function tb_detectMacXFF(){var userAgent=navigator.userAgent.toLowerCase();if(userAgent.indexOf('mac')!=-1&&userAgent.indexOf('firefox')!=-1){return true;}}

function showModal(sURL,aParams)
{var iWidth=500;var iHeight=500;var sMode='';var sFixed='';var sTitle='';if(sURL.indexOf('?')==-1){var sParams=sURL+'?';}else{var sParams=sURL+'&';}
if(typeof(aParams.title)!='undefined')sTitle=aParams.title;if(typeof(aParams.width)!='undefined')iWidth=aParams.width;if(typeof(aParams.height)!='undefined')iHeight=aParams.height;if(typeof(aParams.mode)!='undefined')
{if(aParams.mode=='iframe')sMode='&TB_iframe=true';else if(aParams.mode=='inline')sParams='#TB_inline?inlineId='+aParams.divID+'&';}
if(typeof(aParams.fixed)!='undefined'&&aParams.fixed)sFixed='&modal=true';sParams+='height='+iHeight+'&width='+iWidth+sMode+sFixed;tb_show(sTitle,sParams);}
function hideModal(sUrl,aParams)
{tb_remove();}

(function(jQuery){jQuery.fn.lightBox=function(settings){settings=jQuery.extend({overlayBgColor:'#000',overlayOpacity:0.8,fixedNavigation:false,imageLoading:'/extension/lajavascript/design/standard/javascript/jquery/jquery-lightbox-0.5/images/lightbox-ico-loading.gif',imageBtnPrev:'/extension/lajavascript/design/standard/javascript/jquery/jquery-lightbox-0.5/images/lightbox-btn-prev.gif',imageBtnNext:'/extension/lajavascript/design/standard/javascript/jquery/jquery-lightbox-0.5/images/lightbox-btn-next.gif',imageBtnClose:'/extension/lajavascript/design/standard/javascript/jquery/jquery-lightbox-0.5/images/lightbox-btn-close.gif',imageBlank:'/extension/lajavascript/design/standard/javascript/jquery/jquery-lightbox-0.5/images/lightbox-blank.gif',containerBorderSize:10,containerResizeSpeed:400,txtImage:'Image',txtOf:'of',keyToClose:'c',keyToPrev:'p',keyToNext:'n',imageArray:[],activeImage:0},settings);var jQueryMatchedObj=this;function _initialize(){_start(this,jQueryMatchedObj);return false;}
function _start(objClicked,jQueryMatchedObj){jQuery('embed, object, select').css({'visibility':'hidden'});_set_interface();settings.imageArray.length=0;settings.activeImage=0;if(jQueryMatchedObj.length==1){settings.imageArray.push(new Array(objClicked.getAttribute('href'),objClicked.getAttribute('title')));}else{for(var i=0;i<jQueryMatchedObj.length;i++){settings.imageArray.push(new Array(jQueryMatchedObj[i].getAttribute('href'),jQueryMatchedObj[i].getAttribute('title')));}}
while(settings.imageArray[settings.activeImage][0]!=objClicked.getAttribute('href')){settings.activeImage++;}
_set_image_to_view();}
function _set_interface(){jQuery('body').append('<div id="jquery-overlay"></div><div id="jquery-lightbox"><div id="lightbox-container-image-box"><div id="lightbox-container-image"><img id="lightbox-image"><div style="" id="lightbox-nav"><a href="#" id="lightbox-nav-btnPrev"></a><a href="#" id="lightbox-nav-btnNext"></a></div><div id="lightbox-loading"><a href="#" id="lightbox-loading-link"><img src="'+settings.imageLoading+'"></a></div></div></div><div id="lightbox-container-image-data-box"><div id="lightbox-container-image-data"><div id="lightbox-image-details"><span id="lightbox-image-details-caption"></span><span id="lightbox-image-details-currentNumber"></span></div><div id="lightbox-secNav"><a href="#" id="lightbox-secNav-btnClose"><img src="'+settings.imageBtnClose+'"></a></div></div></div></div>');var arrPageSizes=___getPageSize();jQuery('#jquery-overlay').css({backgroundColor:settings.overlayBgColor,opacity:settings.overlayOpacity,width:arrPageSizes[0],height:arrPageSizes[1]}).fadeIn();var arrPageScroll=___getPageScroll();jQuery('#jquery-lightbox').css({top:arrPageScroll[1]+(arrPageSizes[3]/10),left:arrPageScroll[0]}).show();jQuery('#jquery-overlay,#jquery-lightbox').click(function(){_finish();});jQuery('#lightbox-loading-link,#lightbox-secNav-btnClose').click(function(){_finish();return false;});jQuery(window).resize(function(){var arrPageSizes=___getPageSize();jQuery('#jquery-overlay').css({width:arrPageSizes[0],height:arrPageSizes[1]});var arrPageScroll=___getPageScroll();jQuery('#jquery-lightbox').css({top:arrPageScroll[1]+(arrPageSizes[3]/10),left:arrPageScroll[0]});});}
function _set_image_to_view(){jQuery('#lightbox-loading').show();if(settings.fixedNavigation){jQuery('#lightbox-image,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber').hide();}else{jQuery('#lightbox-image,#lightbox-nav,#lightbox-nav-btnPrev,#lightbox-nav-btnNext,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber').hide();}
var objImagePreloader=new Image();objImagePreloader.onload=function(){jQuery('#lightbox-image').attr('src',settings.imageArray[settings.activeImage][0]);_resize_container_image_box(objImagePreloader.width,objImagePreloader.height);objImagePreloader.onload=function(){};};objImagePreloader.src=settings.imageArray[settings.activeImage][0];};function _resize_container_image_box(intImageWidth,intImageHeight){var intCurrentWidth=jQuery('#lightbox-container-image-box').width();var intCurrentHeight=jQuery('#lightbox-container-image-box').height();var intWidth=(intImageWidth+(settings.containerBorderSize*2));var intHeight=(intImageHeight+(settings.containerBorderSize*2));var intDiffW=intCurrentWidth-intWidth;var intDiffH=intCurrentHeight-intHeight;jQuery('#lightbox-container-image-box').animate({width:intWidth,height:intHeight},settings.containerResizeSpeed,function(){_show_image();});if((intDiffW==0)&&(intDiffH==0)){if(jQuery.browser.msie){___pause(250);}else{___pause(100);}}
jQuery('#lightbox-container-image-data-box').css({width:intImageWidth});jQuery('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({height:intImageHeight+(settings.containerBorderSize*2)});};function _show_image(){jQuery('#lightbox-loading').hide();jQuery('#lightbox-image').fadeIn(function(){_show_image_data();_set_navigation();});_preload_neighbor_images();};function _show_image_data(){jQuery('#lightbox-container-image-data-box').slideDown('fast');jQuery('#lightbox-image-details-caption').hide();if(settings.imageArray[settings.activeImage][1]){jQuery('#lightbox-image-details-caption').html(settings.imageArray[settings.activeImage][1]).show();}
if(settings.imageArray.length>1){jQuery('#lightbox-image-details-currentNumber').html(settings.txtImage+' '+(settings.activeImage+1)+' '+settings.txtOf+' '+settings.imageArray.length).show();}}
function _set_navigation(){jQuery('#lightbox-nav').show();jQuery('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({'background':'transparent url('+settings.imageBlank+') no-repeat'});if(settings.activeImage!=0){if(settings.fixedNavigation){jQuery('#lightbox-nav-btnPrev').css({'background':'url('+settings.imageBtnPrev+') left 15% no-repeat'}).unbind().bind('click',function(){settings.activeImage=settings.activeImage-1;_set_image_to_view();return false;});}else{jQuery('#lightbox-nav-btnPrev').unbind().hover(function(){jQuery(this).css({'background':'url('+settings.imageBtnPrev+') left 15% no-repeat'});},function(){jQuery(this).css({'background':'transparent url('+settings.imageBlank+') no-repeat'});}).show().bind('click',function(){settings.activeImage=settings.activeImage-1;_set_image_to_view();return false;});}}
if(settings.activeImage!=(settings.imageArray.length-1)){if(settings.fixedNavigation){jQuery('#lightbox-nav-btnNext').css({'background':'url('+settings.imageBtnNext+') right 15% no-repeat'}).unbind().bind('click',function(){settings.activeImage=settings.activeImage+1;_set_image_to_view();return false;});}else{jQuery('#lightbox-nav-btnNext').unbind().hover(function(){jQuery(this).css({'background':'url('+settings.imageBtnNext+') right 15% no-repeat'});},function(){jQuery(this).css({'background':'transparent url('+settings.imageBlank+') no-repeat'});}).show().bind('click',function(){settings.activeImage=settings.activeImage+1;_set_image_to_view();return false;});}}
_enable_keyboard_navigation();}
function _enable_keyboard_navigation(){jQuery(document).keydown(function(objEvent){_keyboard_action(objEvent);});}
function _disable_keyboard_navigation(){jQuery(document).unbind();}
function _keyboard_action(objEvent){if(objEvent==null){keycode=event.keyCode;escapeKey=27;}else{keycode=objEvent.keyCode;escapeKey=objEvent.DOM_VK_ESCAPE;}
key=String.fromCharCode(keycode).toLowerCase();if((key==settings.keyToClose)||(key=='x')||(keycode==escapeKey)){_finish();}
if((key==settings.keyToPrev)||(keycode==37)){if(settings.activeImage!=0){settings.activeImage=settings.activeImage-1;_set_image_to_view();_disable_keyboard_navigation();}}
if((key==settings.keyToNext)||(keycode==39)){if(settings.activeImage!=(settings.imageArray.length-1)){settings.activeImage=settings.activeImage+1;_set_image_to_view();_disable_keyboard_navigation();}}}
function _preload_neighbor_images(){if((settings.imageArray.length-1)>settings.activeImage){objNext=new Image();objNext.src=settings.imageArray[settings.activeImage+1][0];}
if(settings.activeImage>0){objPrev=new Image();objPrev.src=settings.imageArray[settings.activeImage-1][0];}}
function _finish(){jQuery('#jquery-lightbox').remove();jQuery('#jquery-overlay').fadeOut(function(){jQuery('#jquery-overlay').remove();});jQuery('embed, object, select').css({'visibility':'visible'});}
function ___getPageSize(){var xScroll,yScroll;if(window.innerHeight&&window.scrollMaxY){xScroll=window.innerWidth+window.scrollMaxX;yScroll=window.innerHeight+window.scrollMaxY;}else if(document.body.scrollHeight>document.body.offsetHeight){xScroll=document.body.scrollWidth;yScroll=document.body.scrollHeight;}else{xScroll=document.body.offsetWidth;yScroll=document.body.offsetHeight;}
var windowWidth,windowHeight;if(self.innerHeight){if(document.documentElement.clientWidth){windowWidth=document.documentElement.clientWidth;}else{windowWidth=self.innerWidth;}
windowHeight=self.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){windowWidth=document.documentElement.clientWidth;windowHeight=document.documentElement.clientHeight;}else if(document.body){windowWidth=document.body.clientWidth;windowHeight=document.body.clientHeight;}
if(yScroll<windowHeight){pageHeight=windowHeight;}else{pageHeight=yScroll;}
if(xScroll<windowWidth){pageWidth=xScroll;}else{pageWidth=windowWidth;}
arrayPageSize=new Array(pageWidth,pageHeight,windowWidth,windowHeight);return arrayPageSize;};function ___getPageScroll(){var xScroll,yScroll;if(self.pageYOffset){yScroll=self.pageYOffset;xScroll=self.pageXOffset;}else if(document.documentElement&&document.documentElement.scrollTop){yScroll=document.documentElement.scrollTop;xScroll=document.documentElement.scrollLeft;}else if(document.body){yScroll=document.body.scrollTop;xScroll=document.body.scrollLeft;}
arrayPageScroll=new Array(xScroll,yScroll);return arrayPageScroll;};function ___pause(ms){var date=new Date();curDate=null;do{var curDate=new Date();}
while(curDate-date<ms);};return this.unbind('click').click(_initialize);};})(jQuery);

(function($){$.extend($.fn,{validate:function(options){if(!this.length){options&&options.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing");return;}
var validator=$.data(this[0],'validator');if(validator){return validator;}
validator=new $.validator(options,this[0]);$.data(this[0],'validator',validator);if(validator.settings.onsubmit){this.find("input, button").filter(".cancel").click(function(){validator.cancelSubmit=true;});this.submit(function(event){if(validator.settings.debug)
event.preventDefault();function handle(){if(validator.settings.submitHandler){validator.settings.submitHandler.call(validator,validator.currentForm);return false;}
return true;}
if(validator.cancelSubmit){validator.cancelSubmit=false;return handle();}
if(validator.form()){if(validator.pendingRequest){validator.formSubmitted=true;return false;}
return handle();}else{validator.focusInvalid();return false;}});}
return validator;},valid:function(){if($(this[0]).is('form')){return this.validate().form();}else{var valid=false;var validator=$(this[0].form).validate();this.each(function(){valid|=validator.element(this);});return valid;}},removeAttrs:function(attributes){var result={},$element=this;$.each(attributes.split(/\s/),function(index,value){result[value]=$element.attr(value);$element.removeAttr(value);});return result;},rules:function(command,argument){var element=this[0];if(command){var settings=$.data(element.form,'validator').settings;var staticRules=settings.rules;var existingRules=$.validator.staticRules(element);switch(command){case"add":$.extend(existingRules,$.validator.normalizeRule(argument));staticRules[element.name]=existingRules;if(argument.messages)
settings.messages[element.name]=$.extend(settings.messages[element.name],argument.messages);break;case"remove":if(!argument){delete staticRules[element.name];return existingRules;}
var filtered={};$.each(argument.split(/\s/),function(index,method){filtered[method]=existingRules[method];delete existingRules[method];});return filtered;}}
var data=$.validator.normalizeRules($.extend({},$.validator.metadataRules(element),$.validator.classRules(element),$.validator.attributeRules(element),$.validator.staticRules(element)),element);if(data.required){var param=data.required;delete data.required;data=$.extend({required:param},data);}
return data;}});$.extend($.expr[":"],{blank:function(a){return!$.trim(a.value);},filled:function(a){return!!$.trim(a.value);},unchecked:function(a){return!a.checked;}});$.format=function(source,params){if(arguments.length==1)
return function(){var args=$.makeArray(arguments);args.unshift(source);return $.format.apply(this,args);};if(arguments.length>2&&params.constructor!=Array){params=$.makeArray(arguments).slice(1);}
if(params.constructor!=Array){params=[params];}
$.each(params,function(i,n){source=source.replace(new RegExp("\\{"+i+"\\}","g"),n);});return source;};$.validator=function(options,form){this.settings=$.extend({},$.validator.defaults,options);this.currentForm=form;this.init();};$.extend($.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",errorElement:"label",focusInvalid:true,errorContainer:$([]),errorLabelContainer:$([]),onsubmit:true,ignore:[],ignoreTitle:false,onfocusin:function(element){this.lastActive=element;if(this.settings.focusCleanup&&!this.blockFocusCleanup){this.settings.unhighlight&&this.settings.unhighlight.call(this,element,this.settings.errorClass);this.errorsFor(element).hide();}},onfocusout:function(element){if(!this.checkable(element)&&(element.name in this.submitted||!this.optional(element))){this.element(element);}},onkeyup:function(element){if(element.name in this.submitted||element==this.lastElement){this.element(element);}},onclick:function(element){if(element.name in this.submitted)
this.element(element);},highlight:function(element,errorClass){$(element).addClass(errorClass);},unhighlight:function(element,errorClass){$(element).removeClass(errorClass);}},setDefaults:function(settings){$.extend($.validator.defaults,settings);},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",dateDE:"Bitte geben Sie ein gültiges Datum ein.",number:"Please enter a valid number.",numberDE:"Bitte geben Sie eine Nummer ein.",digits:"Please enter only digits",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",accept:"Please enter a value with a valid extension.",maxlength:$.format("Please enter no more than {0} characters."),minlength:$.format("Please enter at least {0} characters."),rangelength:$.format("Please enter a value between {0} and {1} characters long."),range:$.format("Please enter a value between {0} and {1}."),max:$.format("Please enter a value less than or equal to {0}."),min:$.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:false,prototype:{init:function(){this.labelContainer=$(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||$(this.currentForm);this.containers=$(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var groups=(this.groups={});$.each(this.settings.groups,function(key,value){$.each(value.split(/\s/),function(index,name){groups[name]=key;});});var rules=this.settings.rules;$.each(rules,function(key,value){rules[key]=$.validator.normalizeRule(value);});function delegate(event){var validator=$.data(this[0].form,"validator");validator.settings["on"+event.type]&&validator.settings["on"+event.type].call(validator,this[0]);}
$(this.currentForm).delegate("focusin focusout keyup",":text, :password, :file, select, textarea",delegate).delegate("click",":radio, :checkbox",delegate);if(this.settings.invalidHandler)
$(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler);},form:function(){this.checkForm();$.extend(this.submitted,this.errorMap);this.invalid=$.extend({},this.errorMap);if(!this.valid())
$(this.currentForm).triggerHandler("invalid-form",[this]);this.showErrors();return this.valid();},checkForm:function(){this.prepareForm();for(var i=0,elements=(this.currentElements=this.elements());elements[i];i++){this.check(elements[i]);}
return this.valid();},element:function(element){element=this.clean(element);this.lastElement=element;this.prepareElement(element);this.currentElements=$(element);var result=this.check(element);if(result){delete this.invalid[element.name];}else{this.invalid[element.name]=true;}
if(!this.numberOfInvalids()){this.toHide=this.toHide.add(this.containers);}
this.showErrors();return result;},showErrors:function(errors){if(errors){$.extend(this.errorMap,errors);this.errorList=[];for(var name in errors){this.errorList.push({message:errors[name],element:this.findByName(name)[0]});}
this.successList=$.grep(this.successList,function(element){return!(element.name in errors);});}
this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors();},resetForm:function(){if($.fn.resetForm)
$(this.currentForm).resetForm();this.submitted={};this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass);},numberOfInvalids:function(){return this.objectLength(this.invalid);},objectLength:function(obj){var count=0;for(var i in obj)
count++;return count;},hideErrors:function(){this.addWrapper(this.toHide).hide();},valid:function(){return this.size()==0;},size:function(){return this.errorList.length;},focusInvalid:function(){if(this.settings.focusInvalid){try{$(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus();}catch(e){}}},findLastActive:function(){var lastActive=this.lastActive;return lastActive&&$.grep(this.errorList,function(n){return n.element.name==lastActive.name;}).length==1&&lastActive;},elements:function(){var validator=this,rulesCache={};return $([]).add(this.currentForm.elements).filter(":input").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){!this.name&&validator.settings.debug&&window.console&&console.error("%o has no name assigned",this);if(this.name in rulesCache||!validator.objectLength($(this).rules()))
return false;rulesCache[this.name]=true;return true;});},clean:function(selector){return $(selector)[0];},errors:function(){return $(this.settings.errorElement+"."+this.settings.errorClass,this.errorContext);},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=$([]);this.toHide=$([]);this.formSubmitted=false;this.currentElements=$([]);},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers);},prepareElement:function(element){this.reset();this.toHide=this.errorsFor(element);},check:function(element){element=this.clean(element);if(this.checkable(element)){element=this.findByName(element.name)[0];}
var rules=$(element).rules();var dependencyMismatch=false;for(method in rules){var rule={method:method,parameters:rules[method]};try{var result=$.validator.methods[method].call(this,element.value.replace(/\r/g,""),element,rule.parameters);if(result=="dependency-mismatch"){dependencyMismatch=true;continue;}
dependencyMismatch=false;if(result=="pending"){this.toHide=this.toHide.not(this.errorsFor(element));return;}
if(!result){this.formatAndAdd(element,rule);return false;}}catch(e){this.settings.debug&&window.console&&console.log("exception occured when checking element "+element.id
+", check the '"+rule.method+"' method");throw e;}}
if(dependencyMismatch)
return;if(this.objectLength(rules))
this.successList.push(element);return true;},customMetaMessage:function(element,method){if(!$.metadata)
return;var meta=this.settings.meta?$(element).metadata()[this.settings.meta]:$(element).metadata();return meta&&meta.messages&&meta.messages[method];},customMessage:function(name,method){var m=this.settings.messages[name];return m&&(m.constructor==String?m:m[method]);},findDefined:function(){for(var i=0;i<arguments.length;i++){if(arguments[i]!==undefined)
return arguments[i];}
return undefined;},defaultMessage:function(element,method){return this.findDefined(this.customMessage(element.name,method),this.customMetaMessage(element,method),!this.settings.ignoreTitle&&element.title||undefined,$.validator.messages[method],"<strong>Warning: No message defined for "+element.name+"</strong>");},formatAndAdd:function(element,rule){var message=this.defaultMessage(element,rule.method);if(typeof message=="function")
message=message.call(this,rule.parameters,element);this.errorList.push({message:message,element:element});this.errorMap[element.name]=message;this.submitted[element.name]=message;},addWrapper:function(toToggle){if(this.settings.wrapper)
toToggle=toToggle.add(toToggle.parents(this.settings.wrapper));return toToggle;},defaultShowErrors:function(){for(var i=0;this.errorList[i];i++){var error=this.errorList[i];this.settings.highlight&&this.settings.highlight.call(this,error.element,this.settings.errorClass);this.showLabel(error.element,error.message);}
if(this.errorList.length){this.toShow=this.toShow.add(this.containers);}
if(this.settings.success){for(var i=0;this.successList[i];i++){this.showLabel(this.successList[i]);}}
if(this.settings.unhighlight){for(var i=0,elements=this.validElements();elements[i];i++){this.settings.unhighlight.call(this,elements[i],this.settings.errorClass);}}
this.toHide=this.toHide.not(this.toShow);this.hideErrors();this.addWrapper(this.toShow).show();},validElements:function(){return this.currentElements.not(this.invalidElements());},invalidElements:function(){return $(this.errorList).map(function(){return this.element;});},showLabel:function(element,message){var label=this.errorsFor(element);if(label.length){label.removeClass().addClass(this.settings.errorClass);label.attr("generated")&&label.html(message);}else{label=$("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(element),generated:true}).addClass(this.settings.errorClass).html(message||"");if(this.settings.wrapper){label=label.hide().show().wrap("<"+this.settings.wrapper+"/>").parent();}
if(!this.labelContainer.append(label).length)
this.settings.errorPlacement?this.settings.errorPlacement(label,$(element)):label.insertAfter(element);}
if(!message&&this.settings.success){label.text("");typeof this.settings.success=="string"?label.addClass(this.settings.success):this.settings.success(label);}
this.toShow=this.toShow.add(label);},errorsFor:function(element){return this.errors().filter("[for='"+this.idOrName(element)+"']");},idOrName:function(element){return this.groups[element.name]||(this.checkable(element)?element.name:element.id||element.name);},checkable:function(element){return /radio|checkbox/i.test(element.type);},findByName:function(name){var form=this.currentForm;return $(document.getElementsByName(name)).map(function(index,element){return element.form==form&&element.name==name&&element||null;});},getLength:function(value,element){switch(element.nodeName.toLowerCase()){case'select':return $("option:selected",element).length;case'input':if(this.checkable(element))
return this.findByName(element.name).filter(':checked').length;}
return value.length;},depend:function(param,element){return this.dependTypes[typeof param]?this.dependTypes[typeof param](param,element):true;},dependTypes:{"boolean":function(param,element){return param;},"string":function(param,element){return!!$(param,element.form).length;},"function":function(param,element){return param(element);}},optional:function(element){return!$.validator.methods.required.call(this,$.trim(element.value),element)&&"dependency-mismatch";},startRequest:function(element){if(!this.pending[element.name]){this.pendingRequest++;this.pending[element.name]=true;}},stopRequest:function(element,valid){this.pendingRequest--;if(this.pendingRequest<0)
this.pendingRequest=0;delete this.pending[element.name];if(valid&&this.pendingRequest==0&&this.formSubmitted&&this.form()){$(this.currentForm).submit();}else if(!valid&&this.pendingRequest==0&&this.formSubmitted){$(this.currentForm).triggerHandler("invalid-form",[this]);}},previousValue:function(element){return $.data(element,"previousValue")||$.data(element,"previousValue",previous={old:null,valid:true,message:this.defaultMessage(element,"remote")});}},classRuleSettings:{required:{required:true},email:{email:true},url:{url:true},date:{date:true},dateISO:{dateISO:true},dateDE:{dateDE:true},number:{number:true},numberDE:{numberDE:true},digits:{digits:true},creditcard:{creditcard:true}},addClassRules:function(className,rules){className.constructor==String?this.classRuleSettings[className]=rules:$.extend(this.classRuleSettings,className);},classRules:function(element){var rules={};var classes=$(element).attr('class');classes&&$.each(classes.split(' '),function(){if(this in $.validator.classRuleSettings){$.extend(rules,$.validator.classRuleSettings[this]);}});return rules;},attributeRules:function(element){var rules={};var $element=$(element);for(method in $.validator.methods){var value=$element.attr(method);if(value){rules[method]=value;}}
if(rules.maxlength&&/-1|2147483647|524288/.test(rules.maxlength)){delete rules.maxlength;}
return rules;},metadataRules:function(element){if(!$.metadata)return{};var meta=$.data(element.form,'validator').settings.meta;return meta?$(element).metadata()[meta]:$(element).metadata();},staticRules:function(element){var rules={};var validator=$.data(element.form,'validator');if(validator.settings.rules){rules=$.validator.normalizeRule(validator.settings.rules[element.name])||{};}
return rules;},normalizeRules:function(rules,element){$.each(rules,function(prop,val){if(val===false){delete rules[prop];return;}
if(val.param||val.depends){var keepRule=true;switch(typeof val.depends){case"string":keepRule=!!$(val.depends,element.form).length;break;case"function":keepRule=val.depends.call(element,element);break;}
if(keepRule){rules[prop]=val.param!==undefined?val.param:true;}else{delete rules[prop];}}});$.each(rules,function(rule,parameter){rules[rule]=$.isFunction(parameter)?parameter(element):parameter;});$.each(['minlength','maxlength','min','max'],function(){if(rules[this]){rules[this]=Number(rules[this]);}});$.each(['rangelength','range'],function(){if(rules[this]){rules[this]=[Number(rules[this][0]),Number(rules[this][1])];}});if($.validator.autoCreateRanges){if(rules.min&&rules.max){rules.range=[rules.min,rules.max];delete rules.min;delete rules.max;}
if(rules.minlength&&rules.maxlength){rules.rangelength=[rules.minlength,rules.maxlength];delete rules.minlength;delete rules.maxlength;}}
if(rules.messages){delete rules.messages}
return rules;},normalizeRule:function(data){if(typeof data=="string"){var transformed={};$.each(data.split(/\s/),function(){transformed[this]=true;});data=transformed;}
return data;},addMethod:function(name,method,message){$.validator.methods[name]=method;$.validator.messages[name]=message;if(method.length<3){$.validator.addClassRules(name,$.validator.normalizeRule(name));}},methods:{required:function(value,element,param){if(!this.depend(param,element))
return"dependency-mismatch";switch(element.nodeName.toLowerCase()){case'select':var options=$("option:selected",element);return options.length>0&&(element.type=="select-multiple"||($.browser.msie&&!(options[0].attributes['value'].specified)?options[0].text:options[0].value).length>0);case'input':if(this.checkable(element))
return this.getLength(value,element)>0;default:return $.trim(value).length>0;}},remote:function(value,element,param){if(this.optional(element))
return"dependency-mismatch";var previous=this.previousValue(element);if(!this.settings.messages[element.name])
this.settings.messages[element.name]={};this.settings.messages[element.name].remote=typeof previous.message=="function"?previous.message(value):previous.message;param=typeof param=="string"&&{url:param}||param;if(previous.old!==value){previous.old=value;var validator=this;this.startRequest(element);var data={};data[element.name]=value;$.ajax($.extend(true,{url:param,mode:"abort",port:"validate"+element.name,dataType:"json",data:data,success:function(response){if(response){var submitted=validator.formSubmitted;validator.prepareElement(element);validator.formSubmitted=submitted;validator.successList.push(element);validator.showErrors();}else{var errors={};errors[element.name]=response||validator.defaultMessage(element,"remote");validator.showErrors(errors);}
previous.valid=response;validator.stopRequest(element,response);}},param));return"pending";}else if(this.pending[element.name]){return"pending";}
return previous.valid;},minlength:function(value,element,param){return this.optional(element)||this.getLength($.trim(value),element)>=param;},maxlength:function(value,element,param){return this.optional(element)||this.getLength($.trim(value),element)<=param;},rangelength:function(value,element,param){var length=this.getLength($.trim(value),element);return this.optional(element)||(length>=param[0]&&length<=param[1]);},min:function(value,element,param){return this.optional(element)||value>=param;},max:function(value,element,param){return this.optional(element)||value<=param;},range:function(value,element,param){return this.optional(element)||(value>=param[0]&&value<=param[1]);},email:function(value,element){return this.optional(element)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(value);},url:function(value,element){return this.optional(element)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);},date:function(value,element){return this.optional(element)||!/Invalid|NaN/.test(new Date(value));},dateISO:function(value,element){return this.optional(element)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(value);},dateDE:function(value,element){return this.optional(element)||/^\d\d?\.\d\d?\.\d\d\d?\d?$/.test(value);},number:function(value,element){return this.optional(element)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(value);},numberDE:function(value,element){return this.optional(element)||/^-?(?:\d+|\d{1,3}(?:\.\d{3})+)(?:,\d+)?$/.test(value);},digits:function(value,element){return this.optional(element)||/^\d+$/.test(value);},creditcard:function(value,element){if(this.optional(element))
return"dependency-mismatch";if(/[^0-9-]+/.test(value))
return false;var nCheck=0,nDigit=0,bEven=false;value=value.replace(/\D/g,"");for(n=value.length-1;n>=0;n--){var cDigit=value.charAt(n);var nDigit=parseInt(cDigit,10);if(bEven){if((nDigit*=2)>9)
nDigit-=9;}
nCheck+=nDigit;bEven=!bEven;}
return(nCheck%10)==0;},accept:function(value,element,param){param=typeof param=="string"?param:"png|jpe?g|gif";return this.optional(element)||value.match(new RegExp(".("+param+")$","i"));},equalTo:function(value,element,param){return value==$(param).val();}}});})(jQuery);;(function($){var ajax=$.ajax;var pendingRequests={};$.ajax=function(settings){settings=$.extend(settings,$.extend({},$.ajaxSettings,settings));var port=settings.port;if(settings.mode=="abort"){if(pendingRequests[port]){pendingRequests[port].abort();}
return(pendingRequests[port]=ajax.apply(this,arguments));}
return ajax.apply(this,arguments);};})(jQuery);;(function($){$.each({focus:'focusin',blur:'focusout'},function(original,fix){$.event.special[fix]={setup:function(){if($.browser.msie)return false;this.addEventListener(original,$.event.special[fix].handler,true);},teardown:function(){if($.browser.msie)return false;this.removeEventListener(original,$.event.special[fix].handler,true);},handler:function(e){arguments[0]=$.event.fix(e);arguments[0].type=fix;return $.event.handle.apply(this,arguments);}};});$.extend($.fn,{delegate:function(type,delegate,handler){return this.bind(type,function(event){var target=$(event.target);if(target.is(delegate)){return handler.apply(target,arguments);}});},triggerEvent:function(type,target){return this.triggerHandler(type,[$.event.fix({type:type,target:target})]);}})})(jQuery);

(function($){$.extend(true,$.validator,{defaults:{onkeyup:function(element){if(element.name in this.submitted||element==this.lastElement){}},focusCleanup:true},prototype:{optional:function(element){return!$.validator.methods.required.call(this,$.trim(element.value),element)&&"dependency-mismatch"&&$.trim(element.value)!='';}}});$.la=$.la||{};$.la.prefixAjaxReturnUrl='';$.extend(true,$.la,{ajaxForm:{reset_edit_password_fields:function(){$('#password').attr('value','_ezpassword');$('#confirmmotdepasse').attr('value','_ezpassword');},redirect:function(u){document.location.href=u;},redirectTimeout:function(u,t){setTimeout(function(){jQuery.la.ajaxForm.redirect(u)},t);},commonSettings:{modalBox:{login:{width:505,height:505},register:{width:505,height:505},success:{width:630,height:530}},prefixAjaxReturnUrl:'',errorMessageClass:'error_message',errorMessageInputClass:'error_message',errorClass:'error',errorElement:'span',errorPlacement:function(error,element){if(element.attr('type')=='checkbox'||element.attr('type')=='radio'){element.parent().find('div.alert_form').html('');error.appendTo(element.parent().find('div.alert_form'));}
else{element.next().html('');error.appendTo(element.next());}},success:function(span){span.attr('class','success');},submitHandler:function(){return false;},submit:{'method':'post','dataType':'json','async':false},ignore:".ignore",debug:true,highlight:function(element,errorClass){jQuery(element).addClass('errorElement');if(this.errorList.length>=1){jQuery(element).removeClass('ignore');}else{jQuery(element).addClass('ignore');}},unhighlight:function(element,errorClass){jQuery(element).removeClass('errorElement');if(this.errorList.length>=1){jQuery(element).removeClass('ignore');}else{jQuery(element).addClass('ignore');}},ignoreTitle:true},settings:{'modal_register_form':{id_loading:'',rules:{sexe:"required",first_name:{'validateFirstName':true,required:true,minlength:3},last_name:{'validateLastName':true,required:true,minlength:2},date_de_naissance:{'validateDateNaissance':true,required:true},email:{required:true,email:true,'emailExistAjax':true},code_postal:{'required':true,'validateZipCode':true,'number':true,'minlength':5,'maxlength':5},login:{'required':true,'validatePseudoFirstChar':true,'validatePseudo':true,minlength:5,maxlength:20,'pseudoExist':true},password:{required:true,minlength:5},confirmmotdepasse:{required:true,minlength:5,equalTo:"#password"},cgu:'required'},messages:{sexe:"Homme ou femme ?",first_name:{'validateFirstName':"Pr&eacute;nom invalide",required:"Pr&eacute;nom obligatoire",minlength:"3 caract&egrave;res mini"},last_name:{'validateLastName':"Nom invalide",required:"Nom obligatoire",minlength:"2 caract&egrave;res mini"},date_de_naissance:{'validateDateNaissance':"Date invalide",required:"Date requise"},email:{required:"email obligatoire",email:"email incorrect",'emailExistAjax':"email d&eacute;j&agrave; utilis&eacute;"},adresse:{'validateAddress':'Adresse invalide',required:''},code_postal:{'validateZipCode':'Code postal invalide','number':"Que des chiffres !",'required':"Code postal obligatoire",'minlength':"Code postal trop court !",'maxlength':"Code postal trop long !"},ville:{'validateCity':'Ville invalide',required:''},telephone:{'validatePhone':'T&eacute;l&eacute;phone invalide'},login:{required:"Pseudo obligatoire",minlength:"5 caract&egrave;res mini",maxlength:"20 caract&egrave;res max"},password:{required:"Mot de passe requis",minlength:"5 caract&egrave;res mini"},confirmmotdepasse:{required:"Champ requis",minlength:"5 caract&egrave;res mini",equalTo:"Mots de passe diff&eacute;rents"},cgu:"Acceptation obligatoire !"},submit:{'url':jQuery.la.prefixAjaxReturnUrl+'/action/register/Modal','handler':function(json){if(typeof json=='object'&&json.res!=0){if(json.return_url!=''){if(window.location.search.indexOf('iframe=1')!=-1){parent.location.href=json.return_url;}
else{if(json.return_url.indexOf('Modal')!=-1){jQuery.la.modalbox.call(json.return_url,{title:'',height:jQuery.la.ajaxForm.commonSettings.modalBox.register.height,width:jQuery.la.ajaxForm.commonSettings.modalBox.register.width});}
else{window.location.href=json.return_url;}}}}else{jQuery.la.ajaxForm.hide_loader_picture(jQuery.la.ajaxForm.settings['modal_register_form'].id_loading);jQuery.la.ajaxForm.alertForm('modal_register_form',1);}}},error:function(XMLHttpRequest,textStatus,errorThrown){jQuery.la.ajaxForm.hide_loader_picture(jQuery.la.ajaxForm.settings['modal_register_form'].id_loading);for(var i=0;i<$.la.ajaxForm.settings['modal_register_form'].step.length;i++){for(var j=0;j<$.la.ajaxForm.settings['modal_register_form'].step[i].fields.length;j++){$('[name='+$.la.ajaxForm.settings['modal_register_form'].step[i].fields[j]+']').attr('class','');}}
jQuery('#modal_register_form').validate().form();var stepError='';for(var i=0;i<$.la.ajaxForm.settings['modal_register_form'].step.length;i++){for(var j=0;j<$.la.ajaxForm.settings['modal_register_form'].step[i].fields.length;j++){if($('[name='+$.la.ajaxForm.settings['modal_register_form'].step[i].fields[j]+']').attr('class')=='errorElement'&&stepError==''){stepError=i;}}}
switch(stepError){case 1:{$.la.modalbox.ldapOpenCloseLoginBoxRegistered('ldapRegisterBoxAccess');break;}
case 2:{$.la.modalbox.ldapOpenCloseLoginBoxRegistered('ldapRegisterBoxNewsletters');break;}
case 3:{$.la.modalbox.ldapOpenCloseLoginBoxRegistered('ldapRegisterBoxCgu');break;}
default:{$.la.modalbox.ldapOpenCloseLoginBoxRegistered('ldapRegisterBoxInfos');}}},dimensions:{height:505,width:505}},'full_register_form':{id_loading:'',rules:{sexe:"required",first_name:{required:true,'validateFirstName':true,minlength:3},last_name:{'validateLastName':true,required:true,minlength:2},date_de_naissance:{required:true,'validateDateNaissance':true},email:{required:true,email:true,'emailExistAjax':true},adresse:{'validateAddress':true,required:false},code_postal:{'required':true,'validateZipCode':true,'number':true,'minlength':5,'maxlength':5},ville:{'validateCity':true,required:false},telephone:{'validatePhone':true,required:false},login:{'required':true,'validatePseudoFirstChar':true,'validatePseudo':true,minlength:5,maxlength:20,'pseudoExist':true},password:{required:true,minlength:5},confirmmotdepasse:{required:true,minlength:5,equalTo:"#password"},cgu:'required'},messages:{sexe:"Homme ou femme ?",first_name:{'validateFirstName':"Pr&eacute;nom invalide",required:"Pr&eacute;nom obligatoire",minlength:"3 caract&egrave;res mini"},last_name:{'validateLastName':"Nom invalide",required:"Nom obligatoire",minlength:"2 caract&egrave;res mini"},date_de_naissance:{required:"Date requise",'validateDateNaissance':"Date invalide"},email:{required:"email obligatoire",email:"email incorrect",'emailExistAjax':"email d&eacute;j&agrave; utilis&eacute;"},adresse:{'validateAddress':'Adresse invalide',required:''},code_postal:{'required':"Code postal obligatoire",'validateZipCode':"Code postal invalide",'number':"que des chiffres",'minlength':"code postal trop court",'maxlength':"code postal trop long"},ville:{'validateCity':'Ville invalide',required:''},telephone:{'validatePhone':'T&eacute;l&eacute;phone invalide'},login:{required:"Pseudo obligatoire",minlength:"5 caract&egrave;res mini",maxlength:"20 caract&egrave;res max"},password:{required:"Mot de passe requis",minlength:"5 caract&egrave;res mini"},confirmmotdepasse:{required:"Champ requis",minlength:"5 caract&egrave;res mini",equalTo:"Mots de passe diff&eacute;rents"},cgu:"Acceptation obligatoire !"},submit:{'url':jQuery.la.prefixAjaxReturnUrl+'/action/register','handler':function(json){if(json.res!='0'){if(window.location.search.indexOf('iframe=1')!=-1){if(json.return_url==''){parent.location.href='/';}else{parent.location.href=json.return_url;}}
else{if(json.return_url==''){document.location.href='/';}else{if(json.return_url.indexOf('http')!=-1){jQuery.la.ajaxForm.redirectTimeout(json.return_url,100);}
else{jQuery.la.ajaxForm.redirectTimeout(jQuery.la.prefixAjaxReturnUrl+json.return_url,100);}}}}else{jQuery.la.ajaxForm.hide_loader_picture(jQuery.la.ajaxForm.settings['full_register_form'].id_loading);jQuery.la.ajaxForm.alertForm('full_register_form',json.errors);}}}},'full_edit_form':{id_loading:'',rules:{sexe:"required",first_name:{required:true,'validateFirstName':true,minlength:3},last_name:{required:true,'validateLastName':true,minlength:2},date_de_naissance:{required:true,'validateDateNaissance':true},email:{required:true,email:true,'emailExistAjax':true},adresse:{'validateAddress':true,required:false},code_postal:{'validateZipCode':true,'required':true,'number':true,'minlength':5,'maxlength':5},ville:{'validateCity':true,required:false},telephone:{'validatePhone':true,required:false},password:{required:true,minlength:5},confirmmotdepasse:{required:true,minlength:5,equalTo:"#password"},cgu:'required'},messages:{sexe:"Homme ou femme ?",first_name:{'validateFirstName':"Pr&eacute;nom invalide",required:"Pr&eacute;nom obligatoire",minlength:"3 caract&egrave;res mini"},last_name:{'validateLastName':"Nom invalide",required:"Nom obligatoire",minlength:"2 caract&egrave;res mini"},date_de_naissance:{'validateDateNaissance':"Date invalide",required:"Date requise"},email:{required:"email obligatoire",email:"email incorrect",'emailExistAjax':"email d&eacute;j&agrave; utilis&eacute;"},adresse:{'validateAddress':'Adresse invalide',required:''},code_postal:{'validateZipCode':'Code postal invalide','number':"Que des chiffres !",'required':"Code postal obligatoire",'minlength':"Code postal trop court !",'maxlength':"Code postal trop long !"},ville:{'validateCity':'Ville invalide',required:false},telephone:{'validatePhone':'T&eacute;l&eacute;phone invalide'},password:{required:"Mot de passe requis",minlength:"5 caract&egrave;res mini"},confirmmotdepasse:{required:"Champ requis",minlength:"5 caract&egrave;res mini",equalTo:"Mots de passe diff&eacute;rents"},cgu:"Acceptation obligatoire !"},submit:{'url':jQuery.la.prefixAjaxReturnUrl+'/action/edit','handler':function(json){if(json.res!=0){if(json.return_url!=''){if(window.location.search.indexOf('iframe=1')!=-1){parent.location.href=json.return_url;}
else{window.location.href=json.return_url;}}
else{jQuery('.information_update_success').hide('slow');jQuery('.information_update_error').show('slow');jQuery.la.ajaxForm.hide_loader_picture(jQuery.la.ajaxForm.settings['full_edit_form'].id_loading);}
window.location.href="#info_update";}else{jQuery.la.ajaxForm.hide_loader_picture(jQuery.la.ajaxForm.settings['full_edit_form'].id_loading);jQuery('.information_update_error').hide('slow');jQuery('.information_update_success').show('slow');window.location.href="#info_update";jQuery.la.ajaxForm.alertForm('full_edit_form',1);}}}},'modal_login_form':{id_loading:'',rules:{UserLogin:"required",UserPassword:"required"},messages:{UserLogin:"Champ requis",UserPassword:"Champ requis"},submit:{'url':jQuery.la.prefixAjaxReturnUrl+'/action/login','handler':function(json){if(json.res==1){if(window.location.search.indexOf('iframe=1')!=-1){parent.location.href=json.return_url;}
else{window.location.href=json.return_url;}}else{jQuery.la.ajaxForm.hide_loader_picture(jQuery.la.ajaxForm.settings['modal_login_form'].id_loading);jQuery.la.ajaxForm.alertForm('modal_login_form',1);}}}},'full_login_form':{id_loading:'',rules:{UserLogin:"required",UserPassword:{required:true,minlength:1}},messages:{UserLogin:"Champ requis",UserPassword:{required:"Mot de passe requis",minlength:"1 caract&egrave;res mini"}},submit:{'url':jQuery.la.prefixAjaxReturnUrl+'/action/login','handler':function(json){if(json.res!=0){if(json.return_url!=""){if(window.location.search.indexOf('iframe=1')!=-1){parent.location.href=json.return_url;}
else{document.location.href=json.return_url;}}else{if(window.location.search.indexOf('iframe=1')!=-1){parent.location.href='/';}
else{document.location.href='/';}}}else{jQuery.la.ajaxForm.hide_loader_picture(jQuery.la.ajaxForm.settings['full_login_form'].id_loading);jQuery.la.ajaxForm.alertForm('full_login_form',1);}}}},'modal_first_visit_form':{id_loading:'',rules:{UserEmail:{'required':true,'email':true}},messages:{UserEmail:{'required':"email obligatoire",'email':"email incorrect"}},submit:{'url':jQuery.la.prefixAjaxReturnUrl+'/action/register/Modal','handler':function(json){if(json.res!=0){if(json.return_url!=''){jQuery.la.modalbox.call(jQuery.la.prefixAjaxReturnUrl+json.return_url,{title:'',height:jQuery.la.ajaxForm.commonSettings.modalBox.register.height,width:jQuery.la.ajaxForm.commonSettings.modalBox.register.width});}}else{jQuery.la.ajaxForm.hide_loader_picture(jQuery.la.ajaxForm.settings['modal_first_visit_form'].id_loading);jQuery('#UserEmail').val(jQuery('#NewUserEmail').attr('value'));jQuery.la.ajaxForm.alertForm('modal_first_visit_form',json.errors);}}}},'full_first_visit_form':{id_loading:'',rules:{UserEmail:{'required':true,'email':true}},messages:{UserEmail:{'required':"email obligatoire",'email':"email incorrect"}},submit:{'url':jQuery.la.prefixAjaxReturnUrl+'/action/register','handler':function(json){if(json.res!=0){if(json.return_url!=''){if(window.location.search.indexOf('iframe=1')!=-1){parent.location.href=jQuery.la.prefixAjaxReturnUrl+json.return_url;}
else{window.location.href=jQuery.la.prefixAjaxReturnUrl+json.return_url;}}}else{jQuery.la.ajaxForm.hide_loader_picture(jQuery.la.ajaxForm.settings['full_first_visit_form'].id_loading);jQuery('#UserEmail').val(jQuery('#NewUserEmail').attr('value'));jQuery.la.ajaxForm.alertForm('full_first_visit_form',json.errors);}}}},'modal_forget_password_form':{id_loading:'',rules:{UserEmail:{'required':true,'email':true}},messages:{UserEmail:"email incorrect"},submit:{'url':jQuery.la.prefixAjaxReturnUrl+'/action/forgotpassword','handler':function(json){if(json.res=='1'){jQuery.la.ajaxForm.alertForm('modal_forget_password_form',1);}else{jQuery.la.ajaxForm.hide_loader_picture(jQuery.la.ajaxForm.settings['modal_forget_password_form'].id_loading);jQuery('#NewUserEmail').val(jQuery('#UserEmail').attr('value'));jQuery.la.ajaxForm.alertForm('modal_forget_password_form',2);}}}},'full_forget_password_form':{id_loading:'',rules:{UserEmail:{'required':true,'email':true}},messages:{UserEmail:{'required':"email obligatoire",'email':"email incorrect"}},submit:{'url':jQuery.la.prefixAjaxReturnUrl+'/action/forgotpassword','handler':function(json){if(json.res=='1'){jQuery.la.ajaxForm.alertForm('full_forget_password_form',1);}else{jQuery.la.ajaxForm.alertForm('full_forget_password_form',2);jQuery('#NewUserEmail').val(jQuery('#UserEmail').attr('value'));jQuery.la.ajaxForm.hide_loader_picture(jQuery.la.ajaxForm.settings['full_forget_password_form'].id_loading);}}}},'modal_activation_login_form':{id_loading:'',rules:{UserLogin:"required",UserPassword:"required"},messages:{UserLogin:"Champ requis",UserPassword:"Champ requis"},submit:{'url':jQuery.la.prefixAjaxReturnUrl+'/action/login/Modal','handler':function(json){if(json.res==1){if(json.return_url!=""){if(window.location.search.indexOf('iframe=1')!=-1){parent.location.href=json.return_url;}
else{window.location.href=json.return_url;}}else{jQuery.la.modalbox.call(jQuery.la.prefixAjaxReturnUrl+'/action/success/Modal',{height:jQuery.la.ajaxForm.commonSettings.modalBox.success.height,width:jQuery.la.ajaxForm.commonSettings.modalBox.success.width});}}else{jQuery.la.ajaxForm.hide_loader_picture(jQuery.la.ajaxForm.settings['modal_activation_login_form'].id_loading);jQuery.la.ajaxForm.alertForm('modal_activation_login_form',1);}}},error:function(XMLHttpRequest,textStatus,errorThrown){jQuery.la.ajaxForm.hide_loader_picture(jQuery.la.ajaxForm.settings['modal_activation_login_form'].id_loading);jQuery.la.ajaxForm.alertForm('modal_activation_login_form',1);}},'full_activation_login_form':{id_loading:'',rules:{UserLogin:"required",UserPassword:"required"},messages:{UserLogin:"Champ requis",UserPassword:"Champ requis"},submit:{'url':jQuery.la.prefixAjaxReturnUrl+'/action/login','handler':function(json){if(json.res==1){if(json.return_url!=""){if(window.location.search.indexOf('iframe=1')!=-1){parent.location.href=json.return_url;}
else{window.location.href=json.return_url;}}else{window.location.href=jQuery.la.prefixAjaxReturnUrl+'/action/edit?account=activated';}}else{jQuery.la.ajaxForm.hide_loader_picture(jQuery.la.ajaxForm.settings['full_activation_login_form'].id_loading);jQuery.la.ajaxForm.alertForm('full_activation_login_form',1);}}},error:function(XMLHttpRequest,textStatus,errorThrown){jQuery.la.ajaxForm.hide_loader_picture(jQuery.la.ajaxForm.settings['full_activation_login_form'].id_loading);jQuery.la.ajaxForm.alertForm('full_activation_login_form',1);}},'full_newsletter_form':{id_loading:'',rules:{email:{required:true,email:true}},messages:{email:{required:"email obligatoire",email:"email incorrect"}},submit:{'url':jQuery.la.prefixAjaxReturnUrl+'/action/ajax-newsletter-register','handler':function(json){if(json.text==1){jQuery.la.ajaxForm.hide_loader_picture(jQuery.la.ajaxForm.settings['full_newsletter_form'].id_loading);jQuery('#full_newsletter_form span input').css('display','none');jQuery('#full_newsletter_form .picto_ok').css('display','block');}
if(json.text==2){jQuery.la.modalbox.call(jQuery.la.prefixAjaxReturnUrl+'/action/activate/Modal',{height:jQuery.la.ajaxForm.commonSettings.modalBox.success.height,width:jQuery.la.ajaxForm.commonSettings.modalBox.success.width});jQuery.la.ajaxForm.hide_loader_picture(jQuery.la.ajaxForm.settings['full_newsletter_form'].id_loading);jQuery('#full_newsletter_form span input:first').css('display','block');}
if(json.text==3){jQuery.la.modalbox.call(jQuery.la.prefixAjaxReturnUrl+'/action/login/Modal?email='+jQuery('#full_newsletter_form #email').val()+'&window=firstVisit',{height:jQuery.la.ajaxForm.commonSettings.modalBox.success.height,width:jQuery.la.ajaxForm.commonSettings.modalBox.success.width});jQuery.la.ajaxForm.hide_loader_picture(jQuery.la.ajaxForm.settings['full_newsletter_form'].id_loading);jQuery('#full_newsletter_form span input:first').css('display','block');}}},error:function(XMLHttpRequest,textStatus,errorThrown){jQuery.la.ajaxForm.hide_loader_picture(jQuery.la.ajaxForm.settings['full_newsletter_form'].id_loading);jQuery('#full_newsletter_form span input:first').css('display','block');}},'full_newsletter_form_colonne_droite':{id_loading:'',rules:{email:{required:true,email:true}},messages:{email:{required:"email obligatoire",email:"email incorrect"}},submit:{'url':jQuery.la.prefixAjaxReturnUrl+'/action/ajax-newsletter-register','handler':function(json){if(json.text==1){jQuery.la.ajaxForm.hide_loader_picture(jQuery.la.ajaxForm.settings['full_newsletter_form_colonne_droite'].id_loading);jQuery('#full_newsletter_form_colonne_droite span input').css('display','none');jQuery('#full_newsletter_form_colonne_droite .picto_ok').css('display','block');}
if(json.text==2){jQuery.la.modalbox.call(jQuery.la.prefixAjaxReturnUrl+'/action/activate/Modal',{height:jQuery.la.ajaxForm.commonSettings.modalBox.success.height,width:jQuery.la.ajaxForm.commonSettings.modalBox.success.width});jQuery.la.ajaxForm.hide_loader_picture(jQuery.la.ajaxForm.settings['full_newsletter_form_colonne_droite'].id_loading);jQuery('#full_newsletter_form_colonne_droite span input:first').css('display','block');}
if(json.text==3){jQuery.la.modalbox.call(jQuery.la.prefixAjaxReturnUrl+'/action/login/Modal?email='+jQuery('#full_newsletter_form_colonne_droite #email').val()+'&window=firstVisit',{height:jQuery.la.ajaxForm.commonSettings.modalBox.success.height,width:jQuery.la.ajaxForm.commonSettings.modalBox.success.width});jQuery.la.ajaxForm.hide_loader_picture(jQuery.la.ajaxForm.settings['full_newsletter_form_colonne_droite'].id_loading);jQuery('#full_newsletter_form_colonne_droite span input:first').css('display','block');}}},error:function(XMLHttpRequest,textStatus,errorThrown){jQuery.la.ajaxForm.hide_loader_picture(jQuery.la.ajaxForm.settings['full_newsletter_form_colonne_droite'].id_loading);jQuery('#full_newsletter_form_colonne_droite span input:first').css('display','block');}},'modal_newsletter_form':{id_loading:'',rules:{email:{required:true,email:true}},messages:{email:{required:"email obligatoire",email:"email incorrect"}},submit:{'url':jQuery.la.prefixAjaxReturnUrl+'/action/ajax-newsletter-register','dataType':'json','handler':function(json){if(json.text==1){jQuery.la.modalbox.close();alert('Votre abonnement a bien été pris en compte');}
if(json.text==2){jQuery.la.modalbox.call(jQuery.la.prefixAjaxReturnUrl+'/action/activate/Modal',{height:jQuery.la.ajaxForm.commonSettings.modalBox.success.height,width:jQuery.la.ajaxForm.commonSettings.modalBox.success.width});}
if(json.text==3){jQuery.la.modalbox.call(jQuery.la.prefixAjaxReturnUrl+'/action/login/Modal?email='+jQuery('#modal_newsletter_form #email').val()+'&window=firstVisit',{height:jQuery.la.ajaxForm.commonSettings.modalBox.success.height,width:jQuery.la.ajaxForm.commonSettings.modalBox.success.width});}
if(typeof jQuery('#newsletter_id').val()!='undefined'){var current=new Date();var expireCookie=new Date('2020','01','01',23,59,59,0);SetCookie('inter_newsletter'+id,'1',expireCookie);}}},error:function(XMLHttpRequest,textStatus,errorThrown){jQuery.la.ajaxForm.hide_loader_picture(jQuery.la.ajaxForm.settings['modal_newsletter_form'].id_loading);jQuery('#modal_newsletter_form span input:first').css('display','block');}}},validateStep:function(id_form,step){if(this.validateOnlyStep(id_form,step)){this.settings[id_form].step[step].success();}},validateOnlyStep:function(id_form,step){for(var i=0;i<this.settings[id_form].step.length;i++){for(var j=0;j<=this.settings[id_form].step[i].fields.length;j++){if(i>step){jQuery('[name='+this.settings[id_form].step[i].fields[j]+']').attr('class','ignore');}}}
return jQuery('#'+id_form).validate().form();},validateToStep:function(id_form,step){if(!this.validateOnlyStep(id_form,step)){return false;}
for(var i=step+1;i<this.settings[id_form].step.length;i++){for(var j=0;j<=this.settings[id_form].step[i].fields.length;j++){jQuery('[name='+this.settings[id_form].step[i].fields[j]+']').attr('class','');}}
return true;},validateForm:function(id_form){var settings=this.settings[id_form];var ok=jQuery('#'+id_form).validate().form();jQuery.la.ajaxForm.show_loader_picture(settings.id_loading);if(ok){$.ajax({data:jQuery('#'+id_form).serialize(),type:settings.submit.method,url:settings.submit.url,dataType:settings.submit.dataType,async:settings.submit.async,success:settings.submit.handler,error:settings.error});}else{jQuery.la.ajaxForm.hide_loader_picture(settings.id_loading);}
return ok;},validate:function(id_form){$.extend(true,this.settings[id_form],this.commonSettings);jQuery("#"+id_form).validate(this.settings[id_form]);},alertForm:function(id_form,error){jQuery('#'+id_form+' .'+this.settings[id_form].errorMessageClass).show().html(this.getAlertForm(id_form,error));},alertInput:function(id_form,id,html){if(html==''){jQuery('#'+id_form+' #'+id).siblings(' .'+this.settings[id_form].errorMessageInputClass).hide().html(html);}
else{jQuery('#'+id_form+' #'+id).siblings(' .'+this.settings[id_form].errorMessageInputClass).show().html(html);}},getAlertForm:function(id_form,id,error){},gotoSetp:function(){},gotoStep:function(){},useLocalInit:function(array){},init:function(array){jQuery('#TB_ajaxContent').css('overflow','hidden');$.validator.addMethod("validateFirstName",function(value){var RegExPattern=/[0-9\t\n\r\.\(\)\[\]\"\#&%@\}\{\*\+,;:\/!\?²]+/i;return(!value.match(RegExPattern)||(value==''));},'Pr&eacute;nom invalide');$.validator.addMethod("validateLastName",function(value){var RegExPattern=/[0-9\t\n\r\.\(\)\[\]\"\#&%@\}\{\*\+,;:\/!\?²]+/i;return(!value.match(RegExPattern)||(value==''));},'Nom invalide');$.validator.addMethod("validateDateNaissance",function(value){var d=value.split('/');d=d[1]+'/'+d[0]+'/'+d[2]+'';var date=new Date(d);var now=new Date();var maxAge=(date.getFullYear()>now.getFullYear()-130);var RegExPattern=/^((((0?[1-9]|[12]\d|3[01])[\.\-\/](0?[13578]|1[02])[\.\-\/]((1[6-9]|[2-9]\d)?\d{2}))|((0?[1-9]|[12]\d|30)[\.\-\/](0?[13456789]|1[012])[\.\-\/]((1[6-9]|[2-9]\d)?\d{2}))|((0?[1-9]|1\d|2[0-8])[\.\-\/]0?2[\.\-\/]((1[6-9]|[2-9]\d)?\d{2}))|(29[\.\-\/]0?2[\.\-\/]((1[6-9]|[2-9]\d)?(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00)|00)))|(((0[1-9]|[12]\d|3[01])(0[13578]|1[02])((1[6-9]|[2-9]\d)?\d{2}))|((0[1-9]|[12]\d|30)(0[13456789]|1[012])((1[6-9]|[2-9]\d)?\d{2}))|((0[1-9]|1\d|2[0-8])02((1[6-9]|[2-9]\d)?\d{2}))|(2902((1[6-9]|[2-9]\d)?(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00)|00))))$/;return maxAge&&now.getTime()>date.getTime()&&(value.match(RegExPattern))&&(value!='');},'Date de naissance invalide');$.validator.addMethod("validateAddress",function(value){var RegExPattern=/[\t\n\r\(\)\[\]\"\#%@\}\{\*\+;:\/!\?²]+/i;return(!value.match(RegExPattern));},'Adresse invalide');$.validator.addMethod("validateZipCode",function(value){var RegExPattern=/^[0-9a-z]+$/;return(value.match(RegExPattern)||(value==''));},'Code postal invalide');$.validator.addMethod("validateCity",function(value){var RegExPattern=/[0-9\t\n\r\.\(\)\[\]\"\#&%@\}\{\*\+,;:\/!\?²]+/i;return(!value.match(RegExPattern)||(value==''));},'Ville invalide');$.validator.addMethod("validatePhone",function(value){var RegExPattern=/^[0123456789()+ ]+$/;return(value.match(RegExPattern)||(value==''));},'T&eacute;l&eacute;phone invalide');$.validator.addMethod("validatePseudoFirstChar",function(value){var RegExPattern=/^[a-zA-Z]/;return(value.match(RegExPattern)||(value==''));},'1er caract&egrave;re incorrect');$.validator.addMethod("validatePseudo",function(value){var RegExPattern=/^([a-zA-Z0-9])+$/;return(value.match(RegExPattern));},'Caract&egrave;re invalide dans le Pseudo ');$.validator.addMethod("pseudoExist",function(value,element){jQuery.la.ajaxForm.show_loader_picture(jQuery.la.ajaxForm.div_du_loader_input_pseudo);var res;$.ajax({data:'login='+escape(value)+'&outputFormat=json',type:'get',url:jQuery.la.prefixAjaxReturnUrl+'/action/checkLoginAjax',dataType:'json',async:false,success:function(data){jQuery.la.ajaxForm.hide_loader_picture(jQuery.la.ajaxForm.div_du_loader_input_pseudo);if(data.res){$.la.ajaxForm.alertInput($('#pseudoLDAP').parents('form:eq(0)').attr('id'),'pseudoLDAP','');res=true;}else{var html='<strong>Ce pseudo est d&egrave;j&agrave; pris, nous te proposons :</strong><ul>';for(var i=0;i<3;i++){var pseudo=jQuery('#pseudoLDAP').val().toString().substr(0,17)+Math.floor(Math.random()*999).toString();html+='<li><a href="javascript:void(0);" onclick="jQuery(\'#pseudoLDAP\').val(\''+pseudo
+'\');jQuery(\'#pseudoLDAP\').parents(\'form:eq(0)\').validate().element(\'#pseudoLDAP\');">'+pseudo+'</a></li>';}
html+='</ul>';jQuery.la.ajaxForm.alertInput(jQuery('#pseudoLDAP').parents('form:eq(0)').attr('id'),'pseudoLDAP',html);res=false;}
return(res);}});return(res);},'Pseudo existant');$.validator.addMethod("pseudoExistAjax",function(value){return value;},'Pseudo existant 2');$.validator.addMethod("emailExistAjax",function(value){var res;if($('#ezFormerEmail').val()!=''&&$('#ezFormerEmail').val()==$('#email').val()){return true;}
$.ajax({url:jQuery.la.prefixAjaxReturnUrl+'/action/checkEmailAjax',type:'get',data:{email:jQuery('#email').val(),outputFormat:'json'},async:false,success:function(data){result=data.split('|');if(result[0]=='0'){res=false;}else{res=true;}}});return res;},'Email invalide');$("#date_de_naissance").mask("99/99/9999");$('#code_postal').mask("99999");for(var i=0;i<array.length;i++){this.validate(array[i]);}
$.la.ajaxForm.useLocalInit(array);},show_loader_picture:function(id_spinner,callback){if(typeof id_spinner!='undefined'&&id_spinner!=''){jQuery('#'+id_spinner).show();}
if(typeof callback=='function'){window.setTimeout(callback,100);}},hide_loader_picture:function(id_spinner){if(typeof id_spinner!='undefined'&&id_spinner!=''){jQuery('#'+id_spinner).hide();}},div_du_loader_input_email:"loading_pic_email",div_du_loader_input_pseudo:"loading_pic_pseudo",div_du_loader_form_valider:"loading_pic_valider",div_du_loader_form_first:"loading_pic_first",div_du_loader_form_password:"loading_pic_password",div_du_loader_form_login:"loading_pic_login",getModalWidth:function(id_form){var settings=this.settings[id_form];return settings.dimensions.width;},getModalHeight:function(id_form){var settings=this.settings[id_form];return settings.dimensions.height;}}});})(jQuery);

(function($){$.la=$.la||{};$.extend(true,$.la,{ajaxForm:{commonSettings:{modalBox:{login:{width:670,height:555},register:{width:670,height:555},success:{width:670,height:555}}},settings:{'modal_login_form':{submit:{'url':'/action/login','handler':function(json){if(json.res==1){if(window.location.search.indexOf('iframe=1')!=-1){parent.location.href=json.return_url;}
else{ReturnUrlModal=GetCookieMain('ReturnUrlModal');if(ReturnUrlModal&&ReturnUrlModal!=''){window.location.href=ReturnUrlModal;}else{window.location.href=json.return_url;}}}else{jQuery.la.ajaxForm.hide_loader_picture(jQuery.la.ajaxForm.settings['modal_login_form'].id_loading);jQuery.la.ajaxForm.alertForm('modal_login_form',1);}}}},'modal_first_visit_form':{submit:{'url':'/action/register/Modal','handler':function(json){if(json.res!=0){if(json.return_url!=''){$.la.modalbox.call(json.return_url,{width:670,height:555});}}else{$.la.ajaxForm.alertForm('modal_first_visit_form',json.errors);}}}},'modal_register_form':{step:[{fields:['sexe','first_name','last_name','date_de_naissance','email','code_postal'],success:function(){$.la.ajaxForm.gotoStep('modal_register_form',1)}},{fields:['login','password','confirmmotdepasse'],success:function(){$.la.ajaxForm.gotoStep('modal_register_form',2)}},{fields:['offres_promotionnelles'],success:function(){$.la.ajaxForm.gotoStep('modal_register_form',3)}},{fields:['cgu'],success:function(){$.la.ajaxForm.gotoStep('modal_register_form',4)}}],rules:{offres_promotionnelles:"required"},messages:{offres_promotionnelles:{required:"choix obligatoire"}},dimensions:{width:670},submit:{'url':'/action/register/Modal','handler':function(json){if(json.res!='0'){if(json.return_url!=''){$.la.modalbox.call("/action/success/Modal",{width:670});}}else{$.la.ajaxForm.alertForm('modal_register_form',1);}}}},'full_register_form':{rules:{offres_promotionnelles:"required",portable:{'validatePhone':true,required:false},adresse:{'validateAddress':true,required:false},address2:{'validateAddress':true,required:false},ville:{'validateCity':true,required:false,minlength:1}},messages:{offres_promotionnelles:{required:"choix obligatoire"},address2:{'validateAddress':'Adresse invalide',required:''},adresse:{'validateAddress':'Adresse invalide',required:''},ville:{required:''}},submit:{'url':'/action/register','handler':function(json){if(json.res!='0'){window.location.href="/action/success?ReturnUrl="+json.return_url;}else{$.la.ajaxForm.hide_loader_picture($.la.ajaxForm.div_du_loader_form_valider);$.la.ajaxForm.alertForm('full_register_form',json.errors);}}}},'full_edit_form':{rules:{offres_promotionnelles:"required",portable:{'validatePhone':true,required:false},adresse:{'validateAddress':true,required:false},address2:{'validateAddress':true,required:false},ville:{'validateCity':true,required:true,minlength:1}},messages:{offres_promotionnelles:{required:"choix obligatoire"},address2:{'validateAddress':'Adresse invalide',required:''},adresse:{'validateAddress':'Adresse invalide',required:''},ville:{required:"Champ requis"}}}},getAlertForm:function(id_form,error){var message="$(\'#"+id_form+" .\' + $.la.ajaxForm.settings[\'"+id_form+"\'].errorMessageClass).hide();";switch(id_form){case'modal_login_form':switch(error){case 1:message='Mauvais identifiant ou mot de passe';break;}
break;case'full_login_form':switch(error){case 1:message='Mauvais identifiant ou mot de passe';break;}
break;case'modal_first_visit_form':switch(error){case 1:message='Mot de passe oubli&eacute;? <br/>Indiquez votre adresse email dans le champs E-mail en bas du formulaire <br/>et nous vous renverrons votre pseudo et votre mot de passe';break;case 2:message='Vous etes d&eacute;j&agrave; inscrit sur un de nos sites. <br/>Vous pouvez utiliser les m&ecirc;mes identifiants, pseudo et mot de passe.';break;}
break;case'full_first_visit_form':switch(error){case 1:message='Mot de passe oubli&eacute;? <br/>Indiquez votre adresse email dans le champs E-mail en bas du formulaire <br/>et nous vous renverrons votre pseudo et votre mot de passe';break;case 2:message='Vous etes d&eacute;j&agrave; inscrit sur un de nos sites. <br/>Vous pouvez utiliser les m&ecirc;mes identifiants, pseudo et mot de passe.';break;default:message='Mot de passe oubli&eacute;? <br/>Indiquez votre adresse email dans le champs E-mail en bas du formulaire <br/>et nous vous renverrons votre pseudo et votre mot de passe';break;}
break;case'modal_activation_login_form':switch(error){case 1:message='Mauvais identifiant ou mot de passe';break;}
break;case'full_activation_login_form':switch(error){case 1:message='Mauvais identifiant ou mot de passe';break;}
break;case'modal_forget_password_form':switch(error){case 1:message='Un email va vous &ecirc;tre envoy&eacute; sous peu';break;case 2:message='Votre adresse n\'est pas enregistr&eacute;e dans notre base';break;}
break;case'full_forget_password_form':switch(error){case 1:message='Un email va vous &ecirc;tre envoy&eacute; sous peu';break;case 2:message='Votre adresse n\'est pas enregistr&eacute;e dans notre base';break;}
break;case'modal_register_form':switch(error){case 1:message='OK';break;case 2:message='PAS OK';break;}
break;case'full_register_form':switch(error){case 100:message='L\'adresse email est d&eacute;j&agrave; prise. Veuillez en choisir une autre.';break;}
break;default:message='default';}
return message;},gotoStep:function(id_form,step){for(var i=0;i<step;i++){for(var j=0;j<$.la.ajaxForm.settings[id_form].step[i].fields.length;j++){$('[name='+$.la.ajaxForm.settings[id_form].step[i].fields[j]+']').attr('class','');}}
switch(id_form){case'modal_register_form':{switch(step){case 0:{$.la.modalbox.ldapOpenCloseLoginBoxRegistered('ldapRegisterBoxInfos');break;}
case 1:{$.la.modalbox.ldapOpenCloseLoginBoxRegistered('ldapRegisterBoxAccess');break;}
case 2:{$.la.modalbox.ldapOpenCloseLoginBoxRegistered('ldapRegisterBoxNewsletters');break;}
case 3:{$.la.modalbox.ldapOpenCloseLoginBoxRegistered('ldapRegisterBoxCgu');break;}
case 4:{$.la.ajaxForm.validateForm(id_form);break;}}
break;}}}}});})(jQuery);

(function($){var pasteEventName=($.browser.msie?'paste':'input')+".mask";var iPhone=(window.orientation!=undefined);$.mask={definitions:{'9':"[0-9]",'a':"[A-Za-z]",'*':"[A-Za-z0-9]"}};$.fn.extend({caret:function(begin,end){if(this.length==0)return;if(typeof begin=='number'){end=(typeof end=='number')?end:begin;return this.each(function(){if(this.setSelectionRange){this.focus();this.setSelectionRange(begin,end);}else if(this.createTextRange){var range=this.createTextRange();range.collapse(true);range.moveEnd('character',end);range.moveStart('character',begin);range.select();}});}else{if(this[0].setSelectionRange){begin=this[0].selectionStart;end=this[0].selectionEnd;}else if(document.selection&&document.selection.createRange){var range=document.selection.createRange();begin=0-range.duplicate().moveStart('character',-100000);end=begin+range.text.length;}
return{begin:begin,end:end};}},unmask:function(){return this.trigger("unmask");},mask:function(mask,settings){if(!mask&&this.length>0){var input=$(this[0]);var tests=input.data("tests");return $.map(input.data("buffer"),function(c,i){return tests[i]?c:null;}).join('');}
settings=$.extend({placeholder:"_",completed:null},settings);var defs=$.mask.definitions;var tests=[];var partialPosition=mask.length;var firstNonMaskPos=null;var len=mask.length;$.each(mask.split(""),function(i,c){if(c=='?'){len--;partialPosition=i;}else if(defs[c]){tests.push(new RegExp(defs[c]));if(firstNonMaskPos==null)
firstNonMaskPos=tests.length-1;}else{tests.push(null);}});return this.each(function(){var input=$(this);var buffer=$.map(mask.split(""),function(c,i){if(c!='?')return defs[c]?settings.placeholder:c});var ignore=false;var focusText=input.val();input.data("buffer",buffer).data("tests",tests);function seekNext(pos){while(++pos<=len&&!tests[pos]);return pos;};function shiftL(pos){while(!tests[pos]&&--pos>=0);for(var i=pos;i<len;i++){if(tests[i]){buffer[i]=settings.placeholder;var j=seekNext(i);if(j<len&&tests[i].test(buffer[j])){buffer[i]=buffer[j];}else
break;}}
writeBuffer();input.caret(Math.max(firstNonMaskPos,pos));};function shiftR(pos){for(var i=pos,c=settings.placeholder;i<len;i++){if(tests[i]){var j=seekNext(i);var t=buffer[i];buffer[i]=c;if(j<len&&tests[j].test(t))
c=t;else
break;}}};function keydownEvent(e){var pos=$(this).caret();var k=e.keyCode;ignore=(k<16||(k>16&&k<32)||(k>32&&k<41));if((pos.begin-pos.end)!=0&&(!ignore||k==8||k==46))
clearBuffer(pos.begin,pos.end);if(k==8||k==46||(iPhone&&k==127)){shiftL(pos.begin+(k==46?0:-1));return false;}else if(k==27){input.val(focusText);input.caret(0,checkVal());return false;}};function keypressEvent(e){if(ignore){ignore=false;return(e.keyCode==8)?false:null;}
e=e||window.event;var k=e.charCode||e.keyCode||e.which;var pos=$(this).caret();if(e.ctrlKey||e.altKey||e.metaKey){return true;}else if((k>=32&&k<=125)||k>186){var p=seekNext(pos.begin-1);if(p<len){var c=String.fromCharCode(k);if(tests[p].test(c)){shiftR(p);buffer[p]=c;writeBuffer();var next=seekNext(p);$(this).caret(next);if(settings.completed&&next==len)
settings.completed.call(input);}}}
return false;};function clearBuffer(start,end){for(var i=start;i<end&&i<len;i++){if(tests[i])
buffer[i]=settings.placeholder;}};function writeBuffer(){return input.val(buffer.join('')).val();};function checkVal(allow){var test=input.val();var lastMatch=-1;for(var i=0,pos=0;i<len;i++){if(tests[i]){buffer[i]=settings.placeholder;while(pos++<test.length){var c=test.charAt(pos-1);if(tests[i].test(c)){buffer[i]=c;lastMatch=i;break;}}
if(pos>test.length)
break;}else if(buffer[i]==test[pos]&&i!=partialPosition){pos++;lastMatch=i;}}
if(!allow&&lastMatch+1<partialPosition){input.val("");clearBuffer(0,len);}else if(allow||lastMatch+1>=partialPosition){writeBuffer();if(!allow)input.val(input.val().substring(0,lastMatch+1));}
return(partialPosition?i:firstNonMaskPos);};if(!input.attr("readonly"))
input.one("unmask",function(){input.unbind(".mask").removeData("buffer").removeData("tests");}).bind("focus.mask",function(){focusText=input.val();var pos=checkVal();writeBuffer();setTimeout(function(){if(pos==mask.length)
input.caret(0,pos);else
input.caret(pos);},0);}).bind("blur.mask",function(){checkVal();if(input.val()!=focusText)
input.change();}).bind("keydown.mask",keydownEvent).bind("keypress.mask",keypressEvent).bind(pasteEventName,function(){setTimeout(function(){input.caret(checkVal(true));},0);});checkVal();});}});})(jQuery);
