/*! * Bootstrap v3.3.4 (http://getbootstrap.com) * Copyright 2011-2015 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.4",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.4",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active"));a&&this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.4",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.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},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.4",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){b&&3===b.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=c(d),f={relatedTarget:this};e.hasClass("open")&&(e.trigger(b=a.Event("hide.bs.dropdown",f)),b.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger("hidden.bs.dropdown",f)))}))}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.4",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(this.options.viewport.selector||this.options.viewport),this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c&&c.$tip&&c.$tip.is(":visible")?void(c.hoverState="in"):(c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.options.container?a(this.options.container):this.$element.parent(),p=this.getPosition(o);h="bottom"==h&&k.bottom+m>p.bottom?"top":"top"==h&&k.top-mp.width?"left":"left"==h&&k.left-lg.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;jg.width&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type)})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.4",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.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").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.4",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b=e[a]&&(void 0===e[a+1]||b .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.4",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=a(document.body).height();"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery);(function(){"use strict";var $,EkkoLightbox;$=jQuery;EkkoLightbox=function(element,options){var content,footer,header,_this=this;this.options=$.extend({title:null,footer:null,remote:null},$.fn.ekkoLightbox.defaults,options||{});this.$element=$(element);content='';this.modal_id=this.options.modal_id?this.options.modal_id:'ekkoLightbox-'+Math.floor((Math.random()*1000)+1);header='';footer='';$(document.body).append('');this.modal=$('#'+this.modal_id);this.modal_dialog=this.modal.find('.modal-dialog').first();this.modal_content=this.modal.find('.modal-content').first();this.modal_body=this.modal.find('.modal-body').first();this.lightbox_container=this.modal_body.find('.ekko-lightbox-container').first();this.lightbox_body=this.lightbox_container.find('> div:first-child').first();this.showLoading();this.modal_arrows=null;this.border={top:parseFloat(this.modal_dialog.css('border-top-width'))+parseFloat(this.modal_content.css('border-top-width'))+parseFloat(this.modal_body.css('border-top-width')),right:parseFloat(this.modal_dialog.css('border-right-width'))+parseFloat(this.modal_content.css('border-right-width'))+parseFloat(this.modal_body.css('border-right-width')),bottom:parseFloat(this.modal_dialog.css('border-bottom-width'))+parseFloat(this.modal_content.css('border-bottom-width'))+parseFloat(this.modal_body.css('border-bottom-width')),left:parseFloat(this.modal_dialog.css('border-left-width'))+parseFloat(this.modal_content.css('border-left-width'))+parseFloat(this.modal_body.css('border-left-width'))};this.padding={top:parseFloat(this.modal_dialog.css('padding-top'))+parseFloat(this.modal_content.css('padding-top'))+parseFloat(this.modal_body.css('padding-top')),right:parseFloat(this.modal_dialog.css('padding-right'))+parseFloat(this.modal_content.css('padding-right'))+parseFloat(this.modal_body.css('padding-right')),bottom:parseFloat(this.modal_dialog.css('padding-bottom'))+parseFloat(this.modal_content.css('padding-bottom'))+parseFloat(this.modal_body.css('padding-bottom')),left:parseFloat(this.modal_dialog.css('padding-left'))+parseFloat(this.modal_content.css('padding-left'))+parseFloat(this.modal_body.css('padding-left'))};this.modal.on('show.bs.modal',this.options.onShow.bind(this)).on('shown.bs.modal',function(){_this.modal_shown();return _this.options.onShown.call(_this);}).on('hide.bs.modal',this.options.onHide.bind(this)).on('hidden.bs.modal',function(){if(_this.gallery){$(document).off('keydown.ekkoLightbox');} _this.modal.remove();return _this.options.onHidden.call(_this);}).modal('show',options);return this.modal;};EkkoLightbox.prototype={modal_shown:function(){var video_id,_this=this;if(!this.options.remote){return this.error('No remote target given');}else{this.gallery=this.$element.data('gallery');if(this.gallery){if(this.options.gallery_parent_selector==='document.body'||this.options.gallery_parent_selector===''){this.gallery_items=$(document.body).find('*[data-toggle="lightbox"][data-gallery="'+this.gallery+'"]');}else{this.gallery_items=this.$element.parents(this.options.gallery_parent_selector).first().find('*[data-toggle="lightbox"][data-gallery="'+this.gallery+'"]');} this.gallery_index=this.gallery_items.index(this.$element);$(document).on('keydown.ekkoLightbox',this.navigate.bind(this));if(this.options.directional_arrows&&this.gallery_items.length>1){this.lightbox_container.append('
');this.modal_arrows=this.lightbox_container.find('div.ekko-lightbox-nav-overlay').first();this.lightbox_container.find('a'+this.strip_spaces(this.options.left_arrow_class)).on('click',function(event){event.preventDefault();return _this.navigate_left();});this.lightbox_container.find('a'+this.strip_spaces(this.options.right_arrow_class)).on('click',function(event){event.preventDefault();return _this.navigate_right();});}} if(this.options.type){if(this.options.type==='image'){return this.preloadImage(this.options.remote,true);}else if(this.options.type==='youtube'&&(video_id=this.getYoutubeId(this.options.remote))){return this.showYoutubeVideo(video_id);}else if(this.options.type==='vimeo'){return this.showVimeoVideo(this.options.remote);}else if(this.options.type==='instagram'){return this.showInstagramVideo(this.options.remote);}else if(this.options.type==='url'){return this.loadRemoteContent(this.options.remote);}else if(this.options.type==='video'){return this.showVideoIframe(this.options.remote);}else{return this.error("Could not detect remote target type. Force the type using data-type=\"image|youtube|vimeo|instagram|url|video\"");}}else{return this.detectRemoteType(this.options.remote);}}},strip_stops:function(str){return str.replace(/\./g,'');},strip_spaces:function(str){return str.replace(/\s/g,'');},isImage:function(str){return str.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i);},isSwf:function(str){return str.match(/\.(swf)((\?|#).*)?$/i);},getYoutubeId:function(str){var match;match=str.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/);if(match&&match[2].length===11){return match[2];}else{return false;}},getVimeoId:function(str){if(str.indexOf('vimeo')>0){return str;}else{return false;}},getInstagramId:function(str){if(str.indexOf('instagram')>0){return str;}else{return false;}},navigate:function(event){event=event||window.event;if(event.keyCode===39||event.keyCode===37){if(event.keyCode===39){return this.navigate_right();}else if(event.keyCode===37){return this.navigate_left();}}},navigateTo:function(index){var next,src;if(index<0||index>this.gallery_items.length-1){return this;} this.showLoading();this.gallery_index=index;this.$element=$(this.gallery_items.get(this.gallery_index));this.updateTitleAndFooter();src=this.$element.attr('data-remote')||this.$element.attr('href');this.detectRemoteType(src,this.$element.attr('data-type')||false);if(this.gallery_index+1'+this.options.loadingMessage+'');return this;},showYoutubeVideo:function(id){var height,width;width=this.checkDimensions(this.$element.data('width')||560);height=width /(560 / 3);return this.showVideoIframe('//www.youtube.com/embed/'+id+'?badge=0&autoplay=1&html5=1',width,height);},showVimeoVideo:function(id){var height,width;width=this.checkDimensions(this.$element.data('width')||560);height=width /(500 / 281);return this.showVideoIframe(id+'?autoplay=1',width,height);},showInstagramVideo:function(id){var height,width;width=this.checkDimensions(this.$element.data('width')||612);this.resize(width);height=width+80;this.lightbox_body.html('');this.options.onContentLoaded.call(this);if(this.modal_arrows){return this.modal_arrows.css('display','none');}},showVideoIframe:function(url,width,height){height=height||width;this.resize(width);this.lightbox_body.html('
');this.options.onContentLoaded.call(this);if(this.modal_arrows){this.modal_arrows.css('display','none');} return this;},loadRemoteContent:function(url){var disableExternalCheck,width,_this=this;width=this.$element.data('width')||560;this.resize(width);disableExternalCheck=this.$element.data('disableexternalcheck')||false;if(!disableExternalCheck&&!this.isExternal(url)){this.lightbox_body.load(url,$.proxy(function(){return _this.$element.trigger('loaded.bs.modal');}));}else{this.lightbox_body.html('');this.options.onContentLoaded.call(this);} if(this.modal_arrows){this.modal_arrows.css('display','none');} return this;},isExternal:function(url){var match;match=url.match(/^([^:\/?#]+:)?(?:\/\/([^\/?#]*))?([^?#]+)?(\?[^#]*)?(#.*)?/);if(typeof match[1]==="string"&&match[1].length>0&&match[1].toLowerCase()!==location.protocol){return true;} if(typeof match[2]==="string"&&match[2].length>0&&match[2].replace(new RegExp(":("+{"http:":80,"https:":443}[location.protocol]+")?$"),"")!==location.host){return true;} return false;},error:function(message){this.lightbox_body.html(message);return this;},preloadImage:function(src,onLoadShowImage){var img,_this=this;img=new Image();if((onLoadShowImage==null)||onLoadShowImage===true){img.onload=function(){var image;image=$('');image.attr('src',img.src);image.addClass('img-responsive');_this.lightbox_body.html(image);if(_this.modal_arrows){_this.modal_arrows.css('display','block');} return image.load(function(){_this.resize(img.width);return _this.options.onContentLoaded.call(_this);});};img.onerror=function(){return _this.error('Failed to load image: '+src);};} img.src=src;return img;},resize:function(width){var width_total;width_total=width+this.border.left+this.padding.left+this.padding.right+this.border.right;this.modal_dialog.css('width','auto').css('max-width',width_total);this.lightbox_container.find('a').css('line-height',function(){return $(this).parent().height()+'px';});return this;},checkDimensions:function(width){var body_width,width_total;width_total=width+this.border.left+this.padding.left+this.padding.right+this.border.right;body_width=document.body.clientWidth;if(width_total>body_width){width=this.modal_body.width();} return width;},close:function(){return this.modal.modal('hide');},addTrailingSlash:function(url){if(url.substr(-1)!=='/'){url+='/';} return url;}};$.fn.ekkoLightbox=function(options){return this.each(function(){var $this;$this=$(this);options=$.extend({remote:$this.attr('data-remote')||$this.attr('href'),gallery_parent_selector:$this.attr('data-parent'),type:$this.attr('data-type')},options,$this.data());new EkkoLightbox(this,options);return this;});};$.fn.ekkoLightbox.defaults={gallery_parent_selector:'document.body',left_arrow_class:'.glyphicon .glyphicon-chevron-left',right_arrow_class:'.glyphicon .glyphicon-chevron-right',directional_arrows:true,type:null,always_show_close:true,loadingMessage:'Loading...',onShow:function(){},onShown:function(){},onHide:function(){},onHidden:function(){},onNavigate:function(){},onContentLoaded:function(){}};}).call(this);/*! * typeahead.js 0.10.5 * https://github.com/twitter/typeahead.js * Copyright 2013-2014 Twitter, Inc. and other contributors; Licensed MIT */ (function($){var _=function(){"use strict";return{isMsie:function(){return /(msie|trident)/i.test(navigator.userAgent)?navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2]:false;},isBlankString:function(str){return!str||/^\s*$/.test(str);},escapeRegExChars:function(str){return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");},isString:function(obj){return typeof obj==="string";},isNumber:function(obj){return typeof obj==="number";},isArray:$.isArray,isFunction:$.isFunction,isObject:$.isPlainObject,isUndefined:function(obj){return typeof obj==="undefined";},toStr:function toStr(s){return _.isUndefined(s)||s===null?"":s+"";},bind:$.proxy,each:function(collection,cb){$.each(collection,reverseArgs);function reverseArgs(index,value){return cb(value,index);}},map:$.map,filter:$.grep,every:function(obj,test){var result=true;if(!obj){return result;} $.each(obj,function(key,val){if(!(result=test.call(null,val,key,obj))){return false;}});return!!result;},some:function(obj,test){var result=false;if(!obj){return result;} $.each(obj,function(key,val){if(result=test.call(null,val,key,obj)){return false;}});return!!result;},mixin:$.extend,getUniqueId:function(){var counter=0;return function(){return counter++;};}(),templatify:function templatify(obj){return $.isFunction(obj)?obj:template;function template(){return String(obj);}},defer:function(fn){setTimeout(fn,0);},debounce:function(func,wait,immediate){var timeout,result;return function(){var context=this,args=arguments,later,callNow;later=function(){timeout=null;if(!immediate){result=func.apply(context,args);}};callNow=immediate&&!timeout;clearTimeout(timeout);timeout=setTimeout(later,wait);if(callNow){result=func.apply(context,args);} return result;};},throttle:function(func,wait){var context,args,timeout,result,previous,later;previous=0;later=function(){previous=new Date();timeout=null;result=func.apply(context,args);};return function(){var now=new Date(),remaining=wait-(now-previous);context=this;args=arguments;if(remaining<=0){clearTimeout(timeout);timeout=null;previous=now;result=func.apply(context,args);}else if(!timeout){timeout=setTimeout(later,remaining);} return result;};},noop:function(){}};}();var VERSION="0.10.5";var tokenizers=function(){"use strict";return{nonword:nonword,whitespace:whitespace,obj:{nonword:getObjTokenizer(nonword),whitespace:getObjTokenizer(whitespace)}};function whitespace(str){str=_.toStr(str);return str?str.split(/\s+/):[];} function nonword(str){str=_.toStr(str);return str?str.split(/\W+/):[];} function getObjTokenizer(tokenizer){return function setKey(){var args=[].slice.call(arguments,0);return function tokenize(o){var tokens=[];_.each(args,function(k){tokens=tokens.concat(tokenizer(_.toStr(o[k])));});return tokens;};};}}();var LruCache=function(){"use strict";function LruCache(maxSize){this.maxSize=_.isNumber(maxSize)?maxSize:100;this.reset();if(this.maxSize<=0){this.set=this.get=$.noop;}} _.mixin(LruCache.prototype,{set:function set(key,val){var tailItem=this.list.tail,node;if(this.size>=this.maxSize){this.list.remove(tailItem);delete this.hash[tailItem.key];} if(node=this.hash[key]){node.val=val;this.list.moveToFront(node);}else{node=new Node(key,val);this.list.add(node);this.hash[key]=node;this.size++;}},get:function get(key){var node=this.hash[key];if(node){this.list.moveToFront(node);return node.val;}},reset:function reset(){this.size=0;this.hash={};this.list=new List();}});function List(){this.head=this.tail=null;} _.mixin(List.prototype,{add:function add(node){if(this.head){node.next=this.head;this.head.prev=node;} this.head=node;this.tail=this.tail||node;},remove:function remove(node){node.prev?node.prev.next=node.next:this.head=node.next;node.next?node.next.prev=node.prev:this.tail=node.prev;},moveToFront:function(node){this.remove(node);this.add(node);}});function Node(key,val){this.key=key;this.val=val;this.prev=this.next=null;} return LruCache;}();var PersistentStorage=function(){"use strict";var ls,methods;try{ls=window.localStorage;ls.setItem("~~~","!");ls.removeItem("~~~");}catch(err){ls=null;} function PersistentStorage(namespace){this.prefix=["__",namespace,"__"].join("");this.ttlKey="__ttl__";this.keyMatcher=new RegExp("^"+_.escapeRegExChars(this.prefix));} if(ls&&window.JSON){methods={_prefix:function(key){return this.prefix+key;},_ttlKey:function(key){return this._prefix(key)+this.ttlKey;},get:function(key){if(this.isExpired(key)){this.remove(key);} return decode(ls.getItem(this._prefix(key)));},set:function(key,val,ttl){if(_.isNumber(ttl)){ls.setItem(this._ttlKey(key),encode(now()+ttl));}else{ls.removeItem(this._ttlKey(key));} return ls.setItem(this._prefix(key),encode(val));},remove:function(key){ls.removeItem(this._ttlKey(key));ls.removeItem(this._prefix(key));return this;},clear:function(){var i,key,keys=[],len=ls.length;for(i=0;ittl?true:false;}};}else{methods={get:_.noop,set:_.noop,remove:_.noop,clear:_.noop,isExpired:_.noop};} _.mixin(PersistentStorage.prototype,methods);return PersistentStorage;function now(){return new Date().getTime();} function encode(val){return JSON.stringify(_.isUndefined(val)?null:val);} function decode(val){return JSON.parse(val);}}();var Transport=function(){"use strict";var pendingRequestsCount=0,pendingRequests={},maxPendingRequests=6,sharedCache=new LruCache(10);function Transport(o){o=o||{};this.cancelled=false;this.lastUrl=null;this._send=o.transport?callbackToDeferred(o.transport):$.ajax;this._get=o.rateLimiter?o.rateLimiter(this._get):this._get;this._cache=o.cache===false?new LruCache(0):sharedCache;} Transport.setMaxPendingRequests=function setMaxPendingRequests(num){maxPendingRequests=num;};Transport.resetCache=function resetCache(){sharedCache.reset();};_.mixin(Transport.prototype,{_get:function(url,o,cb){var that=this,jqXhr;if(this.cancelled||url!==this.lastUrl){return;} if(jqXhr=pendingRequests[url]){jqXhr.done(done).fail(fail);}else if(pendingRequestsCountarrayB[bi]){bi++;}else{intersection.push(arrayA[ai]);ai++;bi++;}} return intersection;function compare(a,b){return a-b;}}}();var oParser=function(){"use strict";return{local:getLocal,prefetch:getPrefetch,remote:getRemote};function getLocal(o){return o.local||null;} function getPrefetch(o){var prefetch,defaults;defaults={url:null,thumbprint:"",ttl:24*60*60*1e3,filter:null,ajax:{}};if(prefetch=o.prefetch||null){prefetch=_.isString(prefetch)?{url:prefetch}:prefetch;prefetch=_.mixin(defaults,prefetch);prefetch.thumbprint=VERSION+prefetch.thumbprint;prefetch.ajax.type=prefetch.ajax.type||"GET";prefetch.ajax.dataType=prefetch.ajax.dataType||"json";!prefetch.url&&$.error("prefetch requires url to be set");} return prefetch;} function getRemote(o){var remote,defaults;defaults={url:null,cache:true,wildcard:"%QUERY",replace:null,rateLimitBy:"debounce",rateLimitWait:300,send:null,filter:null,ajax:{}};if(remote=o.remote||null){remote=_.isString(remote)?{url:remote}:remote;remote=_.mixin(defaults,remote);remote.rateLimiter=/^throttle$/i.test(remote.rateLimitBy)?byThrottle(remote.rateLimitWait):byDebounce(remote.rateLimitWait);remote.ajax.type=remote.ajax.type||"GET";remote.ajax.dataType=remote.ajax.dataType||"json";delete remote.rateLimitBy;delete remote.rateLimitWait;!remote.url&&$.error("remote requires url to be set");} return remote;function byDebounce(wait){return function(fn){return _.debounce(fn,wait);};} function byThrottle(wait){return function(fn){return _.throttle(fn,wait);};}}}();(function(root){"use strict";var old,keys;old=root.Bloodhound;keys={data:"data",protocol:"protocol",thumbprint:"thumbprint"};root.Bloodhound=Bloodhound;function Bloodhound(o){if(!o||!o.local&&!o.prefetch&&!o.remote){$.error("one of local, prefetch, or remote is required");} this.limit=o.limit||5;this.sorter=getSorter(o.sorter);this.dupDetector=o.dupDetector||ignoreDuplicates;this.local=oParser.local(o);this.prefetch=oParser.prefetch(o);this.remote=oParser.remote(o);this.cacheKey=this.prefetch?this.prefetch.cacheKey||this.prefetch.url:null;this.index=new SearchIndex({datumTokenizer:o.datumTokenizer,queryTokenizer:o.queryTokenizer});this.storage=this.cacheKey?new PersistentStorage(this.cacheKey):null;} Bloodhound.noConflict=function noConflict(){root.Bloodhound=old;return Bloodhound;};Bloodhound.tokenizers=tokenizers;_.mixin(Bloodhound.prototype,{_loadPrefetch:function loadPrefetch(o){var that=this,serialized,deferred;if(serialized=this._readFromStorage(o.thumbprint)){this.index.bootstrap(serialized);deferred=$.Deferred().resolve();}else{deferred=$.ajax(o.url,o.ajax).done(handlePrefetchResponse);} return deferred;function handlePrefetchResponse(resp){that.clear();that.add(o.filter?o.filter(resp):resp);that._saveToStorage(that.index.serialize(),o.thumbprint,o.ttl);}},_getFromRemote:function getFromRemote(query,cb){var that=this,url,uriEncodedQuery;if(!this.transport){return;} query=query||"";uriEncodedQuery=encodeURIComponent(query);url=this.remote.replace?this.remote.replace(this.remote.url,query):this.remote.url.replace(this.remote.wildcard,uriEncodedQuery);return this.transport.get(url,this.remote.ajax,handleRemoteResponse);function handleRemoteResponse(err,resp){err?cb([]):cb(that.remote.filter?that.remote.filter(resp):resp);}},_cancelLastRemoteRequest:function cancelLastRemoteRequest(){this.transport&&this.transport.cancel();},_saveToStorage:function saveToStorage(data,thumbprint,ttl){if(this.storage){this.storage.set(keys.data,data,ttl);this.storage.set(keys.protocol,location.protocol,ttl);this.storage.set(keys.thumbprint,thumbprint,ttl);}},_readFromStorage:function readFromStorage(thumbprint){var stored={},isExpired;if(this.storage){stored.data=this.storage.get(keys.data);stored.protocol=this.storage.get(keys.protocol);stored.thumbprint=this.storage.get(keys.thumbprint);} isExpired=stored.thumbprint!==thumbprint||stored.protocol!==location.protocol;return stored.data&&!isExpired?stored.data:null;},_initialize:function initialize(){var that=this,local=this.local,deferred;deferred=this.prefetch?this._loadPrefetch(this.prefetch):$.Deferred().resolve();local&&deferred.done(addLocalToIndex);this.transport=this.remote?new Transport(this.remote):null;return this.initPromise=deferred.promise();function addLocalToIndex(){that.add(_.isFunction(local)?local():local);}},initialize:function initialize(force){return!this.initPromise||force?this._initialize():this.initPromise;},add:function add(data){this.index.add(data);},get:function get(query,cb){var that=this,matches=[],cacheHit=false;matches=this.index.get(query);matches=this.sorter(matches).slice(0,this.limit);matches.length0||!this.transport)&&cb&&cb(matches);} function returnRemoteMatches(remoteMatches){var matchesWithBackfill=matches.slice(0);_.each(remoteMatches,function(remoteMatch){var isDuplicate;isDuplicate=_.some(matchesWithBackfill,function(match){return that.dupDetector(remoteMatch,match);});!isDuplicate&&matchesWithBackfill.push(remoteMatch);return matchesWithBackfill.length