!function(t,e,i){"use strict";var s,n,o,r,a,l,h,c,d,u,p;t._realtyna={},t.fn.realtyna=function(e,i){if(t._realtyna.hasOwnProperty(e))return t._realtyna[e].init(t(this),i);console.log("WPL::Dependency Missing=>Realtyna "+e+" library is not available and can't initialize.")},t._realtyna.fn={},e.Realtyna=(s=[],n=[],{version:"1.3.9",shouldInit:!0,init:function(){Realtyna.initURLVariables()},initURLVariables:function(){for(var t=(s=e.location.href.slice(e.location.href.indexOf("?")+1).split("#"))[0].split("&"),i=0;i<t.length;++i){var o=t[i].split("=");n[o[0]]=o[1]}return!0},getHash:function(){return void 0!==s[1]&&s[1]},setHash:function(t,e){t=(e=e||"#")+t,history.pushState?history.pushState(null,null,t):location.hash=t},getQueryString:function(t){if(n.hasOwnProperty(t))return n[t]},getBrowserSizes:function(){var s=i;return{window:{height:t(e).height(),width:t(e).width()},document:{height:t(s).height(),width:function(){return Math.max(s.body.scrollHeight,s.documentElement.scrollHeight,s.body.offsetHeight,s.documentElement.offsetHeight,s.body.clientHeight,s.documentElement.clientHeight)}},browser:function(){var t={};return e.innerHeight?(t.height=e.innerHeight,t.width=e.innerWidth):s.all&&(t.height=s.body.clientHeight,t.width=s.body.clientWidth),t}}},isQuery:function(e){return e&&e.hasOwnProperty&&e instanceof t},isString:function(e){return e&&"string"===t.type(e)},isPercentage:function(t){return isString(t)&&t.indexOf("%")>0},isScrollable:function(t){return t&&!(t.style.overflow&&"hidden"===t.style.overflow)&&(t.clientWidth&&t.scrollWidth>t.clientWidth||t.clientHeight&&t.scrollHeight>t.clientHeight)},options2JSON:function(t){for(var e=t.split("|"),i={},s=/^true|false$/i,n=0;n<e.length;++n){var o=e[n].split(":");o[1].length>0&&!isNaN(o[1])?i[o[0]]=parseInt(o[1]):s.test(o[1])?i[o[0]]=/^true$/i.test(o[1]):i[o[0]]=o[1]}return i},setCookie:function(t,e,s,n,o,r){var a=new Date;a.setTime(a.getTime()),s&&(s=1e3*s*60*60*24);var l=new Date(a.getTime()+s);i.cookie=t+"="+escape(e)+(s?";expires="+l.toGMTString():"")+(n?";path="+n:"")+(o?";domain="+o:"")+(r?";secure":"")},getCookie:function(t){var e=i.cookie.indexOf(t+"="),s=e+t.length+1;if(!e&&t!=i.cookie.substring(0,t.length))return null;if(-1==e)return null;var n=i.cookie.indexOf(";",s);return-1==n&&(n=i.cookie.length),unescape(i.cookie.substring(s,n))},setLocal:function(t,e){return localStorage.setItem(t,e),!0},getLocal:function(t){return localStorage.getItem(t)},setSession:function(t,e){return sessionStorage.setItem(t,e),!0},getSession:function(t){return sessionStorage.getItem(t)},getClass:function(){return Array.prototype.slice.call(arguments).join(" ")},scrollTo:function(e,i,s){if(!e)return!1;if(!t(e).length)return!1;s=s||650,i||(i=0);var n,o=0;t("#wpadminbar").length&&(o=t("#wpadminbar").outerHeight()),n=t(e).eq(0).offset().top-o+i,t("html, body").animate({scrollTop:n},s)},isValidJson:function(t){try{JSON.parse(t)}catch(t){return!1}return!0},hex2rgba:function(t,e){var i,s,n;return"#"===t[0]&&(t=t.slice(1)),6===t.length?(i=parseInt(t.substring(0,2),16),s=parseInt(t.substring(2,4),16),n=parseInt(t.substring(4,6),16)):3===t.length&&(i=parseInt(t.substring(0,1)+t.substring(0,1),16),s=parseInt(t.substring(1,2)+t.substring(1,2),16),n=parseInt(t.substring(2,3)+t.substring(2,3),16)),"rgba("+i+","+s+","+n+","+e/100+")"}}),Realtyna.start=function(){return Realtyna.initializer(Realtyna)},Realtyna.initializer=function(t){var e=0;if(void 0===t)return!1;for(var i in t.hasOwnProperty("shouldInit")&&t.shouldInit&&t.hasOwnProperty("init")&&(t.init(),e++),t)t[i].hasOwnProperty("shouldInit")&&t[i].shouldInit&&t[i].hasOwnProperty("init")&&"prototype"!=i&&(e+=Realtyna.initializer(t[i]));return e},Realtyna.wpl={version:"2.0.0",shouldInit:!0,init:function(){},validate:function(t,e){for(var i=0;i<e.length;++i)if(!t.hasOwnProperty(e[i]))return!1;return!0}},Realtyna.regs={},Realtyna.options={},Realtyna.wpl.options={},Realtyna.options.ajaxloader={autoHide:40,coverTmpl:'<div class="realtyna-ajaxloader-cover"/>',coverStyle:{backgroundColor:"rgba(0,0,0,0.4)",position:"absolute",top:0,left:0,width:"100%",height:"100%",zIndex:2e8,display:"inline-block"}},Realtyna.wpl.options.tabs={tabSystemClass:".wpl-js-tab-system",tabsClass:".wpl-gen-tab-wp",tabContentsClass:".wpl-gen-tab-contents-wp",tabContentClass:".wpl-payment-content",tabActiveClass:"wpl-gen-tab-active",activeChildIndex:0},Realtyna.wpl.options.sidebar={attrContainer:"data-wpl-sidebar",attrTabs:"data-wpl-sidebar-tabs",attrContents:"data-wpl-sidebar-contents",tabPrefix:"wpl_slide_label_id",contentPrefix:"wpl_slide_container_id_",tabActiveClass:"wpl-gen-side-tab-active",showEffect:"animated fadeInDownSmall"},Realtyna.wpl.options.css={utilHidden:"wpl-util-hidden",utilShow:"wpl-util-show",actionMove:"wpl-icon-action-move"},Realtyna.wpl._messages=(o=!1,r=null,a=null,l=["msgBody"],{shouldInit:!1,init:function(e){if("undefined"!=typeof Handlebars){var i=t(e||"#wpl-tmpl-message").html();r=Handlebars.compile(i),a=t("#wpl-messages-wp"),o=!0}},isInit:function(){return o},showMessage:function(e){if(Realtyna.wpl.validate(e,l)){var i=t(r(e));return a.prepend(t(i).show().addClass("animated fadeIn")),!0}return!1}}),Realtyna.wpl._sidebars=(h=Realtyna.wpl.options.sidebar,{shouldInit:!0,init:function(){t("["+h.attrContainer+"]").each(function(e){var i=t(this),s=i.find("["+h.attrTabs+"]"),n=i.find("["+h.attrContents+"]");s.find("a").on("click",function(e){if(t(this).parent().hasClass(h.tabActiveClass))return!1;s.find("a").parent().removeClass(h.tabActiveClass),n.find(">").hide(),t(this).parent().addClass(h.tabActiveClass);var i=t(this).attr("href").slice(1);n.find("#"+h.contentPrefix+i).show().addClass(h.showEffect)});var o=!1;Realtyna.getHash()&&(o=n.find("#"+h.contentPrefix+Realtyna.getHash()).length>0),o?s.find("#"+h.tabPrefix+"_"+Realtyna.getHash()).trigger("click"):(s.find("a:eq(0)").attr("id")==h.tabPrefix+"10000"?s.find("a:eq(1)"):s.find("a:eq(0)")).trigger("click")})}}),Realtyna.libs={},Realtyna.wpl.showMessage=function(e){return!!Realtyna.wpl._messages.isInit()&&(e.hasOwnProperty("type")&&(e.hasButton=!1,"confirm"==e.type?(e.hasButton=!0,e.cssClass=" wpl-get-message-confirm"):"info"==e.type&&(e.cssClass=" wpl-get-message-info")),e.hasOwnProperty("defaultBtn")&&("yes"==e.defaultBtn?e.yesClass=" wpl-gen-message-btn-default":e.noClass=" wpl-gen-message-btn-default"),e.hasOwnProperty("onYes")&&(t.isFunction(e.onYes)||e.onYes),e.hasOwnProperty("onNo"),Realtyna.wpl._messages.showMessage(e))},Realtyna.ajaxLoader=(d=Realtyna.options.ajaxloader.coverTmpl,u=Realtyna.options.ajaxloader.coverStyle,{version:"2.0.1",_autoHide:function(){clearTimeout(c),c=setTimeout(function(){Realtyna.ajaxLoader.hide()},1e3*Realtyna.options.ajaxloader.autoHide)},show:function(e,i,s,n,o,r,a){var l=null,h=Realtyna.isQuery(e)?e:t(e),c="normal",p={left:"50%",top:"50%"},f=o||"#000",g=r||3,_=h.prop("tagName").toLowerCase();if(h.length>0&&!h.eq(0).data("wplHasSpin")){var m=t.fn.spin.presets={normal:{spinWidth:21,lines:20,length:5,width:2,radius:19,corners:0,rotate:0,direction:1,color:"#000",speed:1,trail:85,shadow:!1,hwaccel:!0,className:"realtyna-spin",zIndex:2e9,top:"50%",left:"50%"},tiny:{spinWidth:8,lines:17,length:0,width:2,radius:6,corners:1,rotate:0,direction:1,color:"#000",speed:1,trail:60,shadow:!1,hwaccel:!0,className:"realtyna-spin",zIndex:2e9,top:"50%",left:"50%"},full:{spinWidth:62,lines:30,length:12,width:2,radius:60,corners:1,rotate:0,direction:1,color:"#000",speed:1,trail:36,shadow:!1,hwaccel:!0,className:"realtyna-spin",zIndex:2e9,top:"50%",left:"50%"}};if(void 0===i||t.isPlainObject(i)?void 0!==i&&t.isPlainObject(i):t.fn.spin.presets.hasOwnProperty(i)&&(c=i),void 0!==n){if(n&&"input"!=_&&"select"!=_){var v=t(d),y=u;void 0!==a&&t.isPlainObject(a)&&(y=t.extend({},u,a)),v.css(y),h.prepend(v)}}else n=!1;if(void 0!==s)switch(s){case"leftIn":p.left=m[c].spinWidth+g+"px";break;case"leftOut":p.left=-1*(m[c].spinWidth+g)+"px";break;case"rightOut":p.left=Math.round(100+100*(m[c].spinWidth+g)/h.width())+"%";break;case"rightIn":p.left=Math.round(100-100*(m[c].spinWidth+g)/h.width())+"%"}var b=t.extend({},t.fn.spin.presets[c],p);if(b.color=f,"input"==_){var w=h.parent();w.data({wplHasSpin:!0,wplHasCover:n,wplCurrentPos:w.css("position")}),w.css("position","relative");var x=h.position(),C={width:h.outerWidth(),height:h.height()};if(void 0!==s)switch(b.top=x.top+C.height/2+m[c].spinWidth/2+"px",s){case"leftIn":b.left=x.left+m[c].spinWidth+g+"px";break;case"leftOut":b.left=x.left-m[c].spinWidth-g+"px";break;case"rightOut":b.left=x.left+C.width+m[c].spinWidth+g+"px";break;case"rightIn":b.left=x.left+C.width-m[c].spinWidth-g+"px"}l=w.spin(b)}else h.data({wplHasSpin:!0,wplHasCover:n,wplCurrentPos:h.css("position")}),h.css("position","relative"),l=h.spin(b);return Realtyna.ajaxLoader._autoHide(),l}return!1},hide:function(e){var i=0;if(void 0!==e&&e){var s=e;s.data("wplHasCover")&&s.find(".realtyna-ajaxloader-cover").remove(),s.spin(!1).removeData("wplHasSpin wplHasCover wplCurrentPos"),i++}else t(".realtyna-spin").each(function(e){var s=t(this).parent();s.data("wplHasCover")&&s.find(".realtyna-ajaxloader-cover").remove(),s.spin(!1).removeData("wplHasSpin wplHasCover wplCurrentPos"),i++});return clearTimeout(c),i||!1}}),t(function(){Realtyna.start()}),t._realtyna.fn.lightbox=function(){var s={minWidth:200,minHeight:130,maxWidth:9999,maxHeight:9999,width:800,height:500,title:"",autoSize:!0,zIndex:500001,position:"center",showLoading:!0,reloadPage:!1,clearContent:!0,multiple:!1,closeOnOverlay:!0,loading:{color:"#000"},addTo:"body",overlayClass:"",wrapperClass:"",contentClass:"",closeClass:"",ajaxType:"POST",ajaxDataType:"html",ajaxData:void 0,ajaxURL:void 0,cssClasses:{lock:"realtyna-lightbox-lock",overlay:"realtyna-lightbox-overlay",wrap:"realtyna-lightbox-wp",title:"realtyna-lightbox-title",content:"realtyna-lightbox-cnt",close:"realtyna-lightbox-close-btn",error:"realtyna-lightbox-error",ajax:"realtyna-lightbox-ajax",placeholder:"realtyna-lightbox-placeholder",textOnlyWrap:"realtyna-lightbox-text-wrap",textOnlyContainer:"realtyna-lightbox-text-cnt",rightPos:"realtyna-lightbox-right-pos"},effects:{fadeIn:"wpl-fx-fadeIn",fadeOut:"wpl-fx-fadeOut",showOverlay:"wpl-fx-fadeIn",showBox:"wpl-fx-fadeInBottom",hideBox:"wpl-fx-fadeOutBottom"},errors:{notFound:"Selected content not found!",unexpected:"An unexpected error happen. Please try again."},callbacks:{beforeOpen:function(){},afterOpen:function(){},afterShow:function(){},afterClose:function(){}}},n=this,o=null,r=Realtyna,a={},l=null,h=null,c=null,d=!1,u=!1,p=!1,f=null,g=null,_=null,m=null,v=null,y=null,b=null,w=null,x=null,C={overlay:"realtyna-js-lightbox-overlay",wrap:"realtyna-js-lightbox-wrapper",content:"realtyna-js-lightbox-content",closeBtn:"realtyna-js-lightbox-close"},j=t._realtyna.lightbox.fn={};function k(e){var i,s,n,o,l=r.getBrowserSizes().browser();if(a=function(e){var i=e.data("realtyna-lightbox-obj-opts"),s=j.getInlineOptions(e.attr("data-realtyna-lightbox-opts"));return t.extend(!0,{},i,s)}(e),d){var h=b.css("position");b.css({position:"absolute"}),a.autoSize?(o=b.not("script, style").eq(0).outerWidth(),n=b.not("script, style").eq(0).outerHeight()):(o=a.width,n=a.height),b.css({position:"static"===h?"":h}),"center"==a.position?(o=Math.min(o+2,a.maxWidth),n=Math.min(n+2,a.maxHeight),o=Math.max(o,a.minWidth),n=Math.max(n,a.minHeight),i=l.width/2-o/2,s=Math.max(l.height/2-n/2,40),u?t("body").hasClass("wpl_rtl")?g.css({height:a.autoSize?"auto":n,right:i,top:s,width:o}):g.css({height:a.autoSize?"auto":n,left:i,top:s,width:o}):(t("body").hasClass("wpl_rtl")?g.animate({right:i,top:s,width:o,height:n},450):g.animate({left:i,top:s,width:o,height:n},450),setTimeout(function(){n>a.minHeight&&(n=a.autoSize?"auto":n),g.css({height:n}),f.css({overflowY:"auto"}),g.trigger("onShow"),j.trigger("afterOpen")},600))):"right"==a.position&&(s=0,t("#wpadminbar").length&&(s=t("#wpadminbar").outerHeight()),t("body").hasClass("wpl_rtl")?(g.css({right:"100%",top:s,height:0===s?"100%":"calc(100% - "+s+"px)",width:o}).animate({marginRight:"-"+o},450),setTimeout(function(){g.trigger("onShow"),j.trigger("afterOpen")},600)):(g.css({left:"100%",top:s,height:0===s?"100%":"calc(100% - "+s+"px)",width:o}).animate({marginLeft:"-"+o},450),setTimeout(function(){g.trigger("onShow"),j.trigger("afterOpen")},600)))}else a.showLoading?t("body").hasClass("wpl_rtl")?"center"==a.position?g.css({width:100,height:100,right:l.width/2-50,top:l.height/2-50}):"right"==a.position&&g.css({width:100,height:"100%",right:"100%",top:0}).animate({marginRight:-100},100):"center"==a.position?g.css({width:100,height:100,left:l.width/2-50,top:l.height/2-50}):"right"==a.position&&g.css({width:100,height:"100%",left:"100%",top:0}).animate({marginLeft:-100},100):(o=a.width,n=a.height,"center"==a.position?(o=Math.min(o,a.maxWidth),n=Math.min(n,a.maxHeight),o=Math.max(o,a.minWidth),n=Math.max(n,a.minHeight),i=l.width/2-o/2,s=Math.max(l.height/2-n/2,40),t("body").hasClass("wpl_rtl")?g.css({height:a.autoSize?"auto":n,right:i,top:s,width:o,border:"none",boxShadow:"none"}):g.css({height:a.autoSize?"auto":n,left:i,top:s,width:o,border:"none",boxShadow:"none"})):"right"==a.position&&(s=0,t("#wpadminbar").length&&(s=t("#wpadminbar").outerHeight()),t("body").hasClass("wpl_rtl")?g.css({right:"100%",top:s,height:0===s?"100%":"calc(100% - "+s+"px)",width:o,border:"none",boxShadow:"none"}).animate({marginRight:"-"+o},100):g.css({left:"100%",top:s,height:0===s?"100%":"calc(100% - "+s+"px)",width:o,border:"none",boxShadow:"none"}).animate({marginLeft:"-"+o},100)));return!0}j._beforeOpen=[],j._afterOpen=[],j._afterShow=[],j._afterClose=[],j.open=function(s){p=!0,a=(s=s).data("realtyna-lightbox-obj-opts"),l=a.cssClasses,h=a.effects,c=l.placeholder,function(s,o){t("html").addClass(l.lock),f=t("<div />").attr("id",C.overlay).addClass(r.getClass(l.overlay,a.overlayClass)).css({zIndex:a.zIndex}),(g=t("<div />").attr("id",C.wrap).addClass(r.getClass(l.wrap,a.wrapperClass))).appendTo(f).addClass("center"==a.position?h.showBox:l.rightPos),(_=t("<div />").attr("id",C.closeBtn).addClass(r.getClass(l.close,a.closeClass))).hide().appendTo(g),(m=t("<div />").attr("id",C.content).addClass(r.getClass(l.content,a.contentClass))).appendTo(g),f.appendTo(a.addTo),function(s){t(f).on("click.realtyna-lightbox",function(e){var i=t(e.target);a.closeOnOverlay&&!i.hasClass(l.wrap)&&0==i.parents("#"+C.wrap).length&&n.close()}),t(_).on("click.realtyna-lightbox",function(t){t.preventDefault(),n.close()}),t(e).on("resize.realtyna-lightbox",function(){e.resizeEvt,t(e).on("resize.realtyna-lightbox",function(){"right"!==a.position&&(clearTimeout(e.resizeEvt),e.resizeEvt=setTimeout(function(){k(s)},250))})}),t(i).on("keydown.realtyna-lightbox",function(t){a.closeOnOverlay&&27===(t.which||t.keyCode)&&(t.preventDefault(),n.close())})}(s),j.trigger("beforeOpen"),k(s),a.showLoading&&(v=r.ajaxLoader.show(g,"normal","center",!1,a.loading.color));o.call()}(s,function(){switch(function(e){var i;void 0!==e.attr("href")?i=e.attr("href"):void 0!==e.attr("data-realtyna-href")?i=e.attr("data-realtyna-href"):t._realtyna.lightbox.close();if(i.length>0)return"#"==i[0]?"inline":"ajax"}(s)){case"inline":!function(e){if(w=e.attr("href")||e.attr("data-realtyna-href"),!/^#[a-z]+[\w-]*$/gi.test(w))return;if(0===(y=t(w)).length)return void j._error(e,a.errors.notFound);y.data(c)||y.data(c,t('<div class="'+c+'"></div>').insertAfter(y).hide());y=y.show().invisible().detach(),d=!0,t(m).append(y),g.bind("onReset",function(){t(this).find(y).length&&(a.autoSize&&g.height(y.outerHeight()),y.hide().replaceAll(y.data(c)).data(c,!1),a.clearContent&&y.html(""))}),g.bind("onShow",function(){y.makevisible().hide().fadeIn(),_.fadeIn(),r.ajaxLoader.hide(v),p=!1,u=!0,j.trigger("afterShow")}),x=setInterval(function(){y.html().length>0&&(clearInterval(x),0==y.children().length&&(y.wrapInner('<div class="'+a.cssClasses.textOnlyContainer+'"/>'),y.prepend('<h2 class="'+a.cssClasses.title+'">'+a.title+"</h2>"),y.wrapInner('<div class="'+a.cssClasses.textOnlyWrap+'"/>')),0!=y.find("."+a.cssClasses.title).length&&0==y.find("."+a.cssClasses.textOnlyContainer).length&&y.wrapInner('<div class="'+a.cssClasses.textOnlyContainer+'"/>'),0==y.find("."+a.cssClasses.title).length&&0==y.find("h2").length&&y.prepend('<h2 class="'+a.cssClasses.title+'">'+a.title+"</h2>"),0==y.find("."+a.cssClasses.textOnlyWrap).length&&y.wrapInner('<div class="'+a.cssClasses.textOnlyWrap+'"/>'),b=y.children(),k(e))},300)}(s);break;case"ajax":!function(e){var i=e.attr("data-realtyna-lightbox-data")||{};void 0!==a.ajaxData&&(i=a.ajaxData);w=e.attr("href")||e.attr("data-realtyna-href"),void 0!==a.ajaxURL&&(w=a.ajaxURL);t.ajax({type:a.ajaxType,dataType:a.ajaxDataType,url:w,data:i,error:function(t,i){j._error(e,a.errors.unexpected)},success:function(i,s){"success"===s&&(y=t("<div/>").addClass(l.ajax).html(i),b=y.children(),d=!0,j.trigger("beforeOpen"),m.append(y.show().invisible()),k(e))}}),g.bind("onShow",function(){y.makevisible().hide().fadeIn(),_.fadeIn(),r.ajaxLoader.hide(v),p=!1,u=!0,j.trigger("afterShow")})}(s);break;default:return!1}})},j.trigger=function(t){var e=a.callbacks,i=j["_"+t];e.hasOwnProperty(t)&&null!==e[t]&&i.unshift(e[t]);for(var s=0;s<i.length;++s)i[s].call();return!0},j.getInlineOptions=function(t){return!!t&&r.options2JSON(t)},j._error=function(e,i){(b=t("<div/>").text(i).addClass(l.error)).invisible().appendTo(m),d=!0,j.trigger("beforeOpen"),k(e),g.unbind("onShow").bind("onShow",function(){b.makevisible().hide().fadeIn(),r.ajaxLoader.hide(v),j.trigger("afterShow"),p=!1,u=!0})},this.initialize=function(e,i,n){return o=n,void 0!==i&&i&&o.each(function(){if(!t(this).data("realtyna-lightbox-obj-opts")){var i=t.extend(!0,{},s,e),n=j.getInlineOptions(t(this).attr("data-realtyna-lightbox-opts"));i=t.extend(!0,{},i,n),t(this).data("realtyna-lightbox-obj-opts",i),t(this).on("click.realtyna-lightbox",function(e){p||(e.preventDefault(),j.open(t(this),e))})}}),this},this.open=function(e,i){var s=i||{};return o=r.isQuery(e)?e:t(e),n.initialize(s,!0,o),j.open(o)},this.close=function(){return!!d&&(g.trigger("onReset"),d=!1,u=!1,p=!1,j._beforeOpen=[],j._afterOpen=[],j._afterShow=[],j._afterClose=[],t(g).removeClass(h.showBox+" "+a.position),"center"==a.position?t(g).addClass(h.hideBox):"right"==a.position&&t(g).animate({marginleft:0},450),t(f).fadeOut(600,function(){t(e).off("resize.realtyna-lightbox"),t(i).off("keydown.realtyna-lightbox"),t(this).remove(),j.trigger("afterClose"),t("html").removeClass(l.lock),a.reloadPage&&location.reload()}),!0)},this.on=function(t,e){var i="_"+t;return j.hasOwnProperty(i)&&j[i].push(e),!0}},t._realtyna.lightbox={version:"1.9.6.6",init:function(e,i){return!!e&&(p||(p=new t._realtyna.fn.lightbox,this.open=p.open,this.on=p.on,this.close=p.close),p.initialize(i,!0,e))},initObject:function(){return p||(p=new t._realtyna.fn.lightbox,this.open=p.open,this.on=p.on,this.close=p.close),p},open:null,on:null,close:null},t._realtyna.tagging={version:"1.1.1"},t._realtyna.tagging.init=function(e,i){var s,n=Realtyna,o=e,r='<ul class="wpl-gen-tagging-wp"><li class="wpl-gen-tagging-input-wp"></li><li class="wpl-gen-tagging-values-wp"><input class="wpl-gen-tagging-values" type="hidden" /></li></ul>',a='<li class="wpl-gen-tagging-tag"><span class="wpl-gen-tagging-title"></span><span class="wpl-gen-tagging-close-btn"></span></li>';s=t.extend({},{maxWidth:"auto",sortable:!0},i);var l=t._realtyna.tagging.fn={};l.generateValue=function(e,i){var s=e.find("li").not(".wpl-gen-tagging-input-wp,.wpl-gen-tagging-values-wp").find(".wpl-gen-tagging-title"),n=[];s.each(function(){n.push(t(this).text())}),e.find(".wpl-gen-tagging-values").val(JSON.stringify(n)).trigger("onchange"),void 0===i&&(i=!0),i&&e.find(".wpl-gen-tagging-values").trigger("onchange")},l.createItem=function(e,i,s){var n;void 0===s&&(s=!0),i.find(".wpl-gen-tagging-input-wp").before(a),(n=i.find(".wpl-gen-tagging-input-wp").prev()).find(".wpl-gen-tagging-title").text(e),s&&(l.generateValue(i,s),i.sortable("refresh")),n.find(".wpl-gen-tagging-close-btn").on("click",function(e){e.preventDefault();var s=t(this).parent();void 0===s.data("press-count")&&s.data("press-count",1),1==s.data("press-count")?(s.addClass("wpl-gen-tagging-will-remove"),s.data("press-count",2)):2==s.data("press-count")&&(s.children().fadeOut(300),s.animate({width:"toggle"},250,function(){t(this).remove(),l.generateValue(i)}))})},l.initialize=function(t){var e;if(t.after(r),(e=t.next()).css({maxWidth:s.maxWidth}),t=t.detach(),e.find(".wpl-gen-tagging-input-wp").append(t),e.find(".wpl-gen-tagging-values").attr({name:t.attr("name"),id:t.attr("id"),value:t.val(),onchange:t.attr("onchange")}),t.val().length>0){var i=t.val();if(n.isValidJson(i)){i=JSON.parse(i);for(var o=0;o<i.length;++o)l.createItem(i[o],e,!1)}}e.sortable({axis:"x",items:".wpl-gen-tagging-tag",handle:".wpl-gen-tagging-title",placeholder:"wpl-util-placeholder",update:function(t,i){l.generateValue(e)}}),t.attr({name:null,id:null,onchange:null,value:""}),e.on("click",function(){t.focus()}),t.on("keypress",function(i){13==i.which&&""!==t.val()?(i.preventDefault(),l.createItem(t.val(),e),t.attr("name",""),t.val(""),e.find(".wpl-gen-tagging-will-remove").data("press-count",1).removeClass("wpl-gen-tagging-will-remove")):124==i.which&&i.preventDefault()}),t.on("keyup",function(i){8==i.which&&0==t.val().length&&e.find(".wpl-gen-tagging-input-wp").prev().find(".wpl-gen-tagging-close-btn").trigger("click")})},o.each(function(){l.initialize(t(this))})},t.fn.makevisible=function(){return this.css("visibility","visible")},t.fn.invisible=function(){return this.css("visibility","hidden")},t.fn.visibilityToggle=function(){return this.css("visibility",function(t,e){return"visible"==e?"hidden":"visible"})}}(jQuery,window,document),function(){var t,e,i,s,n={}.hasOwnProperty,o=function(t,e){function i(){this.constructor=t}for(var s in e)n.call(e,s)&&(t[s]=e[s]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t};(s=function(){function t(){this.options_index=0,this.parsed=[]}return t.prototype.add_node=function(t){return"OPTGROUP"===t.nodeName.toUpperCase()?this.add_group(t):this.add_option(t)},t.prototype.add_group=function(t){var e,i,s,n,o,r;for(e=this.parsed.length,this.parsed.push({array_index:e,group:!0,label:this.escapeExpression(t.label),children:0,disabled:t.disabled}),r=[],s=0,n=(o=t.childNodes).length;n>s;s++)i=o[s],r.push(this.add_option(i,e,t.disabled));return r},t.prototype.add_option=function(t,e,i){return"OPTION"===t.nodeName.toUpperCase()?(""!==t.text?(null!=e&&(this.parsed[e].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:t.value,text:t.text,html:t.innerHTML,selected:t.selected,disabled:!0===i?i:t.disabled,group_array_index:e,classes:t.className,style:t.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1):void 0},t.prototype.escapeExpression=function(t){var e,i;return null==t||!1===t?"":/[\&\<\>\"\'\`]/.test(t)?(e={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},i=/&(?!\w+;)|[\<\>\"\'\`]/g,t.replace(i,function(t){return e[t]||"&amp;"})):t},t}()).select_to_array=function(t){var e,i,n,o,r;for(i=new s,n=0,o=(r=t.childNodes).length;o>n;n++)e=r[n],i.add_node(e);return i.parsed},e=function(){function t(e,i){this.form_field=e,this.options=null!=i?i:{},t.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers())}return t.prototype.set_default_values=function(){var t=this;return this.click_test_action=function(e){return t.test_active_click(e)},this.activate_action=function(e){return t.activate_field(e)},this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.result_single_selected=null,this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text&&this.options.allow_single_deselect,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null==this.options.enable_split_word_search||this.options.enable_split_word_search,this.group_search=null==this.options.group_search||this.options.group_search,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null==this.options.single_backstroke_delete||this.options.single_backstroke_delete,this.max_selected_options=this.options.max_selected_options||1/0,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null==this.options.display_selected_options||this.options.display_selected_options,this.display_disabled_options=null==this.options.display_disabled_options||this.options.display_disabled_options},t.prototype.set_default_text=function(){return this.default_text=this.form_field.getAttribute("data-placeholder")?this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.options.placeholder_text_multiple||this.options.placeholder_text||t.default_multiple_text:this.options.placeholder_text_single||this.options.placeholder_text||t.default_single_text,this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||t.default_no_result_text},t.prototype.mouse_enter=function(){return this.mouse_on_container=!0},t.prototype.mouse_leave=function(){return this.mouse_on_container=!1},t.prototype.input_focus=function(){var t=this;if(this.is_multiple){if(!this.active_field)return setTimeout(function(){return t.container_mousedown()},50)}else if(!this.active_field)return this.activate_field()},t.prototype.input_blur=function(){var t=this;return this.mouse_on_container?void 0:(this.active_field=!1,setTimeout(function(){return t.blur_test()},100))},t.prototype.results_option_build=function(t){var e,i,s,n,o;for(e="",s=0,n=(o=this.results_data).length;n>s;s++)e+=(i=o[s]).group?this.result_add_group(i):this.result_add_option(i),(null!=t?t.first:void 0)&&(i.selected&&this.is_multiple?this.choice_build(i):i.selected&&!this.is_multiple&&this.single_set_selected_text(i.text));return e},t.prototype.result_add_option=function(t){var e,i;return t.search_match&&this.include_option_in_results(t)?(e=[],t.disabled||t.selected&&this.is_multiple||e.push("active-result"),!t.disabled||t.selected&&this.is_multiple||e.push("disabled-result"),t.selected&&e.push("result-selected"),null!=t.group_array_index&&e.push("group-option"),""!==t.classes&&e.push(t.classes),i=""!==t.style.cssText?' style="'+t.style+'"':"",'<li class="'+e.join(" ")+'"'+i+' data-option-array-index="'+t.array_index+'">'+t.search_text+"</li>"):""},t.prototype.result_add_group=function(t){return(t.search_match||t.group_match)&&t.active_options>0?'<li class="group-result">'+t.search_text+"</li>":""},t.prototype.results_update_field=function(){return this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.result_single_selected=null,this.results_build(),this.results_showing?this.winnow_results():void 0},t.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},t.prototype.results_search=function(){return this.results_showing?this.winnow_results():this.results_show()},t.prototype.winnow_results=function(){var t,e,i,s,n,o,r,a,l,h,c,d,u;for(this.no_results_clear(),n=0,t=(r=this.get_search_text()).replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),s=this.search_contains?"":"^",i=new RegExp(s+t,"i"),h=new RegExp(t,"i"),c=0,d=(u=this.results_data).length;d>c;c++)(e=u[c]).search_match=!1,o=null,this.include_option_in_results(e)&&(e.group&&(e.group_match=!1,e.active_options=0),null!=e.group_array_index&&this.results_data[e.group_array_index]&&(0===(o=this.results_data[e.group_array_index]).active_options&&o.search_match&&(n+=1),o.active_options+=1),(!e.group||this.group_search)&&(e.search_text=e.group?e.label:e.html,e.search_match=this.search_string_match(e.search_text,i),e.search_match&&!e.group&&(n+=1),e.search_match?(r.length&&(a=e.search_text.search(h),l=e.search_text.substr(0,a+r.length)+"</em>"+e.search_text.substr(a+r.length),e.search_text=l.substr(0,a)+"<em>"+l.substr(a)),null!=o&&(o.group_match=!0)):null!=e.group_array_index&&this.results_data[e.group_array_index].search_match&&(e.search_match=!0)));return this.result_clear_highlight(),1>n&&r.length?(this.update_results_content(""),this.no_results(r)):(this.update_results_content(this.results_option_build()),this.winnow_results_set_highlight())},t.prototype.search_string_match=function(t,e){var i,s,n,o;if(e.test(t))return!0;if(this.enable_split_word_search&&(t.indexOf(" ")>=0||0===t.indexOf("["))&&(s=t.replace(/\[|\]/g,"").split(" ")).length)for(n=0,o=s.length;o>n;n++)if(i=s[n],e.test(i))return!0},t.prototype.choices_count=function(){var t,e,i;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,t=0,e=(i=this.form_field.options).length;e>t;t++)i[t].selected&&(this.selected_option_count+=1);return this.selected_option_count},t.prototype.choices_click=function(t){return t.preventDefault(),this.results_showing||this.is_disabled?void 0:this.results_show()},t.prototype.keyup_checker=function(t){var e,i;switch(e=null!=(i=t.which)?i:t.keyCode,this.search_field_scale(),e){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:if(t.preventDefault(),this.results_showing)return this.result_select(t);break;case 27:return this.results_showing&&this.results_hide(),!0;case 9:case 38:case 40:case 16:case 91:case 17:break;default:return this.results_search()}},t.prototype.container_width=function(){return null!=this.options.width?this.options.width:this.form_field.offsetWidth+"px"},t.prototype.include_option_in_results=function(t){return!(this.is_multiple&&!this.display_selected_options&&t.selected)&&(!(!this.display_disabled_options&&t.disabled)&&!t.empty)},t.browser_is_supported=function(){return true;},t.default_multiple_text="Select Some Options",t.default_single_text="Select an Option",t.default_no_result_text="No results match",t}(),(t=jQuery).fn.extend({chosen:function(s){return e.browser_is_supported()?this.each(function(){var e,n;n=(e=t(this)).data("chosen"),"destroy"===s&&n?n.destroy():n||e.data("chosen",new i(this,s))}):this}}),i=function(i){function n(){return n.__super__.constructor.apply(this,arguments)}return o(n,e),n.prototype.setup=function(){return this.form_field_jq=t(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex,this.is_rtl=this.form_field_jq.hasClass("chosen-rtl")},n.prototype.set_up_html=function(){var e,i;return(e=["chosen-container"]).push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&e.push(this.form_field.className),this.is_rtl&&e.push("chosen-rtl"),i={class:e.join(" "),style:"width: "+this.container_width()+";",title:this.form_field.title},this.form_field.id.length&&(i.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=t("<div />",i),this.is_multiple?this.container.html('<ul class="chosen-choices"><li class="search-field"><input type="text" value="'+this.default_text+'" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chosen-drop"><ul class="chosen-results"></ul></div>'):this.container.html('<a class="chosen-single chosen-default" tabindex="-1"><span>'+this.default_text+'</span><div><b></b></div></a><div class="chosen-drop"><div class="chosen-search"><input type="text" autocomplete="off" /></div><ul class="chosen-results"></ul></div>'),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior(),this.form_field_jq.trigger("chosen:ready",{chosen:this})},n.prototype.register_observers=function(){var t=this;return this.container.bind("mousedown.chosen",function(e){t.container_mousedown(e)}),this.container.bind("mouseup.chosen",function(e){t.container_mouseup(e)}),this.container.bind("mouseenter.chosen",function(e){t.mouse_enter(e)}),this.container.bind("mouseleave.chosen",function(e){t.mouse_leave(e)}),this.search_results.bind("mouseup.chosen",function(e){t.search_results_mouseup(e)}),this.search_results.bind("mouseover.chosen",function(e){t.search_results_mouseover(e)}),this.search_results.bind("mouseout.chosen",function(e){t.search_results_mouseout(e)}),this.search_results.bind("mousewheel.chosen DOMMouseScroll.chosen",function(e){t.search_results_mousewheel(e)}),this.form_field_jq.bind("chosen:updated.chosen",function(e){t.results_update_field(e)}),this.form_field_jq.bind("chosen:activate.chosen",function(e){t.activate_field(e)}),this.form_field_jq.bind("chosen:open.chosen",function(e){t.container_mousedown(e)}),this.search_field.bind("blur.chosen",function(e){t.input_blur(e)}),this.search_field.bind("keyup.chosen",function(e){t.keyup_checker(e)}),this.search_field.bind("keydown.chosen",function(e){t.keydown_checker(e)}),this.search_field.bind("focus.chosen",function(e){t.input_focus(e)}),this.is_multiple?this.search_choices.bind("click.chosen",function(e){t.choices_click(e)}):this.container.bind("click.chosen",function(t){t.preventDefault()})},n.prototype.destroy=function(){return t(document).unbind("click.chosen",this.click_test_action),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},n.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field_jq[0].disabled,this.is_disabled?(this.container.addClass("chosen-disabled"),this.search_field[0].disabled=!0,this.is_multiple||this.selected_item.unbind("focus.chosen",this.activate_action),this.close_field()):(this.container.removeClass("chosen-disabled"),this.search_field[0].disabled=!1,this.is_multiple?void 0:this.selected_item.bind("focus.chosen",this.activate_action))},n.prototype.container_mousedown=function(e){return this.is_disabled||(e&&"mousedown"===e.type&&!this.results_showing&&e.preventDefault(),null!=e&&t(e.target).hasClass("search-choice-close"))?void 0:(this.active_field?this.is_multiple||!e||t(e.target)[0]!==this.selected_item[0]&&!t(e.target).parents("a.chosen-single").length||(e.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),t(document).bind("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},n.prototype.container_mouseup=function(t){return"ABBR"!==t.target.nodeName||this.is_disabled?void 0:this.results_reset(t)},n.prototype.search_results_mousewheel=function(t){var e,i,s;return null!=(e=-(null!=(i=t.originalEvent)?i.wheelDelta:void 0)||(null!=(s=t.originialEvent)?s.detail:void 0))?(t.preventDefault(),"DOMMouseScroll"===t.type&&(e*=40),this.search_results.scrollTop(e+this.search_results.scrollTop())):void 0},n.prototype.blur_test=function(){return!this.active_field&&this.container.hasClass("chosen-container-active")?this.close_field():void 0},n.prototype.close_field=function(){return t(document).unbind("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},n.prototype.activate_field=function(){return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},n.prototype.test_active_click=function(e){return this.container.is(t(e.target).closest(".chosen-container"))?this.active_field=!0:this.close_field()},n.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=s.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():this.is_multiple||(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},n.prototype.result_do_highlight=function(t){var e,i,s,n,o;if(t.length){if(this.result_clear_highlight(),this.result_highlight=t,this.result_highlight.addClass("highlighted"),n=(s=parseInt(this.search_results.css("maxHeight"),10))+(o=this.search_results.scrollTop()),(e=(i=this.result_highlight.position().top+this.search_results.scrollTop())+this.result_highlight.outerHeight())>=n)return this.search_results.scrollTop(e-s>0?e-s:0);if(o>i)return this.search_results.scrollTop(i)}},n.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},n.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.container.addClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this}),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.search_field.val()),this.winnow_results())},n.prototype.update_results_content=function(t){return this.search_results.html(t)},n.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.container.removeClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},n.prototype.set_tab_index=function(){var t;return this.form_field.tabIndex?(t=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=t):void 0},n.prototype.set_label_behavior=function(){var e=this;return this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=t("label[for='"+this.form_field.id+"']")),this.form_field_label.length>0?this.form_field_label.bind("click.chosen",function(t){return e.is_multiple?e.container_mousedown(t):e.activate_field()}):void 0},n.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},n.prototype.search_results_mouseup=function(e){var i;return(i=t(e.target).hasClass("active-result")?t(e.target):t(e.target).parents(".active-result").first()).length?(this.result_highlight=i,this.result_select(e),this.search_field.focus()):void 0},n.prototype.search_results_mouseover=function(e){var i;return(i=t(e.target).hasClass("active-result")?t(e.target):t(e.target).parents(".active-result").first())?this.result_do_highlight(i):void 0},n.prototype.search_results_mouseout=function(e){return t(e.target).hasClass("active-result")?this.result_clear_highlight():void 0},n.prototype.choice_build=function(e){var i,s,n=this;return i=t("<li />",{class:"search-choice"}).html("<span>"+e.html+"</span>"),e.disabled?i.addClass("search-choice-disabled"):((s=t("<a />",{class:"search-choice-close","data-option-array-index":e.array_index})).bind("click.chosen",function(t){return n.choice_destroy_link_click(t)}),i.append(s)),this.search_container.before(i)},n.prototype.choice_destroy_link_click=function(e){return e.preventDefault(),e.stopPropagation(),this.is_disabled?void 0:this.choice_destroy(t(e.target))},n.prototype.choice_destroy=function(t){return this.result_deselect(t[0].getAttribute("data-option-array-index"))?(this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.search_field.val().length<1&&this.results_hide(),t.parents("li").first().remove(),this.search_field_scale()):void 0},n.prototype.results_reset=function(){return this.form_field.options[0].selected=!0,this.selected_option_count=null,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.form_field_jq.trigger("change"),this.active_field?this.results_hide():void 0},n.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},n.prototype.result_select=function(t){var e,i,s;return this.result_highlight?(e=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?e.removeClass("active-result"):(this.result_single_selected&&(this.result_single_selected.removeClass("result-selected"),s=this.result_single_selected[0].getAttribute("data-option-array-index"),this.results_data[s].selected=!1),this.result_single_selected=e),e.addClass("result-selected"),(i=this.results_data[e[0].getAttribute("data-option-array-index")]).selected=!0,this.form_field.options[i.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(i):this.single_set_selected_text(i.text),(t.metaKey||t.ctrlKey)&&this.is_multiple||this.results_hide(),this.search_field.val(""),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.form_field_jq.trigger("change",{selected:this.form_field.options[i.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,this.search_field_scale())):void 0},n.prototype.single_set_selected_text=function(t){return null==t&&(t=this.default_text),t===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").text(t)},n.prototype.result_deselect=function(t){var e;return e=this.results_data[t],!this.form_field.options[e.options_index].disabled&&(e.selected=!1,this.form_field.options[e.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.form_field_jq.trigger("change",{deselected:this.form_field.options[e.options_index].value}),this.search_field_scale(),!0)},n.prototype.single_deselect_control_build=function(){return this.allow_single_deselect?(this.selected_item.find("abbr").length||this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>'),this.selected_item.addClass("chosen-single-with-deselect")):void 0},n.prototype.get_search_text=function(){return this.search_field.val()===this.default_text?"":t("<div/>").text(t.trim(this.search_field.val())).html()},n.prototype.winnow_results_set_highlight=function(){var t,e;return null!=(t=(e=this.is_multiple?[]:this.search_results.find(".result-selected.active-result")).length?e.first():this.search_results.find(".active-result").first())?this.result_do_highlight(t):void 0},n.prototype.no_results=function(e){var i;return(i=t('<li class="no-results">'+this.results_none_found+' "<span></span>"</li>')).find("span").first().html(e),this.search_results.append(i)},n.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},n.prototype.keydown_arrow=function(){var t;return this.results_showing&&this.result_highlight?(t=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(t):void 0:this.results_show()},n.prototype.keyup_arrow=function(){var t;return this.results_showing||this.is_multiple?this.result_highlight?(t=this.result_highlight.prevAll("li.active-result")).length?this.result_do_highlight(t.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight()):void 0:this.results_show()},n.prototype.keydown_backstroke=function(){var t;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(t=this.search_container.siblings("li.search-choice").last()).length&&!t.hasClass("search-choice-disabled")?(this.pending_backstroke=t,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0},n.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},n.prototype.keydown_checker=function(t){var e,i;switch(e=null!=(i=t.which)?i:t.keyCode,this.search_field_scale(),8!==e&&this.pending_backstroke&&this.clear_backstroke(),e){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(t),this.mouse_on_container=!1;break;case 13:t.preventDefault();break;case 38:t.preventDefault(),this.keyup_arrow();break;case 40:t.preventDefault(),this.keydown_arrow()}},n.prototype.search_field_scale=function(){var e,i,s,n,o,r,a,l;if(this.is_multiple){for(0,r=0,n="position:absolute; left: -1000px; top: -1000px; display:none;",a=0,l=(o=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"]).length;l>a;a++)n+=(s=o[a])+":"+this.search_field.css(s)+";";return(e=t("<div />",{style:n})).text(this.search_field.val()),t("body").append(e),r=e.width()+25,e.remove(),r>(i=this.container.outerWidth())-10&&(r=i-10),this.search_field.css({width:r+"px"})}},n}()}.call(this),function(t,e,i){!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):jQuery&&!jQuery.fn.qtip&&t(jQuery)}(function(s){"use strict";function n(t,e,i,n){this.id=i,this.target=t,this.tooltip=O,this.elements={target:t},this._id=Q+"-"+i,this.timers={img:{}},this.options=e,this.plugins={},this.cache={event:{},target:s(),disabled:S,attr:n,onTooltip:S,lastClass:""},this.rendered=this.destroyed=this.disabled=this.waiting=this.hiddenDuringWait=this.positioning=this.triggering=S}function o(t){return t===O||"object"!==s.type(t)}function r(t){return!(s.isFunction(t)||t&&t.attr||t.length||"object"===s.type(t)&&(t.jquery||t.then))}function a(t){var e,i,n,a;return o(t)?S:(o(t.metadata)&&(t.metadata={type:t.metadata}),"content"in t&&(o(e=t.content)||e.jquery||e.done?e=t.content={text:i=r(e)?S:e}:i=e.text,"ajax"in e&&(n=e.ajax,a=n&&n.once!==S,delete e.ajax,e.text=function(t,e){var o=i||s(this).attr(e.options.content.attr)||"Loading...",r=s.ajax(s.extend({},n,{context:e})).then(n.success,O,n.error).then(function(t){return t&&a&&e.set("content.text",t),t},function(t,i,s){e.destroyed||0===t.status||e.set("content.text",i+": "+s)});return a?o:(e.set("content.text",o),r)}),"title"in e&&(s.isPlainObject(e.title)&&(e.button=e.title.button,e.title=e.title.text),r(e.title||S)&&(e.title=S))),"position"in t&&o(t.position)&&(t.position={my:t.position,at:t.position}),"show"in t&&o(t.show)&&(t.show=t.show.jquery?{target:t.show}:t.show===I?{ready:I}:{event:t.show}),"hide"in t&&o(t.hide)&&(t.hide=t.hide.jquery?{target:t.hide}:{event:t.hide}),"style"in t&&o(t.style)&&(t.style={classes:t.style}),s.each(N,function(){this.sanitize&&this.sanitize(t)}),t)}function l(t,e){for(var i,s=0,n=t,o=e.split(".");n=n[o[s++]];)s<o.length&&(i=n);return[i||t,o.pop()]}function h(t,e){var i,s,n;for(i in this.checks)for(s in this.checks[i])(n=new RegExp(s,"i").exec(t))&&(e.push(n),("builtin"===i||this.plugins[i])&&this.checks[i][s].apply(this.plugins[i]||this,e))}function c(t){return V.concat("").join(t?"-"+t+" ":" ")}function d(t,e){return e>0?setTimeout(s.proxy(t,this),e):void t.call(this)}function u(t){this.tooltip.hasClass(K)||(clearTimeout(this.timers.show),clearTimeout(this.timers.hide),this.timers.show=d.call(this,function(){this.toggle(I,t)},this.options.show.delay))}function p(t){if(!this.tooltip.hasClass(K)&&!this.destroyed){var e=s(t.relatedTarget),i=e.closest(U)[0]===this.tooltip[0],n=e[0]===this.options.show.target[0];if(clearTimeout(this.timers.show),clearTimeout(this.timers.hide),this!==e[0]&&"mouse"===this.options.position.target&&i||this.options.hide.fixed&&/mouse(out|leave|move)/.test(t.type)&&(i||n))try{t.preventDefault(),t.stopImmediatePropagation()}catch(t){}else this.timers.hide=d.call(this,function(){this.toggle(S,t)},this.options.hide.delay,this)}}function f(t){!this.tooltip.hasClass(K)&&this.options.hide.inactive&&(clearTimeout(this.timers.inactive),this.timers.inactive=d.call(this,function(){this.hide(t)},this.options.hide.inactive))}function g(t){this.rendered&&this.tooltip[0].offsetWidth>0&&this.reposition(t)}function _(t,i,n){s(e.body).delegate(t,(i.split?i:i.join("."+Q+" "))+"."+Q,function(){var t=x.api[s.attr(this,F)];t&&!t.disabled&&n.apply(t,arguments)})}function m(t,i,o){var r,l,h,c,d,u=s(e.body),p=t[0]===e?u:t,f=t.metadata?t.metadata(o.metadata):O,g="html5"===o.metadata.type&&f?f[o.metadata.name]:O,_=t.data(o.metadata.name||"qtipopts");try{_="string"==typeof _?s.parseJSON(_):_}catch(t){}if(l=(c=s.extend(I,{},x.defaults,o,"object"==typeof _?a(_):O,a(g||f))).position,c.id=i,"boolean"==typeof c.content.text){if(h=t.attr(c.content.attr),c.content.attr===S||!h)return S;c.content.text=h}if(l.container.length||(l.container=u),l.target===S&&(l.target=p),c.show.target===S&&(c.show.target=p),c.show.solo===I&&(c.show.solo=l.container.closest("body")),c.hide.target===S&&(c.hide.target=p),c.position.viewport===I&&(c.position.viewport=l.container),l.container=l.container.eq(0),l.at=new j(l.at,I),l.my=new j(l.my),t.data(Q))if(c.overwrite)t.qtip("destroy",!0);else if(c.overwrite===S)return S;return t.attr(B,i),c.suppress&&(d=t.attr("title"))&&t.removeAttr("title").attr(tt,d).attr("title",""),r=new n(t,c,i,!!h),t.data(Q,r),r}function v(t){return t.charAt(0).toUpperCase()+t.slice(1)}function y(t,e){return Math.ceil(parseFloat(function(t,e){var s,n,o=e.charAt(0).toUpperCase()+e.slice(1),r=(e+" "+gt.join(o+" ")+o).split(" "),a=0;if(ft[e])return t.css(ft[e]);for(;s=r[a++];)if((n=t.css(s))!==i)return ft[e]=s,n}(t,e)))}function b(t,e){this._ns="tip",this.options=e,this.offset=e.offset,this.size=[e.width,e.height],this.init(this.qtip=t)}function w(t,e){this.options=e,this._ns="-modal",this.init(this.qtip=t)}var x,C,j,k,T,I=!0,S=!1,O=null,A="x",z="y",q="width",M="height",D="top",W="left",P="bottom",R="right",E="center",L="flipinvert",H="shift",N={},Q="qtip",B="data-hasqtip",F="data-qtip-id",V=["ui-widget","ui-tooltip"],U="."+Q,$="click dblclick mousedown mouseup mousemove mouseleave mouseenter".split(" "),X=Q+"-fixed",Y=Q+"-default",J=Q+"-focus",G=Q+"-hover",K=Q+"-disabled",Z="_replacedByqTip",tt="oldtitle",et={ie:function(){for(var t=4,i=e.createElement("div");(i.innerHTML="\x3c!--[if gt IE "+t+"]><i></i><![endif]--\x3e")&&i.getElementsByTagName("i")[0];t+=1);return t>4?t:NaN}(),iOS:parseFloat((""+(/CPU.*OS ([0-9_]{1,5})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))||S};(C=n.prototype)._when=function(t){return s.when.apply(s,t)},C.render=function(t){if(this.rendered||this.destroyed)return this;var e=this,i=this.options,n=this.cache,o=this.elements,r=i.content.text,a=i.content.title,l=i.content.button,h=i.position,c=(this._id,[]);return s.attr(this.target[0],"aria-describedby",this._id),n.posClass=this._createPosClass((this.position={my:h.my,at:h.at}).my),this.tooltip=o.tooltip=s("<div/>",{id:this._id,class:[Q,Y,i.style.classes,n.posClass].join(" "),width:i.style.width||"",height:i.style.height||"",tracking:"mouse"===h.target&&h.adjust.mouse,role:"alert","aria-live":"polite","aria-atomic":S,"aria-describedby":this._id+"-content","aria-hidden":I}).toggleClass(K,this.disabled).attr(F,this.id).data(Q,this).appendTo(h.container).append(o.content=s("<div />",{class:Q+"-content",id:this._id+"-content","aria-atomic":I})),this.rendered=-1,this.positioning=I,a&&(this._createTitle(),s.isFunction(a)||c.push(this._updateTitle(a,S))),l&&this._createButton(),s.isFunction(r)||c.push(this._updateContent(r,S)),this.rendered=I,this._setWidget(),s.each(N,function(t){var i;"render"===this.initialize&&(i=this(e))&&(e.plugins[t]=i)}),this._unassignEvents(),this._assignEvents(),this._when(c).then(function(){e._trigger("render"),e.positioning=S,e.hiddenDuringWait||!i.show.ready&&!t||e.toggle(I,n.event,S),e.hiddenDuringWait=S}),x.api[this.id]=this,this},C.destroy=function(t){function e(){if(!this.destroyed){this.destroyed=I;var t,e=this.target,i=e.attr(tt);for(t in this.rendered&&this.tooltip.stop(1,0).find("*").remove().end().remove(),s.each(this.plugins,function(){this.destroy&&this.destroy()}),this.timers)clearTimeout(this.timers[t]);e.removeData(Q).removeAttr(F).removeAttr(B).removeAttr("aria-describedby"),this.options.suppress&&i&&e.attr("title",i).removeAttr(tt),this._unassignEvents(),this.options=this.elements=this.cache=this.timers=this.plugins=this.mouse=O,delete x.api[this.id]}}return this.destroyed?this.target:(t===I&&"hide"!==this.triggering||!this.rendered?e.call(this):(this.tooltip.one("tooltiphidden",s.proxy(e,this)),!this.triggering&&this.hide()),this.target)},k=C.checks={builtin:{"^id$":function(t,e,i,n){var o=i===I?x.nextid:i,r=Q+"-"+o;o!==S&&o.length>0&&!s("#"+r).length?(this._id=r,this.rendered&&(this.tooltip[0].id=this._id,this.elements.content[0].id=this._id+"-content",this.elements.title[0].id=this._id+"-title")):t[e]=n},"^prerender":function(t,e,i){i&&!this.rendered&&this.render(this.options.show.ready)},"^content.text$":function(t,e,i){this._updateContent(i)},"^content.attr$":function(t,e,i,s){this.options.content.text===this.target.attr(s)&&this._updateContent(this.target.attr(i))},"^content.title$":function(t,e,i){return i?(i&&!this.elements.title&&this._createTitle(),void this._updateTitle(i)):this._removeTitle()},"^content.button$":function(t,e,i){this._updateButton(i)},"^content.title.(text|button)$":function(t,e,i){this.set("content."+e,i)},"^position.(my|at)$":function(t,e,i){"string"==typeof i&&(this.position[e]=t[e]=new j(i,"at"===e))},"^position.container$":function(t,e,i){this.rendered&&this.tooltip.appendTo(i)},"^show.ready$":function(t,e,i){i&&(!this.rendered&&this.render(I)||this.toggle(I))},"^style.classes$":function(t,e,i,s){this.rendered&&this.tooltip.removeClass(s).addClass(i)},"^style.(width|height)":function(t,e,i){this.rendered&&this.tooltip.css(e,i)},"^style.widget|content.title":function(){this.rendered&&this._setWidget()},"^style.def":function(t,e,i){this.rendered&&this.tooltip.toggleClass(Y,!!i)},"^events.(render|show|move|hide|focus|blur)$":function(t,e,i){this.rendered&&this.tooltip[(s.isFunction(i)?"":"un")+"bind"]("tooltip"+e,i)},"^(show|hide|position).(event|target|fixed|inactive|leave|distance|viewport|adjust)":function(){if(this.rendered){var t=this.options.position;this.tooltip.attr("tracking","mouse"===t.target&&t.adjust.mouse),this._unassignEvents(),this._assignEvents()}}}},C.get=function(t){if(this.destroyed)return this;var e=l(this.options,t.toLowerCase()),i=e[0][e[1]];return i.precedance?i.string():i};var it=/^position\.(my|at|adjust|target|container|viewport)|style|content|show\.ready/i,st=/^prerender|show\.ready/i;C.set=function(t,e){if(this.destroyed)return this;var i,n=this.rendered,o=S,r=this.options;return this.checks,"string"==typeof t?(i=t,(t={})[i]=e):t=s.extend({},t),s.each(t,function(e,i){if(n&&st.test(e))delete t[e];else{var a,h=l(r,e.toLowerCase());a=h[0][h[1]],h[0][h[1]]=i&&i.nodeType?s(i):i,o=it.test(e)||o,t[e]=[h[0],h[1],i,a]}}),a(r),this.positioning=I,s.each(t,s.proxy(h,this)),this.positioning=S,this.rendered&&this.tooltip[0].offsetWidth>0&&o&&this.reposition("mouse"===r.position.target?O:this.cache.event),this},C._update=function(t,e){var i=this,n=this.cache;return this.rendered&&t?(s.isFunction(t)&&(t=t.call(this.elements.target,n.event,this)||""),s.isFunction(t.then)?(n.waiting=I,t.then(function(t){return n.waiting=S,i._update(t,e)},O,function(t){return i._update(t,e)})):t===S||!t&&""!==t?S:(t.jquery&&t.length>0?e.empty().append(t.css({display:"block",visibility:"visible"})):e.html(t),this._waitForContent(e).then(function(t){i.rendered&&i.tooltip[0].offsetWidth>0&&i.reposition(n.event,!t.length)}))):S},C._waitForContent=function(t){var e=this.cache;return e.waiting=I,(s.fn.imagesLoaded?t.imagesLoaded():s.Deferred().resolve([])).done(function(){e.waiting=S}).promise()},C._updateContent=function(t,e){this._update(t,this.elements.content,e)},C._updateTitle=function(t,e){this._update(t,this.elements.title,e)===S&&this._removeTitle(S)},C._createTitle=function(){var t=this.elements,e=this._id+"-title";t.titlebar&&this._removeTitle(),t.titlebar=s("<div />",{class:Q+"-titlebar "+(this.options.style.widget?c("header"):"")}).append(t.title=s("<div />",{id:e,class:Q+"-title","aria-atomic":I})).insertBefore(t.content).delegate(".qtip-close","mousedown keydown mouseup keyup mouseout",function(t){s(this).toggleClass("ui-state-active ui-state-focus","down"===t.type.substr(-4))}).delegate(".qtip-close","mouseover mouseout",function(t){s(this).toggleClass("ui-state-hover","mouseover"===t.type)}),this.options.content.button&&this._createButton()},C._removeTitle=function(t){var e=this.elements;e.title&&(e.titlebar.remove(),e.titlebar=e.title=e.button=O,t!==S&&this.reposition())},C._createPosClass=function(t){return Q+"-pos-"+(t||this.options.position.my).abbrev()},C.reposition=function(i,n){if(!this.rendered||this.positioning||this.destroyed)return this;this.positioning=I;var o,r,a,l,h=this.cache,c=this.tooltip,d=this.options.position,u=d.target,p=d.my,f=d.at,g=d.viewport,_=d.container,m=d.adjust,v=m.method.split(" "),y=c.outerWidth(S),b=c.outerHeight(S),w=0,x=0,C=c.css("position"),j={left:0,top:0},k=c[0].offsetWidth>0,T=i&&"scroll"===i.type,O=s(t),A=_[0].ownerDocument,z=this.mouse;if(s.isArray(u)&&2===u.length)f={x:W,y:D},j={left:u[0],top:u[1]};else if("mouse"===u)f={x:W,y:D},(!m.mouse||this.options.hide.distance)&&h.origin&&h.origin.pageX?i=h.origin:!i||i&&("resize"===i.type||"scroll"===i.type)?i=h.event:z&&z.pageX&&(i=z),"static"!==C&&(j=_.offset()),A.body.offsetWidth!==(t.innerWidth||A.documentElement.clientWidth)&&(r=s(e.body).offset()),j={left:i.pageX-j.left+(r&&r.left||0),top:i.pageY-j.top+(r&&r.top||0)},m.mouse&&T&&z&&(j.left-=(z.scrollX||0)-O.scrollLeft(),j.top-=(z.scrollY||0)-O.scrollTop());else{if("event"===u?i&&i.target&&"scroll"!==i.type&&"resize"!==i.type?h.target=s(i.target):i.target||(h.target=this.elements.target):"event"!==u&&(h.target=s(u.jquery?u:this.elements.target)),u=h.target,0===(u=s(u).eq(0)).length)return this;u[0]===e||u[0]===t?(w=et.iOS?t.innerWidth:u.width(),x=et.iOS?t.innerHeight:u.height(),u[0]===t&&(j={top:(g||u).scrollTop(),left:(g||u).scrollLeft()})):N.imagemap&&u.is("area")?o=N.imagemap(this,u,f,N.viewport?v:S):N.svg&&u&&u[0].ownerSVGElement?o=N.svg(this,u,f,N.viewport?v:S):(w=u.outerWidth(S),x=u.outerHeight(S),j=u.offset()),o&&(w=o.width,x=o.height,r=o.offset,j=o.position),j=this.reposition.offset(u,j,_),(et.iOS>3.1&&et.iOS<4.1||et.iOS>=4.3&&et.iOS<4.33||!et.iOS&&"fixed"===C)&&(j.left-=O.scrollLeft(),j.top-=O.scrollTop()),(!o||o&&o.adjustable!==S)&&(j.left+=f.x===R?w:f.x===E?w/2:0,j.top+=f.y===P?x:f.y===E?x/2:0)}return j.left+=m.x+(p.x===R?-y:p.x===E?-y/2:0),j.top+=m.y+(p.y===P?-b:p.y===E?-b/2:0),N.viewport?(a=j.adjusted=N.viewport(this,j,d,w,x,y,b),r&&a.left&&(j.left+=r.left),r&&a.top&&(j.top+=r.top),a.my&&(this.position.my=a.my)):j.adjusted={left:0,top:0},h.posClass!==(l=this._createPosClass(this.position.my))&&c.removeClass(h.posClass).addClass(h.posClass=l),this._trigger("move",[j,g.elem||g],i)?(delete j.adjusted,n===S||!k||isNaN(j.left)||isNaN(j.top)||"mouse"===u||!s.isFunction(d.effect)?c.css(j):s.isFunction(d.effect)&&(d.effect.call(c,this,s.extend({},j)),c.queue(function(t){s(this).css({opacity:"",height:""}),et.ie&&this.style.removeAttribute("filter"),t()})),this.positioning=S,this):this},C.reposition.offset=function(t,i,n){function o(t,e){i.left+=e*t.scrollLeft(),i.top+=e*t.scrollTop()}if(!n[0])return i;var r,a,l,h,c=s(t[0].ownerDocument),d=!!et.ie&&"CSS1Compat"!==e.compatMode,u=n[0];do{"static"!==(a=s.css(u,"position"))&&("fixed"===a?(l=u.getBoundingClientRect(),o(c,-1)):((l=s(u).position()).left+=parseFloat(s.css(u,"borderLeftWidth"))||0,l.top+=parseFloat(s.css(u,"borderTopWidth"))||0),i.left-=l.left+(parseFloat(s.css(u,"marginLeft"))||0),i.top-=l.top+(parseFloat(s.css(u,"marginTop"))||0),r||"hidden"===(h=s.css(u,"overflow"))||"visible"===h||(r=s(u)))}while(u=u.offsetParent);return r&&(r[0]!==c[0]||d)&&o(r,1),i};var nt=(j=C.reposition.Corner=function(t,e){t=(""+t).replace(/([A-Z])/," $1").replace(/middle/gi,E).toLowerCase(),this.x=(t.match(/left|right/i)||t.match(/center/)||["inherit"])[0].toLowerCase(),this.y=(t.match(/top|bottom|center/i)||["inherit"])[0].toLowerCase(),this.forceY=!!e;var i=t.charAt(0);this.precedance="t"===i||"b"===i?z:A}).prototype;nt.invert=function(t,e){this[t]=this[t]===W?R:this[t]===R?W:e||this[t]},nt.string=function(t){var e=this.x,i=this.y,s=e!==i?"center"===e||"center"!==i&&(this.precedance===z||this.forceY)?[i,e]:[e,i]:[e];return!1!==t?s.join(" "):s},nt.abbrev=function(){var t=this.string(!1);return t[0].charAt(0)+(t[1]&&t[1].charAt(0)||"")},nt.clone=function(){return new j(this.string(),this.forceY)},C.toggle=function(t,i){var n=this.cache,o=this.options,r=this.tooltip;if(i){if(/over|enter/.test(i.type)&&n.event&&/out|leave/.test(n.event.type)&&o.show.target.add(i.target).length===o.show.target.length&&r.has(i.relatedTarget).length)return this;n.event=s.event.fix(i)}if(this.waiting&&!t&&(this.hiddenDuringWait=I),!this.rendered)return t?this.render(1):this;if(this.destroyed||this.disabled)return this;var a,l,h,c=t?"show":"hide",d=this.options[c],u=(this.options[t?"hide":"show"],this.options.position),p=this.options.content,f=this.tooltip.css("width"),g=this.tooltip.is(":visible"),_=t||1===d.target.length,m=!i||d.target.length<2||n.target[0]===i.target;return(typeof t).search("boolean|number")&&(t=!g),l=(a=!r.is(":animated")&&g===t&&m)?O:!!this._trigger(c,[90]),this.destroyed?this:(l!==S&&t&&this.focus(i),!l||a?this:(s.attr(r[0],"aria-hidden",!t),t?(this.mouse&&(n.origin=s.event.fix(this.mouse)),s.isFunction(p.text)&&this._updateContent(p.text,S),s.isFunction(p.title)&&this._updateTitle(p.title,S),!T&&"mouse"===u.target&&u.adjust.mouse&&(s(e).bind("mousemove."+Q,this._storeMouse),T=I),f||r.css("width",r.outerWidth(S)),this.reposition(i,arguments[2]),f||r.css("width",""),d.solo&&("string"==typeof d.solo?s(d.solo):s(U,d.solo)).not(r).not(d.target).qtip("hide",s.Event("tooltipsolo"))):(clearTimeout(this.timers.show),delete n.origin,T&&!s(U+'[tracking="true"]:visible',d.solo).not(r).length&&(s(e).unbind("mousemove."+Q),T=S),this.blur(i)),h=s.proxy(function(){t?(et.ie&&r[0].style.removeAttribute("filter"),r.css("overflow",""),"string"==typeof d.autofocus&&s(this.options.show.autofocus,r).focus(),this.options.show.target.trigger("qtip-"+this.id+"-inactive")):r.css({display:"",visibility:"",opacity:"",left:"",top:""}),this._trigger(t?"visible":"hidden")},this),d.effect===S||_===S?(r[c](),h()):s.isFunction(d.effect)?(r.stop(1,1),d.effect.call(r,this),r.queue("fx",function(t){h(),t()})):r.fadeTo(90,t?1:0,h),t&&d.target.trigger("qtip-"+this.id+"-inactive"),this))},C.show=function(t){return this.toggle(I,t)},C.hide=function(t){return this.toggle(S,t)},C.focus=function(t){if(!this.rendered||this.destroyed)return this;var e=s(U),i=this.tooltip,n=parseInt(i[0].style.zIndex,10),o=x.zindex+e.length;return i.hasClass(J)||this._trigger("focus",[o],t)&&(n!==o&&(e.each(function(){this.style.zIndex>n&&(this.style.zIndex=this.style.zIndex-1)}),e.filter("."+J).qtip("blur",t)),i.addClass(J)[0].style.zIndex=o),this},C.blur=function(t){return!this.rendered||this.destroyed?this:(this.tooltip.removeClass(J),this._trigger("blur",[this.tooltip.css("zIndex")],t),this)},C.disable=function(t){return this.destroyed?this:("toggle"===t?t=!(this.rendered?this.tooltip.hasClass(K):this.disabled):"boolean"!=typeof t&&(t=I),this.rendered&&this.tooltip.toggleClass(K,t).attr("aria-disabled",t),this.disabled=!!t,this)},C.enable=function(){return this.disable(S)},C._createButton=function(){var t=this,e=this.elements,i=e.tooltip,n=this.options.content.button,o="string"==typeof n?n:"Close tooltip";e.button&&e.button.remove(),e.button=n.jquery?n:s("<a />",{class:"qtip-close "+(this.options.style.widget?"":Q+"-icon"),title:o,"aria-label":o}).prepend(s("<span />",{class:"ui-icon ui-icon-close",html:"&times;"})),e.button.appendTo(e.titlebar||i).attr("role","button").click(function(e){return i.hasClass(K)||t.hide(e),S})},C._updateButton=function(t){if(!this.rendered)return S;var e=this.elements.button;t?this._createButton():e.remove()},C._setWidget=function(){var t=this.options.style.widget,e=this.elements,i=e.tooltip,s=i.hasClass(K);i.removeClass(K),K=t?"ui-state-disabled":"qtip-disabled",i.toggleClass(K,s),i.toggleClass("ui-helper-reset "+c(),t).toggleClass(Y,this.options.style.def&&!t),e.content&&e.content.toggleClass(c("content"),t),e.titlebar&&e.titlebar.toggleClass(c("header"),t),e.button&&e.button.toggleClass(Q+"-icon",!t)},C._storeMouse=function(t){return(this.mouse=s.event.fix(t)).type="mousemove",this},C._bind=function(t,e,i,n,o){if(t&&i&&e.length){var r="."+this._id+(n?"-"+n:"");return s(t).bind((e.split?e:e.join(r+" "))+r,s.proxy(i,o||this)),this}},C._unbind=function(t,e){return t&&s(t).unbind("."+this._id+(e?"-"+e:"")),this},C._trigger=function(t,e,i){var n=s.Event("tooltip"+t);return n.originalEvent=i&&s.extend({},i)||this.cache.event||O,this.triggering=t,this.tooltip.trigger(n,[this].concat(e||[])),this.triggering=S,!n.isDefaultPrevented()},C._bindEvents=function(t,e,i,n,o,r){var a=i.filter(n).add(n.filter(i)),l=[];a.length&&(s.each(e,function(e,i){var n=s.inArray(i,t);n>-1&&l.push(t.splice(n,1)[0])}),l.length&&(this._bind(a,l,function(t){(!!this.rendered&&this.tooltip[0].offsetWidth>0?r:o).call(this,t)}),i=i.not(a),n=n.not(a))),this._bind(i,t,o),this._bind(n,e,r)},C._assignInitialEvents=function(t){function e(t){return this.disabled||this.destroyed?S:(this.cache.event=t&&s.event.fix(t),this.cache.target=t&&s(t.target),clearTimeout(this.timers.show),void(this.timers.show=d.call(this,function(){this.render("object"==typeof t||i.show.ready)},i.prerender?0:i.show.delay)))}var i=this.options,n=i.show.target,o=i.hide.target,r=i.show.event?s.trim(""+i.show.event).split(" "):[],a=i.hide.event?s.trim(""+i.hide.event).split(" "):[];this._bind(this.elements.target,["remove","removeqtip"],function(){this.destroy(!0)},"destroy"),/mouse(over|enter)/i.test(i.show.event)&&!/mouse(out|leave)/i.test(i.hide.event)&&a.push("mouseleave"),this._bind(n,"mousemove",function(t){this._storeMouse(t),this.cache.onTarget=I}),this._bindEvents(r,a,n,o,e,function(){return this.timers?void clearTimeout(this.timers.show):S}),(i.show.ready||i.prerender)&&e.call(this,t)},C._assignEvents=function(){var i=this,n=this.options,o=n.position,r=this.tooltip,a=n.show.target,l=n.hide.target,h=o.container,c=o.viewport,d=s(e),_=(s(e.body),s(t)),m=n.show.event?s.trim(""+n.show.event).split(" "):[],v=n.hide.event?s.trim(""+n.hide.event).split(" "):[];s.each(n.events,function(t,e){i._bind(r,"toggle"===t?["tooltipshow","tooltiphide"]:["tooltip"+t],e,null,r)}),/mouse(out|leave)/i.test(n.hide.event)&&"window"===n.hide.leave&&this._bind(d,["mouseout","blur"],function(t){/select|option/.test(t.target.nodeName)||t.relatedTarget||this.hide(t)}),n.hide.fixed?l=l.add(r.addClass(X)):/mouse(over|enter)/i.test(n.show.event)&&this._bind(l,"mouseleave",function(){clearTimeout(this.timers.show)}),(""+n.hide.event).indexOf("unfocus")>-1&&this._bind(h.closest("html"),["mousedown","touchstart"],function(t){var e=s(t.target),i=this.rendered&&!this.tooltip.hasClass(K)&&this.tooltip[0].offsetWidth>0,n=e.parents(U).filter(this.tooltip[0]).length>0;e[0]===this.target[0]||e[0]===this.tooltip[0]||n||this.target.has(e[0]).length||!i||this.hide(t)}),"number"==typeof n.hide.inactive&&(this._bind(a,"qtip-"+this.id+"-inactive",f,"inactive"),this._bind(l.add(r),x.inactiveEvents,f)),this._bindEvents(m,v,a,l,u,p),this._bind(a.add(r),"mousemove",function(t){if("number"==typeof n.hide.distance){var e=this.cache.origin||{},i=this.options.hide.distance,s=Math.abs;(s(t.pageX-e.pageX)>=i||s(t.pageY-e.pageY)>=i)&&this.hide(t)}this._storeMouse(t)}),"mouse"===o.target&&o.adjust.mouse&&(n.hide.event&&this._bind(a,["mouseenter","mouseleave"],function(t){return this.cache?void(this.cache.onTarget="mouseenter"===t.type):S}),this._bind(d,"mousemove",function(t){this.rendered&&this.cache.onTarget&&!this.tooltip.hasClass(K)&&this.tooltip[0].offsetWidth>0&&this.reposition(t)})),(o.adjust.resize||c.length)&&this._bind(s.event.special.resize?c:_,"resize",g),o.adjust.scroll&&this._bind(_.add(o.container),"scroll",g)},C._unassignEvents=function(){var i=this.options,n=i.show.target,o=i.hide.target,r=s.grep([this.elements.target[0],this.rendered&&this.tooltip[0],i.position.container[0],i.position.viewport[0],i.position.container.closest("html")[0],t,e],function(t){return"object"==typeof t});n&&n.toArray&&(r=r.concat(n.toArray())),o&&o.toArray&&(r=r.concat(o.toArray())),this._unbind(r)._unbind(r,"destroy")._unbind(r,"inactive")},s(function(){_(U,["mouseenter","mouseleave"],function(t){var e="mouseenter"===t.type,i=s(t.currentTarget),n=s(t.relatedTarget||t.target),o=this.options;e?(this.focus(t),i.hasClass(X)&&!i.hasClass(K)&&clearTimeout(this.timers.hide)):"mouse"===o.position.target&&o.position.adjust.mouse&&o.hide.event&&o.show.target&&!n.closest(o.show.target[0]).length&&this.hide(t),i.toggleClass(G,e)}),_("["+F+"]",$,f)}),x=s.fn.qtip=function(t,e,n){var o=(""+t).toLowerCase(),r=O,l=s.makeArray(arguments).slice(1),h=l[l.length-1],c=this[0]?s.data(this[0],Q):O;return!arguments.length&&c||"api"===o?c:"string"==typeof t?(this.each(function(){var t=s.data(this,Q);if(!t)return I;if(h&&h.timeStamp&&(t.cache.event=h),!e||"option"!==o&&"options"!==o)t[o]&&t[o].apply(t,l);else{if(n===i&&!s.isPlainObject(e))return r=t.get(e),S;t.set(e,n)}}),r!==O?r:this):"object"!=typeof t&&arguments.length?void 0:(c=a(s.extend(I,{},t)),this.each(function(t){var e,i;return i=!(i=s.isArray(c.id)?c.id[t]:c.id)||i===S||i.length<1||x.api[i]?x.nextid++:i,(e=m(s(this),i,c))===S?I:(x.api[i]=e,s.each(N,function(){"initialize"===this.initialize&&this(e)}),void e._assignInitialEvents(h))}))},s.qtip=n,x.api={},s.each({attr:function(t,e){if(this.length){var i=this[0],n="title",o=s.data(i,"qtip");if(t===n&&o&&"object"==typeof o&&o.options.suppress)return arguments.length<2?s.attr(i,tt):(o&&o.options.content.attr===n&&o.cache.attr&&o.set("content.text",e),this.attr(tt,e))}return s.fn["attr"+Z].apply(this,arguments)},clone:function(t){var e=(s([]),s.fn["clone"+Z].apply(this,arguments));return t||e.filter("["+tt+"]").attr("title",function(){return s.attr(this,tt)}).removeAttr(tt),e}},function(t,e){if(!e||s.fn[t+Z])return I;var i=s.fn[t+Z]=s.fn[t];s.fn[t]=function(){return e.apply(this,arguments)||i.apply(this,arguments)}}),s.ui||(s["cleanData"+Z]=s.cleanData,s.cleanData=function(t){for(var e,i=0;(e=s(t[i])).length;i++)if(e.attr(B))try{e.triggerHandler("removeqtip")}catch(t){}s["cleanData"+Z].apply(this,arguments)}),x.version="2.2.1",x.nextid=0,x.inactiveEvents=$,x.zindex=15e3,x.defaults={prerender:S,id:S,overwrite:I,suppress:I,content:{text:I,attr:"title",title:S,button:S},position:{my:"top left",at:"bottom right",target:S,container:S,viewport:S,adjust:{x:0,y:0,mouse:I,scroll:I,resize:I,method:"flipinvert flipinvert"},effect:function(t,e){s(this).animate(e,{duration:200,queue:S})}},show:{target:S,event:"mouseenter",effect:I,delay:90,solo:S,ready:S,autofocus:S},hide:{target:S,event:"mouseleave",effect:I,delay:0,fixed:S,inactive:S,leave:"window",distance:S},style:{classes:"",widget:S,width:S,height:S,def:I},events:{render:O,move:O,show:O,hide:O,toggle:O,visible:O,hidden:O,focus:O,blur:O}};var ot,rt="margin",at="border",lt="color",ht="background-color",ct="transparent",dt=" !important",ut=!!e.createElement("canvas").getContext,pt=/rgba?\(0, 0, 0(, 0)?\)|transparent|#123456/i,ft={},gt=["Webkit","O","Moz","ms"];if(ut)var _t=(t.devicePixelRatio||1)/function(){var t=e.createElement("canvas").getContext("2d");return t.backingStorePixelRatio||t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||1}();else var mt=function(t,e,i){return"<qtipvml:"+t+' xmlns="urn:schemas-microsoft.com:vml" class="qtip-vml" '+(e||"")+' style="behavior: url(#default#VML); '+(i||"")+'" />'};s.extend(b.prototype,{init:function(t){var e,i;i=this.element=t.elements.tip=s("<div />",{class:Q+"-tip"}).prependTo(t.tooltip),ut?((e=s("<canvas />").appendTo(this.element)[0].getContext("2d")).lineJoin="miter",e.miterLimit=1e5,e.save()):(e=mt("shape",'coordorigin="0,0"',"position:absolute;"),this.element.html(e+e),t._bind(s("*",i).add(i),["click","mousedown"],function(t){t.stopPropagation()},this._ns)),t._bind(t.tooltip,"tooltipmove",this.reposition,this._ns,this),this.create()},_swapDimensions:function(){this.size[0]=this.options.height,this.size[1]=this.options.width},_resetDimensions:function(){this.size[0]=this.options.width,this.size[1]=this.options.height},_useTitle:function(t){var e=this.qtip.elements.titlebar;return e&&(t.y===D||t.y===E&&this.element.position().top+this.size[1]/2+this.options.offset<e.outerHeight(I))},_parseCorner:function(t){var e=this.qtip.options.position.my;return t===S||e===S?t=S:t===I?t=new j(e.string()):t.string||((t=new j(t)).fixed=I),t},_parseWidth:function(t,e,i){var s=this.qtip.elements,n=at+v(e)+"Width";return(i?y(i,n):y(s.content,n)||y(this._useTitle(t)&&s.titlebar||s.content,n)||y(s.tooltip,n))||0},_parseRadius:function(t){var e=this.qtip.elements,i=at+v(t.y)+v(t.x)+"Radius";return et.ie<9?0:y(this._useTitle(t)&&e.titlebar||e.content,i)||y(e.tooltip,i)||0},_invalidColour:function(t,e,i){var s=t.css(e);return!s||i&&s===t.css(i)||pt.test(s)?S:s},_parseColours:function(t){var e=this.qtip.elements,i=this.element.css("cssText",""),n=at+v(t[t.precedance])+v(lt),o=this._useTitle(t)&&e.titlebar||e.content,r=this._invalidColour,a=[];return a[0]=r(i,ht)||r(o,ht)||r(e.content,ht)||r(e.tooltip,ht)||i.css(ht),a[1]=r(i,n,lt)||r(o,n,lt)||r(e.content,n,lt)||r(e.tooltip,n,lt)||e.tooltip.css(n),s("*",i).add(i).css("cssText",ht+":"+ct+dt+";"+at+":0"+dt+";"),a},_calculateSize:function(t){var e,i,s=t.precedance===z,n=this.options.width,o=this.options.height,r="c"===t.abbrev(),a=(s?n:o)*(r?.5:1),l=Math.pow,h=Math.round,c=Math.sqrt(l(a,2)+l(o,2)),d=[this.border/a*c,this.border/o*c];return d[2]=Math.sqrt(l(d[0],2)-l(this.border,2)),d[3]=Math.sqrt(l(d[1],2)-l(this.border,2)),i=[h((e=(c+d[2]+d[3]+(r?0:d[0]))/c)*n),h(e*o)],s?i:i.reverse()},_calculateTip:function(t,e,i){i=i||1;var s=(e=e||this.size)[0]*i,n=e[1]*i,o=Math.ceil(s/2),r=Math.ceil(n/2),a={br:[0,0,s,n,s,0],bl:[0,0,s,0,0,n],tr:[0,n,s,0,s,n],tl:[0,0,0,n,s,n],tc:[0,n,o,0,s,n],bc:[0,0,s,0,o,n],rc:[0,0,s,r,0,n],lc:[s,0,s,n,0,r]};return a.lt=a.br,a.rt=a.bl,a.lb=a.tr,a.rb=a.tl,a[t.abbrev()]},_drawCoords:function(t,e){t.beginPath(),t.moveTo(e[0],e[1]),t.lineTo(e[2],e[3]),t.lineTo(e[4],e[5]),t.closePath()},create:function(){var t=this.corner=(ut||et.ie)&&this._parseCorner(this.options.corner);return(this.enabled=!!this.corner&&"c"!==this.corner.abbrev())&&(this.qtip.cache.corner=t.clone(),this.update()),this.element.toggle(this.enabled),this.corner},update:function(e,i){if(!this.enabled)return this;var n,o,r,a,l,h,c,d,u=this.qtip.elements,p=this.element,f=p.children(),g=this.options,_=this.size,m=g.mimic,v=Math.round;e||(e=this.qtip.cache.corner||this.corner),m===S?m=e:((m=new j(m)).precedance=e.precedance,"inherit"===m.x?m.x=e.x:"inherit"===m.y?m.y=e.y:m.x===m.y&&(m[e.precedance]=e[e.precedance])),o=m.precedance,e.precedance===A?this._swapDimensions():this._resetDimensions(),(n=this.color=this._parseColours(e))[1]!==ct?(d=this.border=this._parseWidth(e,e[e.precedance]),g.border&&1>d&&!pt.test(n[1])&&(n[0]=n[1]),this.border=d=g.border!==I?g.border:d):this.border=d=0,c=this.size=this._calculateSize(e),p.css({width:c[0],height:c[1],lineHeight:c[1]+"px"}),h=e.precedance===z?[v(m.x===W?d:m.x===R?c[0]-_[0]-d:(c[0]-_[0])/2),v(m.y===D?c[1]-_[1]:0)]:[v(m.x===W?c[0]-_[0]:0),v(m.y===D?d:m.y===P?c[1]-_[1]-d:(c[1]-_[1])/2)],ut?((r=f[0].getContext("2d")).restore(),r.save(),r.clearRect(0,0,6e3,6e3),a=this._calculateTip(m,_,_t),l=this._calculateTip(m,this.size,_t),f.attr(q,c[0]*_t).attr(M,c[1]*_t),f.css(q,c[0]).css(M,c[1]),this._drawCoords(r,l),r.fillStyle=n[1],r.fill(),r.translate(h[0]*_t,h[1]*_t),this._drawCoords(r,a),r.fillStyle=n[0],r.fill()):(a="m"+(a=this._calculateTip(m))[0]+","+a[1]+" l"+a[2]+","+a[3]+" "+a[4]+","+a[5]+" xe",h[2]=d&&/^(r|b)/i.test(e.string())?8===et.ie?2:1:0,f.css({coordsize:c[0]+d+" "+(c[1]+d),antialias:""+(m.string().indexOf(E)>-1),left:h[0]-h[2]*Number(o===A),top:h[1]-h[2]*Number(o===z),width:c[0]+d,height:c[1]+d}).each(function(t){var e=s(this);e[e.prop?"prop":"attr"]({coordsize:c[0]+d+" "+(c[1]+d),path:a,fillcolor:n[0],filled:!!t,stroked:!t}).toggle(!(!d&&!t)),!t&&e.html(mt("stroke",'weight="'+2*d+'px" color="'+n[1]+'" miterlimit="1000" joinstyle="miter"'))})),t.opera&&setTimeout(function(){u.tip.css({display:"inline-block",visibility:"visible"})},1),i!==S&&this.calculate(e,c)},calculate:function(t,e){if(!this.enabled)return S;var i,n,o=this,r=this.qtip.elements,a=this.element,l=this.options.offset,h=(r.tooltip.hasClass("ui-widget"),{});return t=t||this.corner,i=t.precedance,e=e||this._calculateSize(t),n=[t.x,t.y],i===A&&n.reverse(),s.each(n,function(s,n){var a,c,d;n===E?(h[a=i===z?W:D]="50%",h[rt+"-"+a]=-Math.round(e[i===z?0:1]/2)+l):(a=o._parseWidth(t,n,r.tooltip),c=o._parseWidth(t,n,r.content),d=o._parseRadius(t),h[n]=Math.max(-o.border,s?c:l+(d>a?d:-a)))}),h[t[i]]-=e[i===A?0:1],a.css({margin:"",top:"",bottom:"",left:"",right:""}).css(h),h},reposition:function(t,e,s){function n(t,e,i,s,n){t===H&&h.precedance===e&&c[s]&&h[i]!==E?h.precedance=h.precedance===A?z:A:t!==H&&c[s]&&(h[e]=h[e]===E?c[s]>0?s:n:h[e]===s?n:s)}function o(t,e,n){h[t]===E?g[rt+"-"+e]=f[t]=r[rt+"-"+e]-c[e]:(a=r[n]!==i?[c[e],-r[e]]:[-c[e],r[e]],(f[t]=Math.max(a[0],a[1]))>a[0]&&(s[e]-=c[e],f[e]=S),g[r[n]!==i?n:e]=f[t])}if(this.enabled){var r,a,l=e.cache,h=this.corner.clone(),c=s.adjusted,d=e.options.position.adjust.method.split(" "),u=d[0],p=d[1]||d[0],f={left:S,top:S,x:0,y:0},g={};this.corner.fixed!==I&&(n(u,A,z,W,R),n(p,z,A,D,P),(h.string()!==l.corner.string()||l.cornerTop!==c.top||l.cornerLeft!==c.left)&&this.update(h,S)),(r=this.calculate(h)).right!==i&&(r.left=-r.right),r.bottom!==i&&(r.top=-r.bottom),r.user=this.offset,(f.left=u===H&&!!c.left)&&o(A,W,R),(f.top=p===H&&!!c.top)&&o(z,D,P),this.element.css(g).toggle(!(f.x&&f.y||h.x===E&&f.y||h.y===E&&f.x)),s.left-=r.left.charAt?r.user:u!==H||f.top||!f.left&&!f.top?r.left+this.border:0,s.top-=r.top.charAt?r.user:p!==H||f.left||!f.left&&!f.top?r.top+this.border:0,l.cornerLeft=c.left,l.cornerTop=c.top,l.corner=h.clone()}},destroy:function(){this.qtip._unbind(this.qtip.tooltip,this._ns),this.qtip.elements.tip&&this.qtip.elements.tip.find("*").remove().end().remove()}}),(ot=N.tip=function(t){return new b(t,t.options.style.tip)}).initialize="render",ot.sanitize=function(t){if(t.style&&"tip"in t.style){var e=t.style.tip;"object"!=typeof e&&(e=t.style.tip={corner:e}),/string|boolean/i.test(typeof e.corner)||(e.corner=I)}},k.tip={"^position.my|style.tip.(corner|mimic|border)$":function(){this.create(),this.qtip.reposition()},"^style.tip.(height|width)$":function(t){this.size=[t.width,t.height],this.update(),this.qtip.reposition()},"^content.title|style.(classes|widget)$":function(){this.update()}},s.extend(I,x.defaults,{style:{tip:{corner:I,mimic:S,width:6,height:6,border:I,offset:0}}}),N.viewport=function(i,s,n,o,r,a,l){function h(t,e,i,n,o,r,a,l,h){var c=s[o],v=b[t],y=w[t],x=i===H,C=v===o?h:v===r?-h:-h/2,j=y===o?l:y===r?-l:-l/2,k=_[o]+m[o]-(p?0:u[o]),T=k-c,I=c+h-(a===q?f:g)-k,S=C-(b.precedance===t||v===b[e]?j:0)-(y===E?l/2:0);return x?(S=(v===o?1:-1)*C,s[o]+=T>0?T:I>0?-I:0,s[o]=Math.max(-u[o]+m[o],c-S,Math.min(Math.max(-u[o]+m[o]+(a===q?f:g),c+S),s[o],"center"===v?c-C:1e9))):(n*=i===L?2:0,T>0&&(v!==o||I>0)?(s[o]-=S+n,d.invert(t,o)):I>0&&(v!==r||T>0)&&(s[o]-=(v===E?-S:S)+n,d.invert(t,r)),s[o]<_&&-s[o]>I&&(s[o]=c,d=b.clone())),s[o]-c}var c,d,u,p,f,g,_,m,v=n.target,y=i.elements.tooltip,b=n.my,w=n.at,x=n.adjust,C=x.method.split(" "),j=C[0],k=C[1]||C[0],T=n.viewport,I=n.container,O=(i.cache,{left:0,top:0});return T.jquery&&v[0]!==t&&v[0]!==e.body&&"none"!==x.method?(u=I.offset()||O,p="static"===I.css("position"),c="fixed"===y.css("position"),f=T[0]===t?T.width():T.outerWidth(S),g=T[0]===t?T.height():T.outerHeight(S),_={left:c?0:T.scrollLeft(),top:c?0:T.scrollTop()},m=T.offset()||O,("shift"!==j||"shift"!==k)&&(d=b.clone()),O={left:"none"!==j?h(A,z,j,x.x,W,R,q,o,a):0,top:"none"!==k?h(z,A,k,x.y,D,P,M,r,l):0,my:d}):O},N.polys={polygon:function(t,e){var i,s,n,o={width:0,height:0,position:{top:1e10,right:0,bottom:0,left:1e10},adjustable:S},r=0,a=[],l=1,h=1,c=0,d=0;for(r=t.length;r--;)(i=[parseInt(t[--r],10),parseInt(t[r+1],10)])[0]>o.position.right&&(o.position.right=i[0]),i[0]<o.position.left&&(o.position.left=i[0]),i[1]>o.position.bottom&&(o.position.bottom=i[1]),i[1]<o.position.top&&(o.position.top=i[1]),a.push(i);if(s=o.width=Math.abs(o.position.right-o.position.left),n=o.height=Math.abs(o.position.bottom-o.position.top),"c"===e.abbrev())o.position={left:o.position.left+o.width/2,top:o.position.top+o.height/2};else{for(;s>0&&n>0&&l>0&&h>0;)for(s=Math.floor(s/2),n=Math.floor(n/2),e.x===W?l=s:e.x===R?l=o.width-s:l+=Math.floor(s/2),e.y===D?h=n:e.y===P?h=o.height-n:h+=Math.floor(n/2),r=a.length;r--&&!(a.length<2);)c=a[r][0]-o.position.left,d=a[r][1]-o.position.top,(e.x===W&&c>=l||e.x===R&&l>=c||e.x===E&&(l>c||c>o.width-l)||e.y===D&&d>=h||e.y===P&&h>=d||e.y===E&&(h>d||d>o.height-h))&&a.splice(r,1);o.position={left:a[0][0],top:a[0][1]}}return o},rect:function(t,e,i,s){return{width:Math.abs(i-t),height:Math.abs(s-e),position:{left:Math.min(t,i),top:Math.min(e,s)}}},_angles:{tc:1.5,tr:7/4,tl:5/4,bc:.5,br:.25,bl:.75,rc:2,lc:1,c:0},ellipse:function(t,e,i,s,n){var o=N.polys._angles[n.abbrev()],r=0===o?0:i*Math.cos(o*Math.PI),a=s*Math.sin(o*Math.PI);return{width:2*i-Math.abs(r),height:2*s-Math.abs(a),position:{left:t+r,top:e+a},adjustable:S}},circle:function(t,e,i,s){return N.polys.ellipse(t,e,i,i,s)}},N.svg=function(t,i,n){for(var o,r,a,l,h,c,d,u,p,f=(s(e),i[0]),g=s(f.ownerSVGElement),_=f.ownerDocument,m=(parseInt(i.css("stroke-width"),10)||0)/2;!f.getBBox;)f=f.parentNode;if(!f.getBBox||!f.parentNode)return S;switch(f.nodeName){case"ellipse":case"circle":u=N.polys.ellipse(f.cx.baseVal.value,f.cy.baseVal.value,(f.rx||f.r).baseVal.value+m,(f.ry||f.r).baseVal.value+m,n);break;case"line":case"polygon":case"polyline":for(u=[],c=-1,l=(d=f.points||[{x:f.x1.baseVal.value,y:f.y1.baseVal.value},{x:f.x2.baseVal.value,y:f.y2.baseVal.value}]).numberOfItems||d.length;++c<l;)h=d.getItem?d.getItem(c):d[c],u.push.apply(u,[h.x,h.y]);u=N.polys.polygon(u,n);break;default:u={width:(u=f.getBBox()).width,height:u.height,position:{left:u.x,top:u.y}}}return p=u.position,(g=g[0]).createSVGPoint&&(r=f.getScreenCTM(),(d=g.createSVGPoint()).x=p.left,d.y=p.top,a=d.matrixTransform(r),p.left=a.x,p.top=a.y),_!==e&&"mouse"!==t.position.target&&((o=s((_.defaultView||_.parentWindow).frameElement).offset())&&(p.left+=o.left,p.top+=o.top)),_=s(_),p.left+=_.scrollLeft(),p.top+=_.scrollTop(),u};var vt,yt,bt="qtip-modal",wt="."+bt;yt=new(yt=function(){function t(t){l.length<1&&t.length?t.not("body").blur():l.first().focus()}function i(e){if(r.is(":visible")){var i=s(e.target),o=n.tooltip,a=i.closest(U);(a.length<1?S:parseInt(a[0].style.zIndex,10)>parseInt(o[0].style.zIndex,10))||i.closest(U)[0]===o[0]||t(i),e.target===l[l.length-1]}}var n,o,r,a=this,l={};s.extend(a,{init:function(){return r=a.elem=s("<div />",{id:"qtip-overlay",html:"<div></div>",mousedown:function(){return S}}).hide(),s(e.body).bind("focusin"+wt,i),s(e).bind("keydown"+wt,function(t){n&&n.options.show.modal.escape&&27===t.keyCode&&n.hide(t)}),r.bind("click"+wt,function(t){n&&n.options.show.modal.blur&&n.hide(t)}),a},update:function(t){n=t,l=t.options.show.modal.stealfocus!==S?t.tooltip.find("*").filter(function(){return function(t){if(s.expr[":"].focusable)return s.expr[":"].focusable;var e,i,n,o=!isNaN(s.attr(t,"tabindex")),r=t.nodeName&&t.nodeName.toLowerCase();return"area"===r?(i=(e=t.parentNode).name,!(!t.href||!i||"map"!==e.nodeName.toLowerCase())&&!!(n=s("img[usemap=#"+i+"]")[0])&&n.is(":visible")):/input|select|textarea|button|object/.test(r)?!t.disabled:"a"===r&&t.href||o}(this)}):[]},toggle:function(i,l,h){var c=(s(e.body),i.tooltip),d=i.options.show.modal,u=d.effect,p=l?"show":"hide",f=r.is(":visible"),g=s(wt).filter(":visible:not(:animated)").not(c);return a.update(i),l&&d.stealfocus!==S&&t(s(":focus")),r.toggleClass("blurs",d.blur),l&&r.appendTo(e.body),r.is(":animated")&&f===l&&o!==S||!l&&g.length?a:(r.stop(I,S),s.isFunction(u)?u.call(r,l):u===S?r[p]():r.fadeTo(parseInt(h,10)||90,l?1:0,function(){l||r.hide()}),l||r.queue(function(t){r.css({left:"",top:""}),s(wt).length||r.detach(),t()}),o=l,n.destroyed&&(n=O),a)}}),a.init()}),s.extend(w.prototype,{init:function(t){var e=t.tooltip;return this.options.on?(t.elements.overlay=yt.elem,e.addClass(bt).css("z-index",x.modal_zindex+s(wt).length),t._bind(e,["tooltipshow","tooltiphide"],function(t,i,n){var o=t.originalEvent;if(t.target===e[0])if(o&&"tooltiphide"===t.type&&/mouse(leave|enter)/.test(o.type)&&s(o.relatedTarget).closest(yt.elem[0]).length)try{t.preventDefault()}catch(t){}else(!o||o&&"tooltipsolo"!==o.type)&&this.toggle(t,"tooltipshow"===t.type,n)},this._ns,this),t._bind(e,"tooltipfocus",function(t,i){if(!t.isDefaultPrevented()&&t.target===e[0]){var n=s(wt),o=x.modal_zindex+n.length,r=parseInt(e[0].style.zIndex,10);yt.elem[0].style.zIndex=o-1,n.each(function(){this.style.zIndex>r&&(this.style.zIndex-=1)}),n.filter("."+J).qtip("blur",t.originalEvent),e.addClass(J)[0].style.zIndex=o,yt.update(i);try{t.preventDefault()}catch(t){}}},this._ns,this),void t._bind(e,"tooltiphide",function(t){t.target===e[0]&&s(wt).filter(":visible").not(e).last().qtip("focus",t)},this._ns,this)):this},toggle:function(t,e,i){return t&&t.isDefaultPrevented()?this:void yt.toggle(this.qtip,!!e,i)},destroy:function(){this.qtip.tooltip.removeClass(bt),this.qtip._unbind(this.qtip.tooltip,this._ns),yt.toggle(this.qtip,S),delete this.qtip.elements.overlay}}),(vt=N.modal=function(t){return new w(t,t.options.show.modal)}).sanitize=function(t){t.show&&("object"!=typeof t.show.modal?t.show.modal={on:!!t.show.modal}:void 0===t.show.modal.on&&(t.show.modal.on=I))},x.modal_zindex=x.zindex-200,vt.initialize="render",k.modal={"^show.modal.(on|blur)$":function(){this.destroy(),this.init(),this.qtip.elems.overlay.toggle(this.qtip.tooltip[0].offsetWidth>0)}},s.extend(I,x.defaults,{show:{modal:{on:S,effect:I,blur:I,stealfocus:I,escape:I}}})})}(window,document),function(t,e){"object"==typeof exports?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Spinner=e()}(this,function(){"use strict";function t(t,e){var i,s=document.createElement(t||"div");for(i in e)s[i]=e[i];return s}function e(t){for(var e=1,i=arguments.length;i>e;e++)t.appendChild(arguments[e]);return t}function i(t,e,i,s){var n=["opacity",e,~~(100*t),i,s].join("-"),o=.01+i/s*100,r=Math.max(1-(1-t)/e*(100-o),t),a=l.substring(0,l.indexOf("Animation")).toLowerCase(),h=a&&"-"+a+"-"||"";return c[n]||(d.insertRule("@"+h+"keyframes "+n+"{0%{opacity:"+r+"}"+o+"%{opacity:"+t+"}"+(o+.01)+"%{opacity:1}"+(o+e)%100+"%{opacity:"+t+"}100%{opacity:"+r+"}}",d.cssRules.length),c[n]=1),n}function s(t,e){var i,s,n=t.style;for(e=e.charAt(0).toUpperCase()+e.slice(1),s=0;s<h.length;s++)if(void 0!==n[i=h[s]+e])return i;return void 0!==n[e]?e:void 0}function n(t,e){for(var i in e)t.style[s(t,i)||i]=e[i];return t}function o(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var s in i)void 0===t[s]&&(t[s]=i[s])}return t}function r(t,e){return"string"==typeof t?t:t[e%t.length]}function a(t){this.opts=o(t||{},a.defaults,u)}var l,h=["webkit","Moz","ms","O"],c={},d=function(){var i=t("style",{type:"text/css"});return e(document.getElementsByTagName("head")[0],i),i.sheet||i.styleSheet}(),u={lines:12,length:7,width:5,radius:10,rotate:0,corners:1,color:"#000",direction:1,speed:1,trail:100,opacity:.25,fps:20,zIndex:2e9,className:"spinner",top:"50%",left:"50%",position:"absolute"};a.defaults={},o(a.prototype,{spin:function(e){this.stop();var i=this,s=i.opts,o=i.el=n(t(0,{className:s.className}),{position:s.position,width:0,zIndex:s.zIndex});if(s.radius,s.length,s.width,n(o,{left:s.left,top:s.top}),e&&e.insertBefore(o,e.firstChild||null),o.setAttribute("role","progressbar"),i.lines(o,i.opts),!l){var r,a=0,h=(s.lines-1)*(1-s.direction)/2,c=s.fps,d=c/s.speed,u=(1-s.opacity)/(d*s.trail/100),p=d/s.lines;!function t(){a++;for(var e=0;e<s.lines;e++)r=Math.max(1-(a+(s.lines-e)*p)%d*u,s.opacity),i.opacity(o,e*s.direction+h,r,s);i.timeout=i.el&&setTimeout(t,~~(1e3/c))}()}return i},stop:function(){var t=this.el;return t&&(clearTimeout(this.timeout),t.parentNode&&t.parentNode.removeChild(t),this.el=void 0),this},lines:function(s,o){function a(e,i){return n(t(),{position:"absolute",width:o.length+o.width+"px",height:o.width+"px",background:e,boxShadow:i,transformOrigin:"left",transform:"rotate("+~~(360/o.lines*c+o.rotate)+"deg) translate("+o.radius+"px,0)",borderRadius:(o.corners*o.width>>1)+"px"})}for(var h,c=0,d=(o.lines-1)*(1-o.direction)/2;c<o.lines;c++)h=n(t(),{position:"absolute",top:1+~(o.width/2)+"px",transform:o.hwaccel?"translate3d(0,0,0)":"",opacity:o.opacity,animation:l&&i(o.opacity,o.trail,d+c*o.direction,o.lines)+" "+1/o.speed+"s linear infinite"}),o.shadow&&e(h,n(a("#000","0 0 4px #000"),{top:"2px"})),e(s,e(h,a(r(o.color,c),"0 0 1px rgba(0,0,0,.1)")));return s},opacity:function(t,e,i){e<t.childNodes.length&&(t.childNodes[e].style.opacity=i)}});var p=n(t("group"),{behavior:"url(#default#VML)"});return!s(p,"transform")&&p.adj?function(){function i(e,i){return t("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',i)}d.addRule(".spin-vml","behavior:url(#default#VML)"),a.prototype.lines=function(t,s){function o(){return n(i("group",{coordsize:c+" "+c,coordorigin:-h+" "+-h}),{width:c,height:c})}function a(t,a,l){e(u,e(n(o(),{rotation:360/s.lines*t+"deg",left:~~a}),e(n(i("roundrect",{arcsize:s.corners}),{width:h,height:s.width,left:s.radius,top:-s.width>>1,filter:l}),i("fill",{color:r(s.color,t),opacity:s.opacity}),i("stroke",{opacity:0}))))}var l,h=s.length+s.width,c=2*h,d=2*-(s.width+s.length)+"px",u=n(o(),{position:"absolute",top:d,left:d});if(s.shadow)for(l=1;l<=s.lines;l++)a(l,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(l=1;l<=s.lines;l++)a(l);return e(t,u)},a.prototype.opacity=function(t,e,i,s){var n=t.firstChild;s=s.shadow&&s.lines||0,n&&e+s<n.childNodes.length&&(n=(n=(n=n.childNodes[e+s])&&n.firstChild)&&n.firstChild)&&(n.opacity=i)}}():l=s(p,"animation"),a}),function(t){if("object"==typeof exports)t(require("jquery"),require("spin"));else if("function"==typeof define&&define.amd)define(["jquery","spin"],t);else{if(!window.Spinner)throw new Error("Spin.js not present");t(window.jQuery,window.Spinner)}}(function(t,e){t.fn.spin=function(i,s){return this.each(function(){var n=t(this),o=n.data();o.spinner&&(o.spinner.stop(),delete o.spinner),!1!==i&&(i=t.extend({color:s||n.css("color")},t.fn.spin.presets[i]||i),o.spinner=new e(i).spin(this))})},t.fn.spin.presets={tiny:{lines:8,length:2,width:2,radius:3},small:{lines:8,length:4,width:3,radius:5},large:{lines:10,length:8,width:4,radius:8}}}),jQuery.extend({createUploadIframe:function(t,e){var i="jUploadFrame"+t,s='<iframe id="'+i+'" name="'+i+'" style="position:absolute; top:-9999px; left:-9999px"';return window.ActiveXObject&&("boolean"==typeof e?s+=' src="javascript:false"':"string"==typeof e&&(s+=' src="'+e+'"')),jQuery(s+" />").appendTo(document.body),jQuery("#"+i).get(0)},createUploadForm:function(t,e,i){var s="jUploadForm"+t;if(t="jUploadFile"+t,s=jQuery('<form  action="" method="POST" name="'+s+'" id="'+s+'" enctype="multipart/form-data"></form>'),i)for(var n in i)jQuery('<input type="hidden" name="'+n+'" value="'+i[n]+'" />').appendTo(s);return jQuery('<input type="hidden" name="joomla_dont_redirect" value="yes_this_is_file_upload" />').appendTo(s),e=jQuery("#"+e),i=jQuery(e).clone(),jQuery(e).attr("id",t),jQuery(e).before(i),jQuery(e).appendTo(s),jQuery(s).css("position","absolute"),jQuery(s).css("top","-1200px"),jQuery(s).css("left","-1200px"),jQuery(s).appendTo("body"),s},ajaxFileUpload:function(t){t=jQuery.extend({},jQuery.ajaxSettings,t);var e=(new Date).getTime(),i=jQuery.createUploadForm(e,t.fileElementId,void 0!==t.data&&t.data);jQuery.createUploadIframe(e,t.secureuri);var s="jUploadFrame"+e;e="jUploadForm"+e;t.global&&!jQuery.active++&&jQuery.event.trigger("ajaxStart");var n=!1,o={};t.global&&jQuery.event.trigger("ajaxSend",[o,t]);var r=function(e){var r=document.getElementById(s);try{r.contentWindow?(o.responseText=r.contentWindow.document.body?r.contentWindow.document.body.innerHTML:null,o.responseXML=r.contentWindow.document.XMLDocument?r.contentWindow.document.XMLDocument:r.contentWindow.document):r.contentDocument&&(o.responseText=r.contentDocument.document.body?r.contentDocument.document.body.innerHTML:null,o.responseXML=r.contentDocument.document.XMLDocument?r.contentDocument.document.XMLDocument:r.contentDocument.document)}catch(e){jQuery.handleError(t,o,null,e)}if(o||"timeout"==e){var a;n=!0;try{if("error"!=(a="timeout"!=e?"success":"error")){var l=jQuery.uploadHttpData(o,t.dataType);t.success&&t.success(l,a),t.global&&jQuery.event.trigger("ajaxSuccess",[o,t])}else jQuery.handleError(t,o,a)}catch(e){a="error",jQuery.handleError(t,o,a,e)}t.global&&jQuery.event.trigger("ajaxComplete",[o,t]),t.global&&!--jQuery.active&&jQuery.event.trigger("ajaxStop"),t.complete&&t.complete(o,a),jQuery(r).unbind(),setTimeout(function(){try{jQuery(r).remove(),jQuery(i).remove()}catch(e){jQuery.handleError(t,o,null,e)}},100),o=null}};0<t.timeout&&setTimeout(function(){n||r("timeout")},t.timeout);try{i=jQuery("#"+e),jQuery(i).attr("action",t.url),jQuery(i).attr("method","POST"),jQuery(i).attr("target",s),i.encoding?jQuery(i).attr("encoding","multipart/form-data"):jQuery(i).attr("enctype","multipart/form-data"),jQuery(i).submit()}catch(e){jQuery.handleError(t,o,null,e)}return jQuery("#"+s).load(r),{abort:function(){}}},uploadHttpData:function(a,b){var c;return c="xml"!=b&&b?a.responseText:a.responseXML,"script"==b&&jQuery.globalEval(c),"json"==b&&eval("data="+c),"html"==b&&jQuery("<div>").html(c).evalScripts(),c}}),function(t,e){"use strict";function i(i,s,o,a,l){function h(){C=t.devicePixelRatio>1,o=c(o),s.delay>=0&&setTimeout(function(){d(!0)},s.delay),(s.delay<0||s.combined)&&(a.e=function(t,e){var n,o=0;return function(r,a){function l(){o=+new Date,e.call(i,r)}var h=+new Date-o;n&&clearTimeout(n),h>t||!s.enableThrottle||a?l():n=setTimeout(l,t-h)}}(s.throttle,function(t){"resize"===t.type&&(w=x=-1),d(t.all)}),a.a=function(t){t=c(t),o.push.apply(o,t)},a.g=function(){return o=n(o).filter(function(){return!n(this).data(s.loadedName)})},a.f=function(t){for(var e=0;e<t.length;e++){var i=o.filter(function(){return this===t[e]});i.length&&d(!1,i)}},d(),n(s.appendScroll).on("scroll."+l+" resize."+l,a.e))}function c(t){for(var o=s.defaultImage,r=s.placeholder,a=s.imageBase,l=s.srcsetAttribute,h=s.loaderAttribute,c=s._f||{},d=0,u=(t=n(t).filter(function(){var t=n(this),i=_(this);return!t.data(s.handledName)&&(t.attr(s.attribute)||t.attr(l)||t.attr(h)||c[i]!==e)}).data("plugin_"+s.name,i)).length;d<u;d++){var p=n(t[d]),f=_(t[d]),g=p.attr(s.imageBaseAttribute)||a;f===I&&g&&p.attr(l)&&p.attr(l,m(p.attr(l),g)),c[f]===e||p.attr(h)||p.attr(h,c[f]),f===I&&o&&!p.attr(S)?p.attr(S,o):f===I||!r||p.css(z)&&"none"!==p.css(z)||p.css(z,"url('"+r+"')")}return t}function d(t,e){if(o.length){for(var r=e||o,a=!1,l=s.imageBase||"",h=s.srcsetAttribute,c=s.handledName,d=0;d<r.length;d++)if(t||e||p(r[d])){var f=n(r[d]),g=_(r[d]),m=f.attr(s.attribute),v=f.attr(s.imageBaseAttribute)||l,y=f.attr(s.loaderAttribute);f.data(c)||s.visibleOnly&&!f.is(":visible")||!((m||f.attr(h))&&(g===I&&(v+m!==f.attr(S)||f.attr(h)!==f.attr(O))||g!==I&&v+m!==f.css(z))||y)||(a=!0,f.data(c,!0),u(f,g,v,y))}a&&(o=n(o).filter(function(){return!n(this).data(c)}))}else s.autoDestroy&&i.destroy()}function u(t,e,i,o){++b;var r=function(){y("onError",t),v(),r=n.noop};y("beforeLoad",t);var a=s.attribute,l=s.srcsetAttribute,h=s.sizesAttribute,c=s.retinaAttribute,d=s.removeAttribute,u=s.loadedName,p=t.attr(c);if(o){var f=function(){d&&t.removeAttr(s.loaderAttribute),t.data(u,!0),y(j,t),setTimeout(v,1),f=n.noop};t.off(T).one(T,r).one(k,f),y(o,t,function(e){e?(t.off(k),f()):(t.off(T),r())})||t.trigger(T)}else{var g=n(new Image);g.one(T,r).one(k,function(){t.hide(),e===I?t.attr(A,g.attr(A)).attr(O,g.attr(O)).attr(S,g.attr(S)):t.css(z,"url('"+g.attr(S)+"')"),t[s.effect](s.effectTime),d&&(t.removeAttr(a+" "+l+" "+c+" "+s.imageBaseAttribute),h!==A&&t.removeAttr(h)),t.data(u,!0),y(j,t),g.remove(),v()});var _=(C&&p?p:t.attr(a))||"";g.attr(A,t.attr(h)).attr(O,t.attr(l)).attr(S,_?i+_:null),g.complete&&g.trigger(k)}}function p(t){var e=t.getBoundingClientRect(),i=s.scrollDirection,n=s.threshold,o=g()+n>e.top&&-n<e.bottom,r=f()+n>e.left&&-n<e.right;return"vertical"===i?o:"horizontal"===i?r:o&&r}function f(){return w>=0?w:w=n(t).width()}function g(){return x>=0?x:x=n(t).height()}function _(t){return t.tagName.toLowerCase()}function m(t,e){if(e){var i=t.split(",");t="";for(var s=0,n=i.length;s<n;s++)t+=e+i[s].trim()+(s!==n-1?",":"")}return t}function v(){--b,o.length||b||y("onFinishedAll")}function y(t,e,n){return!!(t=s[t])&&(t.apply(i,[].slice.call(arguments,1)),!0)}var b=0,w=-1,x=-1,C=!1,j="afterLoad",k="load",T="error",I="img",S="src",O="srcset",A="sizes",z="background-image";"event"===s.bind||r?h():n(t).on(k+"."+l,h)}function s(s,r){var a=this,l=n.extend({},a.config,r),h={},c=l.name+"-"+ ++o;return a.config=function(t,i){return i===e?l[t]:(l[t]=i,a)},a.addItems=function(t){return h.a&&h.a("string"===n.type(t)?n(t):t),a},a.getItems=function(){return h.g?h.g():{}},a.update=function(t){return h.e&&h.e({},!t),a},a.force=function(t){return h.f&&h.f("string"===n.type(t)?n(t):t),a},a.loadAll=function(){return h.e&&h.e({all:!0},!0),a},a.destroy=function(){return n(l.appendScroll).off("."+c,h.e),n(t).off("."+c),h={},e},i(a,l,s,h,c),l.chainable?s:a}var n=t.jQuery||t.Zepto,o=0,r=!1;n.fn.Lazy=n.fn.lazy=function(t){return new s(this,t)},n.Lazy=n.lazy=function(t,i,o){if(n.isFunction(i)&&(o=i,i=[]),n.isFunction(o)){t=n.isArray(t)?t:[t],i=n.isArray(i)?i:[i];for(var r=s.prototype.config,a=r._f||(r._f={}),l=0,h=t.length;l<h;l++)(r[t[l]]===e||n.isFunction(r[t[l]]))&&(r[t[l]]=o);for(var c=0,d=i.length;c<d;c++)a[i[c]]=t[0]}},s.prototype.config={name:"lazy",chainable:!0,autoDestroy:!0,bind:"load",threshold:500,visibleOnly:!1,appendScroll:t,scrollDirection:"both",imageBase:null,defaultImage:"data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==",placeholder:null,delay:-1,combined:!1,attribute:"data-src",srcsetAttribute:"data-srcset",sizesAttribute:"data-sizes",retinaAttribute:"data-retina",loaderAttribute:"data-loader",imageBaseAttribute:"data-imagebase",removeAttribute:!0,handledName:"handled",loadedName:"loaded",effect:"show",effectTime:0,enableThrottle:!0,throttle:250,beforeLoad:e,afterLoad:e,onError:e,onFinishedAll:e},n(t).on("load",function(){r=!0})}(window),function(t){function e(t,e){if(!(t.originalEvent.touches.length>1)){t.preventDefault();var i=t.originalEvent.changedTouches[0],s=document.createEvent("MouseEvents");s.initMouseEvent(e,!0,!0,window,1,i.screenX,i.screenY,i.clientX,i.clientY,!1,!1,!1,!1,0,null),t.target.dispatchEvent(s)}}if(t.support.touch="ontouchend"in document,t.support.touch){var i,s=t.ui.mouse.prototype,n=s._mouseInit,o=s._mouseDestroy;s._touchStart=function(t){!i&&this._mouseCapture(t.originalEvent.changedTouches[0])&&(i=!0,this._touchMoved=!1,e(t,"mouseover"),e(t,"mousemove"),e(t,"mousedown"))},s._touchMove=function(t){i&&(this._touchMoved=!0,e(t,"mousemove"))},s._touchEnd=function(t){i&&(e(t,"mouseup"),e(t,"mouseout"),this._touchMoved||e(t,"click"),i=!1)},s._mouseInit=function(){var e=this;e.element.bind({touchstart:t.proxy(e,"_touchStart"),touchmove:t.proxy(e,"_touchMove"),touchend:t.proxy(e,"_touchEnd")}),n.call(e)},s._mouseDestroy=function(){var e=this;e.element.unbind({touchstart:t.proxy(e,"_touchStart"),touchmove:t.proxy(e,"_touchMove"),touchend:t.proxy(e,"_touchEnd")}),o.call(e)}}}(jQuery);