/*! content-views-pro 05-2019 */ /*! Colorbox v1.5.4 (c) 2014 Jack Moore - http://www.jacklmoore.com/colorbox MIT License */ !function(a,b,c){function d(c,d,e){var f=b.createElement(c);return d&&(f.id=_+d),e&&(f.style.cssText=e),a(f)}function e(){return c.innerHeight?c.innerHeight:a(c).height()}function f(b,c){c!==Object(c)&&(c={}),this.cache={},this.el=b,this.value=function(b){var d;return void 0===this.cache[b]&&(d=a(this.el).attr("data-cvpbox-"+b),void 0!==d?this.cache[b]=d:void 0!==c[b]?this.cache[b]=c[b]:void 0!==Z[b]&&(this.cache[b]=Z[b])),this.cache[b]},this.get=function(b){var c=this.value(b);return a.isFunction(c)?c.call(this.el,this):c}}function g(a){var b=A.length,c=(R+a)%b;return 0>c?b+c:c}function h(a,b){return Math.round((/%/.test(a)?("x"===b?B.width():e())/100:1)*parseInt(a,10))}function i(a,b){return a.get("photo")||a.get("photoRegex").test(b)}function j(a,b){return a.get("retinaUrl")&&c.devicePixelRatio>1?b.replace(a.get("photoRegex"),a.get("retinaSuffix")):b}function k(a){"contains"in t[0]&&!t[0].contains(a.target)&&a.target!==s[0]&&(a.stopPropagation(),t.focus())}function l(a){l.str!==a&&(t.add(s).removeClass(l.str).addClass(a),l.str=a)}function m(){R=0,rel&&"nofollow"!==rel?(A=a("."+ab).filter(function(){var b=a.data(this,$),c=new f(this,b);return c.get("rel")===rel}),R=A.index(M.el),-1===R&&(A=A.add(M.el),R=A.length-1)):A=a(M.el)}function n(c){a(b).trigger(c),hb.triggerHandler(c)}function o(c){var e;V||(e=a(c).data("cvpcolorbox"),M=new f(c,e),rel=M.get("rel"),m(),T||(T=U=!0,l(M.get("className")),t.css({visibility:"hidden",display:"block"}),C=d(ib,"LoadedContent","width:0; height:0; overflow:hidden; visibility:hidden"),v.css({width:"",height:""}).append(C),N=w.height()+z.height()+v.outerHeight(!0)-v.height(),O=x.width()+y.width()+v.outerWidth(!0)-v.width(),P=C.outerHeight(!0),Q=C.outerWidth(!0),M.w=h(M.get("initialWidth"),"x"),M.h=h(M.get("initialHeight"),"y"),C.css({width:"",height:M.h}),X.position(),n(bb),M.get("onOpen"),L.add(F).hide(),t.focus(),M.get("trapFocus")&&b.addEventListener&&(b.addEventListener("focus",k,!0),hb.one(fb,function(){b.removeEventListener("focus",k,!0)})),M.get("returnFocus")&&hb.one(fb,function(){a(M.el).focus()})),s.css({opacity:parseFloat(M.get("opacity")),cursor:M.get("overlayClose")?"pointer":"auto",visibility:"visible"}).show(),M.get("closeButton")?K.html(M.get("close")).appendTo(v):K.appendTo("
"),r())}function p(){!t&&b.body&&(Y=!1,B=a(c),t=d(ib).attr({id:$,"class":a.support.opacity===!1?_+"IE":"",role:"dialog",tabindex:"-1"}).hide(),s=d(ib,"Overlay").hide(),E=a([d(ib,"LoadingOverlay")[0],d(ib,"LoadingGraphic")[0]]),u=d(ib,"Wrapper"),v=d(ib,"Content").append(F=d(ib,"Title"),G=d(ib,"Current"),J=a('").addClass(this._triggerClass).html(f?a("").attr({src:f,alt:e,title:e}):e)),b[h?"before":"after"](c.trigger),c.trigger.on("click",function(){return a.cvp_datepicker._datepickerShowing&&a.cvp_datepicker._lastInput===b[0]?a.cvp_datepicker._hideDatepicker():a.cvp_datepicker._datepickerShowing&&a.cvp_datepicker._lastInput!==b[0]?(a.cvp_datepicker._hideDatepicker(),a.cvp_datepicker._showDatepicker(b[0])):a.cvp_datepicker._showDatepicker(b[0]),!1}))},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var b,c,d,e,f=new Date(2009,11,20),g=this._get(a,"dateFormat");g.match(/[DM]/)&&(b=function(a){for(c=0,d=0,e=0;ec&&(c=a[e].length,d=e);return d},f.setMonth(b(this._get(a,g.match(/MM/)?"monthNames":"monthNamesShort"))),f.setDate(b(this._get(a,g.match(/DD/)?"dayNames":"dayNamesShort"))+20-f.getDay())),a.input.attr("size",this._formatDate(a,f).length)}},_inlineDatepicker:function(b,c){var d=a(b);d.hasClass(this.markerClassName)||(d.addClass(this.markerClassName).append(c.dpDiv),a.data(b,"datepicker",c),this._setDate(c,this._getDefaultDate(c),!0),this._updateDatepicker(c),this._updateAlternate(c),c.settings.disabled&&this._disableDatepicker(b),c.dpDiv.css("display","block"))},_dialogDatepicker:function(b,c,d,e,g){var h,i,j,k,l,m=this._dialogInst;return m||(this.uuid+=1,h="dp"+this.uuid,this._dialogInput=a(""),this._dialogInput.on("keydown",this._doKeyDown),a("body").append(this._dialogInput),m=this._dialogInst=this._newInst(this._dialogInput,!1),m.settings={},a.data(this._dialogInput[0],"datepicker",m)),f(m.settings,e||{}),c=c&&c.constructor===Date?this._formatDate(m,c):c,this._dialogInput.val(c),this._pos=g?g.length?g:[g.pageX,g.pageY]:null,this._pos||(i=document.documentElement.clientWidth,j=document.documentElement.clientHeight,k=document.documentElement.scrollLeft||document.body.scrollLeft,l=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[i/2-100+k,j/2-150+l]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),m.settings.onSelect=d,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),a.blockUI&&a.blockUI(this.dpDiv),a.data(this._dialogInput[0],"datepicker",m),this},_destroyDatepicker:function(b){var c,d=a(b),e=a.data(b,"datepicker");d.hasClass(this.markerClassName)&&(c=b.nodeName.toLowerCase(),a.removeData(b,"datepicker"),"input"===c?(e.append.remove(),e.trigger.remove(),d.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):("div"===c||"span"===c)&&d.removeClass(this.markerClassName).empty(),g===e&&(g=null))},_enableDatepicker:function(b){var c,d,e=a(b),f=a.data(b,"datepicker");e.hasClass(this.markerClassName)&&(c=b.nodeName.toLowerCase(),"input"===c?(b.disabled=!1,f.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===c||"span"===c)&&(d=e.children("."+this._inlineClass),d.children().removeClass("jqui-state-disabled"),d.find("select.jqui-datepicker-month, select.jqui-datepicker-year").prop("disabled",!1)),this._disabledInputs=a.map(this._disabledInputs,function(a){return a===b?null:a}))},_disableDatepicker:function(b){var c,d,e=a(b),f=a.data(b,"datepicker");e.hasClass(this.markerClassName)&&(c=b.nodeName.toLowerCase(),"input"===c?(b.disabled=!0,f.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===c||"span"===c)&&(d=e.children("."+this._inlineClass),d.children().addClass("jqui-state-disabled"),d.find("select.jqui-datepicker-month, select.jqui-datepicker-year").prop("disabled",!0)),this._disabledInputs=a.map(this._disabledInputs,function(a){return a===b?null:a}),this._disabledInputs[this._disabledInputs.length]=b)},_isDisabledDatepicker:function(a){if(!a)return!1;for(var b=0;bd||!c||c.indexOf(d)>-1):void 0},_doKeyUp:function(b){var c,d=a.cvp_datepicker._getInst(b.target);if(d.input.val()!==d.lastVal)try{c=a.cvp_datepicker.parseDate(a.cvp_datepicker._get(d,"dateFormat"),d.input?d.input.val():null,a.cvp_datepicker._getFormatConfig(d)),c&&(a.cvp_datepicker._setDateFromField(d),a.cvp_datepicker._updateAlternate(d),a.cvp_datepicker._updateDatepicker(d))}catch(e){}return!0},_showDatepicker:function(c){if(c=c.target||c,"input"!==c.nodeName.toLowerCase()&&(c=a("input",c.parentNode)[0]),!a.cvp_datepicker._isDisabledDatepicker(c)&&a.cvp_datepicker._lastInput!==c){var d,e,g,h,i,j,k;d=a.cvp_datepicker._getInst(c),a.cvp_datepicker._curInst&&a.cvp_datepicker._curInst!==d&&(a.cvp_datepicker._curInst.dpDiv.stop(!0,!0),d&&a.cvp_datepicker._datepickerShowing&&a.cvp_datepicker._hideDatepicker(a.cvp_datepicker._curInst.input[0])),e=a.cvp_datepicker._get(d,"beforeShow"),g=e?e.apply(c,[c,d]):{},g!==!1&&(f(d.settings,g),d.lastVal=null,a.cvp_datepicker._lastInput=c,a.cvp_datepicker._setDateFromField(d),a.cvp_datepicker._inDialog&&(c.value=""),a.cvp_datepicker._pos||(a.cvp_datepicker._pos=a.cvp_datepicker._findPos(c),a.cvp_datepicker._pos[1]+=c.offsetHeight),h=!1,a(c).parents().each(function(){return h|="fixed"===a(this).css("position"),!h}),i={left:a.cvp_datepicker._pos[0],top:a.cvp_datepicker._pos[1]},a.cvp_datepicker._pos=null,d.dpDiv.empty(),d.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),a.cvp_datepicker._updateDatepicker(d),i=a.cvp_datepicker._checkOffset(d,i,h),d.dpDiv.css({position:a.cvp_datepicker._inDialog&&a.blockUI?"static":h?"fixed":"absolute",display:"none",left:i.left+"px",top:i.top+"px"}),d.inline||(j=a.cvp_datepicker._get(d,"showAnim"),k=a.cvp_datepicker._get(d,"duration"),d.dpDiv.css("z-index",b(a(c))+1),a.cvp_datepicker._datepickerShowing=!0,a.effects&&a.effects.effect[j]?d.dpDiv.show(j,a.cvp_datepicker._get(d,"showOptions"),k):d.dpDiv[j||"show"](j?k:null),a.cvp_datepicker._shouldFocusInput(d)&&d.input.trigger("focus"),a.cvp_datepicker._curInst=d))}},_updateDatepicker:function(b){this.maxRows=4,g=b,b.dpDiv.empty().append(this._generateHTML(b)),this._attachHandlers(b);var c,d=this._getNumberOfMonths(b),f=d[1],h=17,i=b.dpDiv.find("."+this._dayOverClass+" a");i.length>0&&e.apply(i.get(0)),b.dpDiv.removeClass("jqui-datepicker-multi-2 jqui-datepicker-multi-3 jqui-datepicker-multi-4").width(""),f>1&&b.dpDiv.addClass("jqui-datepicker-multi-"+f).css("width",h*f+"em"),b.dpDiv[(1!==d[0]||1!==d[1]?"add":"remove")+"Class"]("jqui-datepicker-multi"),b.dpDiv[(this._get(b,"isRTL")?"add":"remove")+"Class"]("jqui-datepicker-rtl"),b===a.cvp_datepicker._curInst&&a.cvp_datepicker._datepickerShowing&&a.cvp_datepicker._shouldFocusInput(b)&&b.input.trigger("focus"),b.yearshtml&&(c=b.yearshtml,setTimeout(function(){c===b.yearshtml&&b.yearshtml&&b.dpDiv.find("select.jqui-datepicker-year:first").replaceWith(b.yearshtml),c=b.yearshtml=null},0))},_shouldFocusInput:function(a){return a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&&!a.input.is(":focus")},_checkOffset:function(b,c,d){var e=b.dpDiv.outerWidth(),f=b.dpDiv.outerHeight(),g=b.input?b.input.outerWidth():0,h=b.input?b.input.outerHeight():0,i=document.documentElement.clientWidth+(d?0:a(document).scrollLeft()),j=document.documentElement.clientHeight+(d?0:a(document).scrollTop());return c.left-=this._get(b,"isRTL")?e-g:0,c.left-=d&&c.left===b.input.offset().left?a(document).scrollLeft():0,c.top-=d&&c.top===b.input.offset().top+h?a(document).scrollTop():0,c.left-=Math.min(c.left,c.left+e>i&&i>e?Math.abs(c.left+e-i):0),c.top-=Math.min(c.top,c.top+f>j&&j>f?Math.abs(f+h):0),c},_findPos:function(b){for(var c,d=this._getInst(b),e=this._get(d,"isRTL");b&&("hidden"===b.type||1!==b.nodeType||a.expr.filters.hidden(b));)b=b[e?"previousSibling":"nextSibling"];return c=a(b).offset(),[c.left,c.top]},_hideDatepicker:function(b){var c,d,e,f,g=this._curInst;!g||b&&g!==a.data(b,"datepicker")||this._datepickerShowing&&(c=this._get(g,"showAnim"),d=this._get(g,"duration"),e=function(){a.cvp_datepicker._tidyDialog(g)},a.effects&&(a.effects.effect[c]||a.effects[c])?g.dpDiv.hide(c,a.cvp_datepicker._get(g,"showOptions"),d,e):g.dpDiv["slideDown"===c?"slideUp":"fadeIn"===c?"fadeOut":"hide"](c?d:null,e),c||e(),this._datepickerShowing=!1,f=this._get(g,"onClose"),f&&f.apply(g.input?g.input[0]:null,[g.input?g.input.val():"",g]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),a.blockUI&&(a.unblockUI(),a("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).off(".jqui-datepicker-calendar")},_checkExternalClick:function(b){if(a.cvp_datepicker._curInst){var c=a(b.target),d=a.cvp_datepicker._getInst(c[0]);(c[0].id!==a.cvp_datepicker._mainDivId&&0===c.parents("#"+a.cvp_datepicker._mainDivId).length&&!c.hasClass(a.cvp_datepicker.markerClassName)&&!c.closest("."+a.cvp_datepicker._triggerClass).length&&a.cvp_datepicker._datepickerShowing&&(!a.cvp_datepicker._inDialog||!a.blockUI)||c.hasClass(a.cvp_datepicker.markerClassName)&&a.cvp_datepicker._curInst!==d)&&a.cvp_datepicker._hideDatepicker()}},_adjustDate:function(b,c,d){var e=a(b),f=this._getInst(e[0]);this._isDisabledDatepicker(e[0])||(this._adjustInstDate(f,c+("M"===d?this._get(f,"showCurrentAtPos"):0),d),this._updateDatepicker(f))},_gotoToday:function(b){var c,d=a(b),e=this._getInst(d[0]);this._get(e,"gotoCurrent")&&e.currentDay?(e.selectedDay=e.currentDay,e.drawMonth=e.selectedMonth=e.currentMonth,e.drawYear=e.selectedYear=e.currentYear):(c=new Date,e.selectedDay=c.getDate(),e.drawMonth=e.selectedMonth=c.getMonth(),e.drawYear=e.selectedYear=c.getFullYear()),this._notifyChange(e),this._adjustDate(d)},_selectMonthYear:function(b,c,d){var e=a(b),f=this._getInst(e[0]);f["selected"+("M"===d?"Month":"Year")]=f["draw"+("M"===d?"Month":"Year")]=parseInt(c.options[c.selectedIndex].value,10),this._notifyChange(f),this._adjustDate(e)},_selectDay:function(b,c,d,e){var f,g=a(b);a(e).hasClass(this._unselectableClass)||this._isDisabledDatepicker(g[0])||(f=this._getInst(g[0]),f.selectedDay=f.currentDay=a("a",e).html(),f.selectedMonth=f.currentMonth=c,f.selectedYear=f.currentYear=d,this._selectDate(b,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear)))},_clearDate:function(b){var c=a(b);this._selectDate(c,"")},_selectDate:function(b,c){var d,e=a(b),f=this._getInst(e[0]);c=null!=c?c:this._formatDate(f),f.input&&f.input.val(c),this._updateAlternate(f),d=this._get(f,"onSelect"),d?d.apply(f.input?f.input[0]:null,[c,f]):f.input&&f.input.trigger("change"),f.inline?this._updateDatepicker(f):(this._hideDatepicker(),this._lastInput=f.input[0],"object"!=typeof f.input[0]&&f.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(b){var c,d,e,f=this._get(b,"altField");f&&(c=this._get(b,"altFormat")||this._get(b,"dateFormat"),d=this._getDate(b),e=this.formatDate(c,d,this._getFormatConfig(b)),a(f).val(e))},noWeekends:function(a){var b=a.getDay();return[b>0&&6>b,""]},iso8601Week:function(a){var b,c=new Date(a.getTime());return c.setDate(c.getDate()+4-(c.getDay()||7)),b=c.getTime(),c.setMonth(0),c.setDate(1),Math.floor(Math.round((b-c)/864e5)/7)+1},parseDate:function(b,c,d){if(null==b||null==c)throw"Invalid arguments";if(c="object"==typeof c?c.toString():c+"",""===c)return null;var e,f,g,h,i=0,j=(d?d.shortYearCutoff:null)||this._defaults.shortYearCutoff,k="string"!=typeof j?j:(new Date).getFullYear()%100+parseInt(j,10),l=(d?d.dayNamesShort:null)||this._defaults.dayNamesShort,m=(d?d.dayNames:null)||this._defaults.dayNames,n=(d?d.monthNamesShort:null)||this._defaults.monthNamesShort,o=(d?d.monthNames:null)||this._defaults.monthNames,p=-1,q=-1,r=-1,s=-1,t=!1,u=function(a){var c=e+1p&&(p+=(new Date).getFullYear()-(new Date).getFullYear()%100+(k>=p?0:-100)),s>-1)for(q=1,r=s;;){if(f=this._getDaysInMonth(p,q-1),f>=r)break;q++,r-=f}if(h=this._daylightSavingAdjust(new Date(p,q-1,r)),h.getFullYear()!==p||h.getMonth()+1!==q||h.getDate()!==r)throw"Invalid date";return h},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(a,b,c){if(!b)return"";var d,e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayNames:null)||this._defaults.dayNames,g=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,h=(c?c.monthNames:null)||this._defaults.monthNames,i=function(b){var c=d+112?a.getHours()+2:0),a):null},_setDate:function(a,b,c){var d=!b,e=a.selectedMonth,f=a.selectedYear,g=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay=a.currentDay=g.getDate(),a.drawMonth=a.selectedMonth=a.currentMonth=g.getMonth(),a.drawYear=a.selectedYear=a.currentYear=g.getFullYear(),e===a.selectedMonth&&f===a.selectedYear||c||this._notifyChange(a),this._adjustInstDate(a),a.input&&a.input.val(d?"":this._formatDate(a))},_getDate:function(a){var b=!a.currentYear||a.input&&""===a.input.val()?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return b},_attachHandlers:function(b){var c=this._get(b,"stepMonths"),d="#"+b.id.replace(/\\\\/g,"\\");b.dpDiv.find("[data-handler]").map(function(){var b={prev:function(){a.cvp_datepicker._adjustDate(d,-c,"M")},next:function(){a.cvp_datepicker._adjustDate(d,+c,"M")},hide:function(){a.cvp_datepicker._hideDatepicker()},today:function(){a.cvp_datepicker._gotoToday(d)},selectDay:function(){return a.cvp_datepicker._selectDay(d,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return a.cvp_datepicker._selectMonthYear(d,this,"M"),!1},selectYear:function(){return a.cvp_datepicker._selectMonthYear(d,this,"Y"),!1}};a(this).on(this.getAttribute("data-event"),b[this.getAttribute("data-handler")])})},_generateHTML:function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O=new Date,P=this._daylightSavingAdjust(new Date(O.getFullYear(),O.getMonth(),O.getDate())),Q=this._get(a,"isRTL"),R=this._get(a,"showButtonPanel"),S=this._get(a,"hideIfNoPrevNext"),T=this._get(a,"navigationAsDateFormat"),U=this._getNumberOfMonths(a),V=this._get(a,"showCurrentAtPos"),W=this._get(a,"stepMonths"),X=1!==U[0]||1!==U[1],Y=this._daylightSavingAdjust(a.currentDay?new Date(a.currentYear,a.currentMonth,a.currentDay):new Date(9999,9,9)),Z=this._getMinMaxDate(a,"min"),$=this._getMinMaxDate(a,"max"),_=a.drawMonth-V,ab=a.drawYear;if(0>_&&(_+=12,ab--),$)for(b=this._daylightSavingAdjust(new Date($.getFullYear(),$.getMonth()-U[0]*U[1]+1,$.getDate())),b=Z&&Z>b?Z:b;this._daylightSavingAdjust(new Date(ab,_,1))>b;)_--,0>_&&(_=11,ab--);for(a.drawMonth=_,a.drawYear=ab,c=this._get(a,"prevText"),c=T?this.formatDate(c,this._daylightSavingAdjust(new Date(ab,_-W,1)),this._getFormatConfig(a)):c,d=this._canAdjustMonth(a,-1,ab,_)?""+c+"":S?"":""+c+"",e=this._get(a,"nextText"),e=T?this.formatDate(e,this._daylightSavingAdjust(new Date(ab,_+W,1)),this._getFormatConfig(a)):e,f=this._canAdjustMonth(a,1,ab,_)?""+e+"":S?"":""+e+"",g=this._get(a,"currentText"),h=this._get(a,"gotoCurrent")&&a.currentDay?Y:P,g=T?this.formatDate(g,h,this._getFormatConfig(a)):g,i=a.inline?"":"",j=R?"
"+(Q?i:"")+(this._isInRange(a,h)?"":"")+(Q?"":i)+"
":"",k=parseInt(this._get(a,"firstDay"),10),k=isNaN(k)?0:k,l=this._get(a,"showWeek"),m=this._get(a,"dayNames"),n=this._get(a,"dayNamesMin"),o=this._get(a,"monthNames"),p=this._get(a,"monthNamesShort"),q=this._get(a,"beforeShowDay"),r=this._get(a,"showOtherMonths"),s=this._get(a,"selectOtherMonths"),t=this._getDefaultDate(a),u="",w=0;w1)switch(y){case 0:B+=" jqui-datepicker-group-first",A=" jqui-corner-"+(Q?"right":"left");break;case U[1]-1:B+=" jqui-datepicker-group-last",A=" jqui-corner-"+(Q?"left":"right");break;default:B+=" jqui-datepicker-group-middle",A=""}B+="'>"}for(B+="
"+(/all|left/.test(A)&&0===w?Q?f:d:"")+(/all|right/.test(A)&&0===w?Q?d:f:"")+this._generateMonthYearHeader(a,_,ab,Z,$,w>0||y>0,o,p)+"
",C=l?"":"",v=0;7>v;v++)D=(v+k)%7,C+="";for(B+=C+"",E=this._getDaysInMonth(ab,_),ab===a.selectedYear&&_===a.selectedMonth&&(a.selectedDay=Math.min(a.selectedDay,E)),F=(this._getFirstDayOfMonth(ab,_)-k+7)%7,G=Math.ceil((F+E)/7),H=X&&this.maxRows>G?this.maxRows:G,this.maxRows=H,I=this._daylightSavingAdjust(new Date(ab,_,1-F)),J=0;H>J;J++){for(B+="",K=l?"":"",v=0;7>v;v++)L=q?q.apply(a.input?a.input[0]:null,[I]):[!0,""],M=I.getMonth()!==_,N=M&&!s||!L[0]||Z&&Z>I||$&&I>$,K+="",I.setDate(I.getDate()+1),I=this._daylightSavingAdjust(I);B+=K+""}_++,_>11&&(_=0,ab++),B+="
"+this._get(a,"weekHeader")+"=5?" class='jqui-datepicker-week-end'":"")+">"+n[D]+"
"+this._get(a,"calculateWeek")(I)+""+(M&&!r?" ":N?""+I.getDate()+"":""+I.getDate()+"")+"
"+(X?"
"+(U[0]>0&&y===U[1]-1?"
":""):""),x+=B}u+=x}return u+=j,a._keyEvent=!1,u},_generateMonthYearHeader:function(a,b,c,d,e,f,g,h){var i,j,k,l,m,n,o,p,q=this._get(a,"changeMonth"),r=this._get(a,"changeYear"),s=this._get(a,"showMonthAfterYear"),t="
",u="";if(f||!q)u+=""+g[b]+"";else{for(i=d&&d.getFullYear()===c,j=e&&e.getFullYear()===c,u+=""}if(s||(t+=u+(!f&&q&&r?"":" ")),!a.yearshtml)if(a.yearshtml="",f||!r)t+=""+c+"";else{for(l=this._get(a,"yearRange").split(":"),m=(new Date).getFullYear(),n=function(a){var b=a.match(/c[+\-].*/)?c+parseInt(a.substring(1),10):a.match(/[+\-].*/)?m+parseInt(a,10):parseInt(a,10);return isNaN(b)?m:b},o=n(l[0]),p=Math.max(o,n(l[1]||"")),o=d?Math.max(o,d.getFullYear()):o,p=e?Math.min(p,e.getFullYear()):p,a.yearshtml+="",t+=a.yearshtml,a.yearshtml=null}return t+=this._get(a,"yearSuffix"),s&&(t+=(!f&&q&&r?"":" ")+u),t+="
"},_adjustInstDate:function(a,b,c){var d=a.selectedYear+("Y"===c?b:0),e=a.selectedMonth+("M"===c?b:0),f=Math.min(a.selectedDay,this._getDaysInMonth(d,e))+("D"===c?b:0),g=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(d,e,f)));a.selectedDay=g.getDate(),a.drawMonth=a.selectedMonth=g.getMonth(),a.drawYear=a.selectedYear=g.getFullYear(),("M"===c||"Y"===c)&&this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min"),d=this._getMinMaxDate(a,"max"),e=c&&c>b?c:b;return d&&e>d?d:e},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");b&&b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){var b=this._get(a,"numberOfMonths");return null==b?[1,1]:"number"==typeof b?[1,b]:b},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return new Date(a,b,1).getDay()},_canAdjustMonth:function(a,b,c,d){var e=this._getNumberOfMonths(a),f=this._daylightSavingAdjust(new Date(c,d+(0>b?b:e[0]*e[1]),1));return 0>b&&f.setDate(this._getDaysInMonth(f.getFullYear(),f.getMonth())),this._isInRange(a,f)},_isInRange:function(a,b){var c,d,e=this._getMinMaxDate(a,"min"),f=this._getMinMaxDate(a,"max"),g=null,h=null,i=this._get(a,"yearRange");return i&&(c=i.split(":"),d=(new Date).getFullYear(),g=parseInt(c[0],10),h=parseInt(c[1],10),c[0].match(/[+\-].*/)&&(g+=d),c[1].match(/[+\-].*/)&&(h+=d)),(!e||b.getTime()>=e.getTime())&&(!f||b.getTime()<=f.getTime())&&(!g||b.getFullYear()>=g)&&(!h||b.getFullYear()<=h) },_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");return b="string"!=typeof b?b:(new Date).getFullYear()%100+parseInt(b,10),{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,d){b||(a.currentDay=a.selectedDay,a.currentMonth=a.selectedMonth,a.currentYear=a.selectedYear);var e=b?"object"==typeof b?b:this._daylightSavingAdjust(new Date(d,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),e,this._getFormatConfig(a))}}),a.fn.cvp_datepicker=function(b){if(!this.length)return this;a.cvp_datepicker.initialized||(a(document).on("mousedown",a.cvp_datepicker._checkExternalClick),a.cvp_datepicker.initialized=!0),0===a("#"+a.cvp_datepicker._mainDivId).length&&a("body").append(a.cvp_datepicker.dpDiv);var c=Array.prototype.slice.call(arguments,1);return"string"!=typeof b||"isDisabled"!==b&&"getDate"!==b&&"widget"!==b?"option"===b&&2===arguments.length&&"string"==typeof arguments[1]?a.cvp_datepicker["_"+b+"Datepicker"].apply(a.cvp_datepicker,[this[0]].concat(c)):this.each(function(){"string"==typeof b?a.cvp_datepicker["_"+b+"Datepicker"].apply(a.cvp_datepicker,[this].concat(c)):a.cvp_datepicker._attachDatepicker(this,b)}):a.cvp_datepicker["_"+b+"Datepicker"].apply(a.cvp_datepicker,[this[0]].concat(c))},a.cvp_datepicker=new c,a.cvp_datepicker.initialized=!1,a.cvp_datepicker.uuid=(new Date).getTime(),a.cvp_datepicker.version="1.12.1";a.cvp_datepicker}),/*! * imagesLoaded v3.1.8 * MIT License */ function(){function a(){}function b(a,b){for(var c=a.length;c--;)if(a[c].listener===b)return c;return-1}function c(a){return function(){return this[a].apply(this,arguments)}}var d=a.prototype,e=this,f=e.EventEmitter;d.getListeners=function(a){var b,c,d=this._getEvents();if("object"==typeof a){b={};for(c in d)d.hasOwnProperty(c)&&a.test(c)&&(b[c]=d[c])}else b=d[a]||(d[a]=[]);return b},d.flattenListeners=function(a){var b,c=[];for(b=0;a.length>b;b+=1)c.push(a[b].listener);return c},d.getListenersAsObject=function(a){var b,c=this.getListeners(a);return c instanceof Array&&(b={},b[a]=c),b||c},d.addListener=function(a,c){var d,e=this.getListenersAsObject(a),f="object"==typeof c;for(d in e)e.hasOwnProperty(d)&&-1===b(e[d],c)&&e[d].push(f?c:{listener:c,once:!1});return this},d.on=c("addListener"),d.addOnceListener=function(a,b){return this.addListener(a,{listener:b,once:!0})},d.once=c("addOnceListener"),d.defineEvent=function(a){return this.getListeners(a),this},d.defineEvents=function(a){for(var b=0;a.length>b;b+=1)this.defineEvent(a[b]);return this},d.removeListener=function(a,c){var d,e,f=this.getListenersAsObject(a);for(e in f)f.hasOwnProperty(e)&&(d=b(f[e],c),-1!==d&&f[e].splice(d,1));return this},d.off=c("removeListener"),d.addListeners=function(a,b){return this.manipulateListeners(!1,a,b)},d.removeListeners=function(a,b){return this.manipulateListeners(!0,a,b)},d.manipulateListeners=function(a,b,c){var d,e,f=a?this.removeListener:this.addListener,g=a?this.removeListeners:this.addListeners;if("object"!=typeof b||b instanceof RegExp)for(d=c.length;d--;)f.call(this,b,c[d]);else for(d in b)b.hasOwnProperty(d)&&(e=b[d])&&("function"==typeof e?f.call(this,d,e):g.call(this,d,e));return this},d.removeEvent=function(a){var b,c=typeof a,d=this._getEvents();if("string"===c)delete d[a];else if("object"===c)for(b in d)d.hasOwnProperty(b)&&a.test(b)&&delete d[b];else delete this._events;return this},d.removeAllListeners=c("removeEvent"),d.emitEvent=function(a,b){var c,d,e,f,g=this.getListenersAsObject(a);for(e in g)if(g.hasOwnProperty(e))for(d=g[e].length;d--;)c=g[e][d],c.once===!0&&this.removeListener(a,c.listener),f=c.listener.apply(this,b||[]),f===this._getOnceReturnValue()&&this.removeListener(a,c.listener);return this},d.trigger=c("emitEvent"),d.emit=function(a){var b=Array.prototype.slice.call(arguments,1);return this.emitEvent(a,b)},d.setOnceReturnValue=function(a){return this._onceReturnValue=a,this},d._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},d._getEvents=function(){return this._events||(this._events={})},a.noConflict=function(){return e.EventEmitter=f,a},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return a}):"object"==typeof module&&module.exports?module.exports=a:this.EventEmitter=a}.call(this),function(a){function b(b){var c=a.event;return c.target=c.target||c.srcElement||b,c}var c=document.documentElement,d=function(){};c.addEventListener?d=function(a,b,c){a.addEventListener(b,c,!1)}:c.attachEvent&&(d=function(a,c,d){a[c+d]=d.handleEvent?function(){var c=b(a);d.handleEvent.call(d,c)}:function(){var c=b(a);d.call(a,c)},a.attachEvent("on"+c,a[c+d])});var e=function(){};c.removeEventListener?e=function(a,b,c){a.removeEventListener(b,c,!1)}:c.detachEvent&&(e=function(a,b,c){a.detachEvent("on"+b,a[b+c]);try{delete a[b+c]}catch(d){a[b+c]=void 0}});var f={bind:d,unbind:e};"function"==typeof define&&define.amd?define("eventie/eventie",f):a.eventie=f}(this),function(a,b){"function"==typeof define&&define.amd?define(["eventEmitter/EventEmitter","eventie/eventie"],function(c,d){return b(a,c,d)}):"object"==typeof exports?module.exports=b(a,require("wolfy87-eventemitter"),require("eventie")):a.cvp_imagesLoaded=b(a,a.EventEmitter,a.eventie)}(window,function(a,b,c){function d(a,b){for(var c in b)a[c]=b[c];return a}function e(a){return"[object Array]"===m.call(a)}function f(a){var b=[];if(e(a))b=a;else if("number"==typeof a.length)for(var c=0,d=a.length;d>c;c++)b.push(a[c]);else b.push(a);return b}function g(a,b,c){if(!(this instanceof g))return new g(a,b);"string"==typeof a&&(a=document.querySelectorAll(a)),this.elements=f(a),this.options=d({},this.options),"function"==typeof b?c=b:d(this.options,b),c&&this.on("always",c),this.getImages(),j&&(this.jqDeferred=new j.Deferred);var e=this;setTimeout(function(){e.check()})}function h(a){this.img=a}function i(a){this.src=a,n[a]=this}var j=a.jQuery,k=a.console,l=void 0!==k,m=Object.prototype.toString;g.prototype=new b,g.prototype.options={},g.prototype.getImages=function(){this.images=[];for(var a=0,b=this.elements.length;b>a;a++){var c=this.elements[a];"IMG"===c.nodeName&&this.addImage(c);var d=c.nodeType;if(d&&(1===d||9===d||11===d))for(var e=c.querySelectorAll("img"),f=0,g=e.length;g>f;f++){var h=e[f];this.addImage(h)}}},g.prototype.addImage=function(a){var b=new h(a);this.images.push(b)},g.prototype.check=function(){function a(a,e){return b.options.debug&&l&&k.log("confirm",a,e),b.progress(a),c++,c===d&&b.complete(),!0}var b=this,c=0,d=this.images.length;if(this.hasAnyBroken=!1,!d)return void this.complete();for(var e=0;d>e;e++){var f=this.images[e];f.on("confirm",a),f.check()}},g.prototype.progress=function(a){this.hasAnyBroken=this.hasAnyBroken||!a.isLoaded;var b=this;setTimeout(function(){b.emit("progress",b,a),b.jqDeferred&&b.jqDeferred.notify&&b.jqDeferred.notify(b,a)})},g.prototype.complete=function(){var a=this.hasAnyBroken?"fail":"done";this.isComplete=!0;var b=this;setTimeout(function(){if(b.emit(a,b),b.emit("always",b),b.jqDeferred){var c=b.hasAnyBroken?"reject":"resolve";b.jqDeferred[c](b)}})},j&&(j.fn.cvp_imagesLoaded=function(a,b){var c=new g(this,a,b);return c.jqDeferred.promise(j(this))}),h.prototype=new b,h.prototype.check=function(){var a=n[this.img.src]||new i(this.img.src);if(a.isConfirmed)return void this.confirm(a.isLoaded,"cached was confirmed");if(this.img.complete&&void 0!==this.img.naturalWidth)return void this.confirm(0!==this.img.naturalWidth,"naturalWidth");var b=this;a.on("confirm",function(a,c){return b.confirm(a.isLoaded,c),!0}),a.check()},h.prototype.confirm=function(a,b){this.isLoaded=a,this.emit("confirm",this,b)};var n={};return i.prototype=new b,i.prototype.check=function(){if(!this.isChecked){var a=new Image;c.bind(a,"load",this),c.bind(a,"error",this),a.src=this.src,this.isChecked=!0}},i.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},i.prototype.onload=function(a){this.confirm(!0,"onload"),this.unbindProxyEvents(a)},i.prototype.onerror=function(a){this.confirm(!1,"onerror"),this.unbindProxyEvents(a)},i.prototype.confirm=function(a,b){this.isConfirmed=!0,this.isLoaded=a,this.emit("confirm",this,b)},i.prototype.unbindProxyEvents=function(a){c.unbind(a.target,"load",this),c.unbind(a.target,"error",this)},g}),/*! * Ion.RangeSlider | version 2.1.7 | https://github.com/IonDen/ion.rangeSlider * MIT License https://github.com/IonDen/ion.rangeSlider/blob/master/License.md */ function(a){"function"==typeof define&&define.amd?define(["jquery"],function(b){return a(b,document,window,navigator)}):"object"==typeof exports?a(require("jquery"),document,window,navigator):a(jQuery,document,window,navigator)}(function(a,b,c,d,e){var f=0,g=function(){var b=d.userAgent,c=/msie\s\d+/i;return 0b)?(a("html").addClass("lt-ie9"),!0):!1}();Function.prototype.bind||(Function.prototype.bind=function(a){var b=this,c=[].slice;if("function"!=typeof b)throw new TypeError;var d=c.call(arguments,1),e=function(){if(this instanceof e){var f=function(){};f.prototype=b.prototype;var f=new f,g=b.apply(f,d.concat(c.call(arguments)));return Object(g)===g?g:f}return b.apply(a,d.concat(c.call(arguments)))};return e}),Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){var c;if(null==this)throw new TypeError('"this" is null or not defined');var d=Object(this),e=d.length>>>0;if(0===e)return-1;if(c=+b||0,1/0===Math.abs(c)&&(c=0),c>=e)return-1;for(c=Math.max(c>=0?c:e-Math.abs(c),0);e>c;){if(c in d&&d[c]===a)return c;c++}return-1});var h=function(d,f,g){this.VERSION="2.1.7",this.input=d,this.plugin_count=g,this.old_to=this.old_from=this.update_tm=this.calc_count=this.current_plugin=0,this.raf_id=this.old_min_interval=null,this.is_update=this.is_key=this.no_diapason=this.force_redraw=this.dragging=!1,this.is_start=!0,this.is_click=this.is_resize=this.is_active=this.is_finish=!1,f=f||{},this.$cache={win:a(c),body:a(b.body),input:a(d),cont:null,rs:null,min:null,max:null,from:null,to:null,single:null,bar:null,line:null,s_single:null,s_from:null,s_to:null,shad_single:null,shad_from:null,shad_to:null,edge:null,grid:null,grid_labels:[]},this.coords={x_gap:0,x_pointer:0,w_rs:0,w_rs_old:0,w_handle:0,p_gap:0,p_gap_left:0,p_gap_right:0,p_step:0,p_pointer:0,p_handle:0,p_single_fake:0,p_single_real:0,p_from_fake:0,p_from_real:0,p_to_fake:0,p_to_real:0,p_bar_x:0,p_bar_w:0,grid_gap:0,big_num:0,big:[],big_w:[],big_p:[],big_x:[]},this.labels={w_min:0,w_max:0,w_from:0,w_to:0,w_single:0,p_min:0,p_max:0,p_from_fake:0,p_from_left:0,p_to_fake:0,p_to_left:0,p_single_fake:0,p_single_left:0};var h=this.$cache.input;d=h.prop("value");var i;g={type:"single",min:10,max:100,from:null,to:null,step:1,min_interval:0,max_interval:0,drag_interval:!1,values:[],p_values:[],from_fixed:!1,from_min:null,from_max:null,from_shadow:!1,to_fixed:!1,to_min:null,to_max:null,to_shadow:!1,prettify_enabled:!0,prettify_separator:" ",prettify:null,force_edges:!1,keyboard:!1,keyboard_step:5,grid:!1,grid_margin:!0,grid_num:4,grid_snap:!1,hide_min_max:!1,hide_from_to:!1,prefix:"",postfix:"",max_postfix:"",decorate_both:!0,values_separator:" — ",input_values_separator:";",disable:!1,onStart:null,onChange:null,onFinish:null,onUpdate:null},"INPUT"!==h[0].nodeName&&console&&console.warn&&console.warn("Base element should be !",h[0]),h={type:h.data("type"),min:h.data("min"),max:h.data("max"),from:h.data("from"),to:h.data("to"),step:h.data("step"),min_interval:h.data("minInterval"),max_interval:h.data("maxInterval"),drag_interval:h.data("dragInterval"),values:h.data("values"),from_fixed:h.data("fromFixed"),from_min:h.data("fromMin"),from_max:h.data("fromMax"),from_shadow:h.data("fromShadow"),to_fixed:h.data("toFixed"),to_min:h.data("toMin"),to_max:h.data("toMax"),to_shadow:h.data("toShadow"),prettify_enabled:h.data("prettifyEnabled"),prettify_separator:h.data("prettifySeparator"),force_edges:h.data("forceEdges"),keyboard:h.data("keyboard"),keyboard_step:h.data("keyboardStep"),grid:h.data("grid"),grid_margin:h.data("gridMargin"),grid_num:h.data("gridNum"),grid_snap:h.data("gridSnap"),hide_min_max:h.data("hideMinMax"),hide_from_to:h.data("hideFromTo"),prefix:h.data("prefix"),postfix:h.data("postfix"),max_postfix:h.data("maxPostfix"),decorate_both:h.data("decorateBoth"),values_separator:h.data("valuesSeparator"),input_values_separator:h.data("inputValuesSeparator"),disable:h.data("disable")},h.values=h.values&&h.values.split(",");for(i in h)h.hasOwnProperty(i)&&(h[i]!==e&&""!==h[i]||delete h[i]);d!==e&&""!==d&&(d=d.split(h.input_values_separator||f.input_values_separator||";"),d[0]&&d[0]==+d[0]&&(d[0]=+d[0]),d[1]&&d[1]==+d[1]&&(d[1]=+d[1]),f&&f.values&&f.values.length?(g.from=d[0]&&f.values.indexOf(d[0]),g.to=d[1]&&f.values.indexOf(d[1])):(g.from=d[0]&&+d[0],g.to=d[1]&&+d[1])),a.extend(g,f),a.extend(g,h),this.options=g,this.update_check={},this.validate(),this.result={input:this.$cache.input,slider:null,min:this.options.min,max:this.options.max,from:this.options.from,from_percent:0,from_value:null,to:this.options.to,to_percent:0,to_value:null},this.init()};h.prototype={init:function(a){this.no_diapason=!1,this.coords.p_step=this.convertToPercent(this.options.step,!0),this.target="base",this.toggleInput(),this.append(),this.setMinMax(),a?(this.force_redraw=!0,this.calc(!0),this.callOnUpdate()):(this.force_redraw=!0,this.calc(!0),this.callOnStart()),this.updateScene()},append:function(){this.$cache.input.before(''),this.$cache.input.prop("readonly",!0),this.$cache.cont=this.$cache.input.prev(),this.result.slider=this.$cache.cont,this.$cache.cont.html('01000'),this.$cache.rs=this.$cache.cont.find(".irs"),this.$cache.min=this.$cache.cont.find(".irs-min"),this.$cache.max=this.$cache.cont.find(".irs-max"),this.$cache.from=this.$cache.cont.find(".irs-from"),this.$cache.to=this.$cache.cont.find(".irs-to"),this.$cache.single=this.$cache.cont.find(".irs-single"),this.$cache.bar=this.$cache.cont.find(".irs-bar"),this.$cache.line=this.$cache.cont.find(".irs-line"),this.$cache.grid=this.$cache.cont.find(".irs-grid"),"single"===this.options.type?(this.$cache.cont.append(''),this.$cache.edge=this.$cache.cont.find(".irs-bar-edge"),this.$cache.s_single=this.$cache.cont.find(".single"),this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.shad_single=this.$cache.cont.find(".shadow-single")):(this.$cache.cont.append(''),this.$cache.s_from=this.$cache.cont.find(".from"),this.$cache.s_to=this.$cache.cont.find(".to"),this.$cache.shad_from=this.$cache.cont.find(".shadow-from"),this.$cache.shad_to=this.$cache.cont.find(".shadow-to"),this.setTopHandler()),this.options.hide_from_to&&(this.$cache.from[0].style.display="none",this.$cache.to[0].style.display="none",this.$cache.single[0].style.display="none"),this.appendGrid(),this.options.disable?(this.appendDisableMask(),this.$cache.input[0].disabled=!0):(this.$cache.cont.removeClass("irs-disabled"),this.$cache.input[0].disabled=!1,this.bindEvents()),this.options.drag_interval&&(this.$cache.bar[0].style.cursor="ew-resize")},setTopHandler:function(){var a=this.options.max,b=this.options.to;this.options.from>this.options.min&&b===a?this.$cache.s_from.addClass("type_last"):a>b&&this.$cache.s_to.addClass("type_last")},changeLevel:function(a){switch(a){case"single":this.coords.p_gap=this.toFixed(this.coords.p_pointer-this.coords.p_single_fake);break;case"from":this.coords.p_gap=this.toFixed(this.coords.p_pointer-this.coords.p_from_fake),this.$cache.s_from.addClass("state_hover"),this.$cache.s_from.addClass("type_last"),this.$cache.s_to.removeClass("type_last");break;case"to":this.coords.p_gap=this.toFixed(this.coords.p_pointer-this.coords.p_to_fake),this.$cache.s_to.addClass("state_hover"),this.$cache.s_to.addClass("type_last"),this.$cache.s_from.removeClass("type_last");break;case"both":this.coords.p_gap_left=this.toFixed(this.coords.p_pointer-this.coords.p_from_fake),this.coords.p_gap_right=this.toFixed(this.coords.p_to_fake-this.coords.p_pointer),this.$cache.s_to.removeClass("type_last"),this.$cache.s_from.removeClass("type_last")}},appendDisableMask:function(){this.$cache.cont.append(''),this.$cache.cont.addClass("irs-disabled")},remove:function(){this.$cache.cont.remove(),this.$cache.cont=null,this.$cache.line.off("keydown.irs_"+this.plugin_count),this.$cache.body.off("touchmove.irs_"+this.plugin_count),this.$cache.body.off("mousemove.irs_"+this.plugin_count),this.$cache.win.off("touchend.irs_"+this.plugin_count),this.$cache.win.off("mouseup.irs_"+this.plugin_count),g&&(this.$cache.body.off("mouseup.irs_"+this.plugin_count),this.$cache.body.off("mouseleave.irs_"+this.plugin_count)),this.$cache.grid_labels=[],this.coords.big=[],this.coords.big_w=[],this.coords.big_p=[],this.coords.big_x=[],cancelAnimationFrame(this.raf_id)},bindEvents:function(){this.no_diapason||(this.$cache.body.on("touchmove.irs_"+this.plugin_count,this.pointerMove.bind(this)),this.$cache.body.on("mousemove.irs_"+this.plugin_count,this.pointerMove.bind(this)),this.$cache.win.on("touchend.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.win.on("mouseup.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.line.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.line.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.options.drag_interval&&"double"===this.options.type?(this.$cache.bar.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"both")),this.$cache.bar.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"both"))):(this.$cache.bar.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.bar.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))),"single"===this.options.type?(this.$cache.single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.s_single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.shad_single.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.s_single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.edge.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_single.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))):(this.$cache.single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,null)),this.$cache.single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,null)),this.$cache.from.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.s_from.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.to.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.s_to.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.shad_from.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_to.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.from.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.s_from.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.to.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.s_to.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.shad_from.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_to.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))),this.options.keyboard&&this.$cache.line.on("keydown.irs_"+this.plugin_count,this.key.bind(this,"keyboard")),g&&(this.$cache.body.on("mouseup.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.body.on("mouseleave.irs_"+this.plugin_count,this.pointerUp.bind(this))))},pointerMove:function(a){this.dragging&&(this.coords.x_pointer=(a.pageX||a.originalEvent.touches&&a.originalEvent.touches[0].pageX)-this.coords.x_gap,this.calc())},pointerUp:function(b){this.current_plugin===this.plugin_count&&this.is_active&&(this.is_active=!1,this.$cache.cont.find(".state_hover").removeClass("state_hover"),this.force_redraw=!0,g&&a("*").prop("unselectable",!1),this.updateScene(),this.restoreOriginalMinInterval(),(a.contains(this.$cache.cont[0],b.target)||this.dragging)&&this.callOnFinish(),this.dragging=!1)},pointerDown:function(b,c){c.preventDefault();var d=c.pageX||c.originalEvent.touches&&c.originalEvent.touches[0].pageX;2!==c.button&&("both"===b&&this.setTempMinInterval(),b||(b=this.target||"from"),this.current_plugin=this.plugin_count,this.target=b,this.dragging=this.is_active=!0,this.coords.x_gap=this.$cache.rs.offset().left,this.coords.x_pointer=d-this.coords.x_gap,this.calcPointerPercent(),this.changeLevel(b),g&&a("*").prop("unselectable",!0),this.$cache.line.trigger("focus"),this.updateScene())},pointerClick:function(a,b){b.preventDefault();var c=b.pageX||b.originalEvent.touches&&b.originalEvent.touches[0].pageX;2!==b.button&&(this.current_plugin=this.plugin_count,this.target=a,this.is_click=!0,this.coords.x_gap=this.$cache.rs.offset().left,this.coords.x_pointer=+(c-this.coords.x_gap).toFixed(),this.force_redraw=!0,this.calc(),this.$cache.line.trigger("focus"))},key:function(a,b){if(!(this.current_plugin!==this.plugin_count||b.altKey||b.ctrlKey||b.shiftKey||b.metaKey)){switch(b.which){case 83:case 65:case 40:case 37:b.preventDefault(),this.moveByKey(!1);break;case 87:case 68:case 38:case 39:b.preventDefault(),this.moveByKey(!0)}return!0}},moveByKey:function(a){var b=this.coords.p_pointer,b=a?b+this.options.keyboard_step:b-this.options.keyboard_step;this.coords.x_pointer=this.toFixed(this.coords.w_rs/100*b),this.is_key=!0,this.calc()},setMinMax:function(){this.options&&(this.options.hide_min_max?(this.$cache.min[0].style.display="none",this.$cache.max[0].style.display="none"):(this.options.values.length?(this.$cache.min.html(this.decorate(this.options.p_values[this.options.min])),this.$cache.max.html(this.decorate(this.options.p_values[this.options.max]))):(this.$cache.min.html(this.decorate(this._prettify(this.options.min),this.options.min)),this.$cache.max.html(this.decorate(this._prettify(this.options.max),this.options.max))),this.labels.w_min=this.$cache.min.outerWidth(!1),this.labels.w_max=this.$cache.max.outerWidth(!1)))},setTempMinInterval:function(){var a=this.result.to-this.result.from;null===this.old_min_interval&&(this.old_min_interval=this.options.min_interval),this.options.min_interval=a},restoreOriginalMinInterval:function(){null!==this.old_min_interval&&(this.options.min_interval=this.old_min_interval,this.old_min_interval=null)},calc:function(a){if(this.options&&(this.calc_count++,(10===this.calc_count||a)&&(this.calc_count=0,this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.calcHandlePercent()),this.coords.w_rs)){switch(this.calcPointerPercent(),a=this.getHandleX(),"both"===this.target&&(this.coords.p_gap=0,a=this.getHandleX()),"click"===this.target&&(this.coords.p_gap=this.coords.p_handle/2,a=this.getHandleX(),this.target=this.options.drag_interval?"both_one":this.chooseHandle(a)),this.target){case"base":var b=(this.options.max-this.options.min)/100;a=(this.result.from-this.options.min)/b,b=(this.result.to-this.options.min)/b,this.coords.p_single_real=this.toFixed(a),this.coords.p_from_real=this.toFixed(a),this.coords.p_to_real=this.toFixed(b),this.coords.p_single_real=this.checkDiapason(this.coords.p_single_real,this.options.from_min,this.options.from_max),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max),this.coords.p_single_fake=this.convertToFakePercent(this.coords.p_single_real),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real),this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real),this.target=null;break;case"single":if(this.options.from_fixed)break;this.coords.p_single_real=this.convertToRealPercent(a),this.coords.p_single_real=this.calcWithStep(this.coords.p_single_real),this.coords.p_single_real=this.checkDiapason(this.coords.p_single_real,this.options.from_min,this.options.from_max),this.coords.p_single_fake=this.convertToFakePercent(this.coords.p_single_real);break;case"from":if(this.options.from_fixed)break;this.coords.p_from_real=this.convertToRealPercent(a),this.coords.p_from_real=this.calcWithStep(this.coords.p_from_real),this.coords.p_from_real>this.coords.p_to_real&&(this.coords.p_from_real=this.coords.p_to_real),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_from_real=this.checkMinInterval(this.coords.p_from_real,this.coords.p_to_real,"from"),this.coords.p_from_real=this.checkMaxInterval(this.coords.p_from_real,this.coords.p_to_real,"from"),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real);break;case"to":if(this.options.to_fixed)break;this.coords.p_to_real=this.convertToRealPercent(a),this.coords.p_to_real=this.calcWithStep(this.coords.p_to_real),this.coords.p_to_realb&&(b=0,c=b+a),c>100&&(c=100,b=c-a),this.coords.p_from_real=this.calcWithStep(b),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real),this.coords.p_to_real=this.calcWithStep(c),this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max),this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real)}}"single"===this.options.type?(this.coords.p_bar_x=this.coords.p_handle/2,this.coords.p_bar_w=this.coords.p_single_fake,this.result.from_percent=this.coords.p_single_real,this.result.from=this.convertToValue(this.coords.p_single_real),this.options.values.length&&(this.result.from_value=this.options.values[this.result.from])):(this.coords.p_bar_x=this.toFixed(this.coords.p_from_fake+this.coords.p_handle/2),this.coords.p_bar_w=this.toFixed(this.coords.p_to_fake-this.coords.p_from_fake),this.result.from_percent=this.coords.p_from_real,this.result.from=this.convertToValue(this.coords.p_from_real),this.result.to_percent=this.coords.p_to_real,this.result.to=this.convertToValue(this.coords.p_to_real),this.options.values.length&&(this.result.from_value=this.options.values[this.result.from],this.result.to_value=this.options.values[this.result.to])),this.calcMinMax(),this.calcLabels()}},calcPointerPercent:function(){this.coords.w_rs?(0>this.coords.x_pointer||isNaN(this.coords.x_pointer)?this.coords.x_pointer=0:this.coords.x_pointer>this.coords.w_rs&&(this.coords.x_pointer=this.coords.w_rs),this.coords.p_pointer=this.toFixed(this.coords.x_pointer/this.coords.w_rs*100)):this.coords.p_pointer=0},convertToRealPercent:function(a){return a/(100-this.coords.p_handle)*100},convertToFakePercent:function(a){return a/100*(100-this.coords.p_handle)},getHandleX:function(){var a=100-this.coords.p_handle,b=this.toFixed(this.coords.p_pointer-this.coords.p_gap);return 0>b?b=0:b>a&&(b=a),b},calcHandlePercent:function(){this.coords.w_handle="single"===this.options.type?this.$cache.s_single.outerWidth(!1):this.$cache.s_from.outerWidth(!1),this.coords.p_handle=this.toFixed(this.coords.w_handle/this.coords.w_rs*100)},chooseHandle:function(a){return"single"===this.options.type?"single":a>=this.coords.p_from_real+(this.coords.p_to_real-this.coords.p_from_real)/2?this.options.to_fixed?"from":"to":this.options.from_fixed?"to":"from"},calcMinMax:function(){this.coords.w_rs&&(this.labels.p_min=this.labels.w_min/this.coords.w_rs*100,this.labels.p_max=this.labels.w_max/this.coords.w_rs*100)},calcLabels:function(){this.coords.w_rs&&!this.options.hide_from_to&&("single"===this.options.type?(this.labels.w_single=this.$cache.single.outerWidth(!1),this.labels.p_single_fake=this.labels.w_single/this.coords.w_rs*100,this.labels.p_single_left=this.coords.p_single_fake+this.coords.p_handle/2-this.labels.p_single_fake/2):(this.labels.w_from=this.$cache.from.outerWidth(!1),this.labels.p_from_fake=this.labels.w_from/this.coords.w_rs*100,this.labels.p_from_left=this.coords.p_from_fake+this.coords.p_handle/2-this.labels.p_from_fake/2,this.labels.p_from_left=this.toFixed(this.labels.p_from_left),this.labels.p_from_left=this.checkEdges(this.labels.p_from_left,this.labels.p_from_fake),this.labels.w_to=this.$cache.to.outerWidth(!1),this.labels.p_to_fake=this.labels.w_to/this.coords.w_rs*100,this.labels.p_to_left=this.coords.p_to_fake+this.coords.p_handle/2-this.labels.p_to_fake/2,this.labels.p_to_left=this.toFixed(this.labels.p_to_left),this.labels.p_to_left=this.checkEdges(this.labels.p_to_left,this.labels.p_to_fake),this.labels.w_single=this.$cache.single.outerWidth(!1),this.labels.p_single_fake=this.labels.w_single/this.coords.w_rs*100,this.labels.p_single_left=(this.labels.p_from_left+this.labels.p_to_left+this.labels.p_to_fake)/2-this.labels.p_single_fake/2,this.labels.p_single_left=this.toFixed(this.labels.p_single_left)),this.labels.p_single_left=this.checkEdges(this.labels.p_single_left,this.labels.p_single_fake))},updateScene:function(){this.raf_id&&(cancelAnimationFrame(this.raf_id),this.raf_id=null),clearTimeout(this.update_tm),this.update_tm=null,this.options&&(this.drawHandles(),this.is_active?this.raf_id=requestAnimationFrame(this.updateScene.bind(this)):this.update_tm=setTimeout(this.updateScene.bind(this),300))},drawHandles:function(){this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.coords.w_rs&&(this.coords.w_rs!==this.coords.w_rs_old&&(this.target="base",this.is_resize=!0),(this.coords.w_rs!==this.coords.w_rs_old||this.force_redraw)&&(this.setMinMax(),this.calc(!0),this.drawLabels(),this.options.grid&&(this.calcGridMargin(),this.calcGridLabels()),this.force_redraw=!0,this.coords.w_rs_old=this.coords.w_rs,this.drawShadow()),this.coords.w_rs&&(this.dragging||this.force_redraw||this.is_key)&&((this.old_from!==this.result.from||this.old_to!==this.result.to||this.force_redraw||this.is_key)&&(this.drawLabels(),this.$cache.bar[0].style.left=this.coords.p_bar_x+"%",this.$cache.bar[0].style.width=this.coords.p_bar_w+"%","single"===this.options.type?this.$cache.s_single[0].style.left=this.coords.p_single_fake+"%":(this.$cache.s_from[0].style.left=this.coords.p_from_fake+"%",this.$cache.s_to[0].style.left=this.coords.p_to_fake+"%",(this.old_from!==this.result.from||this.force_redraw)&&(this.$cache.from[0].style.left=this.labels.p_from_left+"%"),(this.old_to!==this.result.to||this.force_redraw)&&(this.$cache.to[0].style.left=this.labels.p_to_left+"%")),this.$cache.single[0].style.left=this.labels.p_single_left+"%",this.writeToInput(),this.old_from===this.result.from&&this.old_to===this.result.to||this.is_start,this.old_from=this.result.from,this.old_to=this.result.to,this.is_resize||this.is_update||this.is_start||this.is_finish||this.callOnChange(),(this.is_key||this.is_click)&&(this.is_click=this.is_key=!1,this.callOnFinish()),this.is_finish=this.is_resize=this.is_update=!1),this.force_redraw=this.is_click=this.is_key=this.is_start=!1))},drawLabels:function(){if(this.options){var a,b=this.options.values.length,c=this.options.p_values;if(!this.options.hide_from_to)if("single"===this.options.type)b=b?this.decorate(c[this.result.from]):this.decorate(this._prettify(this.result.from),this.result.from),this.$cache.single.html(b),this.calcLabels(),this.$cache.min[0].style.visibility=this.labels.p_single_left100-this.labels.p_max-1?"hidden":"visible";else{b?(this.options.decorate_both?(b=this.decorate(c[this.result.from]),b+=this.options.values_separator,b+=this.decorate(c[this.result.to])):b=this.decorate(c[this.result.from]+this.options.values_separator+c[this.result.to]),a=this.decorate(c[this.result.from]),c=this.decorate(c[this.result.to])):(this.options.decorate_both?(b=this.decorate(this._prettify(this.result.from),this.result.from),b+=this.options.values_separator,b+=this.decorate(this._prettify(this.result.to),this.result.to)):b=this.decorate(this._prettify(this.result.from)+this.options.values_separator+this._prettify(this.result.to),this.result.to),a=this.decorate(this._prettify(this.result.from),this.result.from),c=this.decorate(this._prettify(this.result.to),this.result.to)),this.$cache.single.html(b),this.$cache.from.html(a),this.$cache.to.html(c),this.calcLabels(),c=Math.min(this.labels.p_single_left,this.labels.p_from_left),b=this.labels.p_single_left+this.labels.p_single_fake,a=this.labels.p_to_left+this.labels.p_to_fake;var d=Math.max(b,a);this.labels.p_from_left+this.labels.p_from_fake>=this.labels.p_to_left?(this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.single[0].style.visibility="visible",this.result.from===this.result.to?("from"===this.target?this.$cache.from[0].style.visibility="visible":"to"===this.target?this.$cache.to[0].style.visibility="visible":this.target||(this.$cache.from[0].style.visibility="visible"),this.$cache.single[0].style.visibility="hidden",d=a):(this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.single[0].style.visibility="visible",d=Math.max(b,a))):(this.$cache.from[0].style.visibility="visible",this.$cache.to[0].style.visibility="visible",this.$cache.single[0].style.visibility="hidden"),this.$cache.min[0].style.visibility=c100-this.labels.p_max-1?"hidden":"visible"}}},drawShadow:function(){var a=this.options,b=this.$cache,c="number"==typeof a.from_min&&!isNaN(a.from_min),d="number"==typeof a.from_max&&!isNaN(a.from_max),e="number"==typeof a.to_min&&!isNaN(a.to_min),f="number"==typeof a.to_max&&!isNaN(a.to_max);"single"===a.type?a.from_shadow&&(c||d)?(c=this.convertToPercent(c?a.from_min:a.min),d=this.convertToPercent(d?a.from_max:a.max)-c,c=this.toFixed(c-this.coords.p_handle/100*c),d=this.toFixed(d-this.coords.p_handle/100*d),c+=this.coords.p_handle/2,b.shad_single[0].style.display="block",b.shad_single[0].style.left=c+"%",b.shad_single[0].style.width=d+"%"):b.shad_single[0].style.display="none":(a.from_shadow&&(c||d)?(c=this.convertToPercent(c?a.from_min:a.min),d=this.convertToPercent(d?a.from_max:a.max)-c,c=this.toFixed(c-this.coords.p_handle/100*c),d=this.toFixed(d-this.coords.p_handle/100*d),c+=this.coords.p_handle/2,b.shad_from[0].style.display="block",b.shad_from[0].style.left=c+"%",b.shad_from[0].style.width=d+"%"):b.shad_from[0].style.display="none",a.to_shadow&&(e||f)?(e=this.convertToPercent(e?a.to_min:a.min),a=this.convertToPercent(f?a.to_max:a.max)-e,e=this.toFixed(e-this.coords.p_handle/100*e),a=this.toFixed(a-this.coords.p_handle/100*a),e+=this.coords.p_handle/2,b.shad_to[0].style.display="block",b.shad_to[0].style.left=e+"%",b.shad_to[0].style.width=a+"%"):b.shad_to[0].style.display="none")},writeToInput:function(){"single"===this.options.type?(this.options.values.length?this.$cache.input.prop("value",this.result.from_value):this.$cache.input.prop("value",this.result.from),this.$cache.input.data("from",this.result.from)):(this.options.values.length?this.$cache.input.prop("value",this.result.from_value+this.options.input_values_separator+this.result.to_value):this.$cache.input.prop("value",this.result.from+this.options.input_values_separator+this.result.to),this.$cache.input.data("from",this.result.from),this.$cache.input.data("to",this.result.to))},callOnStart:function(){this.writeToInput(),this.options.onStart&&"function"==typeof this.options.onStart&&this.options.onStart(this.result)},callOnChange:function(){this.writeToInput(),this.options.onChange&&"function"==typeof this.options.onChange&&this.options.onChange(this.result)},callOnFinish:function(){this.writeToInput(),this.options.onFinish&&"function"==typeof this.options.onFinish&&this.options.onFinish(this.result)},callOnUpdate:function(){this.writeToInput(),this.options.onUpdate&&"function"==typeof this.options.onUpdate&&this.options.onUpdate(this.result)},toggleInput:function(){this.$cache.input.toggleClass("irs-hidden-input")},convertToPercent:function(a,b){var c=this.options.max-this.options.min;return c?this.toFixed((b?a:a-this.options.min)/(c/100)):(this.no_diapason=!0,0)},convertToValue:function(a){var b,c,d=this.options.min,e=this.options.max,f=d.toString().split(".")[1],g=e.toString().split(".")[1],h=0,i=0;return 0===a?this.options.min:100===a?this.options.max:(f&&(h=b=f.length),g&&(h=c=g.length),b&&c&&(h=b>=c?b:c),0>d&&(i=Math.abs(d),d=+(d+i).toFixed(h),e=+(e+i).toFixed(h)),a=(e-d)/100*a+d,(d=this.options.step.toString().split(".")[1])?a=+a.toFixed(d.length):(a/=this.options.step,a*=this.options.step,a=+a.toFixed(0)),i&&(a-=i),i=d?+a.toFixed(d.length):this.toFixed(a),ithis.options.max&&(i=this.options.max),i)},calcWithStep:function(a){var b=Math.round(a/this.coords.p_step)*this.coords.p_step;return b>100&&(b=100),100===a&&(b=100),this.toFixed(b)},checkMinInterval:function(a,b,c){var d=this.options;return d.min_interval?(a=this.convertToValue(a),b=this.convertToValue(b),"from"===c?b-ad.max_interval&&(a=b-d.max_interval):a-b>d.max_interval&&(a=b+d.max_interval),this.convertToPercent(a)):a},checkDiapason:function(a,b,c){a=this.convertToValue(a);var d=this.options;return"number"!=typeof b&&(b=d.min),"number"!=typeof c&&(c=d.max),b>a&&(a=b),a>c&&(a=c),this.convertToPercent(a)},toFixed:function(a){return a=a.toFixed(20),+a},_prettify:function(a){return this.options.prettify_enabled?this.options.prettify&&"function"==typeof this.options.prettify?this.options.prettify(a):this.prettify(a):a },prettify:function(a){return a.toString().replace(/(\d{1,3}(?=(?:\d\d\d)+(?!\d)))/g,"$1"+this.options.prettify_separator)},checkEdges:function(a,b){return this.options.force_edges?(0>a?a=0:a>100-b&&(a=100-b),this.toFixed(a)):this.toFixed(a)},validate:function(){var a,b,c=this.options,d=this.result,e=c.values,f=e.length;if("string"==typeof c.min&&(c.min=+c.min),"string"==typeof c.max&&(c.max=+c.max),"string"==typeof c.from&&(c.from=+c.from),"string"==typeof c.to&&(c.to=+c.to),"string"==typeof c.step&&(c.step=+c.step),"string"==typeof c.from_min&&(c.from_min=+c.from_min),"string"==typeof c.from_max&&(c.from_max=+c.from_max),"string"==typeof c.to_min&&(c.to_min=+c.to_min),"string"==typeof c.to_max&&(c.to_max=+c.to_max),"string"==typeof c.keyboard_step&&(c.keyboard_step=+c.keyboard_step),"string"==typeof c.grid_num&&(c.grid_num=+c.grid_num),c.maxb;b++)a=+e[b],isNaN(a)?a=e[b]:(e[b]=a,a=this._prettify(a)),c.p_values.push(a);("number"!=typeof c.from||isNaN(c.from))&&(c.from=c.min),("number"!=typeof c.to||isNaN(c.to))&&(c.to=c.max),"single"===c.type?(c.fromc.max&&(c.from=c.max)):(c.fromc.max&&(c.from=c.max),c.toc.max&&(c.to=c.max),this.update_check.from&&(this.update_check.from!==c.from&&c.from>c.to&&(c.from=c.to),this.update_check.to!==c.to&&c.toc.to&&(c.from=c.to),c.toc.step)&&(c.step=1),("number"!=typeof c.keyboard_step||isNaN(c.keyboard_step)||!c.keyboard_step||0>c.keyboard_step)&&(c.keyboard_step=5),"number"==typeof c.from_min&&c.fromc.from_max&&(c.from=c.from_max),"number"==typeof c.to_min&&c.toc.to_max&&(c.to=c.to_max),d&&(d.min!==c.min&&(d.min=c.min),d.max!==c.max&&(d.max=c.max),(d.fromd.max)&&(d.from=c.from),(d.tod.max)&&(d.to=c.to)),("number"!=typeof c.min_interval||isNaN(c.min_interval)||!c.min_interval||0>c.min_interval)&&(c.min_interval=0),("number"!=typeof c.max_interval||isNaN(c.max_interval)||!c.max_interval||0>c.max_interval)&&(c.max_interval=0),c.min_interval&&c.min_interval>c.max-c.min&&(c.min_interval=c.max-c.min),c.max_interval&&c.max_interval>c.max-c.min&&(c.max_interval=c.max-c.min)},decorate:function(a,b){var c="",d=this.options;return d.prefix&&(c+=d.prefix),c+=a,d.max_postfix&&(d.values.length&&a===d.p_values[d.max]?(c+=d.max_postfix,d.postfix&&(c+=" ")):b===d.max&&(c+=d.max_postfix,d.postfix&&(c+=" "))),d.postfix&&(c+=d.postfix),c},updateFrom:function(){this.result.from=this.options.from,this.result.from_percent=this.convertToPercent(this.result.from),this.options.values&&(this.result.from_value=this.options.values[this.result.from])},updateTo:function(){this.result.to=this.options.to,this.result.to_percent=this.convertToPercent(this.result.to),this.options.values&&(this.result.to_value=this.options.values[this.result.to])},updateResult:function(){this.result.min=this.options.min,this.result.max=this.options.max,this.updateFrom(),this.updateTo()},appendGrid:function(){if(this.options.grid){var a,b,c=this.options;a=c.max-c.min;var d,e,f,g,h,i=c.grid_num,j=4,k="";for(this.calcGridMargin(),c.grid_snap?a>50?(i=50/c.step,d=this.toFixed(c.step/.5)):(i=a/c.step,d=this.toFixed(c.step/(a/100))):d=this.toFixed(100/i),i>4&&(j=3),i>7&&(j=2),i>14&&(j=1),i>28&&(j=0),a=0;i+1>a;a++){for(f=j,e=this.toFixed(d*a),e>100&&(e=100,f-=2,0>f&&(f=0)),this.coords.big[a]=e,g=(e-d*(a-1))/(f+1),b=1;f>=b&&0!==e;b++)h=this.toFixed(e-g*b),k+='';k+='',b=this.convertToValue(e),b=c.values.length?c.p_values[b]:this._prettify(b),k+=''+b+""}this.coords.big_num=Math.ceil(i+1),this.$cache.cont.addClass("irs-with-grid"),this.$cache.grid.html(k),this.cacheGridLabels()}},cacheGridLabels:function(){var a,b,c=this.coords.big_num;for(b=0;c>b;b++)a=this.$cache.grid.find(".js-grid-text-"+b),this.$cache.grid_labels.push(a);this.calcGridLabels()},calcGridLabels:function(){var a,b;b=[];var c=[],d=this.coords.big_num;for(a=0;d>a;a++)this.coords.big_w[a]=this.$cache.grid_labels[a].outerWidth(!1),this.coords.big_p[a]=this.toFixed(this.coords.big_w[a]/this.coords.w_rs*100),this.coords.big_x[a]=this.toFixed(this.coords.big_p[a]/2),b[a]=this.toFixed(this.coords.big[a]-this.coords.big_x[a]),c[a]=this.toFixed(b[a]+this.coords.big_p[a]);for(this.options.force_edges&&(b[0]<-this.coords.grid_gap&&(b[0]=-this.coords.grid_gap,c[0]=this.toFixed(b[0]+this.coords.big_p[0]),this.coords.big_x[0]=this.coords.grid_gap),c[d-1]>100+this.coords.grid_gap&&(c[d-1]=100+this.coords.grid_gap,b[d-1]=this.toFixed(c[d-1]-this.coords.big_p[d-1]),this.coords.big_x[d-1]=this.toFixed(this.coords.big_p[d-1]-this.coords.grid_gap))),this.calcGridCollision(2,b,c),this.calcGridCollision(4,b,c),a=0;d>a;a++)b=this.$cache.grid_labels[a][0],this.coords.big_x[a]!==Number.POSITIVE_INFINITY&&(b.style.marginLeft=-this.coords.big_x[a]+"%")},calcGridCollision:function(a,b,c){var d,e,f,g=this.coords.big_num;for(d=0;g>d&&(e=d+a/2,!(e>=g));d+=a)f=this.$cache.grid_labels[e][0],f.style.visibility=c[d]<=b[e]?"visible":"hidden"},calcGridMargin:function(){this.options.grid_margin&&(this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.coords.w_rs&&(this.coords.w_handle="single"===this.options.type?this.$cache.s_single.outerWidth(!1):this.$cache.s_from.outerWidth(!1),this.coords.p_handle=this.toFixed(this.coords.w_handle/this.coords.w_rs*100),this.coords.grid_gap=this.toFixed(this.coords.p_handle/2-.1),this.$cache.grid[0].style.width=this.toFixed(100-this.coords.p_handle)+"%",this.$cache.grid[0].style.left=this.coords.grid_gap+"%"))},update:function(b){this.input&&(this.is_update=!0,this.options.from=this.result.from,this.options.to=this.result.to,this.update_check.from=this.result.from,this.update_check.to=this.result.to,this.options=a.extend(this.options,b),this.validate(),this.updateResult(b),this.toggleInput(),this.remove(),this.init(!0))},reset:function(){this.input&&(this.updateResult(),this.update())},destroy:function(){this.input&&(this.toggleInput(),this.$cache.input.prop("readonly",!1),a.data(this.input,"ionRangeSlider",null),this.remove(),this.options=this.input=null)}},a.fn.cvp_ionRangeSlider=function(b){return this.each(function(){a.data(this,"ionRangeSlider")||a.data(this,"ionRangeSlider",new h(this,b,f++))})},function(){for(var a=0,b=["ms","moz","webkit","o"],d=0;d',a,""].join(""),j.id=q,(k?j:l).innerHTML+=f,l.appendChild(j),k||(l.style.background="",l.style.overflow="hidden",i=p.style.overflow,p.style.overflow="hidden",p.appendChild(l)),g=c(j,a),k?j.parentNode.removeChild(j):(l.parentNode.removeChild(l),p.style.overflow=i),!!g},B={}.hasOwnProperty;l=e(B,"undefined")||e(B.call,"undefined")?function(a,b){return b in a&&e(a.constructor.prototype[b],"undefined")}:function(a,b){return B.call(a,b)},Function.prototype.bind||(Function.prototype.bind=function(a){var b=this;if("function"!=typeof b)throw new TypeError;var c=z.call(arguments,1),d=function(){if(this instanceof d){var e=function(){};e.prototype=b.prototype;var f=new e,g=b.apply(f,c.concat(z.call(arguments)));return Object(g)===g?g:f}return b.apply(a,c.concat(z.call(arguments)))};return d}),x.csstransforms=function(){return!!i("transform")},x.csstransforms3d=function(){var a=!!i("perspective");return a&&"webkitPerspective"in p.style&&A("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b){a=9===b.offsetLeft&&3===b.offsetHeight}),a},x.csstransitions=function(){return i("transition")};for(var C in x)l(x,C)&&(k=C.toLowerCase(),n[k]=x[C](),y.push((n[k]?"":"no-")+k));return n.addTest=function(a,b){if("object"==typeof a)for(var d in a)l(a,d)&&n.addTest(d,a[d]);else{if(a=a.toLowerCase(),n[a]!==c)return n;b="function"==typeof b?b():b,"undefined"!=typeof o&&o&&(p.className+=" "+(b?"":"no-")+a),n[a]=b}return n},d(""),r=j=null,n._version=m,n._prefixes=t,n._domPrefixes=w,n._cssomPrefixes=v,n.testProp=function(a){return g([a])},n.testAllProps=i,n.testStyles=A,n.prefixed=function(a,b,c){return b?i(a,b,c):i(a,"pfx")},p.className=p.className+(o?" "+y.join(" "):""),n}(this,this.document),/*! * Shuffle.js by @Vestride * @license MIT license * @version 3.1.1 */ function(a){"function"==typeof define&&define.amd?define(["jquery","modernizr"],a):"object"==typeof exports?module.exports=a(require("jquery"),window.cvp_Modernizr):window.cvp_Shuffle=a(window.jQuery,window.cvp_Modernizr)}(function(a,b,c){"use strict";function d(a){return a?a.replace(/([A-Z])/g,function(a,b){return"-"+b.toLowerCase()}).replace(/^ms-/,"-ms-"):""}function e(b,c,d){var e,f,g,h=null,i=0;d=d||{};var j=function(){i=d.leading===!1?0:a.now(),h=null,g=b.apply(e,f),e=f=null};return function(){var k=a.now();i||d.leading!==!1||(i=k);var l=c-(k-i);return e=this,f=arguments,0>=l||l>c?(clearTimeout(h),h=null,i=k,g=b.apply(e,f),e=f=null):h||d.trailing===!1||(h=setTimeout(j,l)),g}}function f(a,b,c){for(var d=0,e=a.length;e>d;d++)if(b.call(c,a[d],d,a)==={})return}function g(b,c,d){return setTimeout(a.proxy(b,c),d)}function h(a){return Math.max.apply(Math,a)}function i(a){return Math.min.apply(Math,a)}function j(b){return a.isNumeric(b)?b:0}function k(a){var b,c,d=a.length;if(!d)return a;for(;--d;)c=Math.floor(Math.random()*(d+1)),b=a[c],a[c]=a[d],a[d]=b;return a}if("object"!=typeof b)throw new Error("Shuffle.js requires Modernizr.\nhttp://vestride.github.io/Shuffle/#dependencies");var l=b.prefixed("transition"),m=b.prefixed("transitionDelay"),n=b.prefixed("transitionDuration"),o={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[l],p=b.prefixed("transform"),q=d(p),r=(b.csstransforms&&b.csstransitions,b.csstransforms3d),s=!!window.getComputedStyle,t="shuffle",u="all",v="groups",w=1,x=.001,y=window.getComputedStyle||function(){},z=function(a,b){this.x=j(a),this.y=j(b)};z.equals=function(a,b){return"undefined"==typeof a||"undefined"==typeof b?!0:a.x===b.x&&a.y===b.y};var A=function(){if(!s)return!1;var a=document.body||document.documentElement,b=document.createElement("div");b.style.cssText="width:10px;padding:2px;-webkit-box-sizing:border-box;box-sizing:border-box;",a.appendChild(b);var c=y(b,null).width,d="10px"===c;return a.removeChild(b),d}(),B=0,C=a(window),D=function(b,c){c=c||{},a.extend(this,D.options,c,D.settings),this.$el=a(b),this.element=b,this.unique="shuffle_"+B++,this._fire(D.EventType.LOADING),this._init(),g(function(){this.initialized=!0,this._fire(D.EventType.DONE)},this,16)};return D.EventType={LOADING:"loading",DONE:"done",LAYOUT:"layout",REMOVED:"removed"},D.ClassName={BASE:t,SHUFFLE_ITEM:"shuffle-item",FILTERED:"filtered",CONCEALED:"concealed"},D.options={group:u,speed:250,easing:"ease-out",itemSelector:"",sizer:null,gutterWidth:0,columnWidth:0,delimeter:null,buffer:0,columnThreshold:s?.01:.1,initialSort:null,throttle:e,throttleTime:300,sequentialFadeDelay:150,supported:!1},D.settings={useSizer:!1,itemCss:{position:"absolute",top:0,left:0,visibility:"visible"},revealAppendedDelay:300,lastSort:{},lastFilter:u,enabled:!0,destroyed:!1,initialized:!1,_animations:[],_transitions:[],_isMovementCanceled:!1,styleQueue:[]},D.Point=z,D._getItemTransformString=function(a,b){return a&&null!==a.x&&null!==a.y?r?"translate3d("+a.x+"px, "+a.y+"px, 0) scale3d("+b+", "+b+", 1)":"translate("+a.x+"px, "+a.y+"px) scale("+b+")":void 0},D._getNumberStyle=function(b,c,d){if(s){d=d||y(b,null);var e=D._getFloat(d[c]);return A||"width"!==c?A||"height"!==c||(e+=D._getFloat(d.paddingTop)+D._getFloat(d.paddingBottom)+D._getFloat(d.borderTopWidth)+D._getFloat(d.borderBottomWidth)):e+=D._getFloat(d.paddingLeft)+D._getFloat(d.paddingRight)+D._getFloat(d.borderLeftWidth)+D._getFloat(d.borderRightWidth),e}return D._getFloat(a(b).css(c))},D._getFloat=function(a){return j(parseFloat(a))},D._getOuterWidth=function(a,b){var c=y(a,null),d=D._getNumberStyle(a,"width",c);if(b){var e=D._getNumberStyle(a,"marginLeft",c),f=D._getNumberStyle(a,"marginRight",c);d+=e+f}return d},D._getOuterHeight=function(a,b){var c=y(a,null),d=D._getNumberStyle(a,"height",c);if(b){var e=D._getNumberStyle(a,"marginTop",c),f=D._getNumberStyle(a,"marginBottom",c);d+=e+f}return d},D._skipTransition=function(a,b,c){var d=a.style[n];a.style[n]="0ms",b.call(c);var e=a.offsetWidth;e=null,a.style[n]=d},D.prototype._init=function(){this.$items=this._getItems(),this.sizer=this._getElementOption(this.sizer),this.sizer&&(this.useSizer=!0),this.$el.addClass(D.ClassName.BASE),this._initItems(),C.on("resize."+t+"."+this.unique,this._getResizeFunction());var a=this.$el.css(["position","overflow"]),b=D._getOuterWidth(this.element);this._validateStyles(a),this._setColumns(b),this.shuffle(this.group,this.initialSort),this.supported&&g(function(){this._setTransitions(),this.element.style[l]="height "+this.speed+"ms "+this.easing},this)},D.prototype._getResizeFunction=function(){var b=a.proxy(this._onResize,this);return this.throttle?this.throttle(b,this.throttleTime):b},D.prototype._getElementOption=function(a){return"string"==typeof a?this.$el.find(a)[0]||null:a&&a.nodeType&&1===a.nodeType?a:a&&a.jquery?a[0]:null},D.prototype._validateStyles=function(a){"static"===a.position&&(this.element.style.position="relative"),"hidden"!==a.overflow&&(this.element.style.overflow="hidden")},D.prototype._filter=function(a,b){a=a||this.lastFilter,b=b||this.$items;var c=this._getFilteredSets(a,b);return this._toggleFilterClasses(c.filtered,c.concealed),this.lastFilter=a,"string"==typeof a&&(this.group=a),c.filtered},D.prototype._getFilteredSets=function(b,c){var d=a(),e=a();return b===u?d=c:f(c,function(c){var f=a(c);this._doesPassFilter(b,f)?d=d.add(f):e=e.add(f)},this),{filtered:d,concealed:e}},D.prototype._doesPassFilter=function(b,c){if(a.isFunction(b))return b.call(c[0],c,this);var d=c.data(v),e=null===this.delimeter||a.isArray(d)?d:d.toString().split(this.delimeter);return a.inArray(b,e)>-1},D.prototype._toggleFilterClasses=function(a,b){a.removeClass(D.ClassName.CONCEALED).addClass(D.ClassName.FILTERED),b.removeClass(D.ClassName.FILTERED).addClass(D.ClassName.CONCEALED)},D.prototype._initItems=function(a){a=a||this.$items,a.addClass([D.ClassName.SHUFFLE_ITEM,D.ClassName.FILTERED].join(" ")),a.css(this.itemCss).data("point",new z).data("scale",w)},D.prototype._updateItemCount=function(){this.visibleItems=this._getFilteredItems().length},D.prototype._setTransition=function(a){a.style[l]=q+" "+this.speed+"ms "+this.easing+", opacity "+this.speed+"ms "+this.easing},D.prototype._setTransitions=function(a){a=a||this.$items,f(a,function(a){this._setTransition(a)},this)},D.prototype._setSequentialDelay=function(a){this.supported&&f(a,function(a,b){a.style[m]="0ms,"+(b+1)*this.sequentialFadeDelay+"ms"},this)},D.prototype._getItems=function(){return this.$el.children(this.itemSelector)},D.prototype._getFilteredItems=function(){return this.$items.filter("."+D.ClassName.FILTERED)},D.prototype._getConcealedItems=function(){return this.$items.filter("."+D.ClassName.CONCEALED)},D.prototype._getColumnSize=function(b,c){var d;return d=a.isFunction(this.columnWidth)?this.columnWidth(b):this.useSizer?D._getOuterWidth(this.sizer):this.columnWidth?this.columnWidth:this.$items.length>0?D._getOuterWidth(this.$items[0],!0):b,0===d&&(d=b),d+c},D.prototype._getGutterSize=function(b){var c;return c=a.isFunction(this.gutterWidth)?this.gutterWidth(b):this.useSizer?D._getNumberStyle(this.sizer,"marginLeft"):this.gutterWidth},D.prototype._setColumns=function(b){var c=b||D._getOuterWidth(this.element);window.cvp_sf_fixdropcol&&(c=a(this.element).width());var d=this._getGutterSize(c),e=this._getColumnSize(c,d),f=(c+d)/e;Math.abs(Math.round(f)-f)h;h++)this.positions[d+h]=f;return e},D.prototype._getColumnSpan=function(a,b,c){var d=a/b;return Math.abs(Math.round(d)-d)e;e++)d[e]=h(this.positions.slice(e,e+a));return d},D.prototype._getShortColumn=function(a,b){for(var c=i(a),d=0,e=a.length;e>d;d++)if(a[d]>=c-b&&a[d]<=c+b)return d;return 0},D.prototype._shrink=function(b){var c=b||this._getConcealedItems();f(c,function(b){var c=a(b),d=c.data();d.scale!==x&&(d.scale=x,this.styleQueue.push({$item:c,point:d.point,scale:x,opacity:0,callback:function(){c.css("visibility","hidden")}}))},this)},D.prototype._onResize=function(){if(this.enabled&&!this.destroyed){var b=D._getOuterWidth(this.element);a(this.element).is(":hidden")||b===this.containerWidth||setTimeout(a.proxy(function(){this.update()},this),window.cvp_sf_timeout||500)}},D.prototype._getStylesForTransition=function(a){var b={opacity:a.opacity};return this.supported?b[p]=D._getItemTransformString(a.point,a.scale):a.point&&(b.left=a.point.x,b.top=a.point.y),b},D.prototype._transition=function(b){var c=this._getStylesForTransition(b);this._startItemAnimation(b.$item,c,b.callfront||a.noop,b.callback||a.noop)},D.prototype._startItemAnimation=function(b,c,d,e){function f(b){b.target===b.currentTarget&&(a(b.target).off(o,f),g._removeTransitionReference(h),e())}var g=this,h={$element:b,handler:f};if(d(),!this.initialized)return b.css(c),void e();if(b.hasClass(D.ClassName.CONCEALED)&&(c={opacity:0}),this.supported||this.cvp_appending||window.cvp_sf_disable_animation)b.css(c),b.on(o,f),this._transitions.push(h);else{var i=b.stop(!0).animate(c,this.speed,"swing",e);this._animations.push(i.promise())}},D.prototype._processStyleQueue=function(b){this.isTransitioning&&this._cancelMovement();var c=a();f(this.styleQueue,function(a){a.skipTransition?this._styleImmediately(a):(c=c.add(a.$item),this._transition(a))},this),c.length>0&&this.initialized&&this.speed>0?(this.isTransitioning=!0,this.supported?this._whenCollectionDone(c,o,this._movementFinished):this._whenAnimationsDone(this._movementFinished)):b||g(this._layoutEnd,this),this.styleQueue.length=0},D.prototype._cancelMovement=function(){this.supported?f(this._transitions,function(a){a.$element.off(o,a.handler)}):(this._isMovementCanceled=!0,this.$items.stop(!0),this._isMovementCanceled=!1),this._transitions.length=0,this.isTransitioning=!1},D.prototype._removeTransitionReference=function(b){var c=a.inArray(b,this._transitions);c>-1&&this._transitions.splice(c,1)},D.prototype._styleImmediately=function(a){D._skipTransition(a.$item[0],function(){a.$item.css(this._getStylesForTransition(a))},this)},D.prototype._movementFinished=function(){this.isTransitioning=!1,this._layoutEnd()},D.prototype._layoutEnd=function(){this._fire(D.EventType.LAYOUT)},D.prototype._addItems=function(a,b,c){this._initItems(a),this._setTransitions(a),this.$items=this._getItems(),this._shrink(a),f(this.styleQueue,function(a){a.skipTransition=!0}),this._processStyleQueue(!0),b?this._addItemsToEnd(a,c):this.shuffle(this.lastFilter)},D.prototype._addItemsToEnd=function(a,b){var c=this._filter(null,a),d=c.get();this._updateItemCount(),this._layout(d,!0),b&&this.supported&&this._setSequentialDelay(d),this._revealAppended(d)},D.prototype._revealAppended=function(b){g(function(){f(b,function(b){var c=a(b);this._transition({$item:c,opacity:1,point:c.data("point"),scale:w})},this),this._whenCollectionDone(a(b),o,function(){a(b).css(m,"0ms"),this._movementFinished()})},this,this.revealAppendedDelay)},D.prototype._whenCollectionDone=function(b,c,d){function e(b){b.target===b.currentTarget&&(a(b.target).off(c,e),f++,f===g&&(h._removeTransitionReference(i),d.call(h)))}var f=0,g=b.length,h=this,i={$element:b,handler:e};b.on(c,e),this._transitions.push(i)},D.prototype._whenAnimationsDone=function(b){a.when.apply(null,this._animations).always(a.proxy(function(){this._animations.length=0,this._isMovementCanceled||b.call(this)},this))},D.prototype.shuffle=function(a,b){this.enabled&&(a||(a=u),this._filter(a),this._updateItemCount(),this._shrink(),this.sort(b))},D.prototype.sort=function(a){if(this.enabled){this._resetCols();var b=a||this.lastSort,c=this._getFilteredItems().cvp_sorted(b);this._layout(c),this.lastSort=b}},D.prototype.update=function(a){this.enabled&&(a||this._setColumns(),this.sort())},D.prototype.layout=function(){this.update(!0)},D.prototype.appended=function(a,b,c){this.cvp_appending=!0,this._addItems(a,b===!0,c!==!1),this.cvp_appending=!1},D.prototype.disable=function(){this.enabled=!1},D.prototype.enable=function(a){this.enabled=!0,a!==!1&&this.update()},D.prototype.remove=function(b){function c(){b.remove(),this.$items=this._getItems(),this._updateItemCount(),this._fire(D.EventType.REMOVED,[b,this]),b=null}b.length&&b.jquery&&(this._toggleFilterClasses(a(),b),this._shrink(b),this.sort(),this.$el.one(D.EventType.LAYOUT+"."+t,a.proxy(c,this)))},D.prototype.destroy=function(){C.off("."+this.unique),this.$el.removeClass(t).removeAttr("style").removeData(t),this.$items.removeAttr("style").removeData("point").removeData("scale").removeClass([D.ClassName.CONCEALED,D.ClassName.FILTERED,D.ClassName.SHUFFLE_ITEM].join(" ")),this.$items=null,this.$el=null,this.sizer=null,this.element=null,this._transitions=null,this.destroyed=!0},a.fn.cvp_shuffle=function(b){var c=Array.prototype.slice.call(arguments,1);return this.each(function(){var d=a(this),e=d.data(t);e?"string"==typeof b&&e[b]&&e[b].apply(e,c):(e=new D(this,b),d.data(t,e))})},a.fn.cvp_sorted=function(b){var d=a.extend({},a.fn.cvp_sorted.defaults,b),e=this.get(),f=!1;return e.length?d.randomize?k(e):(a.isFunction(d.by)&&e.sort(function(b,e){if(f)return 0;var g=d.by(a(b)),h=d.by(a(e));return g===c&&h===c?(f=!0,0):h>g||"sortFirst"===g||"sortLast"===h?-1:g>h||"sortLast"===g||"sortFirst"===h?1:0}),f?this.get():(d.reverse&&e.reverse(),e)):[]},a.fn.cvp_sorted.defaults={reverse:!1,by:null,randomize:!1},D}),/*! * TouchSwipe - jQuery Plugin v1.6.18 * @author Matt Bryson http://www.github.com/mattbryson * @license * Copyright (c) 2010-2015 Matt Bryson * Dual licensed under the MIT or GPL Version 2 licenses. */ !function(a){"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],a):a("undefined"!=typeof module&&module.exports?require("jquery"):jQuery)}(function(a){"use strict";function b(b){return!b||void 0!==b.allowPageScroll||void 0===b.swipe&&void 0===b.swipeStatus||(b.allowPageScroll=k),void 0!==b.click&&void 0===b.tap&&(b.tap=b.click),b||(b={}),b=a.extend({},a.fn.cvp_swipe.defaults,b),this.each(function(){var d=a(this),e=d.data(C);e||(e=new c(this,b),d.data(C,e))})}function c(b,c){function d(b){if(!(jb()||a(b.target).closest(c.excludedElements,Tb).length>0)){var d=b.originalEvent?b.originalEvent:b;if(!d.pointerType||"mouse"!=d.pointerType||0!=c.fallbackToMouseEvents){var e,f=d.touches,g=f?f[0]:d;return Ub=v,f?Vb=f.length:c.preventDefaultEvents!==!1&&b.preventDefault(),Jb=0,Kb=null,Lb=null,Rb=null,Mb=0,Nb=0,Ob=0,Pb=1,Qb=0,Sb=qb(),hb(),lb(0,g),!f||Vb===c.fingers||c.fingers===t||R()?(Xb=zb(),2==Vb&&(lb(1,f[1]),Nb=Ob=tb(Wb[0].start,Wb[1].start)),(c.swipeStatus||c.pinchStatus)&&(e=J(d,Ub))):e=!1,e===!1?(Ub=y,J(d,Ub),e):(c.hold&&(bc=setTimeout(a.proxy(function(){Tb.trigger("hold",[d.target]),c.hold&&(e=c.hold.call(Tb,d,d.target))},this),c.longTapThreshold)),kb(!0),null)}}}function D(a){var b=a.originalEvent?a.originalEvent:a;if(Ub!==x&&Ub!==y&&!ib()){var d,e=b.touches,f=e?e[0]:b,g=mb(f);if(Yb=zb(),e&&(Vb=e.length),c.hold&&clearTimeout(bc),Ub=w,2==Vb&&(0==Nb?(lb(1,e[1]),Nb=Ob=tb(Wb[0].start,Wb[1].start)):(mb(e[1]),Ob=tb(Wb[0].end,Wb[1].end),Rb=vb(Wb[0].end,Wb[1].end)),Pb=ub(Nb,Ob),Qb=Math.abs(Nb-Ob)),Vb===c.fingers||c.fingers===t||!e||R()){if(Kb=yb(g.start,g.end),Lb=yb(g.last,g.end),P(a,Lb),Jb=wb(g.start,g.end),Mb=sb(),ob(Kb,Jb),d=J(b,Ub),!c.triggerOnTouchEnd||c.triggerOnTouchLeave){var h=!0;if(c.triggerOnTouchLeave){var i=Ab(this);h=Bb(g.end,i)}!c.triggerOnTouchEnd&&h?Ub=I(w):c.triggerOnTouchLeave&&!h&&(Ub=I(x)),Ub!=y&&Ub!=x||J(b,Ub)}}else Ub=y,J(b,Ub);d===!1&&(Ub=y,J(b,Ub))}}function E(a){var b=a.originalEvent?a.originalEvent:a,d=b.touches;if(d){if(d.length&&!ib())return gb(b),!0;if(d.length&&ib())return!0}return ib()&&(Vb=$b),Yb=zb(),Mb=sb(),M()||!L()?(Ub=y,J(b,Ub)):c.triggerOnTouchEnd||c.triggerOnTouchEnd===!1&&Ub===w?(c.preventDefaultEvents!==!1&&a.preventDefault(),Ub=x,J(b,Ub)):!c.triggerOnTouchEnd&&Y()?(Ub=x,K(b,Ub,o)):Ub===w&&(Ub=y,J(b,Ub)),kb(!1),null}function F(){Vb=0,Yb=0,Xb=0,Nb=0,Ob=0,Pb=1,hb(),kb(!1)}function G(a){var b=a.originalEvent?a.originalEvent:a;c.triggerOnTouchLeave&&(Ub=I(x),J(b,Ub))}function H(){Tb.unbind(Eb,d),Tb.unbind(Ib,F),Tb.unbind(Fb,D),Tb.unbind(Gb,E),Hb&&Tb.unbind(Hb,G),kb(!1)}function I(a){var b=a,d=O(),e=L(),f=M();return!d||f?b=y:!e||a!=w||c.triggerOnTouchEnd&&!c.triggerOnTouchLeave?!e&&a==x&&c.triggerOnTouchLeave&&(b=y):b=x,b}function J(a,b){var c,d=a.touches;return(V()||U())&&(c=K(a,b,m)),(S()||R())&&c!==!1&&(c=K(a,b,n)),eb()&&c!==!1?c=K(a,b,p):fb()&&c!==!1?c=K(a,b,q):db()&&c!==!1&&(c=K(a,b,o)),b===y&&F(a),b===x&&(d?d.length||F(a):F(a)),c}function K(b,d,k){var l;if(k==m){if(Tb.trigger("swipeStatus",[d,Kb||null,Jb||0,Mb||0,Vb,Wb,Lb]),c.swipeStatus&&(l=c.swipeStatus.call(Tb,b,d,Kb||null,Jb||0,Mb||0,Vb,Wb,Lb),l===!1))return!1;if(d==x&&T()){if(clearTimeout(ac),clearTimeout(bc),Tb.trigger("swipe",[Kb,Jb,Mb,Vb,Wb,Lb]),c.swipe&&(l=c.swipe.call(Tb,b,Kb,Jb,Mb,Vb,Wb,Lb),l===!1))return!1;switch(Kb){case e:Tb.trigger("swipeLeft",[Kb,Jb,Mb,Vb,Wb,Lb]),c.swipeLeft&&(l=c.swipeLeft.call(Tb,b,Kb,Jb,Mb,Vb,Wb,Lb));break;case f:Tb.trigger("swipeRight",[Kb,Jb,Mb,Vb,Wb,Lb]),c.swipeRight&&(l=c.swipeRight.call(Tb,b,Kb,Jb,Mb,Vb,Wb,Lb));break;case g:Tb.trigger("swipeUp",[Kb,Jb,Mb,Vb,Wb,Lb]),c.swipeUp&&(l=c.swipeUp.call(Tb,b,Kb,Jb,Mb,Vb,Wb,Lb));break;case h:Tb.trigger("swipeDown",[Kb,Jb,Mb,Vb,Wb,Lb]),c.swipeDown&&(l=c.swipeDown.call(Tb,b,Kb,Jb,Mb,Vb,Wb,Lb))}}}if(k==n){if(Tb.trigger("pinchStatus",[d,Rb||null,Qb||0,Mb||0,Vb,Pb,Wb]),c.pinchStatus&&(l=c.pinchStatus.call(Tb,b,d,Rb||null,Qb||0,Mb||0,Vb,Pb,Wb),l===!1))return!1;if(d==x&&Q())switch(Rb){case i:Tb.trigger("pinchIn",[Rb||null,Qb||0,Mb||0,Vb,Pb,Wb]),c.pinchIn&&(l=c.pinchIn.call(Tb,b,Rb||null,Qb||0,Mb||0,Vb,Pb,Wb));break;case j:Tb.trigger("pinchOut",[Rb||null,Qb||0,Mb||0,Vb,Pb,Wb]),c.pinchOut&&(l=c.pinchOut.call(Tb,b,Rb||null,Qb||0,Mb||0,Vb,Pb,Wb))}}return k==o?d!==y&&d!==x||(clearTimeout(ac),clearTimeout(bc),Z()&&!ab()?(_b=zb(),ac=setTimeout(a.proxy(function(){_b=null,Tb.trigger("tap",[b.target]),c.tap&&(l=c.tap.call(Tb,b,b.target))},this),c.doubleTapThreshold)):(_b=null,Tb.trigger("tap",[b.target]),c.tap&&(l=c.tap.call(Tb,b,b.target)))):k==p?d!==y&&d!==x||(clearTimeout(ac),clearTimeout(bc),_b=null,Tb.trigger("doubletap",[b.target]),c.doubleTap&&(l=c.doubleTap.call(Tb,b,b.target))):k==q&&(d!==y&&d!==x||(clearTimeout(ac),_b=null,Tb.trigger("longtap",[b.target]),c.longTap&&(l=c.longTap.call(Tb,b,b.target)))),l}function L(){var a=!0;return null!==c.threshold&&(a=Jb>=c.threshold),a}function M(){var a=!1;return null!==c.cancelThreshold&&null!==Kb&&(a=pb(Kb)-Jb>=c.cancelThreshold),a}function N(){return null!==c.pinchThreshold?Qb>=c.pinchThreshold:!0}function O(){var a;return a=c.maxTimeThreshold?!(Mb>=c.maxTimeThreshold):!0}function P(a,b){if(c.preventDefaultEvents!==!1)if(c.allowPageScroll===k)a.preventDefault();else{var d=c.allowPageScroll===l;switch(b){case e:(c.swipeLeft&&d||!d&&c.allowPageScroll!=r)&&a.preventDefault();break;case f:(c.swipeRight&&d||!d&&c.allowPageScroll!=r)&&a.preventDefault();break;case g:(c.swipeUp&&d||!d&&c.allowPageScroll!=s)&&a.preventDefault();break;case h:(c.swipeDown&&d||!d&&c.allowPageScroll!=s)&&a.preventDefault();break;case k:}}}function Q(){var a=W(),b=X(),c=N();return a&&b&&c}function R(){return!!(c.pinchStatus||c.pinchIn||c.pinchOut)}function S(){return!(!Q()||!R())}function T(){var a=O(),b=L(),c=W(),d=X(),e=M(),f=!e&&d&&c&&b&&a;return f}function U(){return!!(c.swipe||c.swipeStatus||c.swipeLeft||c.swipeRight||c.swipeUp||c.swipeDown)}function V(){return!(!T()||!U())}function W(){return Vb===c.fingers||c.fingers===t||!z}function X(){return 0!==Wb[0].end.x}function Y(){return!!c.tap}function Z(){return!!c.doubleTap}function $(){return!!c.longTap}function _(){if(null==_b)return!1;var a=zb();return Z()&&a-_b<=c.doubleTapThreshold}function ab(){return _()}function bb(){return(1===Vb||!z)&&(isNaN(Jb)||Jbc.longTapThreshold&&u>Jb}function db(){return!(!bb()||!Y())}function eb(){return!(!_()||!Z())}function fb(){return!(!cb()||!$())}function gb(a){Zb=zb(),$b=a.touches.length+1}function hb(){Zb=0,$b=0}function ib(){var a=!1;if(Zb){var b=zb()-Zb;b<=c.fingerReleaseThreshold&&(a=!0)}return a}function jb(){return!(Tb.data(C+"_intouch")!==!0)}function kb(a){Tb&&(a===!0?(Tb.bind(Fb,D),Tb.bind(Gb,E),Hb&&Tb.bind(Hb,G)):(Tb.unbind(Fb,D,!1),Tb.unbind(Gb,E,!1),Hb&&Tb.unbind(Hb,G,!1)),Tb.data(C+"_intouch",a===!0))}function lb(a,b){var c={start:{x:0,y:0},last:{x:0,y:0},end:{x:0,y:0}};return c.start.x=c.last.x=c.end.x=b.pageX||b.clientX,c.start.y=c.last.y=c.end.y=b.pageY||b.clientY,Wb[a]=c,c}function mb(a){var b=void 0!==a.identifier?a.identifier:0,c=nb(b);return null===c&&(c=lb(b,a)),c.last.x=c.end.x,c.last.y=c.end.y,c.end.x=a.pageX||a.clientX,c.end.y=a.pageY||a.clientY,c}function nb(a){return Wb[a]||null}function ob(a,b){a!=k&&(b=Math.max(b,pb(a)),Sb[a].distance=b)}function pb(a){return Sb[a]?Sb[a].distance:void 0}function qb(){var a={};return a[e]=rb(e),a[f]=rb(f),a[g]=rb(g),a[h]=rb(h),a}function rb(a){return{direction:a,distance:0}}function sb(){return Yb-Xb}function tb(a,b){var c=Math.abs(a.x-b.x),d=Math.abs(a.y-b.y);return Math.round(Math.sqrt(c*c+d*d))}function ub(a,b){var c=b/a*1;return c.toFixed(2)}function vb(){return 1>Pb?j:i}function wb(a,b){return Math.round(Math.sqrt(Math.pow(b.x-a.x,2)+Math.pow(b.y-a.y,2)))}function xb(a,b){var c=a.x-b.x,d=b.y-a.y,e=Math.atan2(d,c),f=Math.round(180*e/Math.PI);return 0>f&&(f=360-Math.abs(f)),f}function yb(a,b){if(Cb(a,b))return k;var c=xb(a,b);return 45>=c&&c>=0?e:360>=c&&c>=315?e:c>=135&&225>=c?f:c>45&&135>c?h:g}function zb(){var a=new Date;return a.getTime()}function Ab(b){b=a(b);var c=b.offset(),d={left:c.left,right:c.left+b.outerWidth(),top:c.top,bottom:c.top+b.outerHeight()};return d}function Bb(a,b){return a.x>b.left&&a.xb.top&&a.y * @license GPL-2.0+ */ function(a){"use strict";PT_CV_PUBLIC=PT_CV_PUBLIC||{};var b,c=PT_CV_PUBLIC._prefix,d=function(){};d.cdata={debug:!1,delay_seconds:800,selectors:{wrapper:"."+c+"wrapper",view:"."+c+"view",item:"."+c+"content-item",pagination:"."+c+"pagination-wrapper",sfilter:"."+c+"filter-bar",foption:"."+c+"filter-option"},"class":{sf_active:"active",sf_group_active:"selected",sfilter_taxogroup:c+"groupsf"},_debug:function(a,b){d.cdata.debug&&console.log(" "+a+" : "+("object"==typeof b?JSON.stringify(b):b))}},d._pagination_handle=function(c){var e=function(){PT_CV_PUBLIC.paging=0},f=parseInt(c.attr("data-nextpages"));return f?(b||(b=new a.PT_CV_Public({skip:!0})),void b._setup_pagination(c,f,function(){if(e(),!c.closest(d.cdata.selectors.wrapper).find(d.cdata.selectors.sfilter).length){var a=f+1;a<=parseInt(c.attr("data-totalpages"))?c.attr("data-nextpages",a):c.remove()}})):void e()},d.overlay_box=function(b){var d=c+"overlay-box";return"add"===b?'
loading
':void a("."+d).remove()},d.add_param_tourl=function(a,b){return a+(a.indexOf("?")>=0?"&":"?")+b},d.change_url_wo_reload=function(a){a&&history.pushState(null,null,a)},d.pathname_from_url=function(a){var b=document.createElement("a");b.href=a;var c=b.pathname;return c.startsWith("/")||(c="/"+c),c},d.do_lazyload=function(b){var c=0,e=a(".cvplazy[data-cvpsrc]",b).length;a(".cvplazy[data-cvpsrc]",b).each(function(){a(this).attr("src",a(this).data("cvpsrc")),a(this).removeAttr("data-cvpsrc"),a(this).css("opacity",0),a(this).data("cvpset")&&(a(this).attr("srcset",a(this).data("cvpset")),a(this).removeAttr("data-cvpset"));var b=a(this);window.cvp_lazy_dosimple?b.css("opacity",1):b.parent().cvp_imagesLoaded(function(){b.parent().removeClass("cvp-lazy-container"),b.css("opacity",1),c++,c===e&&a("body").trigger("broadcast-shuffle-update")})}),a(".cvp-play").on("click",function(b){b.preventDefault();var c=a(this).parent().children("iframe");if(c.length){var e=c.data("cvpsrc");c.attr("src",d.add_param_tourl(e,e.indexOf("soundcloud")>=0?"auto_play=true":"autoplay=true")),c.removeAttr("data-cvpsrc"),a(this).next("img").remove(),a(this).remove()}})},d.shuffle_before=function(a){a.before(d.overlay_box("add"))},d.get_view_id=function(a){var b=a.is(d.cdata.selectors.view)?a:a.parent(),e=b.attr("id"),f=new RegExp(c+"view-");return e?e.replace(f,""):""},d.shuffle_after=function(b){b.addClass("cvpshuffled"),d.overlay_box("remove"),d.do_lazyload(b),a("body").on("cvp-resize",function(){d.hidden_or_not_hidden(b,function(){b.cvp_shuffle("update")})});var c=d.get_view_id(b),e=c?"."+c:"";c&&a("body").off("broadcast-shuffle-update"+e),a("body").on("broadcast-shuffle-update"+e,function(){b.width()>0&&b.cvp_shuffle("update")})},d.shuffle_append=function(a,b){a&&a.length&&(a.css({opacity:0}),a.cvp_imagesLoaded(function(){b.cvp_shuffle("appended",a),a.css({opacity:1})}))},d.hidden_or_not_hidden=function(a,b,c){var e=d.cdata.delay_seconds;setTimeout(function(){if(!a.is(":visible")||a.is(":hidden")){if(!a.hasClass("cvp-hidden")){a.addClass("cvp-hidden");var d=setInterval(function(){a.width()>0&&(clearInterval(d),a.removeClass("cvp-hidden"),"function"==typeof b&&b())},e)}}else"function"==typeof c&&c()},e)},d.get_device_by_width=function(){var a=null;return a=window.matchMedia("(min-width: 992px)").matches?"pc":window.matchMedia("(min-width: 768px)").matches?"tablet":"mobile"},d.dynamic_init=function(){new a.PT_CV_Pinterest,new a.PT_CV_Glossary;var b="."+c+"scrollable";a(".carousel-control.left",b).off("click").on("click",function(){"function"==typeof jQuery.fn.cvcarousel?a(this).parent().cvcarousel("prev"):a(this).parent().carousel("prev")}),a(".carousel-control.right",b).off("click").on("click",function(){"function"==typeof jQuery.fn.cvcarousel?a(this).parent().cvcarousel("next"):a(this).parent().carousel("next")})},d.lineup_fields=function(b,d){var e=new Array("title","content","meta-fields","ctf-list"),f="."+c+"readmore:not(."+c+"textlink)",g=function(b){b.cvp_imagesLoaded(function(){var g;a.each(e,function(e,h){var i=b.find("."+c+h);if(!("resized"!==d&&i.attr("style")&&i.attr("style").indexOf("height")>=0)){var j="content"===h;if(j&&(g=b.find(f)),i.length){"resized"===d&&(i.height("auto"),j&&g.css("position","relative"));var k=i.map(function(){return a(this).height()}).get(),l=Math.max.apply(null,k);parseInt(l)&&(i.height(l),j&&g.css({position:"absolute",bottom:"0px"}))}}})})};g(b)},window.cvp_common=d}(jQuery),function(a){"use strict";PT_CV_PUBLIC=PT_CV_PUBLIC||{};var b=PT_CV_PUBLIC._prefix,c=window.cvp_common,d=!1,e={sf_term:{},sf_solved_term:[],sf_triggered_term:[],sf_term_taxo:{},sf_taxo_operator:{},separator:" "};window.cvsf_data=e;var f={reset_view:function(a){e.sf_term[a]={},e.sf_solved_term[a]=[],e.sf_triggered_term[a]=[],e.sf_term_taxo[a]={}},set_term:function(a,b){e.sf_term[a]=b,c.cdata._debug("set term",f.get_val("sf_term",a))},set_solved_term:function(a){e.sf_solved_term[a]=e.sf_solved_term[a]||[];var b=f.get_val("sf_term",a);e.sf_solved_term[a].indexOf(b)<0&&e.sf_solved_term[a].push(b)},set_sf_triggered_term:function(a){e.sf_triggered_term[a]=e.sf_triggered_term[a]||[];var b=f.get_val("sf_term",a);e.sf_triggered_term[a].indexOf(b)<0&&e.sf_triggered_term[a].push(b)},do_sf_triggered_term:function(b,c){var d=f.get_val("sf_triggered_term",b),e=f.get_val("sf_term",b);d.length>0&&a.inArray(e,d)>=0||(f.set_sf_triggered_term(b),c())},set_stt:function(a,b,c){e.sf_term_taxo[a]=e.sf_term_taxo[a]||{},e.sf_term_taxo[a][b]=e.sf_term_taxo[a][b]||[],e.sf_term_taxo[a][b].indexOf(c)<0&&e.sf_term_taxo[a][b].push(c)},set_operator:function(a,b,c){e.sf_taxo_operator[a]=e.sf_taxo_operator[a]||{},e.sf_taxo_operator[a][b]=c},is_empty:function(a){var b=f.get_val("sf_term",a);return null===b||""===b||"all"===b},get_val:function(a,b){return e[a][b]},reset_val:function(a){e.sf_term_taxo[a]={},e.sf_taxo_operator[a]={}},setWindowData:function(a,b){window.cvdata=window.cvdata||{},window.cvdata.sf_taxo=JSON.stringify(e.sf_term_taxo),window.cvdata.sf_opera=JSON.stringify(e.sf_taxo_operator),window.cvdata.sf_pids=window.cvdata.sf_pids||{},a&&(window.cvdata.sf_pids[a]=JSON.stringify(b))}};a.CVP_Shuffle_Filter=function(){this.init()},a.CVP_Shuffle_Filter.prototype={init:function(){var d=this;a(c.cdata.selectors.wrapper).each(function(){var e=a(this).find(c.cdata.selectors.sfilter);if(e.length){var g=d._shuffle_get_items(e.first()),h=c.get_view_id(g);c.shuffle_before(g),f.reset_view(h),g.cvp_imagesLoaded(function(){f.set_term(h,"all");var a=e.hasClass(b+"filter-group");g.addClass(a?c.cdata["class"].sfilter_taxogroup:""),d._shuffle_main(e,g,h,a),d._shuffle_actions(g,h)}),c.hidden_or_not_hidden(g,function(){g.cvp_shuffle("update")})}}),a("body").on(b+"before-pagination",function(){f.setWindowData(0,0)}),a("body").on(b+"pagination-finished "+b+"pagination-finished-simple",function(a,b,e){if(b){var f=b.closest(c.cdata.selectors.wrapper).find(c.cdata.selectors.sfilter);if(f.length){var g=d._shuffle_get_items(f.first());g.trigger("cvpsf-paginated",[e])}}})},_shuffle_init:function(a){a.cvp_shuffle({itemSelector:c.cdata.selectors.item,delimeter:e.separator,supported:a.parent().hasClass(b+"collapsible")?!0:!1})},_shuffle_get_items:function(d){null===d&&(d=a(c.cdata.selectors.sfilter));var e=d.parent().find(c.cdata.selectors.view);return e.find("."+b+"page").length?e.find("."+b+"page"):e},_filter_this_item:function(b,c,d){var e=a.map(c,function(c){return a.inArray(c.toString(),b)<0?null:c});return"or"===d?e.length:e.length===c.length},_get_item_groups:function(a){var b=a.data("groups");return b.toString().split(e.separator)},_get_taxonomy:function(a){var c=a.attr("id"),d=new RegExp(b+"filter-bar-[^-]+-");return c?c.replace(d,""):""},_get_term_to_filter:function(a,b,c,d,e){var g=b.data("value");g&&"all"!==g&&(c.push(g),d&&f.set_stt(a,e,g))},_pagination_toggle:function(a,b){var d=a.closest(c.cdata.selectors.wrapper).find(c.cdata.selectors.pagination);b?d.show():(d.hide(),c.cdata._debug("pagination HIDE",1))},_is_sf_type:function(a,b,d){if(!Object.keys(f.get_val("sf_term_taxo",d)).length)return!1;var e=b.hasClass(c.cdata["class"].sfilter_taxogroup);return"group"===a?e:!e},_no_item_found:function(b){if(window.cvp_sf_nopost){var d={},e=b.closest(c.cdata.selectors.wrapper),f="cvpsfnpf";return d.init=function(){if(!e.find("."+f).length){var b=a("
",{"class":f,text:PT_CV_PUBLIC.sf_no_post_found,style:"display:none"});e.append(b)}},d.handle=function(){b.find(".filtered").length?e.find("."+f).hide():e.find("."+f).show()},d.init(),d.handle(),d}},_do_shuffle:function(d,e){var g=this,h=d.length;if(h>0)if(1===h)e.cvp_shuffle("shuffle",""+d[0]);else{var i=c.get_view_id(e),j=g._is_sf_type("group",e,i);e.cvp_shuffle("shuffle",function(c){var h=g._get_item_groups(c),k=e.data("sfop");if(j){var l="or"===k,m=l?!1:!0;return a.each(f.get_val("sf_term_taxo",i),function(c,d){if(d.length){var e=a('[data-taxonomy="'+c+'"]').parent().find("."+b+"filter-operator input:checked").val(),j=g._filter_this_item(h,d,e)?!0:!1;m=l?m||j:m&&j,f.set_operator(i,c,e)}}),m}return g._filter_this_item(h,d,k)})}else e.cvp_shuffle("shuffle","all")},_shuffle_steps:function(a,b,c){var d=a();this._do_shuffle(d,b),c!==!1&&b.trigger("cvpsf-toggle-pagination",[d.join()])},_shuffle_main:function(d,e,g,h){var i=this;i._shuffle_init(e);var j=function(){var e=[];return f.reset_val(g),h?d.find("."+b+"filter-title").each(function(){var b=a(this).data("taxonomy");a(this).parent().find("."+c.cdata["class"].sf_group_active).each(function(){var c=a(this);i._get_term_to_filter(g,c,e,!0,b)})}):d.each(function(){var b=a(this),f=i._get_taxonomy(b),h=b.find("."+c.cdata["class"].sf_active);h.is(c.cdata.selectors.foption)||(h=h.children()),i._get_term_to_filter(g,h,e,d.length,f)}),e};window.sf_enable_trigger||a(c.cdata.selectors.foption,d).off("click");var k=c.cdata["class"].sf_active;a(c.cdata.selectors.foption,d).on("click",function(b){b.preventDefault(),a(this).hasClass(k)||a(this).parent().hasClass(k)||i._shuffle_styles(a(this),function(){i._shuffle_steps(j,e)})}),h&&a("."+b+"filter-operator input",d).on("change",function(){i._shuffle_steps(j,e,!1)}),a("body").trigger("cvp-shuffle-main")},_shuffle_actions:function(e,g){var h=this;e.on("cvpsf-toggle-pagination",function(b,c){var d=f.get_val("sf_solved_term",g);d.length>0&&a.inArray(c,d)>=0?(f.set_term(g,null),h._pagination_toggle(e)):(f.set_term(g,c),h._pagination_toggle(e,"show"))}),e.on("layout.shuffle",function(i,j){c.shuffle_after(e);var k=[];if(j.$items.each(function(){a(this).hasClass("filtered")&&k.push(a(this).data("pid"))}),f.setWindowData(g,k),!f.is_empty(g)&&void 0!==e.data("sftp")){var l=e.closest(c.cdata.selectors.wrapper).find("."+b+"more:visible");l.length&&f.do_sf_triggered_term(g,function(){c.cdata._debug("Trigger pagination",l.length),c._pagination_handle(l),d=!0})}h._no_item_found(e)}),e.on("cvpsf-paginated",function(b,i){var j,k=h._is_sf_type("others-multi",e,g),l=a.map(f.get_val("sf_term_taxo",g),function(a){return a}),m=e.data("sfop"),n=0;i.each(function(){var b=a(this).data("pid");if(b){n++;var c=e.find('[data-pid="'+b+'"]');if(1===c.length){var d=1;if(k){var f=h._get_item_groups(c);d=h._filter_this_item(f,l,m)}d&&(j="undefined"==typeof j?c:j.add(c))}else c.length>1&&c.not(":first").remove()}});var o=j&&j.length;o&&c.shuffle_append(j,e),e.trigger("cvpsf-solve-term",[o||n]),d=!1}),e.on("cvpsf-solve-term",function(a,b){var c=parseInt(e.data("sfpp")),d=e.data("sfshowall");(void 0!==d&&!b||void 0===d&&(c>b||!b))&&(f.set_solved_term(g),h._pagination_toggle(e))})},_shuffle_styles:function(b,e){if(!d){var f=function(a,b){var d=c.cdata["class"].sf_active;a.children("."+d).removeClass(d),b.addClass(d)},g=b.data("sftype");switch(g){case"button":f(b.parent(),b);break;case"dropdown":f(b.closest(".dropdown-menu"),b.parent()),b.parents(".btn-group").find(".dropdown-toggle").html(b.text()+' ');break;case"breadcrumb":f(b.closest(".breadcrumb"),b.parent());break;case"group":b.toggleClass(c.cdata["class"].sf_group_active)}a("body").trigger("cvp-shuffle-clicked",[b]),"function"==typeof e&&e()}}}}(jQuery),function(a){"use strict";PT_CV_PUBLIC=PT_CV_PUBLIC||{},a.CVP_AutoFix=function(){this.init()},a.CVP_AutoFix.prototype={init:function(){var b=function(){a(".cvp-replayout").parent('[style*="height: 0px"]').css("height","auto"),a(".cvp-replayout").removeClass("elementor-post elementor-grid-item"),a(".cvp-replayout").parent().removeClass("row-isotope")};a(window).on("load",function(){b()})}},a(function(){new a.CVP_AutoFix;var b=a.fn.simpleselect;a.fn.simpleselect=function(){return a(this).parent().hasClass("cvp-dropdown")?void a("head").append(''):b.apply(this,arguments)}})}(jQuery),function(a){"use strict";PT_CV_PUBLIC=PT_CV_PUBLIC||{};var b=PT_CV_PUBLIC._prefix,c=window.cvp_common;a.CVP_LazyLoad=function(){this.init()},a.CVP_LazyLoad.prototype={init:function(){var d=function(d){d||(d=a(c.cdata.selectors.view)),d.each(function(){var d=a(this),e=d.is(c.cdata.selectors.view)?d:d.closest(c.cdata.selectors.view);e.hasClass(b+"pinterest")||e.parent().find(c.cdata.selectors.sfilter).length||c.do_lazyload(d)})};a(window).on("load",function(){d()}),a("body").on(b+"pagination-finished",function(a,b){d(b)})}},a(function(){new a.CVP_LazyLoad})}(jQuery),function(a){"use strict";PT_CV_PUBLIC=PT_CV_PUBLIC||{};var b=PT_CV_PUBLIC._prefix,c=window.cvp_common,d=".cvp-live-filter",e=1;a.CVP_LIVE_FILTER=function(){this.init()},a.CVP_LIVE_FILTER.prototype={init:function(){var b=this;b.init_lib(),a(window).on("load",function(){setTimeout(function(){a(window).on("popstate",function(e){if(a(d).length){var f=e.originalEvent.state&&e.originalEvent.state.query?e.originalEvent.state.query:"";f?(a(c.cdata.selectors.wrapper).hide(),b.get_result(f,a(d))):window.cvp_lf_disable_state||window.location.hash||window.location.reload()}})},0)}),a("input, select",d).on("change",function(){a(this).off("change"),a(this).data("nosubmit")||b.process_filter(a(this),1)}),setTimeout(function(){b.on_click_pagination()},100)},init_lib:function(){var b=this;a(".cvp-range input").each(function(){a(this).cvp_ionRangeSlider({input_values_separator:",",onFinish:function(b){a(b.input).trigger("change")}});var c=a(this).attr("name"),d=b.param_in_url(c),e="cvplf_track_"+c;window[e]=0,d&&(a(this).val(decodeURIComponent(d)),window[e]="changed"),a(this).on("change",function(){var b=a(this),c=b.data("from"),d=b.data("to");b.val(c+","+d),window[e]="changed"})}),this.search_field(),this.date_field(),setTimeout(function(){b.submit_reset()},100)},search_field:function(){var b=this,c=a("[name]",".cvp-search-box");c.on("keypress",function(c){var d=c.which||c.keyCode;13===d&&b.process_filter(a(this),1)});var d=function(){var b=function(a){a.next("span").toggle(Boolean(a.val()))};c.on("keyup",function(){b(a(this))}),b(c)};d()},date_field:function(){var b=a("[class^='cvp-date']",".cvp-live-filter");b.each(function(){a(this).cvp_datepicker({dateFormat:"yy-mm-dd",showButtonPanel:!0,closeText:a.cvp_datepicker.resetText?a.cvp_datepicker.resetText:"Reset",changeMonth:!0,changeYear:!0,onClose:function(){a.cvp_datepicker._clearDate(this),a(this).trigger("change")}});var b=[];a(this).on("change",function(){var c=a(this).closest(".cvp-daterange");c.find("label:not(.hidden) input").each(function(){b.push(a(this).val())});var d=c.find('input[type="hidden"]'),e=b.join(",");d.val(","!==a.trim(e)?e:""),d.trigger("change")})})},submit_reset:function(){var b=this,f=a(d+":last"),g=f.closest(c.cdata.selectors.wrapper),h="cvp-live-button";if(!g.find("."+h).length&&(g.find(".cvp-range").length||g.find(".cvp-search-box").length||window.cvp_lf_submit_reset)){var i="cvp-live-submit",j="cvp-live-reset",k=window.cvp_lf_submit_text||"Submit",l=window.cvp_lf_reset_text||"Reset";f.after('
'+k+''+l+'

'),a("."+i).on("click",function(){b.process_filter(a(this),1)}),a("."+j).on("click",function(){e=1,b.get_result("",g)})}},get_configuration:function(a,b){var c=a.find(".cvp-live-config");return c.length?c.data(b):null},is_in_sidebar:function(a,b){return b||(b=a.children(c.cdata.selectors.view)),!b.length},is_replacing_layout:function(a){return a.parent().hasClass("cvp-replayout")},before_process:function(a){a.prepend(c.overlay_box("add"));var b=a.children(c.cdata.selectors.view);b.length&&a.children().first().css("height",parseInt(b.position().top)+10+"px"),(this.is_in_sidebar(a,b)||this.is_replacing_layout(a))&&(window.cvp_lf_reload_url=!0)},process_filter:function(b,d){e=d;var f=b.closest(c.cdata.selectors.wrapper),g=this;window.cvp_lf_changed_filter=b.attr("name")||f.find("[data-nosubmit]").last().attr("name");var h=f.find("input, select").serialize(),i=[],j=[];a.each(h.split("&"),function(a,b){var c=b.split("="),d=c[0],e=c[1];!e||"undefined"!=typeof window["cvplf_track_"+d]&&"changed"!==window["cvplf_track_"+d]||(i[d]="undefined"==typeof i[d]?e:i[d]+","+e)}),"function"==typeof window.cvp_lf_fn_modify_query&&(i=window.cvp_lf_fn_modify_query(i)),i=g.get_current_page(i),Object.keys(i).forEach(function(a){j.push(a+"="+i[a])}),j=j.join("&"),g.get_result(j,f)},param_in_url:function(b){var c,d=window.location.search.replace("?","").split("&");return a.each(d,function(a,d){var e=d.split("=");e[0]===b&&(c=e[1])}),c},update_url:function(a,b){var c,d=window.location.href,e=window.location.search,f=a?"?"+a:"",g=this.get_configuration(b,"submit-to");window.location.hash&&(d=d.replace(window.location.hash,"")),c=g?encodeURI(g)+f:e?d.replace(e,f):d+f,c=c.replace(/\/page(d)?\/\d+/,""),window.cvp_lf_reload_url?(history.replaceState({query:a},null,c),window.location.href=c):history.pushState({query:a},null,c)},get_result:function(b,c){var d=this;if(!window.cvp_lf_processing){window.cvp_lf_processing=!0;var e=a('[data-lfpage="search"]',c).length?"s=":"";e&&!b.match("[&]?s=")&&(b+=b?"&"+e:e);var f=window.cvp_lf_special_url_params||["lang","taxonomy","term"];a.isArray(f)&&f.forEach(function(a){var c=new RegExp("[?&]"+a+"=");if(window.location.search.match(c)){var e=encodeURIComponent(d.param_in_url(a));e&&(e=a+"="+e,b+=b?"&"+e:e)}}),d.before_process(c),(PT_CV_PUBLIC.is_admin||!window.cvp_lf_reload_url)&&d.ajax_request(b,c),PT_CV_PUBLIC.is_admin||d.update_url(b,c),window.cvp_lf_processing=!1}},ajax_request:function(c,d){var e=this;a.ajax({type:"POST",url:PT_CV_PUBLIC.ajaxurl,data:{action:"live_filter_reload",query:c,view_data:PT_CV_PUBLIC.is_admin?window.cvp_admin_form:0,sid:d.find("[data-sid]").first().data("sid"),lang:PT_CV_PUBLIC.lang,ajax_nonce:PT_CV_PUBLIC._nonce},beforeSend:function(){}}).done(function(c){PT_CV_PUBLIC.is_admin&&d.after(d.find('style[id*="inline-style"]')),d.html(c),e.init_pagination(d),e.init(),new a.PT_CV_Pinterest({container:f});var f=d.find("."+b+"page");a("body").trigger(b+"pagination-finished",[f,a(c)])})},init_pagination:function(c){a("."+b+"pagination."+b+"ajax",c).each(function(){var b=a(this).attr("data-totalpages");a(this).bootstrapPaginator({bootstrapMajorVersion:3,currentPage:e,totalPages:b?parseInt(b):1,numberOfPages:PT_CV_PUBLIC.page_to_show,shouldShowPage:function(a){if(!(b&&10>b))return!0;switch(a){case"first":case"last":return!1;default:return!0}},itemContainerClass:function(a,b,c){var d="cv-pageitem-"+("page"===a?"number":a);return d+" "+(b===c?"active":"")}})})},on_click_pagination:function(){var f=this,g=[];a(d).each(function(){var d=a(this),h=d.data("sid");g.includes(h)||(g.push(h),a('[data-sid="'+h+'"]').parent(c.cdata.selectors.pagination).each(function(){var c=a(this),g=c.find("."+b+"pagination");g.attr("data-disabled",1),g.find(".active a").off("click"),g.on("page-changed",function(a,b,c){e=c}),g.on("page-clicked",function(b,c,e,g){f.process_filter(d,g),window.cvp_lf_reload_url||window.cvp_pagination_no_scroll||a("html, body").animate({scrollTop:d.offset().top},1e3)})}))})},get_current_page:function(a){return e>1&&(a._page=e),a}}}(jQuery),/** * CVPro JS * @author PT Guy * @license GPL-2.0+ */ function(a){"use strict";PT_CV_PUBLIC=PT_CV_PUBLIC||{};var b=PT_CV_PUBLIC._prefix,c=a(window).width(),d=window.cvp_common,e=function(c){if(this.options=a.extend({_prefix:b,_autoload:1},c),0!==this.options._autoload){this.animation(),this.pagination(),this.openin_window(),this.openin_lightbox(),this.open_in(),this.grid_same_height(),this.iframe_dimension(),this.quicksand_filter(),this.parties_compatible();var d=this;a(window).on("orientationchange resize",function(){d.grid_same_height("resized"),a("body").trigger("cvp-resize")}),a("."+b+"same-height").length&&a('[role="tab"] a, [role="tab"], [data-toggle] a, [data-toggle]').on("click",function(){setTimeout(function(){d.grid_same_height("tab")},1e3)}),a("body").on(b+"pagination-finished-simple broadcast-shuffle-update",function(){d.grid_same_height("resized")})}};e.prototype={reset_after:function(b){this.view_init(b),this.animation(),this.grid_same_height(b?"paging":"preview"),this.open_in(),this.openin_lightbox(),void 0===b&&this.quicksand_filter(),new a.PT_CV_Share_Count,new a.CVP_LazyLoad},view_init:function(c){new a.PT_CV_Collapsible,new a.PT_CV_Scrollable,new a.PT_CV_Glossary,void 0===c&&new a.PT_CV_Pinterest({container:a("."+b+"pinterest")})},iframe_dimension:function(){PT_CV_PUBLIC.is_mobile_tablet&&a("."+b+"view iframe").each(function(){var b=function(a){var b=a.width(),c=parseInt(a.attr("width")),d=parseInt(a.attr("height"));a.attr("width",b),a.attr("height",b*d/c)};a(this).on("load",function(){b(a(this))})})},open_in:function(){a("."+b+"none").each(function(){a(this).removeAttr("href")}),a("."+b+"none").on("click",function(a){a.preventDefault()})},grid_same_height:function(c){a("."+b+"same-height").children("."+b+"page").each(function(){if(!a(this).is(":hidden")){var b,e=d.get_device_by_width();switch(e){case"pc":b="cvc";break;case"tablet":b="cvct";break;case"mobile":b="cvcm"}var f=d.cdata.selectors.item,g=a(this).data(b),h=g,i=-1;if(g>1)for(;i0?":gt("+i+")":"";i+=g,h+=g;var l=a(f+j+k,this);d.lineup_fields(l,c)}}})},animation:function(){var c="."+b+"content-hover";PT_CV_PUBLIC.is_mobile&&a("."+b+"thumbnail",c).on("click",function(c){var e=a(this).closest(d.cdata.selectors.view);e.hasClass(b+"force-mask")||c.preventDefault()});var e=function(a){a.find("."+b+"href-thumbnail")[0].click()},f="click";a("."+b+"hover-wrapper","."+b+"clickable").on(f,function(b){b.target==this&&e(a(this).parent())}),a("."+b+"mask > *","."+b+"clickable").on(f,function(c){c.target==this&&e(a(this).closest("."+b+"hover-wrapper"))})},pagination:function(){this._pagination_loadmore(),this._pagination_infinite()},_pagination_loadmore:function(){a("body").on("click","."+b+"more",function(){var b=a(this);d._pagination_handle(b)})},_pagination_infinite:function(){var c,e=this,f=function(c){a(d.cdata.selectors.pagination).each(function(){if(c=c?c:e._scrollTo(a(this),window.cvp_trigger_infinite?window.cvp_trigger_infinite:300),a(this).prev().hasClass(b+"pginfinite")&&c){var f=a(this).find("."+b+"more");d._pagination_handle(f)}})},g=function(a,b){a.scroll(function(){c&&clearTimeout(c),c=setTimeout(b,200)})};g(a(window),function(){f()}),g(a("#"+b+"preview-box"),function(){f(a(this).scrollTop()+a(this).innerHeight()>=a(this)[0].scrollHeight)})},_scrollTo:function(b,c){if(0===a(b).length||a(b).is(":hidden"))return!1;var d=a(window).scrollTop(),e=d+a(window).height(),f=a(b).offset().top,g=f+a(b).height();return e>=g-(c?c:0)&&f>=d},openin_window:function(){var c=this;a("body").on("click","."+b+"window",function(b){b.preventDefault(),c.fn_openin_window(a(this))})},fn_openin_window:function(a){var b=a.attr("href"),c=parseInt(a.attr("data-width")),d=parseInt(a.attr("data-height")),e=window.screen.width/2-c/2,f=window.screen.height/2-d/2,g="toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=1, resizable=no, copyhistory=no, ";window.open(b,"_blank",g+" top="+f+", left="+e+", width="+c+", height="+d)},openin_lightbox:function(){var e=this;a(document).on("cvpbox_complete",function(){if(a("#cvpcolorbox").hasClass(b+"lightbox-dialog")){var c=a.cvpcolorbox.element().attr("href");if(c){var e=d.pathname_from_url(c);"undefined"!=typeof _gaq&&_gaq.push(["_trackPageview",e]),"undefined"!=typeof ga&&ga("send",{hitType:"pageview",page:e})}}});var f=function(){var b="cvp-overflow-hidden";a(document).on("cvpbox_open",function(){a("html").addClass(b)}),a(document).on("cvpbox_closed",function(){a("html").removeClass(b)})};f();var g=function(){var b,c=window.location.href;a(document).on("cvpbox_clicked",function(a,c){b=c.attr("href")}),a(document).on("cvpbox_complete",function(){d.change_url_wo_reload(b)}),a(document).on("cvpbox_closed",function(){b=null,d.change_url_wo_reload(c)})};g(),a(document).on("cvpbox_closed",function(){a('[id="cvpcolorbox"]:not(#cvpcolorbox:first)').remove(),a('[id="cvpboxOverlay"]:not(#cvpboxOverlay:first)').remove()}),e.fn_lightbox_image(a("."+b+"lightbox-image")),a("body").on("click","."+b+"lightbox",function(b){b.preventDefault(),e.fn_lightbox_content(a(this))}),a("body").on("cvp-resize",function(){var b=a(window).width(),d=c;if(c=b,!(navigator.platform.toUpperCase().indexOf("MAC")>=0||Math.abs(d-b)<30)){var e;"undefined"!=typeof e&&clearTimeout(e),e=setTimeout(function(){a("#cvpboxOverlay").is(":visible")&&a.cvpcolorbox.relaunch()},500)}})},fn_lightbox_image:function(c){var e=/\.(jpeg|jpg|gif|png|webp|bmp|tif|tiff|ico|svg)/i;c.cvpcolorbox({maxWidth:"95%",maxHeight:"90%",href:function(){var b=a(this).attr("href");return b.match(/youtube\.com|youtu\.be/)&&(b=b.replace("/watch?v=","/embed/").replace("/playlist","/embed/videoseries")),b},rel:function(){var b=a(this).attr("class"),c=b.split(" ");return b.indexOf("cvplbd")<0?c[1]:!1},title:function(){var c=a('a[href="'+a(this).attr("href")+'"]',d.cdata.selectors.item),e=c.closest(d.cdata.selectors.item).find("."+b+"title"),f=c.find("img"),g=e.length?e.text():f.length?f.attr("alt"):!1;return g},iframe:function(){return a(this).attr("href").match(e)?!1:!0},innerWidth:function(){return a(this).attr("href").match(e)?!1:"600px"},innerHeight:function(){return a(this).attr("href").match(e)?!1:"400px"}})},fn_lightbox_content:function(c){var e,f,g=c.attr("data-content-selector");if(window.cvp_lb_change_url&&a(document).trigger("cvpbox_clicked",[c]),PT_CV_PUBLIC.is_mobile?(e=window.cvp_lbwidth_mobile||90,f=window.cvp_lbheight_mobile||75):(e=parseInt(c.attr("data-width"))||75,f=parseInt(c.attr("data-height"))||75),g){var h=b+"overlay",i=a("#"+h).length?a("#"+h):a("
",{id:b+"overlay"}).css({background:"#000",opacity:.9,position:"fixed",width:"100%",height:"100%",left:0,top:0,zIndex:1e6}).appendTo("body");i.show(),a("body").css("cursor","progress");var j=b+"lightbox-content",k=a("#"+j).length?a("#"+j):a("
",{id:j}).hide().appendTo("body");k.load(c.attr("href")+" "+g,function(g,h){i.hide(),a("body").css("cursor","default"),"error"!==h&&c.cvpcolorbox({open:!0,fixed:!0,className:b+"lightbox-dialog",width:e+"%",height:f+"%",html:k.html()?k.html():g,onComplete:function(){a("body").trigger(b+"lightbox-loaded"),a("#"+j).remove(),d.dynamic_init()}})})}else c.cvpcolorbox({iframe:!0,width:e+"%",height:f+"%"})},quicksand_filter:function(){new a.CVP_Shuffle_Filter,new a.CVP_LIVE_FILTER},unFitVids:function(){a(document).ready(function(){setTimeout(function(){a("iframe",d.cdata.selectors.view).each(function(){var b=a(this).parent("div");b.length&&b.attr("class")&&b.attr("class").indexOf("fluid")>=0&&(a(this).insertBefore(b),b.remove())})},1500)})},parties_compatible:function(){var c=function(c){var e=0,f=setInterval(function(){var g=c.find("."+b+"page");g.length>0&&(clearInterval(f),window.cvp_reload_layout=!0,a("body").trigger(b+"pagination-finished",[g,g.find(d.cdata.selectors.item)])),e++>10&&clearInterval(f)},1e3)};a(document).on("facetwp-loaded",function(){c(a(".facetwp-template"))}),a("body").on("cvp-reload",function(a,b){c(b)})}},a(function(){var c=new e;a("body").on(b+"pagination-finished "+b+"pagination-finished-simple",function(a,b){b&&c.reset_after(1)}),window.cvp_enable_fitvid||c.unFitVids()}),window.cvp_js=e}(jQuery),function(a){"use strict";PT_CV_PUBLIC=PT_CV_PUBLIC||{};var b=PT_CV_PUBLIC._prefix,c=window.cvp_common;a.CVP_ResImage=function(){this.init()},a.CVP_ResImage.prototype={init:function(){var d=function(b){b=b?a(".cvp-responsive-image",b):a(".cvp-responsive-image");var c=0,d=b.length;b.each(function(){var b=a(this).find("img"),f=b.data("cvpsrc")?b.data("cvpsrc"):b.attr("src");"undefined"!=typeof f&&f&&a(this).css("background-image","url("+f+")");var g=a(this);g.cvp_imagesLoaded(function(){e(g),c++,c===d&&setTimeout(function(){a("body").trigger("broadcast-shuffle-update")},window.cvp_sf_timeout||500)})})},e=function(a){if(!window.cvp_no_responsive_img&&a.is(":visible")&&!a.is(":hidden")){var b=a.width(),c=a.data("iw"),d=a.data("ih");if(b&&c&&d){var e=b*d/c;e>d&&(e=d),e+="px",a.css("height",e)}}},f=function(b){b=b?b:c.cdata.selectors.view,a(".pt-cv-carousel",b).on("slid.bs.carousel",function(){d(a(this).find(".carousel-inner .active"))}),a(".panel-collapse",b).on("show.bs.collapse",function(){d(a(this))})};a(window).on("load",function(){d(),f()}),a("body").on(b+"pagination-finished",function(a,b){d(b),f(b)}),a("body").on("cvp-resize",function(){a(".cvp-responsive-image").each(function(){e(a(this))})})}},a(function(){new a.CVP_ResImage})}(jQuery),function(a){"use strict";PT_CV_PUBLIC=PT_CV_PUBLIC||{};var b=PT_CV_PUBLIC._prefix,c={scclass:b+"socialsc",view:"."+b+"view",item:"."+b+"content-item",buttons:"."+b+"social-buttons",sprefix:b+"social-"};a.PT_CV_Share_Count=function(){this.do_count()},a.PT_CV_Share_Count.prototype={do_count:function(){a(c.view).each(function(){if(a(this).hasClass(c.scclass)){var b=a(this),d=[],e=a.map(b.find(c.item),function(b,e){return 0===e&&(d=a.map(a(b).find(c.buttons).find("a"),function(b){var d=a(b).attr("class");return d.replace(c.sprefix,"")})),a(b).data("pid")});a.ajax({type:"POST",url:PT_CV_PUBLIC.ajaxurl,data:{action:"share_count",posts:e,services:d,ajax_nonce:PT_CV_PUBLIC._nonce}}).done(function(d){var e=a.parseJSON(d);a.each(e,function(d,e){var f=b.find(c.item+'[data-pid="'+d+'"]');a.each(e,function(a,b){f.find("."+c.sprefix+a).html(b)})})})}})}},a(function(){new a.PT_CV_Share_Count})}(jQuery),function(a){"use strict";a.PT_CV_Collapsible=a.PT_CV_Collapsible||{},PT_CV_PUBLIC=PT_CV_PUBLIC||{};var b=PT_CV_PUBLIC._prefix;a.PT_CV_Collapsible=function(c){this.options=a.extend({collapse_box:"."+b+"collapsible",icon_plus:"glyphicon-plus",icon_minus:"glyphicon-minus"},c),this._toggle_panel(this.options.collapse_box)},a.PT_CV_Collapsible.prototype={_toggle_panel:function(b){var c=this,d=a(".panel-collapse",b);d.each(function(){a(this).hasClass("in")&&c._toggle_class(a(this),"show")}),d.on("shown.bs.collapse",function(){c._toggle_class(a(this),"show")}),d.on("hidden.bs.collapse",function(){c._toggle_class(a(this))}),a(b).on("click","span.panel-collapsed",function(){"function"==typeof jQuery.fn.cvcollapse?a(this).parent().next().cvcollapse("toggle"):a(this).parent().next().collapse("toggle")}),d.on("show.bs.collapse",function(){c.for_sf(a(this),"hide-items")})},_toggle_class:function(a,b){var c,d,e=this,f=this.options;"show"===b?(c=f.icon_plus,d=f.icon_minus):(c=f.icon_minus,d=f.icon_plus),a.prev().find(".glyphicon").removeClass(c).addClass(d),setTimeout(function(){e.for_sf(a,"show-items-then-update")},250)},for_sf:function(a,b){var c=a.closest(".pt-cv-page");c.hasClass("cvpshuffled")&&("hide-items"===b?a.closest(".pt-cv-content-item").nextAll().css("opacity",0):(a.closest(".pt-cv-content-item").nextAll().css("opacity",1),c.cvp_shuffle("update")))}},a(function(){new a.PT_CV_Collapsible})}(jQuery),function(a){"use strict";a.PT_CV_Glossary=a.PT_CV_Glossary||{},PT_CV_PUBLIC=PT_CV_PUBLIC||{};var b=PT_CV_PUBLIC._prefix;a.PT_CV_Glossary=function(a){this.options=a;var b=this;setTimeout(function(){b._click()},500)},a.PT_CV_Glossary.prototype={_click:function(){a("."+b+"gls-menu a").off("click").on("click",function(c){if(c.preventDefault(),!a(this).hasClass("pt-active")){var d=this.hash;a(this).closest("."+b+"gls-menu").find(".pt-active").removeClass("pt-active"),a(this).addClass("pt-active");var e=a(this).closest("."+b+"gls-menu").parent().children("."+b+"glossary");e.length>0&&(a(this).parent().index()>0?(e.find("."+b+"gls-group").hide(),e.find(d).fadeIn()):e.find("."+b+"gls-group").show())}})}},a(function(){new a.PT_CV_Glossary})}(jQuery),function(a){a.PT_CV_Pinterest=a.PT_CV_Pinterest||{},PT_CV_PUBLIC=PT_CV_PUBLIC||{};var b=PT_CV_PUBLIC._prefix,c=window.cvp_common;a.PT_CV_Pinterest=function(c){this.options=a.extend({wrapper:"."+b+"wrapper",sfilter:"."+b+"filter-bar",container:"."+b+"pinterest",item:"."+b+"content-item",page:"."+b+"page"},c),this.init()},a.PT_CV_Pinterest.prototype={init:function(){var d=this;a(d.options.container).each(function(){var e=a(this),f=e.hasClass(b+"masonry"),g=e.closest(d.options.wrapper).find(d.options.sfilter);g.length||c.hidden_or_not_hidden(e,function(){d.render_layout(e,f)},function(){d.render_layout(e,f)})})},render_layout:function(b,d){var e=this,f=b.find(e.options.page).length?b.find(e.options.page+":visible"):b;c.shuffle_before(f),f.cvp_imagesLoaded(function(){f.cvp_shuffle({itemSelector:e.options.item,sizer:d?".col-md-3":null})}),f.on("layout.shuffle",function(){c.shuffle_after(f)}),f.on("cvp-pinterest-paginated",function(b,d){var e;d.each(function(){var b=a(this).data("pid");if(b){var c=f.find('[data-pid="'+b+'"]');c.length&&(e="undefined"==typeof e?c:e.add(c))}}),"undefined"!=typeof e&&c.shuffle_append(e,f)})}},a(function(){new a.PT_CV_Pinterest,a("body").on(b+"pagination-finished",function(c,d,e){if(d){var f=d.is("."+b+"view")?d:d.parent();f.hasClass(b+"pinterest")&&(f.hasClass(b+"pgregular")||window.cvp_reload_layout?new a.PT_CV_Pinterest({container:d}):d.trigger("cvp-pinterest-paginated",[e]))}})})}(jQuery),function(a){"use strict";a.PT_CV_Scrollable=a.PT_CV_Scrollable||{},PT_CV_PUBLIC=PT_CV_PUBLIC||{};var b=PT_CV_PUBLIC._prefix;a.PT_CV_Scrollable=function(a){this.options=a,this.swipe(),this.keyboard()},a.PT_CV_Scrollable.prototype={swipe:function(){a('[data-ride="cvcarousel"]',"."+b+"scrollable").cvp_swipe({swipe:function(b,c){"left"===c&&("function"==typeof jQuery.fn.cvcarousel?a(this).cvcarousel("next"):a(this).carousel("next")),"right"===c&&("function"==typeof jQuery.fn.cvcarousel?a(this).cvcarousel("prev"):a(this).carousel("prev"))},allowPageScroll:"vertical"})},keyboard:function(){a(".pt-cv-carousel").length&&a(document).on("keydown",function(b){if(!/input|textarea/i.test(b.target.tagName)){var c=a(".pt-cv-carousel"),d="function"==typeof jQuery.fn.cvcarousel;switch(b.which){case 37:b.preventDefault(),d?c.cvcarousel("prev"):c.carousel("prev");break;case 39:b.preventDefault(),d?c.cvcarousel("next"):c.carousel("next")}}})}},a(function(){new a.PT_CV_Scrollable})}(jQuery);