

/*     CSM: /scripts/win_utils.js    */

function windowHeight(){return window.innerHeight!=null?window.innerHeight:document.documentElement&&document.documentElement.clientHeight?document.documentElement.clientHeight:document.body!=null?document.body.clientHeight:null;}
function centered_param(w,h){var win_left=(screen)?(screen.width-w)/2:0;var win_top=(screen)?((screen.height-h)/2-40):0;return" left="+win_left+",top="+win_top+",width="+w+", height="+h+" ";}
function mini_popup_param(){return"toolbar=0, location=0, directories=0, status=0, menubar=0, scrollbars=0, resizable=1";}
function centered_x(w,h){var myversionInfo=detectDoctype();if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)&&typeof(myversionInfo)!=null&&myversionInfo=='XHTML'){return((document.documentElement.clientWidth-w)/2)+document.documentElement.scrollLeft;}
else{var innerWidth=document.body.clientWidth;var win_top=(window)?(innerWidth-w)/2:0;return win_top+document.body.scrollLeft;}}
function centered_y(w,h){var myversionInfo=detectDoctype();if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)&&typeof(myversionInfo)!=null&&myversionInfo=='XHTML'){return((document.documentElement.clientHeight-h)/2)+document.documentElement.scrollTop;}
else{var innerHeight=document.body.clientHeight;var win_top=(window)?(innerHeight-h)/2:0;return win_top+document.body.scrollTop;}}
function max_height(h){var screen_height=(screen)?(screen.height):(800);var wished_h=screen_height*0.85;if(wished_h<h)wished_h=h;return wished_h;}
function max_size(w_percent,h_percent){var screen_height=(screen)?(screen.height):(800);var screen_width=(screen)?(screen.width):(600);wished_w=screen_width*w_percent;wished_h=screen_height*h_percent;return centered_param(wished_w,wished_h);}
function plein_ecran(){window.moveTo(0,0);window.resizeTo(screen.availWidth,screen.availHeight-3);}
function setMaxHeight(id,diff){var height_px=700;if(window.innerHeight){height_px=window.innerHeight;}
else{if(document.body.offsetHeight){height_px=document.body.offsetHeight;}
else{if(document.body.clientHeight){height_px=document.body.clientHeight;}}}
height_px-=diff+5;document.getElementById(id).style.height=height_px+'px';}
function retaille(nomDiv){var x_div=document.getElementById(nomDiv).offsetWidth;var y_div=document.getElementById(nomDiv).offsetHeight;var x=Math.min(x_div+50,screen.availWidth);var y=Math.min(y_div+110,screen.availHeight);window.resizeTo(x,y);window.focus();}
function surchargerEvenement(obj,type,fn){if(obj.attachEvent){obj['e'+type+fn]=fn;obj[type+fn]=function(){obj['e'+type+fn](window.event);}
obj.attachEvent('on'+type,obj[type+fn]);}
else{obj.addEventListener(type,fn,false);}}
function dechargerEvenement(obj,type,fn){if(obj.detachEvent){obj.detachEvent('on'+type,obj[type+fn]);obj[type+fn]=null;}
else{obj.removeEventListener(type,fn,false);}}
function surchargerEvenement_old(conteneur,evenement,maFonction){if(typeof conteneur.attachEvent!="undefined"){conteneur.attachEvent("on"+evenement,maFonction);}
else if(typeof conteneur.addEventListener!="undefined"){conteneur.addEventListener(evenement,maFonction,false);}
else{var oldon=eval('conteneur.on'+evenement);if(eval('typeof conteneur.on'+evenement+' != "function"')){eval('conteneur.on'+evenement+' = maFonction');}
else{eval('conteneur.on'+evenement+' = function(){oldon();maFonction();}');}}}
function detectDoctype(){var re=/\s+(X?HTML)\s+([\d\.]+)\s*([^\/]+)*\//gi;if(typeof document.namespaces!="undefined"){if(document.all[0].nodeType==8)
re.exec(document.all[0].nodeValue);else
return null;}
else{if(document.doctype!=null)
re.exec(document.doctype.publicId);else
return null;}
return RegExp.$1;};

/*     CSM: /scripts/View/ViewOther/ViewFilter/ViewFilterCursor/ViewFilterCursor.js    */

