!function(a){a(function(){a.support.transition=function(){var a=function(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},c;for(c in b)if(a.style[c]!==undefined)return b[c]}();return a&&{end:a}}()})}(window.jQuery),!function(a){var b=function(b,c){this.options=c,this.$element=a(b).delegate('[data-dismiss="modal"]',"click.dismiss.modal",a.proxy(this.hide,this)),this.options.remote&&this.$element.find(".modal-body").load(this.options.remote)};b.prototype={constructor:b,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var b=this,c=a.Event("show");this.$element.trigger(c);if(this.isShown||c.isDefaultPrevented())return;this.isShown=!0,this.escape(),this.backdrop(function(){var c=a.support.transition&&b.$element.hasClass("fade");b.$element.parent().length||b.$element.appendTo(document.body),b.$element.show(),c&&b.$element[0].offsetWidth,b.$element.addClass("in").attr("aria-hidden",!1),b.enforceFocus(),c?b.$element.one(a.support.transition.end,function(){b.$element.focus().trigger("shown")}):b.$element.focus().trigger("shown")})},hide:function(b){b&&b.preventDefault();var c=this;b=a.Event("hide"),this.$element.trigger(b);if(!this.isShown||b.isDefaultPrevented())return;this.isShown=!1,this.escape(),a(document).off("focusin.modal"),this.$element.removeClass("in").attr("aria-hidden",!0),a.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal()},enforceFocus:function(){var b=this;a(document).on("focusin.modal",function(a){b.$element[0]!==a.target&&!b.$element.has(a.target).length&&b.$element.focus()})},escape:function(){var a=this;this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.modal",function(b){b.which==27&&a.hide()}):this.isShown||this.$element.off("keyup.dismiss.modal")},hideWithTransition:function(){var b=this,c=setTimeout(function(){b.$element.off(a.support.transition.end),b.hideModal()},500);this.$element.one(a.support.transition.end,function(){clearTimeout(c),b.hideModal()})},hideModal:function(){var a=this;this.$element.hide(),this.backdrop(function(){a.removeBackdrop(),a.$element.trigger("hidden")})},removeBackdrop:function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},backdrop:function(b){var c=this,d=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var e=a.support.transition&&d;this.$backdrop=a('
').appendTo(document.body),this.$backdrop.click(this.options.backdrop=="static"?a.proxy(this.$element[0].focus,this.$element[0]):a.proxy(this.hide,this)),e&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in");if(!b)return;e?this.$backdrop.one(a.support.transition.end,b):b()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(a.support.transition.end,b):b()):b&&b()}};var c=a.fn.modal;a.fn.modal=function(c){return this.each(function(){var d=a(this),e=d.data("modal"),f=a.extend({},a.fn.modal.defaults,d.data(),typeof c=="object"&&c);e||d.data("modal",e=new b(this,f)),typeof c=="string"?e[c]():f.show&&e.show()})},a.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},a.fn.modal.Constructor=b,a.fn.modal.noConflict=function(){return a.fn.modal=c,this},a(document).on("click.modal.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d=c.attr("href"),e=a(c.attr("data-target")||d&&d.replace(/.*(?=#[^\s]+$)/,"")),f=e.data("modal")?"toggle":a.extend({remote:!/#/.test(d)&&d},e.data(),c.data());b.preventDefault(),e.modal(f).one("hide",function(){c.focus()})})}(window.jQuery),!function(a){function d(){a(".dropdown-backdrop").remove(),a(b).each(function(){e(a(this)).removeClass("open")})}function e(b){var c=b.attr("data-target"),d;c||(c=b.attr("href"),c=c&&/#/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,"")),d=c&&a(c);if(!d||!d.length)d=b.parent();return d}var b="[data-toggle=dropdown]",c=function(b){var c=a(b).on("click.dropdown.data-api",this.toggle);a("html").on("click.dropdown.data-api",function(){c.parent().removeClass("open")})};c.prototype={constructor:c,toggle:function(b){var c=a(this),f,g;if(c.is(".disabled, :disabled"))return;return f=e(c),g=f.hasClass("open"),d(),g||("ontouchstart"in document.documentElement&&a('').insertBefore(a(this)).on("click",d),f.toggleClass("open")),c.focus(),!1},keydown:function(c){var d,f,g,h,i,j;if(!/(38|40|27)/.test(c.keyCode))return;d=a(this),c.preventDefault(),c.stopPropagation();if(d.is(".disabled, :disabled"))return;h=e(d),i=h.hasClass("open");if(!i||i&&c.keyCode==27)return c.which==27&&h.find(b).focus(),d.click();f=a("[role=menu] li:not(.divider):visible a",h);if(!f.length)return;j=f.index(f.filter(":focus")),c.keyCode==38&&j>0&&j--,c.keyCode==40&&j a",this.$body=a("body"),this.refresh(),this.process()}b.prototype={constructor:b,refresh:function(){var b=this,c;this.offsets=a([]),this.targets=a([]),c=this.$body.find(this.selector).map(function(){var c=a(this),d=c.data("target")||c.attr("href"),e=/^#\w/.test(d)&&a(d);return e&&e.length&&[[e.position().top+(!a.isWindow(b.$scrollElement.get(0))&&b.$scrollElement.scrollTop()),d]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},process:function(){var a=this.$scrollElement.scrollTop()+this.options.offset,b=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,c=b-this.$scrollElement.height(),d=this.offsets,e=this.targets,f=this.activeTarget,g;if(a>=c)return f!=(g=e.last()[0])&&this.activate(g);for(g=d.length;g--;)f!=e[g]&&a>=d[g]&&(!d[g+1]||a<=d[g+1])&&this.activate(e[g])},activate:function(b){var c,d;this.activeTarget=b,a(this.selector).parent(".active").removeClass("active"),d=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',c=a(d).parent("li").addClass("active"),c.parent(".dropdown-menu").length&&(c=c.closest("li.dropdown").addClass("active")),c.trigger("activate")}};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("scrollspy"),f=typeof c=="object"&&c;e||d.data("scrollspy",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.defaults={offset:10},a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(window.jQuery),!function(a){var b=function(b){this.element=a(b)};b.prototype={constructor:b,show:function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.attr("data-target"),e,f,g;d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,""));if(b.parent("li").hasClass("active"))return;e=c.find(".active:last a")[0],g=a.Event("show",{relatedTarget:e}),b.trigger(g);if(g.isDefaultPrevented())return;f=a(d),this.activate(b.parent("li"),c),this.activate(f,f.parent(),function(){b.trigger({type:"shown",relatedTarget:e})})},activate:function(b,c,d){function g(){e.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),f?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var e=c.find("> .active"),f=d&&a.support.transition&&e.hasClass("fade");f?e.one(a.support.transition.end,g):g(),e.removeClass("in")}};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("tab");e||d.data("tab",e=new b(this)),typeof c=="string"&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(window.jQuery),!function(a){var b=function(a,b){this.init("tooltip",a,b)};b.prototype={constructor:b,init:function(b,c,d){var e,f,g,h,i;this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.enabled=!0,g=this.options.trigger.split(" ");for(i=g.length;i--;)h=g[i],h=="click"?this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this)):h!="manual"&&(e=h=="hover"?"mouseenter":"focus",f=h=="hover"?"mouseleave":"blur",this.$element.on(e+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(f+"."+this.type,this.options.selector,a.proxy(this.leave,this)));this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(b){return b=a.extend({},a.fn[this.type].defaults,this.$element.data(),b),b.delay&&typeof b.delay=="number"&&(b.delay={show:b.delay,hide:b.delay}),b},enter:function(b){var c=a.fn[this.type].defaults,d={},e;this._options&&a.each(this._options,function(a,b){c[a]!=b&&(d[a]=b)},this),e=a(b.currentTarget)[this.type](d).data(this.type);if(!e.options.delay||!e.options.delay.show)return e.show();clearTimeout(this.timeout),e.hoverState="in",this.timeout=setTimeout(function(){e.hoverState=="in"&&e.show()},e.options.delay.show)},leave:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);this.timeout&&clearTimeout(this.timeout);if(!c.options.delay||!c.options.delay.hide)return c.hide();c.hoverState="out",this.timeout=setTimeout(function(){c.hoverState=="out"&&c.hide()},c.options.delay.hide)},show:function(){var b,c,d,e,f,g,h=a.Event("show");if(this.hasContent()&&this.enabled){this.$element.trigger(h);if(h.isDefaultPrevented())return;b=this.tip(),this.setContent(),this.options.animation&&b.addClass("fade"),f=typeof this.options.placement=="function"?this.options.placement.call(this,b[0],this.$element[0]):this.options.placement,b.detach().css({top:0,left:0,display:"block"}),this.options.container?b.appendTo(this.options.container):b.insertAfter(this.$element),c=this.getPosition(),d=b[0].offsetWidth,e=b[0].offsetHeight;switch(f){case"bottom":g={top:c.top+c.height,left:c.left+c.width / 2-d / 2};break;case"top":g={top:c.top-e,left:c.left+c.width / 2-d / 2};break;case"left":g={top:c.top+c.height / 2-e / 2,left:c.left-d};break;case"right":g={top:c.top+c.height / 2-e / 2,left:c.left+c.width}}this.applyPlacement(g,f),this.$element.trigger("shown")}},applyPlacement:function(a,b){var c=this.tip(),d=c[0].offsetWidth,e=c[0].offsetHeight,f,g,h,i;c.offset(a).addClass(b).addClass("in"),f=c[0].offsetWidth,g=c[0].offsetHeight,b=="top"&&g!=e&&(a.top=a.top+e-g,i=!0),b=="bottom"||b=="top"?(h=0,a.left<0&&(h=a.left*-2,a.left=0,c.offset(a),f=c[0].offsetWidth,g=c[0].offsetHeight),this.replaceArrow(h-d+f,f,"left")):this.replaceArrow(g-e,g,"top"),i&&c.offset(a)},replaceArrow:function(a,b,c){this.arrow().css(c,a?50*(1-a / b)+"%":"")},setContent:function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},hide:function(){function e(){var b=setTimeout(function(){c.off(a.support.transition.end).detach()},500);c.one(a.support.transition.end,function(){clearTimeout(b),c.detach()})}var b=this,c=this.tip(),d=a.Event("hide");this.$element.trigger(d);if(d.isDefaultPrevented())return;return c.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?e():c.detach(),this.$element.trigger("hidden"),this},fixTitle:function(){var a=this.$element;(a.attr("title")||typeof a.attr("data-original-title")!="string")&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},hasContent:function(){return this.getTitle()},getPosition:function(){var b=this.$element[0];return a.extend({},typeof b.getBoundingClientRect=="function"?b.getBoundingClientRect():{width:b.offsetWidth,height:b.offsetHeight},this.$element.offset())},getTitle:function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||(typeof c.title=="function"?c.title.call(b[0]):c.title),a},tip:function(){return this.$tip=this.$tip||a(this.options.template)},arrow:function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(b){var c=b?a(b.currentTarget)[this.type](this._options).data(this.type):this;c.tip().hasClass("in")?c.hide():c.show()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}};var c=a.fn.tooltip;a.fn.tooltip=function(c){return this.each(function(){var d=a(this),e=d.data("tooltip"),f=typeof c=="object"&&c;e||d.data("tooltip",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.tooltip.Constructor=b,a.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},a.fn.tooltip.noConflict=function(){return a.fn.tooltip=c,this}}(window.jQuery),!function(a){var b=function(a,b){this.init("popover",a,b)};b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype,{constructor:b,setContent:function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"html":"text"](c),a.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var a,b=this.$element,c=this.options;return a=(typeof c.content=="function"?c.content.call(b[0]):c.content)||b.attr("data-content"),a},tip:function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}});var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("popover"),f=typeof c=="object"&&c;e||d.data("popover",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.popover.Constructor=b,a.fn.popover.defaults=a.extend({},a.fn.tooltip.defaults,{placement:"right",trigger:"click",content:"",template:''}),a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(window.jQuery),!function(a){var b=function(b,c){this.options=a.extend({},a.fn.affix.defaults,c),this.$window=a(window).on("scroll.affix.data-api",a.proxy(this.checkPosition,this)).on("click.affix.data-api",a.proxy(function(){setTimeout(a.proxy(this.checkPosition,this),1)},this)),this.$element=a(b),this.checkPosition()};b.prototype.checkPosition=function(){if(!this.$element.is(":visible"))return;var b=a(document).height(),c=this.$window.scrollTop(),d=this.$element.offset(),e=this.options.offset,f=e.bottom,g=e.top,h="affix affix-top affix-bottom",i;typeof e!="object"&&(f=g=e),typeof g=="function"&&(g=e.top()),typeof f=="function"&&(f=e.bottom()),i=this.unpin!=null&&c+this.unpin<=d.top?!1:f!=null&&d.top+this.$element.height()>=b-f?"bottom":g!=null&&c<=g?"top":!1;if(this.affixed===i)return;this.affixed=i,this.unpin=i=="bottom"?d.top-c:null,this.$element.removeClass(h).addClass("affix"+(i?"-"+i:""))};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("affix"),f=typeof c=="object"&&c;e||d.data("affix",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.defaults={offset:0},a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(window.jQuery),!function(a){var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function f(){e.trigger("closed").remove()}var c=a(this),d=c.attr("data-target"),e;d||(d=c.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),e=a(d),b&&b.preventDefault(),e.length||(e=c.hasClass("alert")?c:c.parent()),e.trigger(b=a.Event("close"));if(b.isDefaultPrevented())return;e.removeClass("in"),a.support.transition&&e.hasClass("fade")?e.on(a.support.transition.end,f):f()};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("alert");e||d.data("alert",e=new c(this)),typeof b=="string"&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.alert.data-api",b,c.prototype.close)}(window.jQuery),!function(a){var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.button.defaults,c)};b.prototype.setState=function(a){var b="disabled",c=this.$element,d=c.data(),e=c.is("input")?"val":"html";a+="Text",d.resetText||c.data("resetText",c[e]()),c[e](d[a]||this.options[a]),setTimeout(function(){a=="loadingText"?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},b.prototype.toggle=function(){var a=this.$element.closest('[data-toggle="buttons-radio"]');a&&a.find(".active").removeClass("active"),this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("button"),f=typeof c=="object"&&c;e||d.data("button",e=new b(this,f)),c=="toggle"?e.toggle():c&&e.setState(c)})},a.fn.button.defaults={loadingText:"loading..."},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle")})}(window.jQuery),!function(a){var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.collapse.defaults,c),this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.prototype={constructor:b,dimension:function(){var a=this.$element.hasClass("width");return a?"width":"height"},show:function(){var b,c,d,e;if(this.transitioning||this.$element.hasClass("in"))return;b=this.dimension(),c=a.camelCase(["scroll",b].join("-")),d=this.$parent&&this.$parent.find("> .accordion-group > .in");if(d&&d.length){e=d.data("collapse");if(e&&e.transitioning)return;d.collapse("hide"),e||d.data("collapse",null)}this.$element[b](0),this.transition("addClass",a.Event("show"),"shown"),a.support.transition&&this.$element[b](this.$element[0][c])},hide:function(){var b;if(this.transitioning||!this.$element.hasClass("in"))return;b=this.dimension(),this.reset(this.$element[b]()),this.transition("removeClass",a.Event("hide"),"hidden"),this.$element[b](0)},reset:function(a){var b=this.dimension();return this.$element.removeClass("collapse")[b](a||"auto")[0].offsetWidth,this.$element[a!==null?"addClass":"removeClass"]("collapse"),this},transition:function(b,c,d){var e=this,f=function(){c.type=="show"&&e.reset(),e.transitioning=0,e.$element.trigger(d)};this.$element.trigger(c);if(c.isDefaultPrevented())return;this.transitioning=1,this.$element[b]("in"),a.support.transition&&this.$element.hasClass("collapse")?this.$element.one(a.support.transition.end,f):f()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("collapse"),f=a.extend({},a.fn.collapse.defaults,d.data(),typeof c=="object"&&c);e||d.data("collapse",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.collapse.defaults={toggle:!0},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.collapse.data-api","[data-toggle=collapse]",function(b){var c=a(this),d,e=c.attr("data-target")||b.preventDefault()||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""),f=a(e).data("collapse")?"toggle":c.data();c[a(e).hasClass("in")?"addClass":"removeClass"]("collapsed"),a(e).collapse(f)})}(window.jQuery),!function(a){var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.options.pause=="hover"&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.prototype={cycle:function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},getActiveIndex:function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},to:function(b){var c=this.getActiveIndex(),d=this;if(b>this.$items.length-1||b<0)return;return this.sliding?this.$element.one("slid",function(){d.to(b)}):c==b?this.pause().cycle():this.slide(b>c?"next":"prev",a(this.$items[b]))},pause:function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition.end&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),clearInterval(this.interval),this.interval=null,this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g=b=="next"?"left":"right",h=b=="next"?"first":"last",i=this,j;this.sliding=!0,f&&this.pause(),e=e.length?e:this.$element.find(".item")[h](),j=a.Event("slide",{relatedTarget:e[0],direction:g});if(e.hasClass("active"))return;this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")}));if(a.support.transition&&this.$element.hasClass("slide")){this.$element.trigger(j);if(j.isDefaultPrevented())return;e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),this.$element.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid")},0)})}else{this.$element.trigger(j);if(j.isDefaultPrevented())return;d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return f&&this.cycle(),this}};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("carousel"),f=a.extend({},a.fn.carousel.defaults,typeof c=="object"&&c),g=typeof c=="string"?c:f.slide;e||d.data("carousel",e=new b(this,f)),typeof c=="number"?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.defaults={interval:5e3,pause:"hover"},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c=a(this),d,e=a(c.attr("data-target")||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),c.data()),g;e.carousel(f),(g=c.attr("data-slide-to"))&&e.data("carousel").pause().to(g).cycle(),b.preventDefault()})}(window.jQuery),!function(a){var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.typeahead.defaults,c),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.source=this.options.source,this.$menu=a(this.options.menu),this.shown=!1,this.listen()};b.prototype={constructor:b,select:function(){var a=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(a)).change(),this.hide()},updater:function(a){return a},show:function(){var b=a.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});return this.$menu.insertAfter(this.$element).css({top:b.top+b.height,left:b.left}).show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(b){var c;return this.query=this.$element.val(),!this.query||this.query.length"+b+""})},render:function(b){var c=this;return b=a(b).map(function(b,d){return b=a(c.options.item).attr("data-value",d),b.find("a").html(c.highlighter(d)),b[0]}),b.first().addClass("active"),this.$menu.html(b),this},next:function(b){var c=this.$menu.find(".active").removeClass("active"),d=c.next();d.length||(d=a(this.$menu.find("li")[0])),d.addClass("active")},prev:function(a){var b=this.$menu.find(".active").removeClass("active"),c=b.prev();c.length||(c=this.$menu.find("li").last()),c.addClass("active")},listen:function(){this.$element.on("focus",a.proxy(this.focus,this)).on("blur",a.proxy(this.blur,this)).on("keypress",a.proxy(this.keypress,this)).on("keyup",a.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",a.proxy(this.keydown,this)),this.$menu.on("click",a.proxy(this.click,this)).on("mouseenter","li",a.proxy(this.mouseenter,this)).on("mouseleave","li",a.proxy(this.mouseleave,this))},eventSupported:function(a){var b=a in this.$element;return b||(this.$element.setAttribute(a,"return;"),b=typeof this.$element[a]=="function"),b},move:function(a){if(!this.shown)return;switch(a.keyCode){case 9:case 13:case 27:a.preventDefault();break;case 38:a.preventDefault(),this.prev();break;case 40:a.preventDefault(),this.next()}a.stopPropagation()},keydown:function(b){this.suppressKeyPressRepeat=~a.inArray(b.keyCode,[40,38,9,13,27]),this.move(b)},keypress:function(a){if(this.suppressKeyPressRepeat)return;this.move(a)},keyup:function(a){switch(a.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}a.stopPropagation(),a.preventDefault()},focus:function(a){this.focused=!0},blur:function(a){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(a){a.stopPropagation(),a.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(b){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),a(b.currentTarget).addClass("active")},mouseleave:function(a){this.mousedover=!1,!this.focused&&this.shown&&this.hide()}};var c=a.fn.typeahead;a.fn.typeahead=function(c){return this.each(function(){var d=a(this),e=d.data("typeahead"),f=typeof c=="object"&&c;e||d.data("typeahead",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.typeahead.defaults={source:[],items:8,menu:'',item:'',minLength:1},a.fn.typeahead.Constructor=b,a.fn.typeahead.noConflict=function(){return a.fn.typeahead=c,this},a(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(b){var c=a(this);if(c.data("typeahead"))return;c.typeahead(c.data())})}(window.jQuery);(function($){$.fn.bootstrapFileInput=function(){this.each(function(i,elem){var $elem=$(elem);if(typeof $elem.attr('data-bfi-disabled')!='undefined'){return;}
var buttonWord='Browse';if(typeof $elem.attr('title')!='undefined'){buttonWord=$elem.attr('title');}
var className='';if(!!$elem.attr('class')){className=' '+$elem.attr('class');}
$elem.wrap('').parent().prepend($('').html(buttonWord));}).promise().done(function(){$('.file-input-wrapper').mousemove(function(cursor){var input,wrapper,wrapperX,wrapperY,inputWidth,inputHeight,cursorX,cursorY;wrapper=$(this);input=wrapper.find("input");wrapperX=wrapper.offset().left;wrapperY=wrapper.offset().top;inputWidth=input.width();inputHeight=input.height();cursorX=cursor.pageX;cursorY=cursor.pageY;moveInputX=cursorX-wrapperX-inputWidth+20;moveInputY=cursorY-wrapperY-(inputHeight/2);input.css({left:moveInputX,top:moveInputY});});$('body').on('change','.file-input-wrapper input[type=file]',function(){var fileName;fileName=$(this).val();$(this).parent().next('.file-input-name').remove();if(!!$(this).prop('files')&&$(this).prop('files').length>1){fileName=$(this)[0].files.length+' files';}
else{fileName=fileName.substring(fileName.lastIndexOf('\\')+1,fileName.length);}
if(!fileName){return;}
var selectedFileNamePlacement=$(this).data('filename-placement');if(selectedFileNamePlacement==='inside'){$(this).siblings('span').html(fileName);$(this).attr('title',fileName);}else{$(this).parent().after(''+fileName+'');}});});};var cssHtml='';$('link[rel=stylesheet]').eq(0).before(cssHtml);})(jQuery);$(document).ready(function()
{$('input[type=file]').bootstrapFileInput();});!function(b){var a=function(d,c,f){if(f){f.stopPropagation();f.preventDefault()}this.$element=b(d);this.$newElement=null;this.button=null;this.options=b.extend({},b.fn.selectpicker.defaults,this.$element.data(),typeof c=="object"&&c);if(this.options.title==null){this.options.title=this.$element.attr("title")}this.val=a.prototype.val;this.render=a.prototype.render;this.refresh=a.prototype.refresh;this.selectAll=a.prototype.selectAll;this.deselectAll=a.prototype.deselectAll;this.init()};a.prototype={constructor:a,init:function(d){if(!this.options.container){this.$element.hide()}else{this.$element.css("visibility","hidden")}this.multiple=this.$element.prop("multiple");var f=this.$element.attr("class")!==undefined?this.$element.attr("class").split(/\s+/):"";var h=this.$element.attr("id");this.$element.after(this.createView());this.$newElement=this.$element.next(".bootstrap-select");if(this.options.container){this.selectPosition()}this.button=this.$newElement.find("> button");if(h!==undefined){var g=this;this.button.attr("data-id",h);b('label[for="'+h+'"]').click(function(){g.$newElement.find("button[data-id="+h+"]").focus()})}for(var c=0;c'+l.data("subtext")+"":"";var m=l.data("icon")!==undefined?' ':"";if(l.is(":disabled")||l.parent().is(":disabled")){m=""+m+""}p=m+''+p+n+"";if(h.options.hideDisabled&&(l.is(":disabled")||l.parent().is(":disabled"))){g.push('')}else{if(l.parent().is("optgroup")&&l.data("divider")!=true){if(l.index()==0){var o=l.parent().attr("label");var q=l.parent().data("subtext")!==undefined?''+l.parent().data("subtext")+"":"";var i=l.parent().data("icon")?' ':"";o=i+''+o+q+"";if(l[0].index!=0){g.push(''+o+""+h.createA(p,"opt "+j))}else{g.push(""+o+""+h.createA(p,"opt "+j))}}else{g.push(h.createA(p,"opt "+j))}}else{if(l.data("divider")==true){g.push('')}else{if(b(this).data("hidden")==true){g.push("")}else{g.push(h.createA(p,j))}}}}});if(e.length>0){for(var d=0;d"+g[d]+""}}if(!this.multiple&&this.$element.find("option:selected").length==0&&!h.options.title){this.$element.find("option").eq(0).prop("selected",true).attr("selected","selected")}return b(c)},createA:function(d,c){return''+d+''},render:function(){var h=this;this.$element.find("option").each(function(i){h.setDisabled(i,b(this).is(":disabled")||b(this).parent().is(":disabled"));h.setSelected(i,b(this).is(":selected"))});var g=this.$element.find("option:selected").map(function(i,k){var j;if(h.options.showSubtext&&b(this).attr("data-subtext")&&!h.multiple){j=' '+b(this).data("subtext")+""}else{j=""}if(b(this).attr("title")!=undefined){return b(this).attr("title")}else{return b(this).text()+j}}).toArray();var f=!this.multiple?g[0]:g.join(", ");if(h.multiple&&h.options.selectedTextFormat.indexOf("count")>-1){var c=h.options.selectedTextFormat.split(">");var e=this.options.hideDisabled?":not([disabled])":"";if((c.length>1&&g.length>c[1])||(c.length==1&&g.length>=2)){f=g.length+" of "+this.$element.find('option:not([data-divider="true"]):not([data-hidden="true"])'+e).length+" selected"}}if(!f){f=h.options.title!=undefined?h.options.title:h.options.noneSelectedText}var d;if(this.options.showSubtext&&this.$element.find("option:selected").attr("data-subtext")){d=' '+this.$element.find("option:selected").data("subtext")+""}else{d=""}h.$newElement.find(".filter-option").html(f+d)},setSize:function(){if(this.options.container){this.$newElement.toggle(this.$element.parent().is(":visible"))}var j=this;var e=this.$newElement.find(".dropdown-menu");var l=e.find("li > a");var o=this.$newElement.addClass("open").find(".dropdown-menu li > a").outerHeight();this.$newElement.removeClass("open");var h=e.find("li .divider").outerHeight(true);var g=this.$newElement.offset().top;var k=this.$newElement.outerHeight();var c=parseInt(e.css("padding-top"))+parseInt(e.css("padding-bottom"))+parseInt(e.css("border-top-width"))+parseInt(e.css("border-bottom-width"));var d=this.options.hideDisabled?":not(.disabled)":"";var f;if(this.options.size=="auto"){var p=function(){var q=g-b(window).scrollTop();var u=window.innerHeight;var r=c+parseInt(e.css("margin-top"))+parseInt(e.css("margin-bottom"))+2;var t=u-q-k-r;var s;f=t;if(j.$newElement.hasClass("dropup")){f=q-r}if((e.find("li").length+e.find("dt").length)>3){s=o*3+r-2}else{s=0}e.css({"max-height":f+"px","overflow-y":"auto","min-height":s+"px"})};p();b(window).resize(p);b(window).scroll(p)}else{if(this.options.size&&this.options.size!="auto"&&e.find("li"+d).length>this.options.size){var n=e.find("li"+d+" > *").filter(":not(.div-contain)").slice(0,this.options.size).last().parent().index();var m=e.find("li").slice(0,n+1).find(".div-contain").length;f=o*this.options.size+m*h+c;e.css({"max-height":f+"px","overflow-y":"auto"})}}if(this.options.width=="auto"){this.$newElement.find(".dropdown-menu").css("min-width","0");var i=this.$newElement.find(".dropdown-menu").css("width");this.$newElement.css("width",i);if(this.options.container){this.$element.css("width",i)}}else{if(this.options.width){if(this.options.container){this.$element.css("width",this.options.width);this.$newElement.width(this.$element.outerWidth())}else{this.$newElement.css("width",this.options.width)}}else{if(this.options.container){this.$newElement.width(this.$element.outerWidth())}}}},selectPosition:function(){var e=b(this.options.container).offset();var d=this.$element.offset();if(e&&d){var f=d.top-e.top;var c=d.left-e.left;this.$newElement.appendTo(this.options.container);this.$newElement.css({position:"absolute",top:f+"px",left:c+"px"})}},refresh:function(){this.reloadLi();this.render();this.setSize();this.checkDisabled();if(this.options.container){this.selectPosition()}},setSelected:function(c,d){if(d){this.$newElement.find("li").eq(c).addClass("selected")}else{this.$newElement.find("li").eq(c).removeClass("selected")}},setDisabled:function(c,d){if(d){this.$newElement.find("li").eq(c).addClass("disabled").find("a").attr("href","#").attr("tabindex",-1)}else{this.$newElement.find("li").eq(c).removeClass("disabled").find("a").removeAttr("href").attr("tabindex",0)}},isDisabled:function(){return this.$element.is(":disabled")||this.$element.attr("readonly")},checkDisabled:function(){if(this.isDisabled()){this.button.addClass("disabled");this.button.click(function(c){c.preventDefault()});this.button.attr("tabindex","-1")}else{if(!this.isDisabled()&&this.button.hasClass("disabled")){this.button.removeClass("disabled");this.button.click(function(){return true});this.button.removeAttr("tabindex")}}},checkTabIndex:function(){if(this.$element.is("[tabindex]")){var c=this.$element.attr("tabindex");this.button.attr("tabindex",c)}},clickListener:function(){var c=this;b("body").on("touchstart.dropdown",".dropdown-menu",function(d){d.stopPropagation()});this.$newElement.on("click","li a",function(j){var g=b(this).parent().index(),i=b(this).parent(),d=i.parents(".bootstrap-select"),h=c.$element.val();if(c.multiple){j.stopPropagation()}j.preventDefault();if(c.$element.not(":disabled")&&!b(this).parent().hasClass("disabled")){if(!c.multiple){c.$element.find("option").prop("selected",false);c.$element.find("option").eq(g).prop("selected",true)}else{var f=c.$element.find("option").eq(g).prop("selected");if(f){c.$element.find("option").eq(g).prop("selected",false)}else{c.$element.find("option").eq(g).prop("selected",true)}}d.find(".filter-option").html(i.text());d.find("button").focus();if(h!=c.$element.val()){c.$element.trigger("change")}c.render()}});this.$newElement.on("click","li.disabled a, li dt, li .div-contain",function(f){f.preventDefault();f.stopPropagation();var d=b(this).parent().parents(".bootstrap-select");d.find("button").focus()});this.$element.on("change",function(d){c.render()})},val:function(c){if(c!=undefined){this.$element.val(c);this.$element.trigger("change");return this.$element}else{return this.$element.val()}},selectAll:function(){this.$element.find("option").prop("selected",true).attr("selected","selected");this.render()},deselectAll:function(){this.$element.find("option").prop("selected",false).removeAttr("selected");this.render()},keydown:function(n){var o,m,h,l,j,i,p,d,g;o=b(this);h=o.parent();m=b("[role=menu] li:not(.divider):visible a",h);if(!m.length){return}if(/(38|40)/.test(n.keyCode)){l=m.index(m.filter(":focus"));i=m.parent(":not(.disabled)").first().index();p=m.parent(":not(.disabled)").last().index();j=m.eq(l).parent().nextAll(":not(.disabled)").eq(0).index();d=m.eq(l).parent().prevAll(":not(.disabled)").eq(0).index();g=m.eq(j).parent().prevAll(":not(.disabled)").eq(0).index();if(n.keyCode==38){if(l!=g&&l>d){l=d}if(lp){l=p}}m.eq(l).focus()}else{var f={48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9"};var c=[];m.each(function(){if(b(this).parent().is(":not(.disabled)")){if(b.trim(b(this).text().toLowerCase()).substring(0,1)==f[n.keyCode]){c.push(b(this).parent().index())}}});var k=b(document).data("keycount");k++;b(document).data("keycount",k);var q=b.trim(b(":focus").text().toLowerCase()).substring(0,1);if(q!=f[n.keyCode]){k=1;b(document).data("keycount",k)}else{if(k>=c.length){b(document).data("keycount",0)}}m.eq(c[k-1]).focus()}if(/(13)/.test(n.keyCode)){b(":focus").click();h.addClass("open");b(document).data("keycount",0)}}};b.fn.selectpicker=function(e,f){var c=arguments;var g;var d=this.each(function(){if(b(this).is("select")){var m=b(this),l=m.data("selectpicker"),h=typeof e=="object"&&e;if(!l){m.data("selectpicker",(l=new a(this,h,f)))}else{if(h){for(var j in h){l.options[j]=h[j]}}}if(typeof e=="string"){var k=e;if(l[k]instanceof Function){[].shift.apply(c);g=l[k].apply(l,c)}else{g=l.options[k]}}}});if(g!=undefined){return g}else{return d}};b.fn.selectpicker.defaults={style:null,size:"auto",title:null,selectedTextFormat:"values",noneSelectedText:"Nothing selected",width:null,container:false,hideDisabled:false,showSubtext:false};b(document).data("keycount",0).on("keydown","[data-toggle=dropdown], [role=menu]",a.prototype.keydown)}(window.jQuery);function BackgroundParallax()
{this.run=run;var instances=new Array();var startScrollOffset=$(window).height()*0.99;var stopScrollOffset=0;var scrollRegistered=false;var resizeRegistered=false;var resizeTimeout=null;function run()
{if(!resizeRegistered)
{$(window).resize(function()
{var scrollChangeTimeout=null;clearTimeout(resizeTimeout);resizeTimeout=setTimeout(function()
{run();clearTimeout(scrollChangeTimeout);scrollChangeTimeout=setTimeout(function(){handleScrollChange(true);},15);},100);resizeRegistered=true;});}
if($(window).width()<962)
{$(".parallax").css("background-position","center center");$(".parallax.p-inner div:first").attr("style","");return;}
var parallaxCollection=$(".parallax");if($(parallaxCollection).length)
{initializeInstances(parallaxCollection);if(!scrollRegistered)
{$(window).scroll(function()
{handleScrollChange(false);scrollRegistered=true;});$(window).load(function(){handleScrollChange();});}}}
function initializeInstances(parallaxCollection)
{instances=new Array();$(parallaxCollection).each(function()
{var parallaxInstance=new Object();var parallaxElement=$(this);if($(parallaxElement).hasClass("p-inner"))
{parallaxElement=$(this).find("div:first");}
if($(parallaxElement).css("background-image")&&$(parallaxElement).css("background-image")!="none")
{var elementOffset=$(parallaxElement).offset().top;var elementHeight=$(parallaxElement).attr("data-parallax-height")?parseInt($(parallaxElement).attr("data-parallax-height")):$(parallaxElement).outerHeight();parallaxInstance.element=$(parallaxElement);parallaxInstance.height=elementHeight;parallaxInstance.startOffset=elementOffset-startScrollOffset;parallaxInstance.stopOffset=elementOffset+elementHeight-stopScrollOffset;parallaxInstance.scrollSpeed=$(parallaxElement).attr("data-parallax-scroll-speed")?parseInt($(parallaxElement).attr("data-parallax-scroll-speed")):40;$(parallaxElement).getBgImage(function()
{parallaxInstance.bgHeight=$(this).height();parallaxInstance.bgWidth=$(this).width();});if(isNaN(parallaxInstance.scrollSpeed))
{parallaxInstance.scrollSpeed=0.4;}
else
{parallaxInstance.scrollSpeed /=100;}
instances.push(parallaxInstance);}});}
function handleScrollChange(refreshAllElements)
{var scrolledY=$(window).scrollTop();for(i=0;iscrolledY))
{continue;}
var bgOffset=(scrolledY-(instance.startOffset>0?instance.startOffset:0))*instance.scrollSpeed;var maximumBgOffset=instance.bgHeight-instance.height-2;if(bgOffset>maximumBgOffset)
{bgOffset=maximumBgOffset;}
instance.element.css('background-position','center '+(-bgOffset)+'px');}}}function Submenu()
{this.run=run;this.toggleInitialMenuOnHeaderFixed=toggleInitialMenuOnHeaderFixed;this.toggleIsHoverActive=toggleIsHoverActive;this.showInitialSubmenu=showInitialSubmenu;this.isVisible=isVisible;var wrapper=null;var initialSubmenu=null;var enterTimeout=null;var leaveTimeout=null;var activeItemLeaveTimeout=null;var activeLink=null;mode=new Object();isHoverActive=false;var TIMEOUT=250;var submenuIsVisible=false;function run()
{wrapper=$("#submenu-wrapper");if(!$(wrapper).length)return;activeLink=$("#top-menu li.active");var modeCode=$(wrapper).attr("data-mode");mode.hover=modeCode.match(/h/)&&!$("#top-menu.slide").length;mode.initialMenu=modeCode.match(/i/);mode.fixedHeader=false;if(mode.initialMenu)
{initialSubmenu=$("#submenu-wrapper .initial");}
mode.initialMenuAllowed=mode.initialMenu&&!mode.fixedHeader&&$(initialSubmenu).length;toggleIsHoverActive($(window).width());if(mode.initialMenu&&$(initialSubmenu).length)
{showInitialSubmenu();}
else
{resetWrapper();}
registerEvents();}
function isVisible()
{return submenuIsVisible;}
function registerEvents()
{if(mode.hover)
{$("#top-menu").on("mouseenter",".nav > li",function()
{if(!isHoverActive)return;clearTimeout(leaveTimeout);clearTimeout(enterTimeout);var sender=$(this);enterTimeout=setTimeout(function()
{if($(sender).attr("data-submenu"))
{$(wrapper).find(".submenu:visible").hide();var targetSubmenu=$("#"+$(sender).attr("data-submenu"));$(targetSubmenu).show();$(wrapper).height($(wrapper).find(".container").outerHeight(true)).addClass("visible");}
else
{if(mode.initialMenuAllowed)
{$(wrapper).find(".submenu:visible").hide();}
else
{$(wrapper).find(".submenu:visible").hide();resetWrapper();}}
$("#top-menu li").removeClass("active");$(sender).addClass("active");},TIMEOUT / 4);}).on("mouseleave",".nav > li",function()
{if(!isHoverActive)return;clearTimeout(leaveTimeout);clearTimeout(enterTimeout);clearTimeout(activeItemLeaveTimeout);var sender=$(this);leaveTimeout=setTimeout(function()
{if($(sender).attr("data-submenu"))
{$("#"+$(sender).attr("data-submenu")).hide();if(mode.initialMenuAllowed)
{showInitialSubmenu();}
else
{resetWrapper();}}
else
{if(mode.initialMenuAllowed)
{showInitialSubmenu();}}
$("#top-menu li").removeClass("active");$(activeLink).addClass("active");},TIMEOUT);});$(wrapper).on("mouseenter",function()
{if(!isHoverActive)return;clearTimeout(enterTimeout);clearTimeout(leaveTimeout);clearTimeout(activeItemLeaveTimeout);submenuIsVisible=true;}).on("mouseleave",function()
{if(!isHoverActive)return;clearTimeout(enterTimeout);clearTimeout(leaveTimeout);clearTimeout(activeItemLeaveTimeout);leaveTimeout=setTimeout(function()
{$(wrapper).find(".submenu:visible").hide();if(mode.initialMenuAllowed)
{$(initialSubmenu).show();$(wrapper).height($($(initialSubmenu)).outerHeight(true)).addClass("visible");}
else
{resetWrapper();}
$("#top-menu li").removeClass("active");activeLink.addClass("active");submenuIsVisible=false;},TIMEOUT);});}
else
{$("#top-menu").on("mouseenter",".nav > li",function()
{clearTimeout(activeItemLeaveTimeout);$("#top-menu li").removeClass("active");$(this).addClass("active");submenuIsVisible=true;}).on("mouseleave",".nav > li",function()
{activeItemLeaveTimeout=setTimeout(function()
{$("#top-menu li").removeClass("active");activeLink.addClass("active");submenuIsVisible=false;},TIMEOUT / 2);});}}
function showInitialSubmenu(validateSubmenu,disableTransition)
{if(validateSubmenu)
{if(!mode.initial||!$(initialSubmenu).length)return;}
$(initialSubmenu).show();var transition=null;if(disableTransition)
{transition=$(wrapper).css("transition");$(wrapper).css("transition","none");}
$(wrapper).height($($(initialSubmenu)).outerHeight(true)).addClass("visible");if(transition)
{$(wrapper).css("transition",transition);}}
function resetWrapper()
{$(wrapper).height(0).removeClass("visible");submenuIsVisible=false;}
function toggleInitialMenuOnHeaderFixed(isHeaderFixed)
{if(mode.initialMenu&&$(initialSubmenu).length)
{if(isHeaderFixed)
{var paddingTop=parseInt($("body").css("padding-top"));paddingTop+=$(wrapper).outerHeight(true);$("body").css("padding-top",paddingTop+"px");$(wrapper).removeClass("static");resetWrapper();}
else
{$("body").css("padding-top","0px");$(wrapper).addClass("static");showInitialSubmenu(false,true);}
mode.fixedHeader=isHeaderFixed;mode.initialMenuAllowed=mode.initialMenuAllowed=mode.initialMenu&&!mode.fixedHeader&&$(initialSubmenu).length;}}
function toggleIsHoverActive(windowWidth)
{isHoverActive=mode.hover&&windowWidth>961;}}jQuery.extend({nette:{updateSnippet:function(id,html)
{$("#"+id).html(html);},success:function(payload)
{if(payload!=null)
{if(payload.redirect)
{window.location.href=payload.redirect;return;}
if(payload.snippets)
{for(var i in payload.snippets)
{jQuery.nette.updateSnippet(i,payload.snippets[i]);}}}}}});jQuery.ajaxSetup({success:jQuery.nette.success,dataType:"json"});var Nette=Nette||{};Nette.addEvent=function(element,on,callback){var original=element['on'+on];element['on'+on]=function(){if(typeof original==='function'&&original.apply(element,arguments)===false){return false;}
return callback.apply(element,arguments);};};Nette.getValue=function(elem)
{var i,len;if(!elem)
{return null;}
else if(!elem.nodeName)
{for(i=0,len=elem.length;i]+)>)/ig,"").replace(/\ /i,"").replace(/^\s+|\s+$/g,'');}
return elem.value.replace(/^\s+|\s+$/g,'');}};Nette.validateControl=function(elem,rules,onlyCheck){var attrRules=elem.getAttribute('data-nette-rules');var tmpRules=false;if(attrRules!=undefined)tmpRules=attrRules.replace(/##/g,"}").replace(/#/g,"{");rules=rules||eval('['+(tmpRules||'')+']');var requiredField=false;for(var id in rules)
{var rule=rules[id];if(!rule||!rule.op)continue;var op=rule.op.match(/(~)?([^?]+)/);rule.neg=op[1];rule.op=op[2];rule.condition=!!rule.rules;var el=rule.control?elem.form.elements[rule.control]:elem;if(!requiredField&&rule.op==":filled")requiredField=true;var success=Nette.validateRule(el,rule.op,rule.arg);if(success===null){continue;}
if(rule.neg){success=!success;}
if(rule.condition&&success)
{if(!Nette.validateControl(elem,rule.rules,onlyCheck))
{return false;}}
else if(!rule.condition&&!success)
{if(el.disabled){continue;}
if(!onlyCheck)
{Nette.addError(el,rule.msg.replace('%value',Nette.getValue(el)));}
return false;}}
if(requiredField&&$(elem).hasClass("autocomplete"))
{var targetId=$(elem).attr("name").replace("_autocomplete","");if(!$("#"+targetId).val())
{var message="Položka "+$(elem).parent().prev().text()+" není správně vyplněna.";if($(elem).next(".help-block"))
{message+="
"+$(elem).next(".help-block").text()+"";}
Nette.addError(elem,message);return false;}}
return true;};Nette.validateForm=function(sender)
{var form=sender.form||sender;if(form['nette-submittedBy']&&form['nette-submittedBy'].getAttribute('formnovalidate')!==null){return true;}
var isValid=true;for(var i=0;i",{"class":"help-block error-message","html":message}));}
else
{$(messageElement).html(message);}
if(!$(parent).hasClass("error"))
{$(parent).addClass("error");}}
return false;};Nette.validateRule=function(elem,op,arg)
{var val=Nette.getValue(elem);if(elem&&elem.getAttribute)
{if(val===elem.getAttribute('data-nette-empty-value')){val=null;}}
switch(op){case':filled':{return val!==''&&val!==false&&val!==null;}
case':valid':return Nette.validateControl(elem,null,true);case':equal':arg=arg instanceof Array?arg:[arg];for(var i in arg){if(val==(arg[i].control?Nette.getValue(elem.form.elements[arg[i].control]):arg[i])){return true;}}
return false;case':minLength':return val.length>=arg;case':maxLength':return val.length<=arg;case':length':if(typeof arg!=='object'){arg=[arg,arg];}
return(arg[0]===null||val.length>=arg[0])&&(arg[1]===null||val.length<=arg[1]);case':email':return(/^[^@\s]+@[^@\s]+\.[a-z]{2,10}$/i).test(val);case':url':return(/^.+\.[a-z]{2,6}(\/.*)?$/i).test(val);case':regexp':var parts=arg.match(/^\/(.*)\/([imu]*)$/);if(parts){try{return(new RegExp(parts[1],parts[2].replace('u',''))).test(val);}catch(e){}}
return;case':pattern':return(new RegExp(arg)).test(val);case':integer':return(/^-?[0-9]+$/).test(val);case':float':return(/^-?[0-9]*[.,]?[0-9]+$/).test(val);case':range':return(arg[0]===null||parseFloat(val)>=arg[0])&&(arg[1]===null||parseFloat(val)<=arg[1]);case':submitted':return elem.form['nette-submittedBy']===elem;}
return null;};Nette.toggleForm=function(form){for(var i=0;i');showBlockUI=false;}
$.post(this.action,$(this).serialize(),function(payload)
{showBlockUI=true;if(modalElement)
{$(modalElement).find(".ajax-loader").remove();}
if(payload&&payload.error)
{for(key in payload.error)
{Nette.addError(document.getElementById(key),payload.error[key]);}}
else
{$.nette.success(payload);if($(formElement).hasClass("refresh"))
{location.reload();}
else if(modalElement)
{$(modalElement).modal("hide");}
if($(formElement).attr("data-scroll-to"))
{scrollTo($(formElement).attr("data-scroll-to"),150,600);}}});}});});(function($)
{$.fn.unveilImage=function(threshold,callback){var $w=$(window),th=threshold||0,retina=window.devicePixelRatio>1,attrib=retina?"data-src-retina":"data-src",images=this,loaded;this.one("unveilImage",function(){var source=this.getAttribute(attrib);source=source||this.getAttribute("data-src");if(source)
{this.setAttribute("src",source);if(typeof callback==="function")callback.call(this);}});function unveilImage()
{var inview=images.filter(function()
{var $e=$(this);if($e.is(":hidden"))return;var wt=$w.scrollTop(),wb=wt+$w.height(),et=$e.offset().top,eb=et+$e.height();return eb>=wt-th&&et<=wb+th;});loaded=inview.trigger("unveilImage");images=images.not(loaded);}
$w.on("scroll.unveilImage resize.unveilImage lookup.unveilImage",unveilImage);unveilImage();return this;};$.fn.getBgImage=function(callback)
{var height=0;var path=$(this).css('background-image').replace('url','').replace('(','').replace(')','').replace('"','').replace('"','');var tempImg=$('',{"style":"max-width: "+$(this).outerWidth()+"px"});tempImg.hide();tempImg.bind('load',callback);$('body').append(tempImg);tempImg.attr('src',path);$('#tempImg').remove();};$.fn.unveilContainer=function(threshold,callback){var $w=$(window),th=threshold||0,retina=window.devicePixelRatio>1,attrib="data-url",containers=this,loaded;this.one("unveilContainer",function()
{var source=this.getAttribute(attrib);if(source)
{var sender=$(this);$.get(source,function(payload)
{$(sender).html(payload.data);$(sender).removeAttr(attrib);if(typeof callback==="function")callback.call(this);});}});function unveilContainer()
{var inview=containers.filter(function()
{var $e=$(this);if($e.is(":hidden"))return;var wt=$w.scrollTop(),wb=wt+$w.height(),et=$e.offset().top,eb=et+$e.height();return eb>=wt-th&&et<=wb+th;});loaded=inview.trigger("unveilContainer");containers=containers.not(loaded);}
$w.on("scroll.unveilContainer resize.unveilContainer lookup.unveilContainer",unveilContainer);unveilContainer();return this;};})(window.jQuery||window.Zepto);String.prototype.trim=function()
{return this.replace(/^\s+|\s+$/g,"");}
String.prototype.ltrim=function()
{return this.replace(/^\s+/,"");}
String.prototype.rtrim=function()
{return this.replace(/\s+$/,"");}
function initializeElevateZoom()
{if($(".e-zoom").length)
{var options={zoomType:"inner",cursor:"crosshair",zoomWindowFadeIn:750,zoomWindowFadeOut:750,};$(".e-zoom").elevateZoom(options);}}
$(document).ready(function()
{initializeElevateZoom();$('.tooltip-t').tooltip({"container":"body"})
$('.input-number a').live("click",function(e)
{e.preventDefault();type=$(this).attr('data-type');var numberInput=$(this).parent().find("input");var currentVal=getNumericValue($(numberInput));if(!isNaN(currentVal))
{if(type=='minus')
{if(currentVal>numberInput.attr('min'))
{currentVal*=10000;numberInput.val((currentVal-10000)/ 10000).change();}
if(currentVal==numberInput.attr('min'))
{$(this).attr('disabled',true);}}
else if(type=='plus')
{if(currentVal=35&&e.keyCode<=39))
{return;}
if((e.shiftKey||(e.keyCode<48||e.keyCode>57))&&(e.keyCode<96||e.keyCode>105))
{e.preventDefault();}});$("select.exclusiveSelection").live("change",function()
{$("input.exclusiveSelection").val("");var exclusiveId="#"+$(this).attr("id");$("select.exclusiveSelection:not("+exclusiveId+")").val("");return false;});$("input[type=checkbox].exclusiveSelection").live("change",function()
{var exclusiveId="#"+$(this).attr("id");$("input.exclusiveSelection:not("+exclusiveId+")").attr("checked",false);});$("input.exclusiveSelection").live("keyup",function(){$("select.exclusiveSelection").val("");var exclusiveId="#"+$(this).attr("id");if($(this).hasClass("autocomplete")){var targetId=$(this).attr("name").replace("_autocomplete","");exclusiveId+=", #"+targetId;}
$("input.exclusiveSelection:not("+exclusiveId+")").val("");return false;}).live("blur",function(){$(this).keyup();});$(".deleteItemAjax, .ajaxDeletePrompt").live("click",function(){var sender=$(this);var message=$(this).attr("data-message");if(message==undefined||message=="")
{message="Opravdu chcete záznam smazat?";}
var modal=new Modal();modal.setTitle("Potvrzení akce");modal.setBody(message);modal.addButton("ok-action","btn btn-success","Ano",function()
{$.get(sender.attr("href"),function(payload)
{if(sender.hasClass("refreshPayload"))
{$.nette.success(payload);}
else
{if(sender.hasClass("refreshPage"))
{location.reload();}
else
{if(sender.getParent(2).hasClass("dropdown-menu"))
{sender.getParent(6).remove();}
else
{sender.getParent(2).remove();}}}
modal.hide();});});modal.addButton("nok-action","btn btn-danger","Ne",function(){modal.hide();});modal.show();return false;});$(".text-block .block-header.main").live("click",function(){var parent=$(this).getParent(1);if(parent.hasClass("collapsed"))
{parent.removeClass("collapsed");}
else
{parent.addClass("collapsed");}});$("a.loadForm").live("click",function(e)
{e.preventDefault();var sender=$(this);$.get(sender.attr("href"),function(payload)
{var modal=new Modal();var title=$(sender).attr("data-modal-title")?$(sender).attr("data-modal-title"):"";if(!title)
{title=$(sender).attr("title")?$(sender).attr("title"):" ";}
modal.setTitle(title);modal.setBody(payload.form);modal.onShow(function()
{Nette.initForm($(".custom-modal form")[0]);initDatepicker(".custom-modal");$(".custom-modal .modal-body").css("padding-top",0).css("overflow","visible");});modal.show();});return false;});$("a.modal-view").live("click",function(e)
{e.preventDefault();var sender=$(this);$.get(sender.attr("href"),function(payload)
{var modal=new Modal();modal.setTitle(payload.modal.title);modal.setBody(payload.modal.body);if(payload.modal.buttons)
{console.log(payload.modal.buttons);if(payload.modal.buttons[0])
{modal.addPhpButton(payload.modal.buttons[0],function(e){eval(payload.modal.buttons[0].callback);});}
if(payload.modal.buttons[1])
{modal.addPhpButton(payload.modal.buttons[1],function(e){eval(payload.modal.buttons[1].callback);});}
if(payload.modal.buttons[2])
{modal.addPhpButton(payload.modal.buttons[2],function(e){eval(payload.modal.buttons[2].callback);});}
if(payload.modal.buttons[3])
{modal.addPhpButton(payload.modal.buttons[3],function(e){eval(payload.modal.buttons[3].callback);});}}
else
{modal.addButton("close-view","btn btn-warning","Zavřít",function(){modal.hide();});}
modal.onShow(function()
{if($(".custom-modal form").length)
{Nette.initForm($(".custom-modal form")[0]);initDatepicker(".custom-modal");}
$(".custom-modal .modal-body").css("overflow","visible");});modal.show();});return false;});});function printFromUrl(element,url)
{var printFrame=$(element);if(!printFrame.length)
{$("