vendor: 4,849 bytes, line 1
1!function(a,b){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",b):"object"==typeof module&&module.exports?module.exports=b():a.EvEmitter=b()}("undefined"!=typeof window?window:this,function(){function a(){}var b=a.prototype;return b.on=function(a,b){if(a&&b){var c=this._events=this._events||{},d=c[a]=c[a]||[];return-1==d.indexOf(b)&&d.push(b),this}},b.once=function(a,b){if(a&&b){this.on(a,b);var c=this._onceEvents=this._onceEvents||{},d=c[a]=c[a]||{};return d[b]=!0,this}},b.off=function(a,b){var c=this._events&&this._events[a];if(c&&c.length){var d=c.indexOf(b);return-1!=d&&c.splice(d,1),this}},b.emitEvent=function(a,b){var c=this._events&&this._events[a];if(c&&c.length){var d=0,e=c[d];b=b||[];for(var f=this._onceEvents&&this._onceEvents[a];e;){var g=f&&f[e];g&&(this.off(a,e),delete f[e]),e.apply(this,b),d+=g?0:1,e=c[d]}return this}},a}),function(a,b){"use strict";"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter"],function(c){return b(a,c)}):"object"==typeof module&&module.exports?module.exports=b(a,require("ev-emitter")):a.imagesLoaded=b(a,a.EvEmitter)}(window,function(a,b){function c(a,b){for(var c in b)a[c]=b[c];return a}function d(a){var b=[];if(Array.isArray(a))b=a;else if("number"==typeof a.length)for(var c=0;c<a.length;c++)b.push(a[c]);else b.push(a);return b}function e(a,b,f){return this instanceof e?("string"==typeof a&&(a=document.querySelectorAll(a)),this.elements=d(a),this.options=c({},this.options),"function"==typeof b?f=b:c(this.options,b),f&&this.on("always",f),this.getImages(),h&&(this.jqDeferred=new h.Deferred),void setTimeout(function(){this.check()}.bind(this))):new e(a,b,f)}function f(a){this.img=a}function g(a,b){this.url=a,this.element=b,this.img=new Image}var h=a.jQuery,i=a.console;e.prototype=Object.create(b.prototype),e.prototype.options={},e.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)},e.prototype.addElementImages=function(a){"IMG"==a.nodeName&&this.addImage(a),this.options.background===!0&&this.addElementBackgroundImages(a);var b=a.nodeType;if(b&&j[b]){for(var c=a.querySelectorAll("img"),d=0;d<c.length;d++){var e=c[d];this.addImage(e)}if("string"==typeof this.options.background){var f=a.querySelectorAll(this.options.background);for(d=0;d<f.length;d++){var g=f[d];this.addElementBackgroundImages(g)}}}};var j={1:!0,9:!0,11:!0};return e.prototype.addElementBackgroundImages=function(a){var b=getComputedStyle(a);if(b)for(var c=/url\((['"])?(.*?)\1\)/gi,d=c.exec(b.backgroundImage);null!==d;){var e=d&&d[2];e&&this.addBackground(e,a),d=c.exec(b.backgroundImage)}},e.prototype.addImage=function(a){var b=new f(a);this.images.push(b)},e.prototype.addBackground=function(a,b){var c=new g(a,b);this.images.push(c)},e.prototype.check=function(){function a(a,c,d){setTimeout(function(){b.progress(a,c,d)})}var b=this;return this.progressedCount=0,this.hasAnyBroken=!1,this.images.length?void this.images.forEach(function(b){b.once("progress",a),b.check()}):void this.complete()},e.prototype.progress=function(a,b,c){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!a.isLoaded,this.emitEvent("progress",[this,a,b]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,a),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&i&&i.log("progress: "+c,a,b)},e.prototype.complete=function(){var a=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(a,[this]),this.emitEvent("always",[this]),this.jqDeferred){var b=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[b](this)}},f.prototype=Object.create(b.prototype),f.prototype.check=function(){var a=this.getIsImageComplete();return a?void this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),void(this.proxyImage.src=this.img.src))},f.prototype.getIsImageComplete=function(){return this.img.complete&&void 0!==this.img.naturalWidth},f.prototype.confirm=function(a,b){this.isLoaded=a,this.emitEvent("progress",[this,this.img,b])},f.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},f.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},f.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},f.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},g.prototype=Object.create(f.prototype),g.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url;var a=this.getIsImageComplete();
1a&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},g.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},g.prototype.confirm=function(a,b){this.isLoaded=a,this.emitEvent("progress",[this,this.element,b])},e.makeJQueryPlugin=function(b){b=b||a.jQuery,b&&(h=b,h.fn.imagesLoaded=function(a,b){var c=new e(this,a,b);return c.jqDeferred.promise(h(this))})},e.makeJQueryPlugin(),e}),function(a,b,c,d){var e=a(b);a.fn.lazyload=function(f){function j(){var b=0;g.each(function(){var c=a(this);if(!i.skip_invisible||c.is(":visible"))if(a.abovethetop(this,i)||a.leftofbegin(this,i));else if(a.belowthefold(this,i)||a.rightoffold(this,i)){if(++b>i.failure_limit)return!1}else c.trigger("appear"),b=0})}var h,g=this,i={threshold:0,failure_limit:0,event:"scroll",effect:"show",container:b,data_attribute:"original",skip_invisible:!0,appear:null,load:null,placeholder:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC"};return f&&(d!==f.failurelimit&&(f.failure_limit=f.failurelimit,delete f.failurelimit),d!==f.effectspeed&&(f.effect_speed=f.effectspeed,delete f.effectspeed),a.extend(i,f)),h=i.container===d||i.container===b?e:a(i.container),0===i.event.indexOf("scroll")&&h.bind(i.event,function(){return j()}),this.each(function(){var b=this,c=a(b);b.loaded=!1,c.attr("src")!==d&&c.attr("src")!==!1||c.is("img")&&c.attr("src",i.placeholder),c.one("appear",function(){if(!this.loaded){if(i.appear){var d=g.length;i.appear.call(b,d,i)}a("<img />").bind("load",function(){var d=c.attr("data-"+i.data_attribute);c.hide(),c.is("img")?c.attr("src",d):c.css("background-image","url('"+d+"')"),c[i.effect](i.effect_speed),b.loaded=!0;var e=a.grep(g,function(a){return!a.loaded});if(g=a(e),i.load){var f=g.length;i.load.call(b,f,i)}}).attr("src",c.attr("data-"+i.data_attribute))}}),0!==i.event.indexOf("scroll")&&c.bind(i.event,function(){b.loaded||c.trigger("appear")})}),e.bind("resize",function(){j()}),/(?:iphone|ipod|ipad).*os 5/gi.test(navigator.appVersion)&&e.bind("pageshow",function(b){b.originalEvent&&b.originalEvent.persisted&&g.each(function(){a(this).trigger("appear")})}),a(c).ready(function(){j()}),this},a.belowthefold=function(c,f){var g;return g=f.container===d||f.container===b?(b.innerHeight?b.innerHeight:e.height())+e.scrollTop():a(f.container).offset().top+a(f.container).height(),g<=a(c).offset().top-f.threshold},a.rightoffold=function(c,f){var g;return g=f.container===d||f.container===b?e.width()+e.scrollLeft():a(f.container).offset().left+a(f.container).width(),g<=a(c).offset().left-f.threshold},a.abovethetop=function(c,f){var g;return g=f.container===d||f.container===b?e.scrollTop():a(f.container).offset().top,g>=a(c).offset().top+f.threshold+a(c).height()},a.leftofbegin=function(c,f){var g;return g=f.container===d||f.container===b?e.scrollLeft():a(f.container).offset().left,g>=a(c).offset().left+f.threshold+a(c).width()},a.inviewport=function(b,c){return!(a.rightoffold(b,c)||a.leftofbegin(b,c)||a.belowthefold(b,c)||a.abovethetop(b,c))},a.extend(a.expr[":"],{"below-the-fold":function(b){return a.belowthefold(b,{threshold:0})},"above-the-top":function(b){return!a.belowthefold(b,{threshold:0})},"right-of-screen":function(b){return a.rightoffold(b,{threshold:0})},"left-of-screen":function(b){return!a.rightoffold(b,{threshold:0})},"in-viewport":function(b){return a.inviewport(b,{threshold:0})},"above-the-fold":function(b){return!a.belowthefold(b,{threshold:0})},"right-of-fold":function(b){return a.rightoffold(b,{threshold:0})},"left-of-fold":function(b){return!a.rightoffold(b,{threshold:0})}})}(jQuery,window,document),!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):"undefined"!=typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){var b=-1,c=-1,d=function(a){return parseFloat(a)||0},e=function(b){var c=1,e=a(b),f=null,g=[];return e.each(function(){var b=a(this),e=b.offset().top-d(b.css("margin-top")),h=g.length>0?g[g.length-1]:null;null===h?g.push(b):Math.floor(Math.abs(f-e))<=c?g[g.length-1]=h.add(b):g.push(b),f=e}),g},f=function(b){var c={byRow:!0,property:"height",target:null,remove:!1};return"object"==typeof b?a.extend(c,b):("boolean"==typeof b?c.byRow=b:"remove"===b&&(c.remove=!0),c)},g=a.fn.matchHeight=function(b){var c=f(b);if(c.remove){var d=this;return this.css(c.property,""),a.each(g._groups,function(a,b){b.elements=b.elements.not(d)}),this}return this.length<=1&&!c.target?this:(g._groups.push({elements:this,options:c}),g._apply(this,c),this)};g.version="0.7.0",g._groups=[],g._throttle=80,g._maintainScroll=!1,g._beforeUpdate=null,g._afterUpdate=null,g._rows=e,g._parse=d,g._parseOptions=f,g._apply=function(b,c){var h=f(c),i=a(b),j=[i],k=a(window).scrollTop(),l=a("html").outerHeight(!0),m=i.parents().filter(":hidden");return m.each(function(){var b=a(this);b.data("style-cache",b.attr("style"))}),m.css("display","block"),h.byRow&&!h.target&&(i.each(function(){var b=a(this),c=b.css("display");"inline-block"!==c&&"flex"!==c&&"inline-flex"!==c&&(c="block"),b.data("style-cache",b.attr("style")),b.css({display:c,"padding-top":"0","padding-bottom":"0","margin-top":"0","margin-bottom":"0","border-top-width":"0","border-bottom-width":"0",height:"100px",overflow:"hidden"})}),j=e(i),i.each(function(){var b=a(this);b.attr("style",b.data("style-cache")||"")})),a.each(j,function(b,c){var e=a(c),f=0;if(h.target)f=h.target.outerHeight(!1);else{if(h.byRow&&e.length<=1)return void e.css(h.property,"");e.each(function(){var b=a(this),c=b.attr("style"),d=b.css("display");"inline-block"!==d&&"flex"!==d&&"inline-flex"!==d&&(d="block");var e={display:d};e[h.property]="",b.css(e),b.outerHeight(!1)>f&&(f=b.outerHeight(!1)),c?b.attr("style",c):b.css("display","")})}e.each(function(){var b=a(this),c=0;h.target&&b.is(h.target)||("border-box"!==b.css("box-sizing")&&(c+=d(b.css("border-top-width"))+d(b.css("border-bottom-width")),c+=d(b.css("padding-top"))+d(b.css("padding-bottom"))),b.css(h.property,f-c+"px"))})}),m.each(function(){var b=a(this);b.attr("style",b.data("style-cache")||null)}),g._maintainScroll&&a(window).scrollTop(k/l*a("html").outerHeight(!0)),this},g._applyDataApi=function(){var b={};a("[data-match-height], [data-mh]").each(function(){var c=a(this),d=c.attr("data-mh")||c.attr("data-match-height");d in b?b[d]=b[d].add(c):b[d]=c}),a.each(b,function(){this.matchHeight(!0)})};var h=function(b){g._beforeUpdate&&g._beforeUpdate(b,g._groups),a.each(g._groups,function(){g._apply(this.elements,this.options)}),g._afterUpdate&&g._afterUpdate(b,g._groups)};g._update=function(d,e){if(e&&"resize"===e.type){var f=a(window).width();if(f===b)return;b=f}d?-1===c&&(c=setTimeout(function(){h(e),c=-1},g._throttle)):h(e)},a(g._applyDataApi),a(window).bind("load",function(a){g._update(!1,a)}),a(window).bind("resize orientationchange",function(a){g._update(!0,a)})}),!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof module&&module.exports?require("jquery"):jQuery)}(function(a){function b(b){var c={},d=/^jQuery\d+$/;return a.each(b.attributes,function(a,b){b.specified&&!d.test(b.name)&&(c[b.name]=b.value)}),c}function c(b,c){var d=this,f=a(this);if(d.value===f.attr(h?"placeholder-x":"placeholder")&&f.hasClass(n.customClass))if(d.value="",f.removeClass(n.customClass),f.data("placeholder-password")){if(f=f.hide().nextAll('input[type="password"]:first').show().attr("id",f.removeAttr("id").data("placeholder-id")),b===!0)return f[0].value=c,c;f.focus()}else d==e()&&d.select()}function d(d){var e,f=this,g=a(this),i=f.id;if(!d||"blur"!==d.type||!g.hasClass(n.customClass))if(""===f.value){if("password"===f.type){if(!g.data("placeholder-textinput")){try{e=g.clone().prop({type:"text"})}catch(c){e=a("<input>").attr(a.extend(b(this),{type:"text"}))}e.removeAttr("name").data({"placeholder-enabled":!0,"placeholder-password":g,"placeholder-id":i}).bind("focus.placeholder",c),g.data({"placeholder-textinput":e,"placeholder-id":i}).before(e)}f.value="",g=g.removeAttr("id").hide().prevAll('input[type="text"]:first').attr("id",g.data("placeholder-id")).show()}else{var j=g.data("placeholder-password");j&&(j[0].value="",g.attr("id",g.data("placeholder-id")).show().nextAll('input[type="password"]:last').hide().removeAttr("id"))}g.addClass(n.customClass),g[0].value=g.attr(h?"placeholder-x":"placeholder")}else g.removeClass(n.customClass)}function e(){try{return document.activeElement}catch(a){}}var f,g,h=!1,i="[object OperaMini]"===Object.prototype.toString.call(window.operamini),j="placeholder"in document.createElement("input")&&!i&&!h,k="placeholder"in document.createElement("textarea")&&!i&&!h,l=a.valHooks,m=a.propHooks,n={};j&&k?(g=a.fn.placeholder=function(){return this},g.input=!0,g.textarea=!0):(g=a.fn.placeholder=function(b){var e={customClass:"placeholder"};return n=a.extend({},e,b),this.filter((j?"textarea":":input")+"["+(h?"placeholder-x":"placeholder")+"]").not("."+n.customClass).not(":radio, :checkbox, [type=hidden]").bind({"focus.placeholder":c,"blur.placeholder":d}).data("placeholder-enabled",!0).trigger("blur.placeholder")},g.input=j,g.textarea=k,f={get:function(b){var c=a(b),d=c.data("placeholder-password");return d?d[0].value:c.data("placeholder-enabled")&&c.hasClass(n.customClass)?"":b.value},set:function(b,f){var g,h,i=a(b);return""!==f&&(g=i.data("placeholder-textinput"),h=i.data("placeholder-password"),g?(c.call(g[0],!0,f)||(b.value=f),g[0].value=f):h&&(c.call(b,!0,f)||(h[0].value=f),b.value=f)),i.data("placeholder-enabled")?(""===f?(b.value=f,b!=e()&&d.call(b)):(i.hasClass(n.customClass)&&c.c
1all(b),b.value=f),i):(b.value=f,i)}},j||(l.input=f,m.value=f),k||(l.textarea=f,m.value=f),a(function(){a(document).delegate("form","submit.placeholder",function(){var b=a("."+n.customClass,this).each(function(){c.call(this,!0,"")});setTimeout(function(){b.each(d)},10)})}),a(window).bind("beforeunload.placeholder",function(){var b=!0;try{"javascript:void(0)"===document.activeElement.toString()&&(b=!1)}catch(a){}b&&a("."+n.customClass).each(function(){this.value=""})}))}),function(a){var b=this.SelectBox=function(a,b){if(a instanceof jQuery){if(!(a.length>0))return;a=a[0]}return this.typeTimer=null,this.typeSearch="",this.isMac=navigator.platform.match(/mac/i),b="object"==typeof b?b:{},this.selectElement=a,!(!b.mobile&&navigator.userAgent.match(/iPad|iPhone|Android|IEMobile|BlackBerry/i))&&("select"===a.tagName.toLowerCase()&&void this.init(b))};b.prototype.version="1.2.0",b.prototype.init=function(b){var c=a(this.selectElement);if(c.data("selectBox-control"))return!1;var d=a('<a class="selectBox" />'),e=c.attr("multiple")||parseInt(c.attr("size"))>1,f=b||{},g=parseInt(c.prop("tabindex"))||0,h=this;if(d.width(c.outerWidth()).addClass(c.attr("class")).attr("title",c.attr("title")||"").attr("tabindex",g).css("display","inline-block").bind("focus.selectBox",function(){this!==document.activeElement&&document.body!==document.activeElement&&a(document.activeElement).blur(),d.hasClass("selectBox-active")||(d.addClass("selectBox-active"),c.trigger("focus"))}).bind("blur.selectBox",function(){d.hasClass("selectBox-active")&&(d.removeClass("selectBox-active"),c.trigger("blur"))}),a(window).data("selectBox-bindings")||a(window).data("selectBox-bindings",!0).bind("scroll.
1selectBox",f.hideOnWindowScroll?this.hideMenus:a.noop).bind("resize.selectBox",this.hideMenus),c.attr("disabled")&&d.addClass("selectBox-disabled"),c.bind("click.selectBox",function(a){d.focus(),a.preventDefault()}),e){if(b=this.getOptions("inline"),d.append(b).data("selectBox-options",b).addClass("selectBox-inline selectBox-menuShowing").bind("keydown.selectBox",function(a){h.handleKeyDown(a)}).bind("keypress.selectBox",function(a){h.handleKeyPress(a)}).bind("mousedown.selectBox",function(b){1===b.which&&(a(b.target).is("A.selectBox-inline")&&b.preventDefault(),d.hasClass("selectBox-focus")||d.focus())}).insertAfter(c),!c[0].style.height){var i=c.attr("size")?parseInt(c.attr("size")):5,j=d.clone().removeAttr("id").css({position:"absolute",top:"-9999em"}).show().appendTo("body");j.find(".selectBox-options").html("<li><a>Â </a></li>");var k=parseInt(j.find(".selectBox-options A:first").html(" ").outerHeight());j.remove(),d.height(k*i)}this.disableSelection(d)}else{var l=a('<span class="selectBox-label" />'),m=a('<span class="selectBox-arrow" />');l.attr("class",this.getLabelClass()).text(this.getLabelText()),b=this.getOptions("dropdown"),b.appendTo("BODY"),d.data("selectBox-options",b).addClass("selectBox-dropdown").append(l).append(m).bind("mousedown.selectBox",function(a){1===a.which&&(d.hasClass("selectBox-menuShowing")?h.hideMenus():(a.stopPropagation(),b.data("selectBox-down-at-x",a.screenX).data("selectBox-down-at-y",a.screenY),h.showMenu()))}).bind("keydown.selectBox",function(a){h.handleKeyDown(a)}).bind("keypress.selectBox",function(a){h.handleKeyPress(a)}).bind("open.selectBox",function(a,b){b&&b._selectBox===!0||h.showMenu()}).bind("close.selectBox",function(a,b){b&&b._selectBox===!0||h.hideMenus()}).insertAfter(c);var n=d.width()-m.outerWidth()-(parseInt(l.css("paddingLeft"))||0)-(parseInt(l.css("paddingRight"))||0);l.width(n),this.disableSelection(d)}c.addClass("selectBox").data("selectBox-control",d).data("selectBox-settings",f).hide()},b.prototype.getOptions=function(b){var c,d=a(this.selectElement),e=this,f=function(b,c){return b.children("OPTION, OPTGROUP").each(function(){if(a(this).is("OPTION"))a(this).length>0?e.generateOptions(a(this),c):c.append("<li>Â </li>");else{var b=a('<li class="selectBox-optgroup" />');b.text(a(this).attr("label")),c.append(b),c=f(a(this),c)}}),c};switch(b){case"inline":return c=a('<ul class="selectBox-options" />'),c=f(d,c),c.find("A").bind("mouseover.selectBox",function(b){e.addHover(a(this).parent())}).bind("mouseout.selectBox",function(b){e.removeHover(a(this).parent())}).bind("mousedown.selectBox",function(a){1===a.which&&(a.preventDefault(),d.selectBox("control").hasClass("selectBox-active")||d.selectBox("control").focus())}).bind("mouseup.selectBox",function(b){1===b.which&&(e.hideMenus(),e.selectOption(a(this).parent(),b))}),this.disableSelection(c),c;case"dropdown":c=a('<ul class="selectBox-dropdown-menu selectBox-options" />'),c=f(d,c),c.data("selectBox-select",d).css("display","none").appendTo("BODY").find("A").bind("mousedown.selectBox",function(b){1===b.which&&(b.preventDefault(),b.screenX===c.data("selectBox-down-at-x")&&b.screenY===c.data("selectBox-down-at-y")&&(c.removeData("selectBox-down-at-x").removeData("selectBox-down-at-y"),/android/i.test(navigator.userAgent.toLowerCase())&&/chrome/i.test(navigator.userAgent.toLowerCase())&&e.selectOption(a(this).parent()),e.hideMenus()))}).bind("mouseup.selectBox",function(b){1===b.which&&(b.screenX===c.data("selectBox-down-at-x")&&b.screenY===c.data("selectBox-down-at-y")||(c.removeData("selectBox-down-at-x").removeData("selectBox-down-at-y"),e.selectOption(a(this).parent()),e.hideMenus()))}).bind("mouseover.selectBox",function(b){e.addHover(a(this).parent())}).bind("mouseout.selectBox",function(b){e.removeHover(a(this).parent())});var g=d.attr("class")||"";if(""!==g){g=g.split(" ");for(var h=0;h<g.length;h++)c.addClass(g[h]+"-selectBox-dropdown-menu")}return this.disableSelection(c),c}},b.prototype.getLabelClass=function(){var b=a(this.selectElement).find("OPTION:selected");return("selectBox-label "+(b.attr("class")||"")).replace(/\s+$/,"")},b.prototype.getLabelText=function(){var b=a(this.selectElement).find("OPTION:selected");return b.text()||"Â "},b.prototype.setLabel=function(){var b=a(this.selectElement),c=b.data("selectBox-control");c&&c.find(".selectBox-label").attr("class",this.getLabelClass()).text(this.getLabelText())},b.prototype.destroy=function(){var b=a(this.selectElement),c=b.data("selectBox-control");if(c){var d=c.data("selectBox-options");d.remove(),c.remove(),b.removeClass("selectBox").removeData("selectBox-control").data("selectBox-control",null).removeData("selectBox-settings").data("selectBox-settings",null).show()}},b.prototype.refresh=function(){var e,b=a(this.selectElement),c=b.data("selectBox-control"),d=c.hasClass("selectBox-dropdown")?"dropdown":"inline";switch(c.data("selectBox-options").remove(),e=this.getOptions(d),c.data("selectBox-options",e),d){case"inline":c.append(e);break;case"dropdown":this.setLabel(),a("BODY").append(e)}"dropdown"===d&&c.hasClass("selectBox-menuShowing")&&this.showMenu()},b.prototype.showMenu=function(){var b=this,c=a(this.selectElement),d=c.data("selectBox-control"),e=c.data("selectBox-settings"),f=d.data("selectBox-options");
1if(d.hasClass("selectBox-disabled"))return!1;this.hideMenus();var g=parseInt(d.css("borderBottomWidth"))||0,h=parseInt(d.css("borderTopWidth"))||0,i=d.offset(),j=e.topPositionCorrelation?e.topPositionCorrelation:0,k=e.bottomPositionCorrelation?e.bottomPositionCorrelation:0,l=f.outerHeight(),m=d.outerHeight(),n=parseInt(f.css("max-height")),o=a(window).scrollTop(),p=i.top-o,q=a(window).height()-(p+m),r=p>q&&(null==e.keepInViewport||e.keepInViewport),s=r?i.top-l+h+j:i.top+m-g-k;if(p<n&&q<n)if(r){var t=n-(p-5);f.css({"max-height":n-t+"px"}),s+=t}else{var t=n-(q-5);f.css({"max-height":n-t+"px"})}if(f.data("posTop",r),f.width(d.innerWidth()).css({top:s,left:d.offset().left}).addClass("selectBox-options selectBox-options-"+(r?"top":"bottom")),c.triggerHandler("beforeopen"))return!1;var u=function(){c.triggerHandler("open",{_selectBox:!0})};switch(e.menuTransition){case"fade":f.fadeIn(e.menuSpeed,u);break;case"slide":f.slideDown(e.menuSpeed,u);break;default:f.show(e.menuSpeed,u)}e.menuSpeed||u();var v=f.find(".selectBox-selected:first");this.keepOptionInView(v,!0),this.addHover(v),d.addClass("selectBox-menuShowing selectBox-menuShowing-"+(r?"top":"bottom")),a(document).bind("mousedown.selectBox",function(c){if(1===c.which){if(a(c.target).parents().andSelf().hasClass("selectBox-options"))return;b.hideMenus()}})},b.prototype.hideMenus=function(){0!==a(".selectBox-dropdown-menu:visible").length&&(a(document).unbind("mousedown.selectBox"),a(".selectBox-dropdown-menu").each(function(){var b=a(this),c=b.data("selectBox-select"),d=c.data("selectBox-control"),e=c.data("selectBox-settings"),f=b.data("posTop");if(c.triggerHandler("beforeclose"))return!1;var g=function(){c.triggerHandler("close",{_selectBox:!0})};if(e){switch(e.menuTransition){case"fade":b.fadeOut(e.menuSpeed,g);break;case"slide":b.slideUp(e.menuSpeed,g);break;default:b.hide(e.menuSpeed,g)}e.menuSpeed||g(),d.removeClass("selectBox-menuShowing selectBox-menuShowing-"+(f?"top":"bottom"))}else a(this).hide(),a(this).triggerHandler("close",{_selectBox:!0}),a(this).removeClass("selectBox-menuShowing selectBox-menuShowing-"+(f?"top":"bottom"));b.css("max-height",""),b.removeClass("selectBox-options-"+(f?"top":"bottom")),b.data("posTop",!1)}))},b.prototype.selectOption=function(b,c){var d=a(this.selectElement);b=a(b);var e=d.data("selectBox-control");d.data("selectBox-settings");if(e.hasClass("selectBox-disabled"))return!1;if(0===b.length||b.hasClass("selectBox-disabled"))return!1;if(d.attr("multiple"))if(c.shiftKey&&e.data("selectBox-last-selected")){b.toggleClass("selectBox-selected");var g;g=b.index()>e.data("selectBox-last-selected").index()?b.siblings().slice(e.data("selectBox-last-selected").index(),b.index()):b.siblings().slice(b.index(),e.data("selectBox-last-selected").index()),g=g.not(".selectBox-optgroup, .selectBox-disabled"),b.hasClass("selectBox-selected")?g.addClass("selectBox-selected"):g.removeClass("selectBox-selected")}else this.isMac&&c.metaKey||!this.isMac&&c.ctrlKey?b.toggleClass("selectBox-selected"):(b.siblings().removeClass("selectBox-selected"),b.addClass("selectBox-selected"));else b.siblings().removeClass("selectBox-selected"),b.addClass("selectBox-selected");e.hasClass("selectBox-dropdown")&&e.find(".selectBox-label").text(b.text());var h=0,i=[];return d.attr("multiple")?e.find(".selectBox-selected A").each(function(){i[h++]=a(this).attr("rel")}):i=b.find("A").attr("rel"),e.data("selectBox-last-selected",b),d.val()!==i&&(d.val(i),this.setLabel(),d.trigger("change")),!0},b.prototype.addHover=function(b){b=a(b);var c=a(this.selectElement),d=c.data("selectBox-control"),e=d.data("selectBox-options");e.find(".selectBox-hover").removeClass("selectBox-hover"),b.addClass("selectBox-hover")},b.prototype.getSelectElement=function(){return this.selectElement},b.prototype.removeHover=function(b){b=a(b);var c=a(this.selectElement),d=c.data("selectBox-control"),e=d.data("selectBox-options");e.find(".selectBox-hover").removeClass("selectBox-hover")},b.prototype.keepOptionInView=function(b,c){if(b&&0!==b.length){var d=a(this.selectElement),e=d.data("selectBox-control"),f=e.data("selectBox-options"),g=e.hasClass("selectBox-dropdown")?f:f.parent(),h=parseInt(b.offset().top-g.position().top),i=parseInt(h+b.outerHeight());c?g.scrollTop(b.offset().top-g.offset().top+g.scrollTop()-g.height()/2):(h<0&&g.scrollTop(b.offset().top-g.offset().top+g.scrollTop()),i>g.height()&&g.scrollTop(b.offset().top+b.outerHeight()-g.offset().top+g.scrollTop()-g.height()))}},b.prototype.handleKeyDown=function(b){var c=a(this.selectElement),d=c.data("selectBox-control"),e=d.data("selectBox-options"),f=c.data("selectBox-settings"),g=0,h=0;if(!d.hasClass("selectBox-disabled"))switch(b.keyCode){case 8:b.preventDefault(),this.typeSearch="";break;case 9:case 27:this.hideMenus(),this.removeHover();break;case 13:d.hasClass("selectBox-menuShowing")?(this.selectOption(e.find("LI.selectBox-hover:first"),b),d.hasClass("selectBox-dropdown")&&this.hideMenus()):this.showMenu();break;case 38:case 37:if(b.preventDefault(),d.hasClass("selectBox-menuShowing")){var i=e.find(".selectBox-hover").prev("LI");for(g=e.find("LI:not(.selectBox-optgroup)").length,h=0;(0===i.length||i.hasClass("selectBox-disabled")||i.hasClass("selectBox-optgroup"))&&(i=i.prev("LI"),0===i.length&&(i=f.loopOptions?e.find("LI:last"):e.find("LI:first")),!(++h>=g)););this.addHover(i),this.selectOption(i,b),this.keepOptionInView(i)}else this.showMenu();break;case 40:case 39:if(b.preventDefault(),d.hasClass("selectBox-menuShowing")){var j=e.find(".selectBox-hover").next("LI");for(g=e.find("LI:not(.selectBox-optgroup)").length,h=0;(0===j.length||j.hasClass("selectBox-disabled")||j.hasClass("selectBox-optgroup"))&&(j=j.next("LI"),0===j.length&&(j=f.loopOptions?e.find("LI:first"):e.find("LI:last")),!(++h>=g)););this.addHover(j),this.selectOption(j,b),this.keepOptionInView(j)}else this.showMenu()}},b.prototype.handleKeyPress=function(b){var c=a(this.selectElement),d=c.data("selectBox-control"),e=d.data("selectBox-options"),f=this;if(!d.hasClass("selectBox-disabled"))switch(b.keyCode){case 9:case 27:case 13:case 38:case 37:case 40:case 39:break;default:d.hasClass("selectBox-menuShowing")||this.showMenu(),b.preventDefault(),clearTimeout(this.typeTimer),this.typeSearch+=String.fromCharCode(b.charCode||b.keyCode),e.find("A").each(function(){if(a(this).text().substr(0,f.typeSearch.length).toLowerCase()===f.typeSearch.toLowerCase())return f.addHover(a(this).parent()),f.selectOption(a(this).parent(),b),f.keepOptionInView(a(this).parent()),!1}),this.typeTimer=setTimeout(function(){f.typeSearch=""},1e3)}},b.prototype.enable=function(){var b=a(this.selectElement);b.prop("disabled",!1);var c=b.data("selectBox-control");c&&c.removeClass("selectBox-disabled")},b.prototype.disable=function(){var b=a(this.selectElement);b.prop("disabled",!0);var c=b.data("selectBox-control");c&&c.addClass("selectBox-disabled")},b.prototype.setValue=function(b){var c=a(this.selectElement);c.val(b),b=c.val(),null===b&&(b=c.children().first().val(),c.val(b));var d=c.data("selectBox-control");if(d){var e=c.data("selectBox-settings"),f=d.data("selectBox-options");this.setLabel(),f.find(".selectBox-selected").removeClass("selectBox-selected"),f.find("A").each(function(){if("object"==typeof b)for(var c=0;c<b.length;c++)a(this).attr("rel")==b[c]&&a(this).parent().addClass("selectBox-selected");else a(this).attr("rel")==b&&a(this).parent().addClass("selectBox-selected")}),e.change&&e.change.call(c)}},b.prototype.setOptions=function(b){var c=a(this.selectElement),d=c.data("selectBox-control");switch(typeof b){case"string":c.html(b);break;case"object":c.html("");for(var e in b)if(null!==b[e])if("object"==typeof b[e]){var f=a('<optgroup label="'+e+'" />');for(var g in b[e])f.append('<option value="'+g+'">'+b[e][g]+"</option>");c.append(f)}
1else{var h=a('<option value="'+e+'">'+b[e]+"</option>");c.append(h)}}d&&this.refresh()},b.prototype.disableSelection=function(b){a(b).css("MozUserSelect","none").bind("selectstart",function(a){a.preventDefault()})},b.prototype.generateOptions=function(b,c){var d=a("<li />"),e=a("<a />");d.addClass(b.attr("class")),d.data(b.data()),e.attr("rel",b.val()).text(b.text()),d.append(e),b.attr("disabled")&&d.addClass("selectBox-disabled"),b.attr("selected")&&d.addClass("selectBox-selected"),c.append(d)},a.extend(a.fn,{selectBox:function(c,d){var e;switch(c){case"control":return a(this).data("selectBox-control");case"settings":if(!d)return a(this).data("selectBox-settings");a(this).each(function(){a(this).data("selectBox-settings",a.extend(!0,a(this).data("selectBox-settings"),d))});break;case"options":if(void 0===d)return a(this).data("selectBox-control").data("selectBox-options");a(this).each(function(){(e=a(this).data("selectBox"))&&e.setOptions(d)});break;case"value":if(void 0===d)return a(this).val();a(this).each(function(){(e=a(this).data("selectBox"))&&e.setValue(d)});break;case"refresh":a(this).each(function(){(e=a(this).data("selectBox"))&&e.refresh()});break;case"enable":a(this).each(function(){(e=a(this).data("selectBox"))&&e.enable(this)});break;case"disable":a(this).each(function(){(e=a(this).data("selectBox"))&&e.disable()});break;case"destroy":a(this).each(function(){(e=a(this).data("selectBox"))&&(e.destroy(),a(this).data("selectBox",null))});break;case"instance":return a(this).data("selectBox");default:a(this).each(function(d,e){a(e).data("selectBox")||a(e).data("selectBox",new b(e,c))})}return a(this)}})}(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.