var initSlider=function(options){var sliderId=options.sliderId;var minLimit=options.minLimit;var maxLimit=options.maxLimit;var stepValue=options.stepValue;var currentMinValue=options.currentMinValue;var currentMaxValue=options.currentMaxValue;var postFormName=options.postFormName;var minAttributeName=options.minAttributeName;var maxAttributeName=options.maxAttributeName;var useFilterLength=options.useFilterLength;var useFilterPrice=options.useFilterPrice;var useFilterYear=options.useFilterYear;var defaultActionUrl=options.defaultActionUrl;var standardUnit=options.standardUnit;var alternativeUnit=options.alternativeUnit;var conversionRate=options.conversionRate;var setSliderValues=function(minValue,maxValue){$('#'+sliderId+' .slider-bar').slider('values',[minValue,maxValue]);};var setFormValues=function(minValue,maxValue,filterValue){var form=$.getForm(postFormName);$(form).setInput(minAttributeName,minValue);$(form).setInput(maxAttributeName,maxValue);var paramName=minAttributeName.substring(0,minAttributeName.indexOf('['));var currentFilter='useFilter'+sliderId.match(/[A-Z][a-z]+/g);paramName=paramName+'['+currentFilter+']';$(form).setInput(paramName,filterValue);};var setLabelsValues=function(minValue,maxValue){$('#'+sliderId+' .standard-unit-min').html(formatCurrency(minValue)+standardUnit);$('#'+sliderId+' .standard-unit-max').html(formatCurrency(maxValue)+standardUnit);$('#'+sliderId+' .alternative-unit-min').html(formatCurrency(convertValue(minValue))+alternativeUnit);$('#'+sliderId+' .alternative-unit-max').html(formatCurrency(convertValue(maxValue))+alternativeUnit);updateLabelsPositions();};var convertValue=function(value){var convertedValue=value*conversionRate;return convertedValue.toFixed();};var updateLabelsPositions=function(){var currentValues=getCurrentCursorsPositions();var minCursorPosition=currentValues[0];var maxCursorPosition=currentValues[1];};var getCurrentCursorsPositions=function(){var handlers=$('#'+sliderId+' .slider-bar .ui-slider-handle');var minCursorPosition=$(handlers[0]).position().left;var maxCursorPosition=$(handlers[1]).position().left;return[minCursorPosition,maxCursorPosition];};var reloadPage=function(){$('.slider-bar').slider('disable');var form=$.getForm(postFormName);$(form).attr('action',defaultActionUrl);$(form).submit();};var formatCurrency=function(value){if(sliderId.search(/Price/i)!=-1){value=FormatNumberBy3(value,'.',' ');console.log(value);}
return value;}
function FormatNumberBy3(num,decpoint,sep){if(arguments.length==2){sep=",";}
if(arguments.length==1){sep=",";decpoint=".";}
num=num.toString();a=num.split(decpoint);x=a[0];y=a[1];z="";if(typeof(x)!="undefined"){for(i=x.length-1;i>=0;i--)
z+=x.charAt(i);z=z.replace(/(\d{3})/g,"$1"+sep);if(z.slice(-sep.length)==sep)
z=z.slice(0,-sep.length);x="";for(i=z.length-1;i>=0;i--)
x+=z.charAt(i);if(typeof(y)!="undefined"&&y.length>0)
x+=decpoint+y;}
return x;}
$('#'+sliderId+' .slider-bar').slider({animate:false,min:minLimit,max:maxLimit,orientation:'horizontal',range:true,step:stepValue,values:[currentMinValue,currentMaxValue],change:function(event,ui){var newCurrentMinValue=ui.values[0];var newCurrentMaxValue=ui.values[1];if((newCurrentMinValue!=currentMinValue)||(newCurrentMaxValue!=currentMaxValue)){setLabelsValues(newCurrentMinValue,newCurrentMaxValue);}},stop:function(event,ui){var newCurrentMinValue=ui.values[0];var newCurrentMaxValue=ui.values[1];setLabelsValues(newCurrentMinValue,newCurrentMaxValue);if((newCurrentMinValue!=currentMinValue)||(newCurrentMaxValue!=currentMaxValue)){setFormValues(newCurrentMinValue,newCurrentMaxValue,1);reloadPage();}}});$('#'+sliderId+' .slider-reset').click(function(){var newCurrentValues=$('#'+sliderId+' .slider-bar').slider('option','values');var newCurrentMinValue=newCurrentValues[0];var newCurrentMaxValue=newCurrentValues[1];if((newCurrentMinValue!=minLimit)||(newCurrentMaxValue!=maxLimit)){setSliderValues(minLimit,maxLimit);setLabelsValues(minLimit,maxLimit);setFormValues(minLimit,maxLimit,0);reloadPage();}});if(minLimit<maxLimit){if((currentMinValue>minLimit)||(currentMaxValue<maxLimit)){setLabelsValues(currentMinValue,currentMaxValue);setFormValues(currentMinValue,currentMaxValue,1);}}
else{$('#'+sliderId+' .slider-bar').slider('disable');}};;

