Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 22

function autoSugShow(t)

{3==t.length&&200==t[0]&&(t=t[2]),meli.autossugest.innerShow(t);var
e=0,i=meli.trim(meli.autossugest.textFields[e].value.toLowerCase());if(t.q==i&&!
meli.autossugest.dontShow[e])
{meli.autossugest.linesAmt[e]=t.suggested_queries.length;var
o=document.getElementById("mlsug_"+e);if(meli.autossugest.linesAmt[e]>0&&null!=o)
{for(var s,n=0;n<meli.autossugest.linesAmt[e];n+
+)s=document.getElementById("sug_row_"+e+"_"+n),meli.autossugest.visible(s);-
((meli.autossugest.linesMax-
meli.autossugest.linesAmt[e])*meli.autossugest.lineHeight),s=document.getElementByI
d("sug_row_"+e+"_close");var
r=document.getElementById("sug_rows_container");meli.autossugest.visible(r),meli.au
tossugest.isIE()||
meli.autossugest.setStyle(o,"display","block"),meli.autossugest.visible(s),meli.aut
ossugest.visible(o)}else null!=o&&(meli.autossugest.isIE()?
(meli.autossugest.hidden(o),meli.autossugest.hideRows(0,e)):meli.autossugest.setSty
le(o,"display","none"))}}!function(t){"use strict";function e(){return this
instanceof e||void 0!==e.instance?e.instance?e.instance:
(e.instance=this,this.version="1.0.5",this.events={},this.executors={},this):new
e}e.prototype.execute=function(e,i){var o=this.executors[e];return"undefined"!
=typeof o?i.call(t,o):this.on(e,i),this},e.prototype.on=function(t,e){var
i=this.events[t];return i||
(i=[],this.events[t]=i),i.push(e),this},e.prototype.registerExecutor=function(t,e)
{return this.emit(t,e),this.executors[t]=e||
null,this},e.prototype.unRegisterHandler=function(t){return this.executors[t]=void
0,this},e.prototype.emit=function(e,i){var
o,s=this.events[e],n=0;if(s)for(o=s.length;o>n;n+=1)try{s[n].call(t,i)}catch(r)
{}return this},e.prototype.trim=function(t){t=t.replace(/^\s+|\s+$/g,"");var
e=t.replace(/ +(?= )/g,"");return e},e.prototype.getInstance=function(){return
e.instance},e.prototype.init=function(t){if(!t||!t.siteId||!t.domain)throw new
Error("Meli: Error in settings");return
this.siteId=t.siteId,this.domain=t.domain,this},t.Meli=e}(this),function(t,e){"use
strict";function i(){return this}var o;i.prototype.remove=function(){$(o.
$message).remove()},i.prototype.init=function(e){var s=this;return
o=$.extend({},i.settings,e),0===t.location.hash.indexOf(o.hash)&&$.ajax({type:"GET"
,url:o.url+"?callback=?",async:!
1,jsonpCallback:o.callback,asynccontentType:"application/json",dataType:"jsonp",suc
cess:function(t){$("body").prepend(t.content),$(o.$remove).bind("click",function()
{s.remove()})},error:function(){}}),this},i.settings={callback:"callback",
$message:"#mlMsg",$remove:"#mlMsgRemove"},e.Messages=i}
(this,Meli.prototype),function(t,e){"use strict";function i(e)
{e=e.data.split("=");var i=n[e[0]],o=[];if("undefined"!=typeof i){if(e[1])for(var
s=e[1].split("&"),r=0,a=s.length;a>r;r++)o.push(s[r]);i.apply(t,o)}}function o()
{return this}var s,n={resize:function(t,e,i,o)
{o=parseInt(o,10)||"normal","true"==i?$(".ch-modal").animate({width:t,height:e},
{duration:o,step:function()
{s.position("refresh")}}):s.width(t).height(e).position("refresh")},close:function(
){s.hide()},remove:function(t){switch(t){case"loading":$(".ch-modal
iframe").attr("style","");break;case"close":$(".ch-modal .ch-
close").hide()}},add:function(){var t=$(".ch-modal iframe").attr("data-css");$
(".ch-modal iframe").attr("style",t)}};o.prototype.bind=function(t,e){return
n[t]=e,this},o.prototype.init=function(){return t.postMessage&&("undefined"!=typeof
t.addEventListener?t.addEventListener("message",i,!1):"undefined"!=typeof
t.attachEvent&&t.attachEvent("onmessage",i)),this},o.prototype.setModal=function(t)
{return s=t,this},e.PostMessage=o}(this,Meli.prototype),function(t,e){function i()
{return this}var o=$("<a>").modal({closable:"button",onShow:function(){$(".ch-modal
.ch-close").show(),$(".ch-dimmer").one("click",function(){o.hide()}),$(".ch-modal-
content").fadeIn("slow")},onHide:function(){$("#modal-
iframe").attr("src","about:blank")}}),s="background-image:
url(data:image/gif;base64,R0lGODlhJAAkAMQAAP////f39+/v7+bm5t7e3tbW1szMzMXFxb29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L8ZCzytG8PA3hON/yw5JfQ0y0DJgyIMaIRJJeQDZCN
cMqAZAOXAfg8YdNFJE4DMBPdWJSiJjZPGj86WMmgKIIA8WuBwMgoBADs=); background-position:50%
50%; background-repeat:no-repeat;";i.prototype.open=function(e,i){var
s="true"==e.attr("data-modal:dinamic")||i.dinamic,n=e.attr("data-modal:width")||
i.width,r=e.attr("data-modal:height")||i.height,a=e.attr("data-modal:url")||i.url;
(!s||
t.postMessage&&s)&&(o.width(n).height(r).content(this.buildIframe(a,s)).show(),meli
.postmessage.setModal(o))},i.prototype.buildIframe=function(e,i){return void
0===i&&(i=!1),i&&(-
1==e.indexOf("?")&&(e+="?"),e+="&parent_url="+encodeURIComponent(t.location)),'<ifr
ame id="modal-iframe" src="'+e+'" width="100%" height="100%" data-css="'+s+'"
scrolling="auto" frameborder="0"
style="'+s+'"></iframe>'},i.prototype.hide=function(){return
o.hide(),this},i.prototype.init=function(){meli.postmessage.init();var t=this;$
(".iframe-modal").on("click",function(e){try{t.open($
(this)),e.preventDefault()}catch(i){}})},e.IframeModal=i}
(this,Meli.prototype),function(t,e){"use strict";function i(t){var
e=document.cookie.indexOf(t+"="),i=e+t.length+1,o=document.cookie.indexOf(";",i);re
turn-1===e?null:(-
1===o&&(o=document.cookie.length),unescape(document.cookie.substring(i,o)))}functio
n o(t){return null!==t&&"undefined"!=typeof t&&""!==t&&"0"!==t?t:null}function s()
{return this}s.prototype.get=function(t){return
o(i(t))},s.prototype.set=function(t){var e,i,o=meli.domain;t.path=t.path||"/",void
0!==t.days?(e=new Date,i=new Date,(void 0===t.days||
0===t.days)&&(t.days=1),i.setTime(e.getTime()
+864e5*t.days),document.cookie=t.name+"="+t.value+";path="+t.path+";domain=."+o+";e
xpires="+i.toGMTString()):document.cookie=t.name+"="+t.value+";path="+t.path+";doma
in=."+o},e.Cookies=s}(this,Meli.prototype),function(t,e){"use strict";function i()
{return this}var o;i.prototype.wasAuthenticated=function(){return
o="authenticated",meli.registerExecutor("login"),this},i.prototype.success=function
(){return
o="authenticated",meli.iframeModal.hide(),meli.emit("login"),this.onSuccess&&(this.
onSuccess(),this.onSuccess=null),this},i.prototype.show=function(t){return $
("#login
a").trigger("click"),t&&(this.onSuccess=t),this},i.prototype.isIdentified=function(
){return
this.isAuthenticated()||"identified"===o},i.prototype.isAuthenticated=function()
{return"authenticated"===o},i.prototype.init=function(e){return
o=e.state,this.isAuthenticated()&&meli.registerExecutor("login"),meli.iframeModal.i
nit(),"undefined"!=typeof
t.authorizationState&&"loaded"==t.authorizationState.status&&(t.authorizationState.
authorized?this.wasAuthenticated():meli.registerExecutor("rollback-pre-
authenticated")),this},e.Login=i}(this,Meli.prototype),function(t,e){"use
strict";function i(){$("#nickName").html(meli.cookies.get("orgnickp")),$("#account,
#notification, #favorite").removeClass("ch-hide")}function o(){$("#account,
#notification, #favorite").addClass("ch-hide")}function s(){h||(h=$
("#account").layer({content:$("#account ul").html(),event:"click",classes:"ch-
layer-header",points:"rt rb",offset:"0 6",width:150,onShow:function(){$("#account
a").on("click",function(){h.hide()})},onHide:function(){$("#account
a").off("click")}}))}function n(){$("#register, #login").removeClass("ch-
hide")}function r(){o(),n()}function a(){l(),i(),s()}function l(){$("#register,
#login").addClass("ch-hide")}function c(){d.position.scrolltop=$(t).scrollTop()
+d.position.extratop,d.position.scrolltop>d.position.offset&&!d.position.fixed?(d.
$menu.addClass("ml-header-fixed"),d.position.fixed=!
0):d.position.scrolltop<d.position.offset&&d.position.fixed&&(d.
$menu.removeClass("ml-header-fixed"),d.position.fixed=!1)}function u(){return
this}var h,d;u.prototype.init=function(e)
{d=$.extend({},u.settings,e),meli.login.isAuthenticated()?s():
(meli.on("login",a),meli.execute("rollback-pre-authenticated",r)),d.fixed&&(c(),$
(t).on("scroll",function(){c()}))},u.settings={fixed:!1,$menu:$(".ml-
header"),position:{fixed:!1,offset:$(".ml-
header").offset().top,scrolltop:0,extratop:$.browser.msie?13:-1}},e.Menu=u}
(this,Meli.prototype),function(t,e){"use strict";function i(){return this}var
o;i.prototype.init=function(t){o=$.extend({},i.settings,t),o.
$footerAccess.addClass("ch-hide"),o.$footerControl.on("click",function(t)
{t.preventDefault(),o.$footerAccess.toggleClass("ml-footer-open"),o.
$footerAccess.slideToggle(300,function(){o.$footerAccess.hasClass("ml-footer-
open")?o.$footerControl.children("i").removeClass("ch-icon-chevron-
up").addClass("ch-icon-chevron-down"):o.
$footerControl.children("i").removeClass("ch-icon-chevron-down").addClass("ch-icon-
chevron-up")}),$("html, body").animate({scrollTop:$
(document).height()},300)})},i.settings={$footerControl:$("#footerControl"),
$footerAccess:$("#footerAccess")},e.Footer=i}(this,Meli.prototype),function(t,e)
{"use strict";function i(t)
{try{meli.cookies.set({name:"ml_list",value:"searching"}),meli.cookies.set({name:"L
AST_SEARCH",value:t})}catch(e){}}function o(t){for(var
e=t.string.toLowerCase(),i=t.replace,o=t.replacement;-1!
=e.toString().indexOf(i);)e=e.toString().replace(i,o);return e}function s(){var
t=r.$category.width(),e=0;e=t>200?7:t>150?10:15,meli.on("query-load",function(){$
("#query").val().length>e?$("#mlCategory label").addClass("ml-label-small"):$
("#mlCategory label").removeClass("ml-label-small")})}function n(){return this}var
r;n.prototype.doSearch=function(e){var s=meli.trim($("#query").val()),n=$
("#categorySearch"),a=r.uri;return s&&s.length>0?(s=o({string:s,replace:"
",replacement:"-"}),null!==n&&n.is(":checked")&&(a=-1!
=t.location.href.indexOf("_DisplayType_LF")?
r.uriCateg+"_DisplayType_LF":r.uriCateg),"AD"===meli.cookies.get("pr_categ")&&-
1===a.indexOf("_PrCategId_AD")&&(a+="_PrCategId_AD"),a=a.replace("$query",encodeURI
Component(s)),"undefined"!=typeof
e&&(a=a+"#D[A:"+s+",B:"+e.element+"]"),i(s),location.href=a,this):($
("#query").focus(),!1)},n.prototype.init=function(t){if(!t||!t.uri)throw new
Error("meli.search: Error in settings");var
e=this;r=$.extend({},n.settings,t),s(),r.autocomplete&&meli.autossugest.init({trigg
er:document.getElementById("formSearch"),input:document.getElementById("query"),sit
eid:meli.siteId,suggestView:r.suggestView,secure:r.secure,txt:
{lastSearch:r.txt.lastSearch,hideSuggest:r.txt.hideSuggest}}),r.
$form.on("submit",function(t){t.preventDefault(),e.doSearch()})},n.settings={$form:
$("#formSearch"),$category:$("#mlCategory"),autocomplete:!
0,suggestView:"STD",secure:!1,txt:{hideSuggest:"Ocultar
sugerencias",lastSearch:"ltimas bsquedas"}},e.Search=n}
(this,Meli.prototype),function(t,e){function o(){var
t,e,o=[],s=[],n=[],r=0,a=[],l=[],c=[],u=-1,h=[],d=[],p=[],f=19,m=6,g=0,v=!
1,A=0,b="",w="",k=!1;k=meli.cookies.get("pmsctx");var y=function(i){var c=$("<div
id='autosug_div'>"),u=i.input,f=i.siteid,m=$
(i.trigger);m.append(c),o[r]=u,s[r]=c,t=i.left,e=i.top,I(c,u,i.txt),_(u),n[r]=-
1,a[r]=!1,l[r]=0,h[r]=!1,d[r]=!1,p[r]=f,r+
+,suggestView=i.suggestView||"STD",secure=i.secure||!1},I=function(o,s,n){var
a=s.offsetWidth-47,l=null!=e?e:x(s,"offsetTop")+s.offsetHeight-1,c=null!=t?
t:x(s,"offsetLeft"),u=document.createElement("div");u.id="mlsug_"+r,u.className="hi
dden",V(u,"top",l+1+"px"),V(u,"width",a+"px"),V(u,"left",c+"px"),o.append(u);var
h=document.createElement("div");for(h.id="sug_rows_container",h.className="ch-
suggest-list",h.style.display="none",u.appendChild(h),i=0;m>i;i++){var
d=document.createElement("div");d.className="rowa",V(d,"height",f+"px"),d.id="sug_r
ow_"+r+"_"+i,d.sugNumber=r,d.num=i,d.onmouseover=B,d.onmousedown=D,h.appendChild(d)
}g=i,C(u,r,n.lastSearch);var
p=document.createElement("div");p.className="rowc",p.id="sug_row_"+r+"_close",p.inn
erHTML='<p class="ch-suggest-hide"><a href="#hide" id="ch-suggest-hide-link"
class="ch-suggest-hide-link">'+n.hideSuggest+"</a>",u.appendChild(p);var
v=document.getElementById("ch-suggest-hide-
link");v.sugNumber=r,v.onmousedown=E},C=function(t,e,i){if(o="",!k)return"";var
o=k;if(o=o.replace(/\+/g," ").split("*")[5].split("|"),null!=o&&null!=o[0]&&""!
=o[0]){o.pop();for(var s='<dl class="ch-suggest-lastSearches"><dt class="ch-
suggest-lastSearches-title">'+i+"</dt>",n=0;n<o.length;n++,g++){var
r=o[n];r=r.substring(1,r.length),r=unescape(r).toLowerCase(),s+='<dd><a
innertxt="'+r+'" id="sug_row_'+e+"_"+g+'" num="'+g+'" sugNumber="'+e+'"
href="/'+r+'" class="rowa" onmouseover="meli.autossugest.highlightRow(event)"
onmousedown="meli.autossugest.processClick(event)" onclick="return
false;">'+r+"</a></dd>",b+=g+""}if(A=n,s+="</dl>",void 0!=t){var
a=document.createElement("div");a.innerHTML=s,a.id="lastSearches",t.appendChild(a)}
return s}},E=function(t){t||(t=event);var e=Z(t),i=e.sugNumber;d[i]=!
0,o[i].focus();var s=w.charAt(n[i]);S(i,s),n[i]=-
1,o[i].value=o[i].origVal},x=function(t,e){for(var
i=0;t;)i+=t[e],t=t.offsetParent;return i},_=function(t)
{t.setAttribute("autocomplete","off"),t.sugNumber=r,t.origVal="",t.onkeyup=L,t.onke
ypress=N,t.onblur=H,t.onfocus=W},B=function(t){t||(t=event);for(var
e=Z(t);"row_text"==e.className||"highText"==e.className;)null!
=e.offsetParent&&(e=e.offsetParent);var i=void 0!=e.sugNumber?
e.sugNumber:e.getAttribute("sugNumber"),o=void 0!=e.num?
e.num:e.getAttribute("num");w.charAt(n[i]);var
s=document.getElementById("sug_rows_container").getElementsByTagName("div");for(var
r in s){var a=s[r];"rowb"==a.className?
a.className="rowa":"rowa"==a.className&&a.id==e.id&&(a.className="rowb")}n[i]=w.ind
exOf(o),$("#lastSearches dd a").addClass("rowa"),$("#lastSearches dd
a").removeClass("rowb"),"rowa"==e.className&&(e.className="rowb")},M=function(t,e)
{var i=document.getElementById("sug_row_"+t+"_"+e);void
0!=i.sugNumber?i.sugNumber:i.getAttribute("sugNumber");var e=void 0!=i.num?
i.num:i.getAttribute("num");"rowa"==i.className&&(i.className="rowb")},S=function(t
,e){var i=document.getElementById("sug_row_"+t+"_"+e);null!
=i&&"rowb"==i.className&&(i.className="rowa")},D=function(t){if(t||
(t=event),document.getElementById("query").value=$
(t).html(),"rowb"==Z(t).className)var e=Z(t),i=void 0!=e.sugNumber?
e.sugNumber:e.getAttribute("sugNumber");else for(var o="",s=0,e=Z(t);null!
=e.offsetParent&&"rowb"!=o;){e=e.offsetParent,o=e.className;var i=void 0!
=e.sugNumber?e.sugNumber:e.getAttribute("sugNumber");s++}return
i=P(i),meli.search.doSearch({component:"Autossugest",element:i}),!1},P=function(t)
{var e=document.getElementById("mlsug_"+t);if(null!=e){var
i=w.charAt(n[0]),s=document.getElementById("sug_row_"+t+"_"+i);null!
=s&&(o[t].value=void 0==s.innertxt?
s.getAttribute("innertxt"):s.innertxt),G(e),z(0,t)}return i},Q=function(t)
{p[t]},N=function(t){t||(t=event);var e=Z(t).sugNumber,i=J(t);9!=i||d[e]||
(P(u),h[u]=!0,T(meli.trim(o[u].value),u))},L=function(t){t||(t=event);var
e=Z(t),i=e.sugNumber,s=J(t),r=document.getElementById("mlsug_"+i);meli.trim(e.value
);var l=meli.trim(e.value.toLowerCase());if(8==s&&null!=r&&0==e.value.length){var
p=document.getElementById("sug_rows_container");G(p),G(r)}else if(9==s)h[u]=!
0,G(r),z(0,i);else if(13==s&&null!=r)O(r)?(i=P(i),""!
=i&&meli.search.doSearch({component:"Autossugest",element:i})):Q(i);else if(27!=s||
null==r||d[i])if(40!=s&&38!=s||null==r||!a[i])d[i]||R(i);else{var
f=40==s?"down":"up";if(d[i]=!1,O(r)){if(O(r)){var m;"down"==f?(n[i]+
+,n[i]==w.length?(n[i]=-1,m=w.length-1):m=n[i]-1):(n[i]--,-2==n[i]&&(n[i]=w.length-
1),m=n[i]+1);var g=w.charAt(m);S(i,g);var v=w.charAt(n[i]);if(-
1==n[i])e.value=e.origVal;else if(-1!=n[i]){var
A=document.getElementById("sug_row_"+i+"_"+v);null!=A&&O(r)?(M(i,v),o[i].value=void
0==A.innertxt?A.getAttribute("innertxt"):A.innertxt):null==A&&(n[i]=-
1,e.value=e.origVal)}}}else{var g=w.charAt(n[i]);e.origVal=e.value,void 0!
=c[l]&&""!=c[l]?(j(r),U(i)):(S(i,g),n[i]=-1,F(l,i))}}else{e.value=0!
=e.value.length?e.origVal:"";var g=w.charAt(n[i]);S(i,g),n[i]=-1;var
p=document.getElementById("sug_rows_container");G(p),G(r)}u=i,h[i]=!
1,meli.emit("query-load")},R=function(t){var
e=o[t],i=document.getElementById("mlsug_"+t),s=meli.trim(e.value.toLowerCase()),r=m
eli.trim(e.value);if(null!=s&&void 0!=s&&""!=r)if(e.origVal=e.value,void 0==c[s])
{var l=w.charAt(n[t]);S(t,l),n[t]=-1,F(s,t)}else
autoSugShow({q:s,suggested_queries:c[s]});else a[t]=!1,X()?
(G(i),z(0,t)):V(i,"display","none")},T=function(t,e){void 0==c[t]?
F(t,e):Y({q:t,suggested_queries:c[t]})},H=function(t){t||(t=event);var
e=Z(t).sugNumber,i=document.getElementById("mlsug_"+e);X()?
(G(i),z(0,e)):V(i,"display","none")},W=function(t){t||(t=event);var
e=Z(t).sugNumber;if(1==d[e])return!1;document.getElementById("mlsug_"+e);var
i=meli.trim(o[e].value);v?T(i,e):(F(i,e),v=!0)},F=function(t){if(null!=t&&""!=t)
{var e=document.getElementsByTagName("head")[0];X()?"&r="+Math.random():"";var
t=encodeURI(t),i=document.createElement("script"),o=meli.siteId;if("MPT"==meli.site
Id&&(o="MLB"),"TUC"===suggestView&&(o="TCV"),secure)var
s="https://api.mercadolibre.com/sites/"+o+"/autosuggest?q="+t+"&v=1";else var
s="http://suggestgz.mlapps.com/sites/"+o+"/autosuggest?
q="+t+"&v=1";i.src=s+"&callback=autoSugShow",i.charset="ISO-8859-
1",e.appendChild(i)}},Y=function(t){var
e=0,i=t.q;if(c[i]=t.suggested_queries,l[e]=void 0!=t.suggested_queries?
t.suggested_queries.length:0,g=A+l[e],w="",l[e]>0)
{document.getElementById("mlsug_"+e);for(var o=0;o<l[e];o++){var
s=t.suggested_queries[o].q,n=t.suggested_queries[o].match_start,r=t.suggested_queri
es[o].match_end,u="<span class='row_text'>"+s.substring(0,n)+"<span
class='highText'>"+s.substring(n,r)+"</span>"+s.substring(r)
+"</span>",h=document.getElementById("sug_row_"+e+"_"+o);h.innerHTML=u,h.innertxt=s
,w+=o+""}w+=b+"",z(l[e],e),a[e]=!0}},j=function(t)
{V(t,"display","block")},O=function(t)
{return"block"==t.style.display},U=function(t){for(var e=0;e<l[t];e++){var
i=document.getElementById("sug_row_"+t+"_"+e);j(i)}var
o=document.getElementById("sug_rows_container");j(o);var
i=document.getElementById("sug_row_"+t+"_close");j(i)},z=function(t,e){for(var
i=t;m>i;i++){var o=document.getElementById("sug_row_"+e+"_"+i);G(o)}var
s=document.getElementById("sug_rows_container");G(s);var
o=document.getElementById("sug_row_"+e+"_close");G(o)},G=function(t)
{V(t,"display","none")},Z=function(t){return t.srcElement?
t.srcElement:t.target},J=function(t){var e;return null==t.which?
e=t.keyCode:t.which>0&&(e=t.which),e},V=function(t,e,i){t.style[e]=i},X=function(t)
{if(void 0!=t){var e=navigator.appVersion.indexOf("MSIE ");return
e=navigator.appVersion.substring(e+5,e+6),e==t}return/msie/i.test(navigator.userAge
nt)&&!/opera/i.test(navigator.userAgent)},q={init:y,innerShow:Y,textFields:o,dontSh
ow:h,linesAmt:l,linesMax:m,lineHeight:f,visible:j,hidden:G,hideRows:z,setStyle:V,is
IE:X,highlightRow:B,processClick:D};return q}e.Autossugest=o}
(this,Meli.prototype),function(t,e){t.meli=new Meli,e.cookies=new
meli.Cookies,e.iframeModal=new meli.IframeModal,e.postmessage=new
meli.PostMessage,e.login=new meli.Login,e.search=new meli.Search,e.menu=new
meli.Menu,e.footer=new meli.Footer,e.autossugest=new
meli.Autossugest,e.messages=new meli.Messages}
(this,Meli.prototype),"function"==typeof
window.meliAsync&&window.meliAsync(),function(t,e){function i(e,i){var
s,n,r,a=e.nodeName.toLowerCase();return"area"===a?
(s=e.parentNode,n=s.name,e.href&&n&&"map"===s.nodeName.toLowerCase()?
(r=t("img[usemap=#"+n+"]")[0],!!r&&o(r)):!1):(/input|select|textarea|button|
object/.test(a)?!e.disabled:"a"===a?e.href||i:i)&&o(e)}function o(e){return
t.expr.filters.visible(e)&&!t(e).parents().addBack().filter(function()
{return"hidden"===t.css(this,"visibility")}).length}var s=0,n=/^ui-id-\d+
$/;t.ui=t.ui||{},t.ui.version||(t.extend(t.ui,{version:"1.10.0",keyCode:
{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,
NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPL
Y:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:
9,UP:38}}),t.fn.extend({_focus:t.fn.focus,focus:function(e,i)
{return"number"==typeof e?this.each(function(){var o=this;setTimeout(function()
{t(o).focus(),i&&i.call(o)},e)}):this._focus.apply(this,arguments)},scrollParent:fu
nction(){var e;return e=t.ui.ie&&/(static|
relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?
this.parents().filter(function(){return/(relative|absolute|
fixed)/.test(t.css(this,"position"))&&/(auto|scroll)/.test(t.css(this,"overflow")
+t.css(this,"overflow-y")+t.css(this,"overflow-
x"))}).eq(0):this.parents().filter(function(){return/(auto|
scroll)/.test(t.css(this,"overflow")+t.css(this,"overflow-y")+t.css(this,"overflow-
x"))}).eq(0),/fixed/.test(this.css("position"))||!e.length?
t(document):e},zIndex:function(i){if(i!==e)return
this.css("zIndex",i);if(this.length)for(var o,s,n=t(this[0]);n.length&&n[0]!
==document;){if(o=n.css("position"),
("absolute"===o||"relative"===o||"fixed"===o)&&(s=parseInt(n.css("zIndex"),10),!
isNaN(s)&&0!==s))return s;n=n.parent()}return 0},uniqueId:function(){return
this.each(function(){this.id||(this.id="ui-id-"+ ++s)})},removeUniqueId:function()
{return this.each(function()
{n.test(this.id)&&t(this).removeAttr("id")})}}),t.extend(t.expr[":"],
{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i)
{return!!t.data(i,e)}}):function(e,i,o){return!!
t.data(e,o[3])},focusable:function(e){return i(e,!
isNaN(t.attr(e,"tabindex")))},tabbable:function(e){var
o=t.attr(e,"tabindex"),s=isNaN(o);return(s||o>=0)&&i(e,!
s)}}),t("<a>").outerWidth(1).jquery||t.each(["Width","Height"],function(i,o)
{function s(e,i,o,s){return t.each(n,function(){i-
=parseFloat(t.css(e,"padding"+this))||0,o&&(i-
=parseFloat(t.css(e,"border"+this+"Width"))||0),s&&(i-
=parseFloat(t.css(e,"margin"+this))||0)}),i}var n="Width"===o?["Left","Right"]:
["Top","Bottom"],r=o.toLowerCase(),a={innerWidth:t.fn.innerWidth,innerHeight:t.fn.i
nnerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+o]
=function(i){return i===e?a["inner"+o].call(this):this.each(function()
{t(this).css(r,s(this,i)+"px")})},t.fn["outer"+o]=function(e,i){return"number"!
=typeof e?a["outer"+o].call(this,e):this.each(function(){t(this).css(r,s(this,e,!
0,i)+"px")})}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?
this.prevObject:this.prevObject.filter(t))}),t("<a>").data("a-
b","a").removeData("a-b").data("a-b")&&(t.fn.removeData=function(e){return
function(i){return arguments.length?e.call(this,t.camelCase(i)):e.call(this)}}
(t.fn.removeData)),t.ui.ie=!!/msie [\w.]
+/.exec(navigator.userAgent.toLowerCase()),t.support.selectstart="onselectstart"in
document.createElement("div"),t.fn.extend({disableSelection:function(){return
this.bind((t.support.selectstart?"selectstart":"mousedown")+".ui-
disableSelection",function(t){t.preventDefault()})},enableSelection:function()
{return this.unbind(".ui-disableSelection")}}),t.extend(t.ui,{plugin:
{add:function(e,i,o){var s,n=t.ui[e].prototype;for(s in
o)n.plugins[s]=n.plugins[s]||[],n.plugins[s].push([i,o[s]])},call:function(t,e,i)
{var o,s=t.plugins[e];if(s&&t.element[0].parentNode&&11!
==t.element[0].parentNode.nodeType)for(o=0;o<s.length;o++)t.options[s[o][0]]&&s[o]
[1].apply(t.element,i)}},hasScroll:function(e,i)
{if("hidden"===t(e).css("overflow"))return!1;var
o=i&&"left"===i?"scrollLeft":"scrollTop",s=!1;return e[o]>0?!0:
(e[o]=1,s=e[o]>0,e[o]=0,s)}}))}(jQuery),function(t,e){var
i=0,o=Array.prototype.slice,s=t.cleanData;t.cleanData=function(e){for(var
i,o=0;null!=(i=e[o]);o++)try{t(i).triggerHandler("remove")}catch(n)
{}s(e)},t.widget=function(e,i,o){var s,n,r,a,l={},c=e.split(".")[0];e=e.split(".")
[1],s=c+"-"+e,o||(o=i,i=t.Widget),t.expr[":"][s.toLowerCase()]=function(e){return!!
t.data(e,s)},t[c]=t[c]||{},n=t[c][e],r=t[c][e]=function(t,e){return
this._createWidget?void(arguments.length&&this._createWidget(t,e)):new
r(t,e)},t.extend(r,n,{version:o.version,_proto:t.extend({},o),_childConstructors:
[]}),a=new i,a.options=t.widget.extend({},a.options),t.each(o,function(e,o){return
t.isFunction(o)?void(l[e]=function(){var t=function(){return
i.prototype[e].apply(this,arguments)},s=function(t){return
i.prototype[e].apply(this,t)};return function(){var
e,i=this._super,n=this._superApply;return
this._super=t,this._superApply=s,e=o.apply(this,arguments),this._super=i,this._supe
rApply=n,e}}()):void(l[e]=o)}),r.prototype=t.widget.extend(a,{widgetEventPrefix:n?
a.widgetEventPrefix:e},l,
{constructor:r,namespace:c,widgetName:e,widgetFullName:s}),n?
(t.each(n._childConstructors,function(e,i){var
o=i.prototype;t.widget(o.namespace+"."+o.widgetName,r,i._proto)}),delete
n._childConstructors):i._childConstructors.push(r),t.widget.bridge(e,r)},t.widget.e
xtend=function(i){for(var s,n,r=o.call(arguments,1),a=0,l=r.length;l>a;a++)for(s in
r[a])n=r[a][s],r[a].hasOwnProperty(s)&&n!==e&&(i[s]=t.isPlainObject(n)?
t.isPlainObject(i[s])?t.widget.extend({},i[s],n):t.widget.extend({},n):n);return
i},t.widget.bridge=function(i,s){var n=s.prototype.widgetFullName||
i;t.fn[i]=function(r){var a="string"==typeof r,l=o.call(arguments,1),c=this;return
r=!a&&l.length?t.widget.extend.apply(null,[r].concat(l)):r,a?this.each(function()
{var o,s=t.data(this,n);return s?t.isFunction(s[r])&&"_"!==r.charAt(0)?
(o=s[r].apply(s,l),o!==s&&o!==e?(c=o&&o.jquery?c.pushStack(o.get()):o,!1):void
0):t.error("no such method '"+r+"' for "+i+" widget instance"):t.error("cannot call
methods on "+i+" prior to initialization; attempted to call method
'"+r+"'")}):this.each(function(){var e=t.data(this,n);e?e.option(r||
{})._init():t.data(this,n,new s(r,this))}),c}},t.Widget=function()
{},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEve
ntPrefix:"",defaultElement:"<div>",options:{disabled:!
1,create:null},_createWidget:function(e,o){o=t(o||this.defaultElement||this)
[0],this.element=t(o),this.uuid=i+
+,this.eventNamespace="."+this.widgetName+this.uuid,
this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this.bindi
ngs=t(),this.hoverable=t(),this.focusable=t(),o!
==this&&(t.data(o,this.widgetFullName,this),this._on(!0,this.element,
{remove:function(t){t.target===o&&this.destroy()}}),this.document=t(o.style?
o.ownerDocument:o.document||o),this.window=t(this.document[0].defaultView||
this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._ge
tCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.no
op,_create:t.noop,_init:t.noop,destroy:function()
{this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetNam
e).removeData(this.widgetFullName).removeData(t.camelCase(this.widgetFullName)),thi
s.widget().unbind(this.eventNamespace).removeAttr("aria-
disabled").removeClass(this.widgetFullName+"-disabled ui-state-
disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui
-state-hover"),this.focusable.removeClass("ui-state-
focus")},_destroy:t.noop,widget:function(){return
this.element},option:function(i,o){var s,n,r,a=i;if(0===arguments.length)return
t.widget.extend({},this.options);if("string"==typeof
i)if(a={},s=i.split("."),i=s.shift(),s.length)
{for(n=a[i]=t.widget.extend({},this.options[i]),r=0;r<s.length-1;r+
+)n[s[r]]=n[s[r]]||{},n=n[s[r]];if(i=s.pop(),o===e)return n[i]===e?
null:n[i];n[i]=o}else{if(o===e)return this.options[i]===e?
null:this.options[i];a[i]=o}return
this._setOptions(a),this},_setOptions:function(t){var e;for(e in
t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return
this.options[t]=e,"disabled"===t&&(this.widget().toggleClass(this.widgetFullName+"-
disabled ui-state-disabled",!!e).attr("aria-
disabled",e),this.hoverable.removeClass("ui-state-
hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function()
{return this._setOption("disabled",!1)},disable:function(){return
this._setOption("disabled",!0)},_on:function(e,i,o){var s,n=this;"boolean"!=typeof
e&&(o=i,i=e,e=!1),o?(i=s=t(i),this.bindings=this.bindings.add(i)):
(o=i,i=this.element,s=this.widget()),t.each(o,function(o,r){function a(){return e||
n.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof
r?n[r]:r).apply(n,arguments):void 0}"string"!=typeof r&&(a.guid=r.guid=r.guid||
a.guid||t.guid++);var l=o.match(/^(\w+)\s*(.*)$/),c=l[1]+n.eventNamespace,u=l[2];u?
s.delegate(u,c,a):i.bind(c,a)})},_off:function(t,e){e=(e||"").split("
").join(this.eventNamespace+" ")
+this.eventNamespace,t.unbind(e).undelegate(e)},_delay:function(t,e){function i()
{return("string"==typeof t?o[t]:t).apply(o,arguments)}var o=this;return
setTimeout(i,e||0)},_hoverable:function(e)
{this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e)
{t(e.currentTarget).addClass("ui-state-hover")},mouseleave:function(e)
{t(e.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e)
{this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e)
{t(e.currentTarget).addClass("ui-state-focus")},focusout:function(e)
{t(e.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,i,o){var
s,n,r=this.options[e];if(o=o||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?
e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],n=i.originalEven
t)for(s in n)s in i||(i[s]=n[s]);return this.element.trigger(i,o),!
(t.isFunction(r)&&r.apply(this.element[0],[i].concat(o))===!1||
i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i)
{t.Widget.prototype["_"+e]=function(o,s,n){"string"==typeof s&&(s={effect:s});var
r,a=s?s===!0||"number"==typeof s?i:s.effect||i:e;s=s||{},"number"==typeof
s&&(s={duration:s}),r=!
t.isEmptyObject(s),s.complete=n,s.delay&&o.delay(s.delay),r&&t.effects&&t.effects.e
ffect[a]?o[e](s):a!==e&&o[a]?o[a](s.duration,s.easing,n):o.queue(function(i)
{t(this)[e](),n&&n.call(o[0]),i()})}})}(jQuery),function(t){var e=!
1;t(document).mouseup(function(){e=!1}),t.widget("ui.mouse",
{version:"1.10.0",options:
{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:functi
on(){var e=this;this.element.bind("mousedown."+this.widgetName,function(t){return
e._mouseDown(t)}).bind("click."+this.widgetName,function(i){return!
0===t.data(i.target,e.widgetName+".preventClickEvent")?
(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagatio
n(),!1):void 0}),this.started=!1},_mouseDestroy:function()
{this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&t(document).unbi
nd("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.wid
getName,this._mouseUpDelegate)},_mouseDown:function(i){if(!e)
{this._mouseStarted&&this._mouseUp(i),this._mouseDownEvent=i;var
o=this,s=1===i.which,n="string"==typeof this.options.cancel&&i.target.nodeName?
t(i.target).closest(this.options.cancel).length:!1;return s&&!
n&&this._mouseCapture(i)?(this.mouseDelayMet=!
this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function()
{o.mouseDelayMet=!
0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._m
ouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted)?(i.preventDefault(),!0):
(!
0===t.data(i.target,this.widgetName+".preventClickEvent")&&t.removeData(i.target,th
is.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return
o._mouseMove(t)},this._mouseUpDelegate=function(t){return
o._mouseUp(t)},t(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegat
e).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),e=!0,!
0)):!0}},_mouseMove:function(e){return t.ui.ie&&(!document.documentMode||
document.documentMode<9)&&!e.button?this._mouseUp(e):this._mouseStarted?
(this._mouseDrag(e),e.preventDefault()):
(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouse
Start(this._mouseDownEvent,e)!==!1,this._mouseStarted?
this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e)
{return
t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mo
useup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStar
ted=!
1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".prevent
ClickEvent",!0),this._mouseStop(e)),!1},_mouseDistanceMet:function(t){return
Math.max(Math.abs(this._mouseDownEvent.pageX-
t.pageX),Math.abs(this._mouseDownEvent.pageY-
t.pageY))>=this.options.distance},_mouseDelayMet:function(){return
this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function()
{},_mouseStop:function(){},_mouseCapture:function(){return!0}})}
(jQuery),function(t,e){function i(t,e,i){return[parseInt(t[0],10)*(p.test(t[0])?
e/100:1),parseInt(t[1],10)*(p.test(t[1])?i/100:1)]}function o(e,i){return
parseInt(t.css(e,i),10)||0}function s(e){var i=e[0];return 9===i.nodeType?
{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?
{width:e.width(),height:e.height(),offset:
{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:
{top:i.pageY,left:i.pageX}}:
{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}t.ui=t.ui||{};var
n,r=Math.max,a=Math.abs,l=Math.round,c=/left|center|right/,u=/top|center|
bottom/,h=/[\+\-]\d+%?/,d=/^\w+/,p=/%
$/,f=t.fn.position;t.position={scrollbarWidth:function(){if(n!==e)return n;var
i,o,s=t("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div
style='height:100px;width:auto;'></div></div>"),r=s.children()[0];return
t("body").append(s),i=r.offsetWidth,s.css("overflow","scroll"),o=r.offsetWidth,i===
o&&(o=s[0].clientWidth),s.remove(),n=i-o},getScrollInfo:function(e){var
i=e.isWindow?"":e.element.css("overflow-
x"),o=e.isWindow?"":e.element.css("overflow-
y"),s="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth,n="scroll"===o||"a
uto"===o&&e.height<e.element[0].scrollHeight;return{width:s?
t.position.scrollbarWidth():0,height:n?
t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||
window),o=t.isWindow(i[0]);return{element:i,isWindow:o,offset:i.offset()||
{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:o?
i.width():i.outerWidth(),height:o?
i.height():i.outerHeight()}}},t.fn.position=function(e){if(!e||!e.of)return
f.apply(this,arguments);e=t.extend({},e);var
n,p,m,g,v,A,b=t(e.of),w=t.position.getWithinInfo(e.within),k=t.position.getScrollIn
fo(w),y=(e.collision||"flip").split(" "),I={};return
A=s(b),b[0].preventDefault&&(e.at="left
top"),p=A.width,m=A.height,g=A.offset,v=t.extend({},g),t.each(["my","at"],function(
){var t,i,o=(e[this]||"").split(" ");1===o.length&&(o=c.test(o[0])?
o.concat(["center"]):u.test(o[0])?["center"].concat(o):
["center","center"]),o[0]=c.test(o[0])?o[0]:"center",o[1]=u.test(o[1])?
o[1]:"center",t=h.exec(o[0]),i=h.exec(o[1]),I[this]=[t?t[0]:0,i?
i[0]:0],e[this]=[d.exec(o[0])[0],d.exec(o[1])
[0]]}),1===y.length&&(y[1]=y[0]),"right"===e.at[0]?
v.left+=p:"center"===e.at[0]&&(v.left+=p/2),"bottom"===e.at[1]?
v.top+=m:"center"===e.at[1]&&(v.top+=m/2),n=i(I.at,p,m),v.left+=n[0],v.top+=n[1],th
is.each(function(){var
s,c,u=t(this),h=u.outerWidth(),d=u.outerHeight(),f=o(this,"marginLeft"),A=o(this,"m
arginTop"),C=h+f+o(this,"marginRight")+k.width,E=d+A+o(this,"marginBottom")
+k.height,x=t.extend({},v),_=i(I.my,u.outerWidth(),u.outerHeight());"right"===e.my[
0]?x.left-=h:"center"===e.my[0]&&(x.left-=h/2),"bottom"===e.my[1]?x.top-
=d:"center"===e.my[1]&&(x.top-
=d/2),x.left+=_[0],x.top+=_[1],t.support.offsetFractions||
(x.left=l(x.left),x.top=l(x.top)),s={marginLeft:f,marginTop:A},t.each(["left","top"
],function(i,o){t.ui.position[y[i]]&&t.ui.position[y[i]][o](x,
{targetWidth:p,targetHeight:m,elemWidth:h,elemHeight:d,collisionPosition:s,collisio
nWidth:C,collisionHeight:E,offset:
[n[0]+_[0],n[1]+_[1]],my:e.my,at:e.at,within:w,elem:u})}),e.using&&(c=function(t)
{var i=g.left-x.left,o=i+p-h,s=g.top-x.top,n=s+m-d,l={target:
{element:b,left:g.left,top:g.top,width:p,height:m},element:
{element:u,left:x.left,top:x.top,width:h,height:d},horizontal:0>o?"left":i>0?"right
":"center",vertical:0>n?"top":s>0?"bottom"
:"middle"};h>p&&a(i+o)<p&&(l.horizontal="center"),d>m&&a(s+n)<m&&(l.vertical="middl
e"),l.important=r(a(i),a(o))>r(a(s),a(n))?"horizontal":"vertical",e.using.call(this
,t,l)}),u.offset(t.extend(x,{using:c}))})},t.ui.position={fit:{left:function(t,e)
{var i,o=e.within,s=o.isWindow?o.scrollLeft:o.offset.left,n=o.width,a=t.left-
e.collisionPosition.marginLeft,l=s-a,c=a+e.collisionWidth-n-s;e.collisionWidth>n?
l>0&&0>=c?(i=t.left+l+e.collisionWidth-n-s,t.left+=l-i):t.left=c>0&&0>=l?s:l>c?s+n-
e.collisionWidth:s:l>0?t.left+=l:c>0?t.left-=c:t.left=r(t.left-
a,t.left)},top:function(t,e){var i,o=e.within,s=o.isWindow?
o.scrollTop:o.offset.top,n=e.within.height,a=t.top-
e.collisionPosition.marginTop,l=s-a,c=a+e.collisionHeight-n-s;e.collisionHeight>n?
l>0&&0>=c?(i=t.top+l+e.collisionHeight-n-s,t.top+=l-i):t.top=c>0&&0>=l?s:l>c?s+n-
e.collisionHeight:s:l>0?t.top+=l:c>0?t.top-=c:t.top=r(t.top-a,t.top)}},flip:
{left:function(t,e){var
i,o,s=e.within,n=s.offset.left+s.scrollLeft,r=s.width,l=s.isWindow?
s.scrollLeft:s.offset.left,c=t.left-e.collisionPosition.marginLeft,u=c-
l,h=c+e.collisionWidth-r-l,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?
e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-
e.targetWidth:0,f=-2*e.offset[0];0>u?(i=t.left+d+p+f+e.collisionWidth-r-n,(0>i||
i<a(u))&&(t.left+=d+p+f)):h>0&&(o=t.left-e.collisionPosition.marginLeft+d+p+f-l,
(o>0||a(o)<h)&&(t.left+=d+p+f))},top:function(t,e){var
i,o,s=e.within,n=s.offset.top+s.scrollTop,r=s.height,l=s.isWindow?
s.scrollTop:s.offset.top,c=t.top-e.collisionPosition.marginTop,u=c-
l,h=c+e.collisionHeight-r-l,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?
e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-
e.targetHeight:0,m=-2*e.offset[1];0>u?(o=t.top+p+f+m+e.collisionHeight-r-
n,t.top+p+f+m>u&&(0>o||o<a(u))&&(t.top+=p+f+m)):h>0&&(i=t.top-
e.collisionPosition.marginTop+p+f+m-l,t.top+p+f+m>h&&(i>0||
a(i)<h)&&(t.top+=p+f+m))}},flipfit:{left:function()
{t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,ar
guments)},top:function()
{t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,argu
ments)}}},function(){var e,i,o,s,n,r=document.getElementsByTagName("body")
[0],a=document.createElement("div");e=document.createElement(r?"div":"body"),o={vis
ibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},r&&t.extend(
o,{position:"absolute",left:"-1000px",top:"-1000px"});for(n in
o)e.style[n]=o[n];e.appendChild(a),i=r||
document.documentElement,i.insertBefore(e,i.firstChild),a.style.cssText="position:
absolute; left:
10.7432222px;",s=t(a).offset().left,t.support.offsetFractions=s>10&&11>s,e.innerHTM
L="",i.removeChild(e)}()}(jQuery),function(t){t.widget("ui.draggable",t.ui.mouse,
{version:"1.10.0",widgetEventPrefix:"drag",options:{addClasses:!
0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!
1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!
1,opacity:!1,refreshPositions:!1,revert:!
1,revertDuration:500,scope:"default",scroll:!
0,scrollSensitivity:20,scrollSpeed:20,snap:!
1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!
1,drag:null,start:null,stop:null},_create:function()
{"original"===this.options.helper&&!/^(?:r|a|
f)/.test(this.element.css("position"))&&(this.element[0].style.position="relative")
,this.options.addClasses&&this.element.addClass("ui-
draggable"),this.options.disabled&&this.element.addClass("ui-draggable-
disabled"),this._mouseInit()},_destroy:function(){this.element.removeClass("ui-
draggable ui-draggable-dragging ui-draggable-
disabled"),this._mouseDestroy()},_mouseCapture:function(e){var
i=this.options;return this.helper||i.disabled||t(e.target).closest(".ui-resizable-
handle").length>0?!1:(this.handle=this._getHandle(e),this.handle?(t(i.iframeFix===!
0?"iframe":i.iframeFix).each(function(){t("<div class='ui-draggable-iframeFix'
style='background:
#fff;'></div>").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",posi
tion:"absolute",opacity:"0.001",zIndex:1e3}).css(t(this).offset()).appendTo("body")
}),!0):!1)},_mouseStart:function(e){var i=this.options;return
this.helper=this._createHelper(e),this.helper.addClass("ui-draggable-
dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=t
his),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollP
arent=this.helper.scrollParent(),this.offset=this.positionAbs=this.element.offset()
,this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-
this.margins.left},t.extend(this.offset,{click:{left:e.pageX-
this.offset.left,top:e.pageY-
this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}
),this.originalPosition=this.position=this._generatePosition(e),this.originalPageX=
e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.curso
rAt),i.containment&&this._setContainment(),this._trigger("start",e)===!1?
(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!
i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!
0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_mouseDrag:function(e,i)
{if(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionT
o("absolute"),!i){var o=this._uiHash();if(this._trigger("drag",e,o)===!1)return
this._mouseUp({}),!1;this.position=o.position}return
this.options.axis&&"y"===this.options.axis||
(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.o
ptions.axis||
(this.helper[0].style.top=this.position.top+"px"),t.ui.ddmanager&&t.ui.ddmanager.dr
ag(this,e),!1},_mouseStop:function(e){var i,o=this,s=!1,n=!1;for(t.ui.ddmanager&&!
this.options.dropBehaviour&&(n=t.ui.ddmanager.drop(this,e)),this.dropped&&(n=this.d
ropped,this.dropped=!1),i=this.element[0];i&&(i=i.parentNode);)i===document&&(s=!
0);return s||"original"!==this.options.helper?("invalid"===this.options.revert&&!
n||"valid"===this.options.revert&&n||this.options.revert===!0||
t.isFunction(this.options.revert)&&this.options.revert.call(this.element,n)?
t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,1
0),function(){o._trigger("stop",e)!==!1&&o._clear()}):this._trigger("stop",e)!==!
1&&this._clear(),!1):!1},_mouseUp:function(e){return t("div.ui-draggable-
iframeFix").each(function()
{this.parentNode.removeChild(this)}),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e
),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return
this.helper.is(".ui-draggable-dragging")?
this._mouseUp({}):this._clear(),this},_getHandle:function(e){var i=!
this.options.handle||!t(this.options.handle,this.element).length;return
t(this.options.handle,this.element).find("*").addBack().each(function()
{this===e.target&&(i=!0)}),i},_createHelper:function(e){var
i=this.options,o=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],
[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return
o.parents("body").length||o.appendTo("parent"===i.appendTo?
this.element[0].parentNode:i.appendTo),o[0]!==this.element[0]&&!/(fixed|
absolute)/.test(o.css("position"))&&o.css("position","absolute"),o},_adjustOffsetFr
omHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:
+e[0],top:+e[1]||0}),"left"in
e&&(this.offset.click.left=e.left+this.margins.left),"right"in
e&&(this.offset.click.left=this.helperProportions.width-
e.right+this.margins.left),"top"in
e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in
e&&(this.offset.click.top=this.helperProportions.height-
e.bottom+this.margins.top)},_getParentOffset:function()
{this.offsetParent=this.helper.offsetParent();var
e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent
[0]!
==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.sc
rollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),
(this.offsetParent[0]===document.body||
this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&
t.ui.ie)&&(e={top:0,left:0}),{top:e.top+
(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+
(parseInt(this.offsetParent.css("borderLeftWidth"),10)||
0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var
t=this.element.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||
0)+this.scrollParent.scrollTop(),left:t.left-
(parseInt(this.helper.css("left"),10)||
0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function()
{this.margins={left:parseInt(this.element.css("marginLeft"),10)||
0,top:parseInt(this.element.css("marginTop"),10)||
0,right:parseInt(this.element.css("marginRight"),10)||
0,bottom:parseInt(this.element.css("marginBottom"),10)||
0}},_cacheHelperProportions:function()
{this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHei
ght()}},_setContainment:function(){var
e,i,o,s=this.options;if("parent"===s.containment&&(s.containment=this.helper[0].par
entNode),
("document"===s.containment||"window"===s.containment)&&(this.containment=["documen
t"===s.containment?0:t(window).scrollLeft()-this.offset.relative.left-
this.offset.parent.left,"document"===s.containment?0:t(window).scrollTop()-
this.offset.relative.top-this.offset.parent.top,("document"===s.containment?
0:t(window).scrollLeft())+t("document"===s.containment?document:window).width()-
this.helperProportions.width-this.margins.left,("document"===s.containment?
0:t(window).scrollTop())+(t("document"===s.containment?document:window).height()||
document.body.parentNode.scrollHeight)-this.helperProportions.height-
this.margins.top]),/^(document|window|parent)$/.test(s.containment)||
s.containment.constructor===Array)s.containment.constructor===Array&&(this.containm
ent=s.containment);else{if(i=t(s.containment),o=i[0],!o)return;e="hidden"!
==t(o).css("overflow"),this.containment=[(parseInt(t(o).css("borderLeftWidth"),10)|
|0)+(parseInt(t(o).css("paddingLeft"),10)||0),
(parseInt(t(o).css("borderTopWidth"),10)||0)+(parseInt(t(o).css("paddingTop"),10)||
0),(e?Ma
th.max(o.scrollWidth,o.offsetWidth):o.offsetWidth)-
(parseInt(t(o).css("borderLeftWidth"),10)||0)-
(parseInt(t(o).css("paddingRight"),10)||0)-this.helperProportions.width-
this.margins.left-this.margins.right,(e?
Math.max(o.scrollHeight,o.offsetHeight):o.offsetHeight)-
(parseInt(t(o).css("borderTopWidth"),10)||0)-
(parseInt(t(o).css("paddingBottom"),10)||0)-this.helperProportions.height-
this.margins.top-
this.margins.bottom],this.relative_container=i}},_convertPositionTo:function(e,i)
{i||(i=this.position);var o="absolute"===e?1:-1,s="absolute"!==this.cssPosition||
this.scrollParent[0]!
==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?
this.scrollParent:this.offsetParent,n=/(html|
body)/i.test(s[0].tagName);return{top:i.top+this.offset.relative.top*o+this.offset.
parent.top*o-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():n?
0:s.scrollTop())*o,left:i.left+this.offset.relative.left*o+this.offset.parent.left*
o-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():n?
0:s.scrollLeft())*o}},_generatePosition:function(e){var
i,o,s,n,r=this.options,a="absolute"!==this.cssPosition||this.scrollParent[0]!
==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?
this.scrollParent:this.offsetParent,l=/(html|
body)/i.test(a[0].tagName),c=e.pageX,u=e.pageY;return
this.originalPosition&&(this.containment&&(this.relative_container?
(o=this.relative_container.offset(),i=[this.containment[0]+o.left,this.containment[
1]+o.top,this.containment[2]+o.left,this.containment[3]+o.top]):i=this.containment,
e.pageX-this.offset.click.left<i[0]&&(c=i[0]+this.offset.click.left),e.pageY-
this.offset.click.top<i[1]&&(u=i[1]+this.offset.click.top),e.pageX-
this.offset.click.left>i[2]&&(c=i[2]+this.offset.click.left),e.pageY-
this.offset.click.top>i[3]&&(u=i[3]+this.offset.click.top)),r.grid&&(s=r.grid[1]?
this.originalPageY+Math.round((u-
this.originalPageY)/r.grid[1])*r.grid[1]:this.originalPageY,u=i?s-
this.offset.click.top>=i[1]||s-this.offset.click.top>i[3]?s:s-
this.offset.click.top>=i[1]?s-r.grid[1]:s+r.grid[1]:s,n=r.grid[0]?
this.originalPageX+Math.round((c-
this.originalPageX)/r.grid[0])*r.grid[0]:this.originalPageX,c=i?n-
this.offset.click.left>=i[0]||n-this.offset.click.left>i[2]?n:n-
this.offset.click.left>=i[0]?n-r.grid[0]:n+r.grid[0]:n)),{top:u-
this.offset.click.top-this.offset.relative.top-this.offset.parent.top+
("fixed"===this.cssPosition?-this.scrollParent.scrollTop():l?
0:a.scrollTop()),left:c-this.offset.click.left-this.offset.relative.left-
this.offset.parent.left+("fixed"===this.cssPosition?-
this.scrollParent.scrollLeft():l?0:a.scrollLeft())}},_clear:function()
{this.helper.removeClass("ui-draggable-dragging"),this.helper[0]!
==this.element[0]&&!
this.cancelHelperRemoval&&this.helper.remove(),this.helper=null,this.cancelHelperRe
moval=!1},_trigger:function(e,i,o){return o=o||
this._uiHash(),t.ui.plugin.call(this,e,
[i,o]),"drag"===e&&(this.positionAbs=this._convertPositionTo("absolute")),t.Widget.
prototype._trigger.call(this,e,i,o)},plugins:{},_uiHash:function()
{return{helper:this.helper,position:this.position,originalPosition:this.originalPos
ition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",
{start:function(e,i){var o=t(this).data("ui-
draggable"),s=o.options,n=t.extend({},i,
{item:o.element});o.sortables=[],t(s.connectToSortable).each(function(){var
i=t.data(this,"ui-sortable");i&&!
i.options.disabled&&(o.sortables.push({instance:i,shouldRevert:i.options.revert}),i
.refreshPositions(),i._trigger("activate",e,n))})},stop:function(e,i){var
o=t(this).data("ui-draggable"),s=t.extend({},i,
{item:o.element});t.each(o.sortables,function(){this.instance.isOver?
(this.instance.isOver=0,o.cancelHelperRemoval=!
0,this.instance.cancelHelperRemoval=!
1,this.shouldRevert&&(this.instance.options.revert=!
0),this.instance._mouseStop(e),this.instance.options.helper=this.instance.options._
helper,"original"===o.options.helper&&this.instance.currentItem.css({top:"auto",lef
t:"auto"})):(this.instance.cancelHelperRemoval=!
1,this.instance._trigger("deactivate",e,s))})},drag:function(e,i){var
o=t(this).data("ui-draggable"),s=this;t.each(o.sortables,function(){var n=!
1,r=this;this.instance.positionAbs=o.positionAbs,this.instance.helperProportions=o.
helperProportions,this.instance.offset.click=o.offset.click,this.instance._intersec
tsWith(this.instance.containerCache)&&(n=!0,t.each(o.sortables,function(){return
this.instance.positionAbs=o.positionAbs,this.instance.helperProportions=o.helperPro
portions,this.instance.offset.click=o.offset.click,this!
==r&&this.instance._intersectsWith(this.instance.containerCache)&&t.ui.contains(r.i
nstance.element[0],this.instance.element[0])&&(n=!1),n})),n?(this.instance.isOver||
(this.instance.isOver=1,this.instance.currentItem=t(s).clone().removeAttr("id").app
endTo(this.instance.element).data("ui-sortable-item",!
0),this.instance.options._helper=this.instance.options.helper,this.instance.options
.helper=function(){return
i.helper[0]},e.target=this.instance.currentItem[0],this.instance._mouseCapture(e,!
0),this.instance._mouseStart(e,!0,!
0),this.instance.offset.click.top=o.offset.click.top,this.instance.offset.click.lef
t=o.offset.click.left,this.instance.offset.parent.left-=o.offset.parent.left-
this.instance.offset.parent.left,this.instance.offset.parent.top-
=o.offset.parent.top-
this.instance.offset.parent.top,o._trigger("toSortable",e),o.dropped=this.instance.
element,o.currentItem=o.element,this.instance.fromOutside=o),this.instance.currentI
tem&&this.instance._mouseDrag(e)):this.instance.isOver&&(this.instance.isOver=0,thi
s.instance.cancelHelperRemoval=!0,this.instance.options.revert=!
1,this.instance._trigger("out",e,this.instance._uiHash(this.instance)),this.instanc
e._mouseStop(e,!
0),this.instance.options.helper=this.instance.options._helper,this.instance.current
Item.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),o._trig
ger("fromSortable",e),o.dropped=!1)})}}),t.ui.plugin.add("draggable","cursor",
{start:function(){var e=t("body"),i=t(this).data("ui-
draggable").options;e.css("cursor")&&(i._cursor=e.css("cursor")),e.css("cursor",i.c
ursor)},stop:function(){var e=t(this).data("ui-
draggable").options;e._cursor&&t("body").css("cursor",e._cursor)}}),t.ui.plugin.add
("draggable","opacity",{start:function(e,i){var o=t(i.helper),s=t(this).data("ui-
draggable").options;o.css("opacity")&&(s._opacity=o.css("opacity")),o.css("opacity"
,s.opacity)},stop:function(e,i){var o=t(this).data("ui-
draggable").options;o._opacity&&t(i.helper).css("opacity",o._opacity)}}),t.ui.plugi
n.add("draggable","scroll",{start:function(){var e=t(this).data("ui-
draggable");e.scrollParent[0]!==document&&"HTML"!
==e.scrollParent[0].tagName&&(e.overflowOffset=e.scrollParent.offset())},drag:funct
ion(e){var i=t(this).data("ui-draggable"),o=i.options,s=!1;i.scrollParent[0]!
==document&&"HTML"!==i.scrollParent[0].tagName?(o.axis&&"x"===o.axis||
(i.overflowOffset.top+i.scrollParent[0].offsetHeight-e.pageY<o.scrollSensitivity?
i.scrollParent[0].scrollTop=s=i.scrollParent[0].scrollTop+o.scrollSpeed:e.pageY-
i.overflowOffset.top<o.scrollSensitivity&&(i.scrollParent[0].scrollTop=s=i.scrollPa
rent[0].scrollTop-o.scrollSpeed)),o.axis&&"y"===o.axis||
(i.overflowOffset.left+i.scrollParent[0].offsetWidth-e.pageX<o.scrollSensitivity?
i.scrollParent[0].scrollLeft=s=i.scrollParent[0].scrollLeft+o.scrollSpeed:e.pageX-
i.overflowOffset.left<o.scrollSensitivity&&(i.scrollParent[0].scrollLeft=s=i.scroll
Parent[0].scrollLeft-o.scrollSpeed))):(o.axis&&"x"===o.axis||(e.pageY-
t(document).scrollTop()<o.scrollSensitivity?
s=t(document).scrollTop(t(document).scrollTop()-o.scrollSpeed):t(window).height()-
(e.pageY-
t(document).scrollTop())<o.scrollSensitivity&&(s=t(document).scrollTop(t(document).
scrollTop()+o.scrollSpeed))),o.axis&&"y"===o.axis||(e.pageX-
t(document).scrollLeft()<o.scrollSensitivity?
s=t(document).scrollLeft(t(document).scrollLeft()-o.scrollSpeed):t(window).width()-
(e.pageX-
t(document).scrollLeft())<o.scrollSensitivity&&(s=t(document).scrollLeft(t(document
).scrollLeft()+o.scrollSpeed)))),s!==!1&&t.ui.ddmanager&&!
o.dropBehaviour&&t.ui.ddmanager.prepareOffsets(i,e)}}),t.ui.plugin.add("draggable",
"snap",{start:function(){var e=t(this).data("ui-
draggable"),i=e.options;e.snapElements=[],t(i.snap.constructor!==String?
i.snap.items||":data(ui-draggable)":i.snap).each(function(){var
i=t(this),o=i.offset();this!
==e.element[0]&&e.snapElements.push({item:this,width:i.outerWidth(),height:i.outerH
eight(),top:o.top,left:o.left})})},drag:function(e,i){var
o,s,n,r,a,l,c,u,h,d,p=t(this).data("ui-
draggable"),f=p.options,m=f.snapTolerance,g=i.offset.left,v=g+p.helperProportions.w
idth,A=i.offset.top,b=A+p.helperProportions.height;for(h=p.snapElements.length-
1;h>=0;h--)a=p.snapElements[h].left,l=a+p.snapElements[h].width,c=p.snapElements[h]
.top,u=c+p.snapElements[h].height,g>a-m&&l+m>g&&A>c-m&&u+m>A||g>a-m&&l+m>g&&b>c-
m&&u+m>b||v>a-m&&l+m>v&&A>c-m&&u+m>A||v>a-m&&l+m>v&&b>c-m&&u+m>b?("inner"!
==f.snapMode&&(o=Math.abs(c-b)<=m,s=Math.abs(u-A)<=m,n=Math.abs(a-
v)<=m,r=Math.abs(l-g)<=m,o&&(i.position.top=p._convertPositionTo("relative",{top:c-
p.helperProportions.height,left:0}).top-
p.margins.top),s&&(i.position.top=p._convertPositionTo("relative",
{top:u,left:0}).top-
p.margins.top),n&&(i.position.left=p._convertPositionTo("relative",{top:0,left:a-
p.helperProportions.width}).left-
p.margins.left),r&&(i.position.left=p._convertPositionTo("relative",
{top:0,left:l}).left-p.margins.left)),d=o||s||n||r,"outer"!
==f.snapMode&&(o=Math.abs(c-A)<=m,s=Math.abs(u-b)<=m,n=Math.abs(a-
g)<=m,r=Math.abs(l-v)<=m,o&&(i.position.top=p._convertPositionTo("relative",
{top:c,left:0}).top-
p.margins.top),s&&(i.position.top=p._convertPositionTo("relative",{top:u-
p.helperProportions.height,left:0}).top-
p.margins.top),n&&(i.position.left=p._convertPositionTo("relative",
{top:0,left:a}).left-
p.margins.left),r&&(i.position.left=p._convertPositionTo("relative",{top:0,left:l-
p.helperProportions.width}).left-p.margins.left)),!p.snapElements[h].snapping&&(o||
s||n||r||d)&&p.options.snap.snap&&p.options
.snap.snap.call(p.element,e,t.extend(p._uiHash(),
{snapItem:p.snapElements[h].item})),p.snapElements[h].snapping=o||s||n||r||d):
(p.snapElements[h].snapping&&p.options.snap.release&&p.options.snap.release.call(p.
element,e,t.extend(p._uiHash(),
{snapItem:p.snapElements[h].item})),p.snapElements[h].snapping=!
1)}}),t.ui.plugin.add("draggable","stack",{start:function(){var
e,i=t(this).data("ui-
draggable").options,o=t.makeArray(t(i.stack)).sort(function(e,i)
{return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||
0)});o.length&&(e=parseInt(o[0].style.zIndex,10)||0,t(o).each(function(t)
{this.style.zIndex=e+t}),this[0].style.zIndex=e+o.length)}}),t.ui.plugin.add("dragg
able","zIndex",{start:function(e,i){var o=t(i.helper),s=t(this).data("ui-
draggable").options;o.css("zIndex")&&(s._zIndex=o.css("zIndex")),o.css("zIndex",s.z
Index)},stop:function(e,i){var o=t(this).data("ui-
draggable").options;o._zIndex&&t(i.helper).css("zIndex",o._zIndex)}})}
(jQuery),function(t){jQuery.fn.extend({slimScroll:function(e){if(t(".lt-
ie8").length>0||t(".ie7").length>0||t(".ipad").length>0)return!1;var i=e;return
this.each(function(){var e,o,s,n,r,a="<div></div>",l=30,c=30,u=i||
{},h=u.width||"auto",d=u.height||"250px",p=u.size||"7px",f=u.color||"#000",m=(u.pos
ition||"right",u.opacity||.4),g=u.alwaysVisible===!0,v=t(this);if(u.scrollTo){var
A=parseInt(u.scrollTo.substring(0,u.scrollTo.indexOf("px")));return
v.scrollTop(A),v.parent().find(".slimScrollBar").css({top:u.scrollTo}),this}var
b=t(a).css({position:"relative",overflow:"hidden",width:h,height:d}).attr({"class":
"slimScrollDiv"});v.css({overflow:"hidden",width:h,height:d});var
w=t(a).css({"background-color":"#eee","box-shadow":"inset 1px 1px 3px
#ddd",width:"7px",height:"100%",position:"absolute",top:0,right:"1px",display:"none
"}),k=t(a).attr({"class":"slimScrollBar ",style:"border-radius:
"+p}).css({background:f,cursor:"pointer",width:p,position:"absolute",top:0,right:"2
px",opacity:m,display:g?"block":"none",BorderRadius:p,MozBorderRadius:p,
WebkitBorderRadius:p,zIndex:99});v.wrap(b),v.parent().append(k),v.parent().append(w
),k.draggable({axis:"y",containment:"parent",start:function(){s=!0},stop:function()
{s=!1,_()},drag:function(){I(0,t(this).position().top,!1)}}),w.hover(function()
{x()},function(){_()}),k.hover(function(){o=!0},function(){o=!
1}),v.hover(function(){e=!0,x(),_()},function(){e=!1,_()});var y=function(t){if(e)
{var t=t||window.event,i=0;t.wheelDelta&&(i=-
t.wheelDelta/120),t.detail&&(i=t.detail/3),I(0,i,!
0),t.preventDefault&&t.preventDefault(),t.returnValue=!1}},I=function(t,e,i){var
o=e;if(i){o=k.position().top+e*c,o=Math.max(o,0);var s=v.outerHeight()-
k.outerHeight();o=Math.min(o,s),k.css({top:o+"px"})}percentScroll=parseInt(k.positi
on().top)/(v.outerHeight()-k.outerHeight()),o=percentScroll*(v[0].scrollHeight-
v.outerHeight()),v.scrollTop(o),x()},C=function(){window.addEventListener?
(this.addEventListener("DOMMouseScroll",y,!
1),this.addEventListener("mousewheel",y,!
1)):document.attachEvent("onmousewheel",y)};C();var E=function()
{r=Math.max(v.outerHeight()/v[0].scrollHeight*v.outerHeight(),l),k.css({height:r+"p
x"})};E();var x=function(){E(),clearTimeout(n),r>=v.outerHeight()||
(k.fadeIn("fast"),w.fadeIn("fast"))},_=function(){g||(n=setTimeout(function(){o||
s||
(k.fadeOut("slow"),w.fadeOut("slow"))},1e3))}}),this}}),jQuery.fn.extend({slimscrol
l:jQuery.fn.slimScroll})}(jQuery),function(t,e){function i(){var e={},i=function(t)
{var e=meli.cookies.get("orgid");if(e){var
i="https://api.mercadolibre.com/users/me/bookmarks?access_token="+e+"&callback=?";
$.ajax({url:i,dataType:"json",cache:!1,success:function(e){200==e[0]?
t(e[2]):e[0]>400},error:function(){}})}},o={state:!1,valid:function(t){return
404==t[0]&&"not_found"==t[2].error&&"invalid_token"==t[2].message||
400==t[0]&&"bad_request"==t[2].error&&"Malformed access_token:
null"==t[2].message}},s=function(t){var e=meli.cookies.get("orgapi");if(null!==e)
{var i='{"item_id":"'+t+'"}',s="https://api.mercadolibre.com/users/me/bookmarks?
access_token="+e+"&_method=POST&_body="+encodeURIComponent(i)+"&callback=?";$
(".favorite[data-
id="+t+"]").addClass("selected").show(),meli.bookmarks.text.remove&&$(".favorite-
btn[data-id="+t+"]").html('<i class="ch-icon-heart"></i>
'+meli.bookmarks.text.remove),meli.bookmarks.total=meli.bookmarks.total+1,$.ajax({u
rl:s,dataType:"json",success:function(e)
{if(e[0]<300&&e[0]>199)meli.bookmarksMenu.update("add",t);else
if(o.valid(e))meli.bookmarksMenu.layer.hide(),meli.bookmarks.total=meli.bookmarks.t
otal-1,meli.login.show(function(){meli.bookmarks.add(t)});else
if(400==e[0])meli.bookmarks.total=meli.bookmarks.total-1;else if(404==e[0]||
500==e[0]||503==e[0]){var i=$
("<div>").modal({content:"<p>"+meli.bookmarks.text.contingency+"</p>",classes:"ch-
box-error",onHide:function(){$(".favorite[data-
id="+t+"]").removeClass("selected"),meli.bookmarks.text.add&&$(".favorite-btn[data-
id="+t+"]").html('<i class="ch-icon-heart"></i>
'+meli.bookmarks.text.add),meli.bookmarks.total=meli.bookmarks.total-
1,meli.bookmarksMenu.refresh()}});i.show()}},error:function(){}})}else
meli.login.show(function()
{r(meli.bookmarksMenu.init),meli.bookmarks.add(t)})},n=function(t,e){var
i=meli.cookies.get("orgapi");if(null!==i){var
s="https://api.mercadolibre.com/users/me/bookmarks/"+t+"?
access_token="+i+"&_method=DELETE&callback=?";$(".favorite[data-
id="+t+"]").removeClass("selected"),meli.bookmarks.text.add&&$(".favorite-btn[data-
id="+t+"]").html('<i class="ch-icon-heart"></i>
'+meli.bookmarks.text.add),meli.bookmarks.total=meli.bookmarks.total-
1,$.ajax({url:s,dataType:"json",success:function(i)
{if(i[0]<300&&i[0]>199)meli.bookmarksMenu.update("remove",t),"menu"==e&&meli.emit("
bookmark-removed-menu");else
if(o.valid(i))meli.bookmarksMenu.layer.hide(),meli.bookmarks.total=meli.bookmarks.t
otal+1,meli.login.show(function(){meli.bookmarks.remove(t)});else if(404==i[0]||
500==i[0]||503==i[0]){var s=$
("<div>").modal({content:"<p>"+meli.bookmarks.text.contingency+"</p>",classes:"ch-
box-error",onHide:function(){$(".favorite[data-
id="+t+"]").addClass("selected").show(),meli.bookmarks.text.remove&&$(".favorite-
btn[data-id="+t+"]").html('<i class="ch-icon-heart"></i>
'+meli.bookmarks.text.remove),meli.bookmarks.total=meli.bookmarks.total+1}});s.show
()}},error:function(){}})}else meli.login.show(function()
{r(meli.bookmarksMenu.init),meli.bookmarks.remove(t)})},r=function(t){i(function(i)
{meli.bookmarks.list=[];for(var o=0,s=i.length;s>o;o+
+)if(meli.bookmarks.list.push(i[o].item_id),e[i[o].item_id]?($(".favorite[data-
id="+i[o].item_id+"]").addClass("selected").show(),meli.bookmarks.text.remove&&$
(".favorite-btn[data-id="+i[o].item_id+"]").html('<i class="ch-icon-heart"></i>
'+meli.bookmarks.text.remove)):($(".favorite[data-
id="+i[o].item_id+"]").removeClass("selected"),meli.bookmarks.text.add&&$
(".favorite-btn[data-id="+i[o].item_id+"]").html('<i class="ch-icon-heart"></i>
'+meli.bookmarks.text.add)),o+1==s)return
meli.bookmarks.total=meli.bookmarks.list.length,void(t&&t());0==i.length&&(meli.boo
kmarks.total=0),t&&t()})},a=function(i){if(void 0==meli.bookmarks.loaded){var i=i||
{},o=i.trigger||$(".favorite");if(i.menu||$(".favorite-
menu"),meli.bookmarks.urlSearch=i.urlSearch,meli.bookmarks.text=i.text||
meli.bookmarks.text,meli.price.separator=i.price.separator||
meli.price.separator||".",meli.price.empty=i.price.empty||meli.price.empty||"Precio
a convenir",o.each(function(t,i){var o=$(this).attr("data-id");e[o]=$
(i)}),t.location.search){var
a=t.location.search.replace("?","").split("=");"addBookmark"===a[0]?
s(a[1]):"removeBookmark"===a[0]&&n(a[1])}meli.login.isIdentified()?
(meli.bookmarks.loaded=!0,r(meli.bookmarksMenu.init)):meli.on("login",function()
{r(meli.bookmarksMenu.init)}),o.on("click",function(t){t.preventDefault(),$
(this).hasClass("selected")?n($(this).attr("data-id")):s($(this).attr("data-
id"))})}},l={version:"0.1",init:a,add:s,remove:n,update:r,instances:e};return
l}e.Bookmarks=i,e.bookmarks=new meli.Bookmarks}(this,Meli.prototype),function(t,e)
{function o(){var e={},o=null,s=!1,n=!1,r=null,a=function(){if(!n)
{u("load",null,6),o=$(".favorite-menu ul");var e=$(".favorite-menu-
wrapper");0==e.find(".ch-icon-heart").length&&e.append('<i class="ch-icon-
heart"></i>'),r=$("#favorite").layer({event:"click",content:'<div class="ch-
loading"></div>',cache:!1,classes:"favorite-menu ch-box-lite",onShow:function(){$
("#favorite a").on("click",function(){r.hide()}),this.content($(".favorite-
menu").html()),o=$(".favorite-menu ul");var e=$(".ch-layer.favorite-menu
ul"),i=e.height();
$.browser.msie,316==i&&(meli.bookmarksMenu.scroll=e.slimScroll({height:"316px",size
:"5px"})),$(".ipad").length>0&&$(".favorite-menu-remove").show(),$(".ch-
layer.favorite-menu .favorite-all a").bind("click",function(e)
{e.preventDefault(),t.location.href=$
(this).attr("href")}),l(e),d(),h()},onHide:function(){$("#favorite
a").off("click")},width:295,points:"rt rb",offset:"-7 6"}),ch.util?
(ch.util.avoidTextSelection($('*[data-
favorite="menu"]')),ch.util.avoidTextSelection(o)):(ch.utils.avoidTextSelection($
('*[data-
favorite="menu"]')),ch.utils.avoidTextSelection(o)),meli.bookmarksMenu.layer=r,n=!
0}},l=function(t){if(0!=meli.bookmarks.list.length){var e=$(t).height()+2;$
(t).children().outerHeight(),$(t).bind("scroll",function(){e+$
(this).scrollTop()>=60*$(t).children().length&&0!=meli.bookmarks.list.length&&($
(t).unbind("scroll"),o.append('<li class="ch-loading"
style="border:none">'),u("load",null,6))})}},c=function(t,i){var
s="https://api.mercadolibre.com/items?
ids="+t+"&attributes=thumbnail,secure_thumbnail,price,currency_id,id,title,status,p
ermalink,available_quantity,initial_quantity,buying_mode,shipping&callback=?";
$.ajax({url:s,dataType:"json",cache:!1,success:function(t)
{if(200==t[0])if("add"===i)1===t[2][0].available_quantity&&2===t[2]
[0].initial_quantity?t[2][0].status="last":t[2][0].available_quantity<=2&&t[2]
[0].initial_quantity>=4?t[2][0].status="last":t[2][0].available_quantity<=3&&t[2]
[0].initial_quantity>=6&&(t[2][0].status="last"),p(1,t[2][0],function()
{d(),h()}),e[t[2][0].id]=t[2][0];else{var s=t[2].length;$(t[2]).each(function(i,n)
{1===t[2][i].available_quantity&&2===t[2][i].initial_quantity?t[2]
[i].status="last":t[2][i].available_quantity<=2&&t[2][i].initial_quantity>=4?t[2]
[i].status="last":t[2][i].available_quantity<=3&&t[2][i].initial_quantity>=6&&(t[2]
[i].status="last"),e[n.id]=n,s==i+1&&p(s,null,function(){d(),h(),o.find(".ch-
loading").remove(),l($(".ch-layer.favorite-menu ul"))})})}},error:function()
{}})},u=function(t,n,r){switch(t){case"add":e[n]?p(1,e[n],function()
{d(),h()}):c(n,"add"),s=!1;break;case"remove":o&&$(".favorite-menu-saved
ul").children("*[data-
id="+n+"]").remove(),d(),position=$.inArray(n,meli.bookmarks.list),~position&&meli.
bookmarks.list.splice(position,1),s=!1;break;case"load":var a="";for(i=0;r>i;i+
+)e[i]="",void 0!=meli.bookmarks.list[i]&&(a+=meli.bookmarks.list[i]
+","),i+1==r&&a.length>0&&(a=a.substring(0,a.length-1),c(a))}},h=function(){$
(".favorite-menu-remove").on("click",function(){s||(meli.bookmarks.remove($
(this).parent().attr("data-id"),"menu"),$(this).parent().hide(),$(".favorite-menu-
saved ul").children().length<5&meli.bookmarks.list.length>0?u("load",null,6):$
(".favorite-menu-saved ul").children().length<5&&$(".favorite-menu
.slimScrollDiv").height("auto").children().height("auto"),s=!0)})},d=function()
{o.children().length<4&&u("load",null,6),$(".ipad").length>0&&$(".favorite-menu-
remove").show(),0!=meli.bookmarks.total?($(".favorite-zero").hide(),$(".favorite-
all").show(),$(".favorite-menu .slimScrollDiv").show()):($(".favorite-
zero").show(),$(".favorite-all").hide(),$(".favorite-menu
.slimScrollDiv").hide())},p=function(t,i,s){var
n="https:"===document.location.protocol;if(1===t&&void 0!=i){var r=n?
i.secure_thumbnail:i.thumbnail;if((""===r||void
0==r)&&(r="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAMAAAANIilAAAAAGX
RFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAA
Dw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1l
d
GEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYx
LjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHR
wOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZG
Y6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNT
T0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9i
ZS5jb20veG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ybe0KaFBiDb8Zb0DksRDHFW
ycQ5VGcYDrBMpo9AfxB3DzkcjsfzIcAAB+sQMB2xolgAAAAASUVORK5CYII=",$(".lt-
ie8").length>0&&(r=n?"https://secure.mlstatic.com/org-
img/items/"+meli.siteId+"/artsinfoto.gif":"http://img1.mlstatic.com/s_"+meli.siteId
+"_v_I_f_artsinfoto.jpg")),"inactive"==i.status)var a="<li data-id="+i.id+"><a
href="+meli.bookmarks.urlSearch+"/"+escape(i.title)+"><p
class='title'>"+i.title+"</p><img src="+r+"><p class='ch-
price'>"+meli.price.format(i.currency_id,i.price)+m(i.shipping)
+"</p>"+f(i.status,i.buying_mode)+'</a><i class="ml-icon icon-remove favorite-menu-
remove"></i>';else var a="<li data-id="+i.id+"><a href="+i.permalink+"><p
class='title'>"+i.title+"</p><img src="+r+"><p class='ch-
price'>"+meli.price.format(i.currency_id,i.price)+m(i.shipping)
+"</p>"+f(i.status,i.buying_mode)+'</a><i class="ml-icon icon-remove favorite-menu-
remove"></i>';o.prepend(a),s&&s()}else for(var l="",c=0,u=t;u>c;c++)
{if(meli.bookmarks.list[0]){var i=e[meli.bookmarks.list[0]],r=n?
i.secure_thumbnail:i.thumbnail;(""===r||void
0==r)&&(r="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAMAAAANIilAAAAAGX
RFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAA
Dw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1l
dGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDY
xLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodH
RwOi8vd3d3Lncz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IAue53A4HP/PIW5I/PvkZHvZ74u
ZUW6eRT9hoijL1/coyiY/HyO9AYlGj/jLuO0zbPKwo/euIK1G5RlDZPlTy3FObuzFsz8uUxpf396oVgD0o+
FgITOuFaECuQAjuSl73hFvdNmoSL6rVnJtJBP8RBcNkrXztAQj+Tsnnnb5RxlayyCgD6TcXk6xC9SCWssE5
a4NVGptL4NY1XrHS26/YNoOWAaq/dHWMgFaBAU13CTkl32CfnSH/MVfZEjD8Ybe0KaFBiDb8Zb0DksRDHFW
ycQ5VGcYDrBMpo9AfxB3DzkcjsfzIcAAB+sQMB2xolgAAAAASUVORK5CYII=",$(".lt-
ie8").length>0&&(r=n?"https://secure.mlstatic.com/org-
img/items/"+meli.siteId+"/artsinfoto.gif":"http://img1.mlstatic.com/s_"+meli.siteId
+"_v_I_f_artsinfoto.jpg")),l+="inactive"==i.status?"<li data-id="+i.id+"><a
href="+meli.bookmarks.urlSearch+"/"+escape(i.title)+"><p
class='title'>"+i.title+"</p><img src="+r+"><p class='ch-
price'>"+meli.price.format(i.currency_id,i.price)+m(i.shipping)
+"</p>"+f(i.status,i.buying_mode)+'</a><i class="ml-icon icon-remove favorite-menu-
remove"></i>':"<li data-id="+i.id+"><a href="+i.permalink+"><p
class='title'>"+i.title+"</p><img src="+r+"><p class='ch-
price'>"+meli.price.format(i.currency_id,i.price)+m(i.shipping)
+"</p>"+f(i.status,i.buying_mode)+'</a><i class="ml-icon icon-remove favorite-menu-
remove"></i>',meli.bookmarks.list.splice(0,1)}
(t==c+1||"undefined"===meli.bookmarks.list[c])&&(o.append(l),s&&s())}},f=function(t
,e){switch(t){case"last":return"buy_it_now"===e?(meli.bookmarks.text.last||"ltimos
disponibles",'<p class="favorite-
last">'+meli.bookmarks.text.last+"</p>"):"";default:return""}},m=function(t)
{return"me1"===t.mode&&t.free_shipping||"me2"===t.mode&&t.free_shipping?'<span
class="ml-icon icon-
shipping">'+meli.bookmarks.text.shipping+"</span>":""},g={init:a,items:e,paint:p,up
date:u,refresh:d};return g}e.BookmarksMenu=o,e.bookmarksMenu=new
meli.BookmarksMenu}(this,Meli.prototype),function(t,e){function i()
{return{format:function(t,e){if(isNaN(parseFloat(e)))return
meli.price.empty||"Precio a convenir";var
i=e.toString().split("."),o=meli.price.getCurrency(t);return i&&i.length>0?
(priceInt=i[0],priceDec=i[1]?i[1]:"",o.symbol+" "+meli.price.getThousands(priceInt)
+meli.price.getDecimal(priceDec,o.decimal_places)):void 0},getThousands:function(t)
{void 0==meli.price.separator;for(var e=t+"",i=new RegExp("(-?[0-9]+)([0-9]
{3})");i.test(e);)e=e.replace(i,"$1"+meli.price.separator+"$2");return
e},getDecimal:function(t,e){if(0==e)return"";for(var i=t.length;e>i;+
+i)t+="0";return"<sup>"+t+"</sup>"},getCurrency:function(t){for(var
e=meli.price.currencies,i=0,o=e.length;o>i;+
+i)if(e[i].id==t)return{symbol:e[i].symbol,decimal_places:e[i].decimal_places}},cur
rencies:[{id:"BRL",description:"Real",symbol:"R$",decimal_places:2},
{id:"UYU",description:"Peso Uruguayo",symbol:"$",decimal_places:2},
{id:"CLP",description:"Peso Chileno",symbol:"$",decimal_places:0},
{id:"MXN",description:"Peso Mexicano",symbol:"$",decimal_places:2},
{id:"DOP",description:"Peso Dominicano",symbol:"$",decimal_places:2},
{id:"PAB",description:"Balboa",symbol:"B/.",decimal_places:2},
{id:"COP",description:"Peso colombiano",symbol:"$",decimal_places:0},
{id:"VEF",description:"Bolivar fuerte",symbol:"BsF",decimal_places:2},
{id:"EUR",description:"Euro",symbol:"",decimal_places:2},
{id:"PEN",description:"Soles",symbol:"S/.",decimal_places:2},
{id:"CRC",description:"Colones",symbol:"",decimal_places:2},
{id:"ARS",description:"Peso argentino",symbol:"$",decimal_places:2},
{id:"USD",description:"Dolar",symbol:"U$S",decimal_places:2}]}}e.Price=i,e.price=ne
w i}(this,Meli.prototype),"function"==typeof
window.bookmarksAsync&&window.bookmarksAsync(),function(t,e,i){"use
strict";function o(o){if(!i.util.hasOwn(o,"element"))throw new t.Error('Chico UI
error: Expected to find "element" as required configuration parameter of
ch.Positioner.');o.reposition=o.reposition||!1;var
a,l,c={},u=e(o.element),h=o.points||"cm cm",d=(o.offset||"0 0").split("
"),p=function(){if(d[0]=n(d[0],10),d[1]=n(d[1],10),!i.util.hasOwn(o,"context")||!
o.context||"viewport"===o.context)return a=!1,i.viewport;var t={};return
t.width=t.height=t.left=t.top=t.right=t.bottom=0,t.element=e(o.context),t.getSize=f
unction()
{return{width:f.width=t.element.outerWidth(),height:f.height=t.element.outerHeight(
)}},t.getOffset=function(){var
e=t.element.offset(),i=t.getSize(),o=e.left,s=e.top;return l||(o-=m.left,s-=m.top),
{left:f.left=o,top:f.top=s,right:f.right=o+i.width,bottom:f.bottom=s+i.height}},a=!
0,t},f=p(),m=function(){var o=a?f.element.offsetParent()
[0]:t.document.body,s={};return s.left=s.top=0,s.getOffset=function(){if("BODY"!
==o.tagName){var t=e(o).offset(),s=n(i.util.getStyles(o,"border-left-
width"),10),r=n(i.util.getStyles(o,"border-top-
width"),10);return{left:m.left=t.left+s,top:m.top=t.top+r}}},s}(),g=function(t){var
e=function(t){var e,o=!a&&i.support.fixed?i.viewport.getPosition():f;switch(t)
{case"ll":e=o.left+d[0];break;case"lr":e=o.right+d[0];break;case"rl":e=o.left-
u.outerWidth()+d[0];break;case"rr":e=o.right-u.outerWidth()
+d[0];break;case"cc":e=o.left+o.width/2-
u.outerWidth()/2+d[0];break;case"tt":e=o.top+d[1];break;case"tb":e=o.bottom+d[1];br
eak;case"bt":e=o.top-u.outerHeight()+d[1];break;case"bb":e=o.bottom-u.outerHeight()
+d[1];break;case"mm":e=o.top+o.height/2-u.outerHeight()/2+d[1]}return
e},o=t.split("
");return{left:e(o[0].charAt(0)+o[1].charAt(0)),top:e(o[0].charAt(1)+o[1].charAt(1)
)}},v=function(){var t=g(h);if(I=r(h),!o.reposition)return t;if("lt lb"!==h&&"rt
rb"!==h&&"lt rt"!==h)return t;var e,s=h,n=d[0],a=d[1];if(l||
(n+=m.left,a+=m.top),t.top+a+u.outerHeight()>i.viewport.bottom&&"lt rt"!
==h&&(s=s.charAt(0)+"b
"+s.charAt(3)+"t",e=g(s),e.classPoints=r(s),e.top+a>i.viewport.top&&(t.top=e.top-
2*d[1],t.left=e.left,I=e.classPoints)),t.left+n+u.outerWidth()>i.viewport.right)
{var c="r"===s.charAt(0)?"l":"r";s=c+s.charAt(1)+"
"+c+s.charAt(4),e=g(s),e.classPoints=r(s),e.left+n>i.viewport.left&&(t.top=e.top,t.
left=e.left-2*d[0],I=e.classPoints)}return t},A={},b=function(){var t,e=function(t)
{t.removeClass(C).addClass(I)};C=I,t=v(),(t.left!==A.left||t.top!
==A.top)&&(A=t,e(u.css({left:t.left,top:t.top})),a&&e(f.element))},w=function()
{l=u.parent().length>0&&"BODY"===u.parent().prop("tagName"),m.getOffset(),a&&f.getO
ffset(),b()}
,k=function()
{u.is(":visible")&&(a&&(m.getOffset(),f.getOffset()),b())},y=function(){!
a&&i.support.fixed?(u.css("position","fixed"),s.bind("resize",k)):
(u.css("position","absolute"),s.bind(i.events.viewport.CHANGE+"
"+i.events.layout.CHANGE,k))},I=r(h),C=I;return c.position=function(e){var
s=c;switch(typeof e)
{case"object":i.util.hasOwn(e,"points")&&(h=e.points),i.util.hasOwn(e,"reposition")
&&(o.reposition=e.reposition),i.util.hasOwn(e,"offset")&&(d=e.offset.split("
")),i.util.hasOwn(e,"context")&&(o.context=e.context,"viewport"===e.context&&(o.con
text=void 0),f=p(),y()),w();break;case"string":"refresh"!==e&&t.alert('Chico UI
error: expected to find "refresh" parameter on position() method of Positioner
component.'),w();break;case"undefined":default:s={context:f.element,element:u,point
s:h,offset:d.join(" "),reposition:o.reposition}}return
s},y(),w(),c.position}if(void 0===i)throw new t.Error("Expected ch namespace
defined.");var s=e(t),n=t.parseInt,r=function(t){return"ch-points-"+t.replace("
","")},a=!1,l=function(){a&&(i.viewport.getOffset(),s.trigger("change"),a=!
1)};s.bind("resize scroll",function(){a=!
0,l()}),o.prototype.name="positioner",o.prototype.constructor=o,i.Positioner=o}
(this,this.jQuery,this.ch);

You might also like