%PDF- %PDF-
Direktori : /home/kfvehpdt/animalerie-paris.fr/490858356/script/ |
Current File : /home/kfvehpdt/animalerie-paris.fr/490858356/script/jquery.selectric.min.js |
/*! Selectric ϟ v1.6.4 (2014-03-06) - git.io/tjl9sQ - Copyright (c) 2014 Leonardo Santos - Dual licensed: MIT/GPL */ !function(a){var b="selectric",c=function(a){var b,c="40-46 50-53 54-57 62-70 71-74 61 47 77".replace(/\d+/g,"\\3$&").split(" ");for(b in c){if(!c.hasOwnProperty(b))return;a=a.toLowerCase().replace(RegExp("["+c[b]+"]","g"),"aeiouncy".charAt(b))}return a},d=function(d,e){function f(){function d(a){/^(9|13|27)$/.test(a.keyCode||a.which)&&(a.stopPropagation(),k(v,!0))}var f=B.children();_$li="<ul>",selectedIndex=f.filter(":"+P).index(),w=v=~selectedIndex?selectedIndex:0,(A=f.length)&&(f.each(function(b){var d=a(this),e=d.html(),f=d.prop("disabled");G[b]={value:d.val(),text:e,slug:c(e),disabled:f},_$li+='<li class="'+(b==w?P:"")+(b==A-1?" last":"")+(f?" disabled":"")+'">'+e+"</li>"}),E.html(_$li+"</ul>"),H.html(G[w].text)),D.add(B).off(I),F.data(b,!0).prop("class",[r[6],B.prop("class"),N,e.responsive?r[8]:""].join(" ")),B.prop("disabled")?C.prop("disabled",!0):(F.removeClass(N).hover(function(){a(this).toggleClass(r[7])}),e.openOnHover&&D.on("mouseenter"+I,h),D.on(L,function(a){s?j():h(a)}),C.on({keypress:d,keydown:function(a){d(a),clearTimeout(u),u=setTimeout(function(){C.val("")},e.keySearchTimeout);var b=a.keyCode||a.which;b>36&&41>b&&k(39>b?n():m())},focusin:function(a){C.one("blur",function(){C.blur()}),s||h(a)}}).on(Q,function(){C.val().length&&a.each(G,function(a,b){return RegExp("^"+C.val(),"i").test(b.slug)&&!b.disabled?(k(a),!1):void 0})}),t=a("li",E.removeAttr("style")).click(function(){return k(a(this).index(),!0),!1}))}function g(){var a=E.closest(":visible").children(":hidden"),b=e.maxHeight;a.addClass(O);var c=E.outerWidth(),d=D.outerWidth()-(c-E.width());!e.expandToItemText||d>c?z=d:(E.css("overflow","scroll"),F.width(9e4),z=c,E.css("overflow",""),F.width("")),E.width(z).height()>b&&E.height(b),a.removeClass(O)}function h(b){b.preventDefault(),b.stopPropagation(),g(),a("."+M).removeClass(M),s=!0,x=E.outerHeight(),i(),C.val("").is(":focus")||C.focus(),J.on(L,j),e.openOnHover&&(clearTimeout(y),F.one("mouseleave"+I,function(){y=setTimeout(j,500)})),F.addClass(M),l(v),e.onOpen(d)}function i(){s&&(g(),E.css("top",F.offset().top+F.outerHeight()+x>K.scrollTop()+K.height()?-x:""),setTimeout(i,100))}function j(a){if(!a&&w!=v){var b=G[v].text;B.prop("selectedIndex",w=v).data("value",b).trigger("change",[b,w]),e.onChange(d),H.html(b)}J.off(I),F.removeClass(M),s=!1,e.onClose(d)}function k(a,b){G[v=a].disabled||(t.removeClass(P).eq(a).addClass(P),l(a),b&&j())}function l(a){var b=t.eq(a).outerHeight(),c=t[a].offsetTop,d=E.scrollTop(),e=c+2*b;E.scrollTop(e>d+x?e-x:d>c-b?c-b:d)}function m(a){if(G[a=(v+1)%A].disabled)for(;G[a=(a+1)%A].disabled;);return a}function n(a){if(G[a=(v>0?v:A)-1].disabled)for(;G[a=(a>0?a:A)-1].disabled;);return a}var o,e=a.extend({onOpen:a.noop,onClose:a.noop,onChange:a.noop,maxHeight:300,keySearchTimeout:500,arrowButtonMarkup:'<b class="button">▾</b>',disableOnMobile:!0,openOnHover:!1,expandToItemText:!1,responsive:!1,customClass:{prefix:"selectric",postfixes:"Input Items Open Disabled TempShow HideSelect Wrapper Hover Responsive",camelCase:!0}},e),p=e.customClass,q=p.postfixes.split(" "),r=[];if(!e.disableOnMobile||!/android|ip(hone|od|ad)/i.test(navigator.userAgent)){for(;o=q.shift();)r.push(p.camelCase?p.prefix+o:(p.prefix+o).replace(/([A-Z])/g,"-$&").toLowerCase());var s,t,u,v,w,x,y,z,A,B=a(d),C=a('<input type="text" class="'+r[0]+'"/>'),D=a('<div class="'+p.prefix+'"><p class="label"/>'+e.arrowButtonMarkup+"</div>"),E=a('<div class="'+r[1]+'" tabindex="-1"></div>'),F=B.data(b,!0).wrap("<div>").parent().append(D.add(E).add(C)),G=[],H=a(".label",D),I=".sl",J=a(document),K=a(window),L="click"+I,M=r[2],N=r[3],O=r[4],P="selected",Q="oninput"in C[0]?"input":"keyup";B.wrap('<div class="'+r[5]+'">'),f(),B.on({refresh:f,destroy:function(){E.add(D).add(C).remove(),B.removeData(b).removeData("value").off(I+" refresh destroy open close").unwrap().unwrap()},open:h,close:j})}};a.fn[b]=function(c,e){return this.each(function(){a(this).data(b)?""+c===c&&a(this).trigger(c):d(this,c||e)})}}(jQuery);