/*     CSM: /lib/jquery/plugins/jquery.tipTip.js    */

(function($){$.fn.tipTip=function(options){var defaults={activation:"hover",keepAlive:false,maxWidth:"200px",edgeOffset:3,defaultPosition:"bottom",delay:400,fadeIn:200,fadeOut:200,attribute:"title",content:false,enter:function(){},exit:function(){},translateButton:"toggleTrad"};var opts=$.extend(defaults,options);if($("#tiptip_holder").length<=0){var tiptip_holder=$('<div id="tiptip_holder";"></div>');var tiptip_content=$('<div id="tiptip_content"></div>');var tiptip_arrow=$('<div id="tiptip_arrow"></div>');$("body").append(tiptip_holder.html(tiptip_content).prepend(tiptip_arrow.html('<div id="tiptip_arrow_inner"></div>')));}else{var tiptip_holder=$("#tiptip_holder");var tiptip_content=$("#tiptip_content");var tiptip_arrow=$("#tiptip_arrow");}
return this.each(function(){var org_elem=$(this);if(opts.content){var org_title=opts.content;}else{var org_title=org_elem.attr(opts.attribute);}
if(org_title!=""){if(!opts.content){org_elem.removeAttr(opts.attribute);}
var timeout=false;if(opts.activation=="hover"){org_elem.hover(function(){active_tiptip();},function(){if(!opts.keepAlive){deactive_tiptip();}});if(opts.keepAlive){tiptip_holder.hover(function(){},function(){deactive_tiptip();});}}else if(opts.activation=="focus"){org_elem.focus(function(){active_tiptip();}).blur(function(){deactive_tiptip();});}else if(opts.activation=="click"){org_elem.click(function(){active_tiptip();return false;}).hover(function(){},function(){if(!opts.keepAlive){deactive_tiptip();}});if(opts.keepAlive){tiptip_holder.hover(function(){},function(){});}}
function active_tiptip(){opts.enter.call(this);tiptip_content.html(org_title);tiptip_holder.hide().removeAttr("class").css("margin","0");tiptip_arrow.removeAttr("style");tiptip_holder.hover(function(){$(this).find("."+opts.translateButton+":first").fadeIn(100)},function(){$(this).find("."+opts.translateButton+":first").fadeOut(100)});$("."+opts.translateButton).hide();$("."+opts.translateButton).click(function(){var postValSplitter=(this.id).split("_");var postIDVal=postValSplitter[1];var labelTmp=$(this).find("div").html();var descTmp=$(this).next().find("p").html();$(this).find("div").html(labelToggleTmp[postIDVal]);$(this).next().find("p").html(descriptionTmp[postIDVal]);labelToggleTmp[postIDVal]=labelTmp;descriptionTmp[postIDVal]=descTmp;});var top=parseInt(org_elem.offset()['top']);var left=parseInt(org_elem.offset()['left']);var org_width=parseInt(org_elem.outerWidth());var org_height=parseInt(org_elem.outerHeight());var tip_w=tiptip_holder.outerWidth();var tip_h=tiptip_holder.outerHeight();var w_compare=Math.round((org_width-tip_w)/2);var h_compare=Math.round((org_height-tip_h)/2);var marg_left=Math.round(left+w_compare);var marg_top=Math.round(top+org_height+opts.edgeOffset);var t_class="";var arrow_top="";var arrow_left=Math.round(tip_w-12)/2;if(opts.defaultPosition=="bottom"){t_class="_bottom";}else if(opts.defaultPosition=="top"){t_class="_top";}else if(opts.defaultPosition=="left"){t_class="_left";}else if(opts.defaultPosition=="right"){t_class="_right";}
var right_compare=(w_compare+left)<parseInt($(window).scrollLeft());var left_compare=(tip_w+left)>parseInt($(window).width());if((right_compare&&w_compare<0)||(t_class=="_right"&&!left_compare)||(t_class=="_left"&&left<(tip_w+opts.edgeOffset+5))){t_class="_right";arrow_top=Math.round(tip_h-13)/2;arrow_left=-12;marg_left=Math.round(left+org_width+opts.edgeOffset);marg_top=Math.round(top+h_compare);}else if((left_compare&&w_compare<0)||(t_class=="_left"&&!right_compare)){t_class="_left";arrow_top=Math.round(tip_h-13)/2;arrow_left=Math.round(tip_w);marg_left=Math.round(left-(tip_w+opts.edgeOffset+5));marg_top=Math.round(top+h_compare);}
var top_compare=(top+org_height+opts.edgeOffset+tip_h+8)>parseInt($(window).height()+$(window).scrollTop());var bottom_compare=((top+org_height)-(opts.edgeOffset+tip_h+8))<0;if(top_compare||(t_class=="_bottom"&&top_compare)||(t_class=="_top"&&!bottom_compare)){if(t_class=="_top"||t_class=="_bottom"){t_class="_top";}else{t_class=t_class+"_top";}
arrow_top=tip_h;marg_top=Math.round(top-(tip_h+5+opts.edgeOffset));}else if(bottom_compare|(t_class=="_top"&&bottom_compare)||(t_class=="_bottom"&&!top_compare)){if(t_class=="_top"||t_class=="_bottom"){t_class="_bottom";}else{t_class=t_class+"_bottom";}
arrow_top=-12;marg_top=Math.round(top+org_height+opts.edgeOffset);}
if(marg_top<0){if(t_class=="_top"||t_class=="_bottom"){t_class="_bottom";}else{t_class=t_class+"_bottom";}
t_class="_bottom";arrow_top=-12;marg_top=Math.round(top+org_height+opts.edgeOffset);}
if(t_class=="_right_top"||t_class=="_left_top"){marg_top=marg_top+5;}else if(t_class=="_right_bottom"||t_class=="_left_bottom"){marg_top=marg_top-5;}
if(t_class=="_left_top"||t_class=="_left_bottom"){marg_left=marg_left+5;}
tiptip_arrow.css({"margin-left":arrow_left+"px","margin-top":arrow_top+"px"});tiptip_holder.css({"margin-left":marg_left+"px","margin-top":marg_top+"px"}).attr("class","tip"+t_class);if(timeout){clearTimeout(timeout);}
timeout=setTimeout(function(){tiptip_holder.stop(true,true).fadeIn(opts.fadeIn);},opts.delay);}
function deactive_tiptip(){opts.exit.call(this);if(timeout){clearTimeout(timeout);}
tiptip_holder.fadeOut(opts.fadeOut);}}});}})(jQuery);;

/*     CSM: /lib/jquery/plugins/jquery.tipTipTranslate.js    */

(function($){$.fn.tipTipTranslate=function(options){var defaults={activation:"hover",keepAlive:false,maxWidth:"200px",edgeOffset:3,defaultPosition:"bottom",delay:400,fadeIn:200,fadeOut:200,attribute:"title",content:false,enter:function(){},exit:function(){},translateButton:"toggleTrad",textOrig:descriptionOrig,textEn:descriptionEn,showOrigLabel:"",showEnLabel:""};var opts=$.extend(defaults,options);if($("#tiptip_holder").length<=0){var tiptip_holder=$('<div id="tiptip_holder" style="max-width:'+opts.maxWidth+';min-height:60px"></div>');var tiptip_content=$('<div id="tiptip_content"></div>');var tiptip_arrow=$('<div id="tiptip_arrow"></div>');$("body").append(tiptip_holder.html(tiptip_content).prepend(tiptip_arrow.html('<div id="tiptip_arrow_inner"></div>')));}else{var tiptip_holder=$("#tiptip_holder");var tiptip_content=$("#tiptip_content");var tiptip_arrow=$("#tiptip_arrow");}
return this.each(function(){function replacetitle(elem){var postValSplitter=(elem.id).split("_");var postIDVal=postValSplitter[1];tiptip_content.find("div.labelToggle").html(opts.showEnLabel);tiptip_content.find("p.descriptionText").html(opts.textEn[postIDVal]);}
function translate(elem){var postValSplitter=(elem.id).split("_");var postIDVal=postValSplitter[1];var labelTmp=tiptip_content.find("div.labelToggle").html();if(labelTmp!=opts.showEnLabel){tiptip_content.find("div.labelToggle").html(opts.showEnLabel);tiptip_content.find("p.descriptionText").html(opts.textEn[postIDVal]);}
else{tiptip_content.find("div.labelToggle").html(opts.showOrigLabel);tiptip_content.find("p.descriptionText").html(opts.textOrig[postIDVal]);}}
var org_elem=$(this);var org_elem_parent=$(this).parent();if(org_elem_parent.is("a")){org_elem_parent=org_elem_parent.parent();}
if(opts.content){var org_title=opts.content;}else{var org_title=org_elem.attr(opts.attribute);}
if(org_title!=""){if(!opts.content){org_elem.removeAttr(opts.attribute);}
var timeout=false;if(opts.activation=="hover"){org_elem.hover(function(){active_tiptip();},function(){if(!opts.keepAlive){deactive_tiptip();}});if(opts.keepAlive){tiptip_holder.hover(function(){},function(){deactive_tiptip();});}}else if(opts.activation=="focus"){org_elem.focus(function(){active_tiptip();}).blur(function(){deactive_tiptip();});}else if(opts.activation=="click"){org_elem.click(function(){active_tiptip();$(".moreinfoprodclose").click(function(){deactive_tiptip();});return false;}).hover(function(){},function(){if(!opts.keepAlive){deactive_tiptip();}});if(opts.keepAlive){tiptip_holder.hover(function(){},function(){});}}
function active_tiptip(){opts.enter.call(this);tiptip_content.html(org_title);replacetitle(org_elem_parent.get(0));tiptip_holder.hide().removeAttr("class").css("margin","0");tiptip_arrow.removeAttr("style");$(document.body).click(function(e){if(!$(e.target).parents().is("#"+tiptip_holder.attr("id"))){tiptip_holder.fadeOut(100);}});tiptip_holder.hover(function(){$(this).find("."+opts.translateButton+":first").fadeIn(100)},function(){$(this).find("."+opts.translateButton+":first").fadeOut(100)});$("."+opts.translateButton).hide();$("."+opts.translateButton).click(function(){translate(this);});var top=parseInt(org_elem.offset()['top']);var left=parseInt(org_elem.offset()['left']);var org_width=parseInt(org_elem.outerWidth());var org_height=parseInt(org_elem.outerHeight());var tip_w=tiptip_holder.outerWidth();var tip_h=tiptip_holder.outerHeight();var w_compare=Math.round((org_width-tip_w)/2);var h_compare=Math.round((org_height-tip_h)/2);var marg_left=Math.round(left+w_compare);var marg_top=Math.round(top+org_height+opts.edgeOffset);var t_class="";var arrow_top="";var arrow_left=Math.round(tip_w-12)/2;if(opts.defaultPosition=="bottom"){t_class="_bottom";}else if(opts.defaultPosition=="top"){t_class="_top";}else if(opts.defaultPosition=="left"){t_class="_left";}else if(opts.defaultPosition=="right"){t_class="_right";}
var right_compare=(w_compare+left)<parseInt($(window).scrollLeft());var left_compare=(tip_w+left)>parseInt($(window).width());if((right_compare&&w_compare<0)||(t_class=="_right"&&!left_compare)||(t_class=="_left"&&left<(tip_w+opts.edgeOffset+5))){t_class="_right";arrow_top=Math.round(tip_h-13)/2;arrow_left=-12;marg_left=Math.round(left+org_width+opts.edgeOffset);marg_top=Math.round(top+h_compare);}else if((left_compare&&w_compare<0)||(t_class=="_left"&&!right_compare)){t_class="_left";arrow_top=Math.round(tip_h-13)/2;arrow_left=Math.round(tip_w);marg_left=Math.round(left-(tip_w+opts.edgeOffset+5));marg_top=Math.round(top+h_compare);}
var top_compare=(top+org_height+opts.edgeOffset+tip_h+8)>parseInt($(window).height()+$(window).scrollTop());var bottom_compare=((top+org_height)-(opts.edgeOffset+tip_h+8))<0;if(top_compare||(t_class=="_bottom"&&top_compare)||(t_class=="_top"&&!bottom_compare)){if(t_class=="_top"||t_class=="_bottom"){t_class="_top";}else{t_class=t_class+"_top";}
arrow_top=tip_h;marg_top=Math.round(top-(tip_h+5+opts.edgeOffset));}else if(bottom_compare|(t_class=="_top"&&bottom_compare)||(t_class=="_bottom"&&!top_compare)){if(t_class=="_top"||t_class=="_bottom"){t_class="_bottom";}else{t_class=t_class+"_bottom";}
arrow_top=-12;marg_top=Math.round(top+org_height+opts.edgeOffset);}
if(t_class=="_right_top"||t_class=="_left_top"){marg_top=marg_top+5;}else if(t_class=="_right_bottom"||t_class=="_left_bottom"){marg_top=marg_top-5;}
if(t_class=="_left_top"||t_class=="_left_bottom"){marg_left=marg_left+5;}
tiptip_arrow.css({"margin-left":arrow_left+"px","margin-top":arrow_top+"px"});tiptip_holder.css({"margin-left":marg_left+"px","margin-top":marg_top+"px"}).attr("class","tip"+t_class);tiptip_content.css({"width":"400px"});if(timeout){clearTimeout(timeout);}
timeout=setTimeout(function(){tiptip_holder.stop(true,true).fadeIn(opts.fadeIn);},opts.delay);}
function deactive_tiptip(){opts.exit.call(this);if(timeout){clearTimeout(timeout);}
tiptip_holder.fadeOut(opts.fadeOut);}}});}})(jQuery);;

/*     CSM: /lib/jquery/plugins/jquery.scrollTo.js    */
;(function($){var $scrollTo=$.scrollTo=function(target,duration,settings){$(window).scrollTo(target,duration,settings);};$scrollTo.defaults={axis:'xy',duration:parseFloat($.fn.jquery)>=1.3?0:1};$scrollTo.window=function(scope){return $(window)._scrollable();};$.fn._scrollable=function(){return this.map(function(){var elem=this,isWin=!elem.nodeName||$.inArray(elem.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!isWin)
return elem;var doc=(elem.contentWindow||elem).document||elem.ownerDocument||elem;return $.browser.safari||doc.compatMode=='BackCompat'?doc.body:doc.documentElement;});};$.fn.scrollTo=function(target,duration,settings){if(typeof duration=='object'){settings=duration;duration=0;}
if(typeof settings=='function')
settings={onAfter:settings};if(target=='max')
target=9e9;settings=$.extend({},$scrollTo.defaults,settings);duration=duration||settings.speed||settings.duration;settings.queue=settings.queue&&settings.axis.length>1;if(settings.queue)
duration/=2;settings.offset=both(settings.offset);settings.over=both(settings.over);return this._scrollable().each(function(){var elem=this,$elem=$(elem),targ=target,toff,attr={},win=$elem.is('html,body');switch(typeof targ){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(targ)){targ=both(targ);break;}
targ=$(targ,this);case'object':if(targ.is||targ.style)
toff=(targ=$(targ)).offset();}
$.each(settings.axis.split(''),function(i,axis){var Pos=axis=='x'?'Left':'Top',pos=Pos.toLowerCase(),key='scroll'+Pos,old=elem[key],max=$scrollTo.max(elem,axis);if(toff){attr[key]=toff[pos]+(win?0:old-$elem.offset()[pos]);if(settings.margin){attr[key]-=parseInt(targ.css('margin'+Pos))||0;attr[key]-=parseInt(targ.css('border'+Pos+'Width'))||0;}
attr[key]+=settings.offset[pos]||0;if(settings.over[pos])
attr[key]+=targ[axis=='x'?'width':'height']()*settings.over[pos];}else{var val=targ[pos];attr[key]=val.slice&&val.slice(-1)=='%'?parseFloat(val)/100*max:val;}
if(/^\d+$/.test(attr[key]))
attr[key]=attr[key]<=0?0:Math.min(attr[key],max);if(!i&&settings.queue){if(old!=attr[key])
animate(settings.onAfterFirst);delete attr[key];}});animate(settings.onAfter);function animate(callback){$elem.animate(attr,duration,settings.easing,callback&&function(){callback.call(this,target,settings);});};}).end();};$scrollTo.max=function(elem,axis){var Dim=axis=='x'?'Width':'Height',scroll='scroll'+Dim;if(!$(elem).is('html,body'))
return elem[scroll]-$(elem)[Dim.toLowerCase()]();var size='client'+Dim,html=elem.ownerDocument.documentElement,body=elem.ownerDocument.body;return Math.max(html[scroll],body[scroll])
-Math.min(html[size],body[size]);};function both(val){return typeof val=='object'?val:{top:val,left:val};};})(jQuery);;