/**
* bootstrap.js v3.0.0 by @fat and @mdo
* Copyright 2013 Twitter Inc.
* http://www.apache.org/licenses/LICENSE-2.0
*/
if(!jQuery)throw new Error("Bootstrap requires 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]}}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,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()})}(window.jQuery),+function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){f.trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one(a.support.transition.end,c).emulateTransitionEnd(150):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("bs.alert");e||d.data("bs.alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.bs.alert.data-api",b,c.prototype.close)}(window.jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d)};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(a){var b="disabled",c=this.$element,d=c.is("input")?"val":"html",e=c.data();a+="Text",e.resetText||c.data("resetText",c[d]()),c[d](e[a]||this.options[a]),setTimeout(function(){"loadingText"==a?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},b.prototype.toggle=function(){var a=this.$element.closest('[data-toggle="buttons"]');if(a.length){var b=this.$element.find("input").prop("checked",!this.$element.hasClass("active")).trigger("change");"radio"===b.prop("type")&&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("bs.button"),f="object"==typeof c&&c;e||d.data("bs.button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle"),b.preventDefault()})}(window.jQuery),+function(a){"use strict";var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},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},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.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)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){return this.sliding?void 0:this.slide("next")},b.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}this.sliding=!0,f&&this.pause();var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});if(!e.hasClass("active")){if(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")})),a.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(j),j.isDefaultPrevented())return;e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.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)}).emulateTransitionEnd(600)}else{if(this.$element.trigger(j),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("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d=a(this),e=a(d.attr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),d.data()),g=d.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=d.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(window.jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b=a.Event("show.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])}}},b.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").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?(this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350),void 0):d.call(this)}}},b.prototype.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("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c);e||d.data("bs.collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":d.data(),i=d.attr("data-parent"),j=i&&a(i);g&&g.transitioning||(j&&j.find('[data-toggle=collapse][data-parent="'+i+'"]').not(d).addClass("collapsed"),d[f.hasClass("in")?"addClass":"removeClass"]("collapsed")),f.collapse(h)})}(window.jQuery),+function(a){"use strict";function b(){a(d).remove(),a(e).each(function(b){var d=c(a(this));d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown")),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown"))})}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}var d=".dropdown-backdrop",e="[data-toggle=dropdown]",f=function(b){a(b).on("click.bs.dropdown",this.toggle)};f.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){if("ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('<div class="dropdown-backdrop"/>').insertAfter(a(this)).on("click",b),f.trigger(d=a.Event("show.bs.dropdown")),d.isDefaultPrevented())return;f.toggleClass("open").trigger("shown.bs.dropdown"),e.focus()}return!1}},f.prototype.keydown=function(b){if(/(38|40|27)/.test(b.keyCode)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var f=c(d),g=f.hasClass("open");if(!g||g&&27==b.keyCode)return 27==b.which&&f.find(e).focus(),d.click();var h=a("[role=menu] li:not(.divider):visible a",f);if(h.length){var i=h.index(h.filter(":focus"));38==b.keyCode&&i>0&&i--,40==b.keyCode&&i<h.length-1&&i++,~i||(i=0),h.eq(i).focus()}}}};var g=a.fn.dropdown;a.fn.dropdown=function(b){return this.each(function(){var c=a(this),d=c.data("dropdown");d||c.data("dropdown",d=new f(this)),"string"==typeof b&&d[b].call(c)})},a.fn.dropdown.Constructor=f,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=g,this},a(document).on("click.bs.dropdown.data-api",b).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",e,f.prototype.toggle).on("keydown.bs.dropdown.data-api",e+", [role=menu]",f.prototype.keydown)}(window.jQuery),+function(a){"use strict";var b=function(b,c){this.options=c,this.$element=a(b),this.$backdrop=this.isShown=null,this.options.remote&&this.$element.load(this.options.remote)};b.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},b.prototype.toggle=function(a){return this[this.isShown?"hide":"show"](a)},b.prototype.show=function(b){var c=this,d=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(d),this.isShown||d.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.$element.on("click.dismiss.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.backdrop(function(){var d=a.support.transition&&c.$element.hasClass("fade");c.$element.parent().length||c.$element.appendTo(document.body),c.$element.show(),d&&c.$element[0].offsetWidth,c.$element.addClass("in").attr("aria-hidden",!1),c.enforceFocus();var e=a.Event("shown.bs.modal",{relatedTarget:b});d?c.$element.find(".modal-dialog").one(a.support.transition.end,function(){c.$element.focus().trigger(e)}).emulateTransitionEnd(300):c.$element.focus().trigger(e)}))},b.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one(a.support.transition.end,a.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal())},b.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.focus()},this))},b.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},b.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.removeBackdrop(),a.$element.trigger("hidden.bs.modal")})},b.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},b.prototype.backdrop=function(b){var c=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var d=a.support.transition&&c;if(this.$backdrop=a('<div class="modal-backdrop '+c+'" />').appendTo(document.body),this.$element.on("click.dismiss.modal",a.proxy(function(a){a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),d&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;d?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):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).emulateTransitionEnd(150):b()):b&&b()};var c=a.fn.modal;a.fn.modal=function(c,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},b.DEFAULTS,e.data(),"object"==typeof c&&c);f||e.data("bs.modal",f=new b(this,g)),"string"==typeof c?f[c](d):g.show&&f.show(d)})},a.fn.modal.Constructor=b,a.fn.modal.noConflict=function(){return a.fn.modal=c,this},a(document).on("click.bs.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,this).one("hide",function(){c.is(":visible")&&c.focus()})}),a(document).on("show.bs.modal",".modal",function(){a(document.body).addClass("modal-open")}).on("hidden.bs.modal",".modal",function(){a(document.body).removeClass("modal-open")})}(window.jQuery),+function(a){"use strict";var b=function(a,b){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",a,b)};b.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},b.prototype.init=function(b,c,d){this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d);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":"focus",i="hover"==g?"mouseleave":"blur";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()},b.prototype.getDefaults=function(){return b.DEFAULTS},b.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},b.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},b.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show),void 0):c.show()},b.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide),void 0):c.hide()},b.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){if(this.$element.trigger(b),b.isDefaultPrevented())return;var c=this.tip();this.setContent(),this.options.animation&&c.addClass("fade");var d="function"==typeof this.options.placement?this.options.placement.call(this,c[0],this.$element[0]):this.options.placement,e=/\s?auto?\s?/i,f=e.test(d);f&&(d=d.replace(e,"")||"top"),c.detach().css({top:0,left:0,display:"block"}).addClass(d),this.options.container?c.appendTo(this.options.container):c.insertAfter(this.$element);var g=this.getPosition(),h=c[0].offsetWidth,i=c[0].offsetHeight;if(f){var j=this.$element.parent(),k=d,l=document.documentElement.scrollTop||document.body.scrollTop,m="body"==this.options.container?window.innerWidth:j.outerWidth(),n="body"==this.options.container?window.innerHeight:j.outerHeight(),o="body"==this.options.container?0:j.offset().left;d="bottom"==d&&g.top+g.height+i-l>n?"top":"top"==d&&g.top-l-i<0?"bottom":"right"==d&&g.right+h>m?"left":"left"==d&&g.left-h<o?"right":d,c.removeClass(k).addClass(d)}var p=this.getCalculatedOffset(d,g,h,i);this.applyPlacement(p,d),this.$element.trigger("shown.bs."+this.type)}},b.prototype.applyPlacement=function(a,b){var c,d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),a.top=a.top+g,a.left=a.left+h,d.offset(a).addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;if("top"==b&&j!=f&&(c=!0,a.top=a.top+f-j),/bottom|top/.test(b)){var k=0;a.left<0&&(k=-2*a.left,a.left=0,d.offset(a),i=d[0].offsetWidth,j=d[0].offsetHeight),this.replaceArrow(k-e+i,i,"left")}else this.replaceArrow(j-f,j,"top");c&&d.offset(a)},b.prototype.replaceArrow=function(a,b,c){this.arrow().css(c,a?50*(1-a/b)+"%":"")},b.prototype.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")},b.prototype.hide=function(){function b(){"in"!=c.hoverState&&d.detach()}var c=this,d=this.tip(),e=a.Event("hide.bs."+this.type);return this.$element.trigger(e),e.isDefaultPrevented()?void 0:(d.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?d.one(a.support.transition.end,b).emulateTransitionEnd(150):b(),this.$element.trigger("hidden.bs."+this.type),this)},b.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},b.prototype.hasContent=function(){return this.getTitle()},b.prototype.getPosition=function(){var b=this.$element[0];return a.extend({},"function"==typeof b.getBoundingClientRect?b.getBoundingClientRect():{width:b.offsetWidth,height:b.offsetHeight},this.$element.offset())},b.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},b.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)},b.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},b.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},b.prototype.enable=function(){this.enabled=!0},b.prototype.disable=function(){this.enabled=!1},b.prototype.toggleEnabled=function(){this.enabled=!this.enabled},b.prototype.toggle=function(b){var c=b?a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;c.tip().hasClass("in")?c.leave(c):c.enter(c)},b.prototype.destroy=function(){this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var c=a.fn.tooltip;a.fn.tooltip=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof c&&c;e||d.data("bs.tooltip",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.tooltip.Constructor=b,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=c,this}}(window.jQuery),+function(a){"use strict";var b=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");b.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.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")[this.options.html?"html":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.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)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(window.jQuery),+function(a){"use strict";function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(c).is("body")?a(window):a(c),this.$body=a("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||(e=a(c).attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);var c=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#\w/.test(e)&&a(e);return f&&f.length&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parents(".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate")};var c=a.fn.scrollspy;a.fn.scrollspy=function(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]()})},a.fn.scrollspy.Constructor=b,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){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.attr("data-target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},b.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),f.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(window.jQuery),+function(a){"use strict";var b=function(c,d){this.options=a.extend({},b.DEFAULTS,d),this.$window=a(window).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(c),this.affixed=this.unpin=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top()),"function"==typeof h&&(h=f.bottom());var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=c-h?"bottom":null!=g&&g>=d?"top":!1;this.affixed!==i&&(this.unpin&&this.$element.css("top",""),this.affixed=i,this.unpin="bottom"==i?e.top-d:null,this.$element.removeClass(b.RESET).addClass("affix"+(i?"-"+i:"")),"bottom"==i&&this.$element.offset({top:document.body.offsetHeight-h-this.$element.height()}))}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof c&&c;e||d.data("bs.affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,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);


$(document).ready(function(){var slide=true;$(".checkbox-tree input").click(function(){var itemClass=$(this).attr('name');var checked_status=$(this).attr('checked');$("."+itemClass).each(function(){if(checked_status){$(this).prop('checked',true);}else{$(this).prop('checked',false);}});});$(".checkbox-tree a").click(function(){var itemClass=$(this).attr('name');$("."+itemClass).toggle();});$('.login .close a').click(function(){if(slide){$('.login').slideUp('fast');}else{$('.login').hide();}
return false;});if($('form.login').attr('action'))
{$('li.log-in a').click(function(){if(slide){$('form.login').slideDown();}else{$('form.login').show();}
return false;});}
$('.register-form .close a').click(function(){if(slide){$('.register-form').slideUp('fast');}else{$('.register-form').hide();}
return false;});if($(".register-form").attr('action'))
{$('li.register a').click(function(){if(slide){$('.register-form').slideDown();}else{$('.register-form').show();}
return false;});}
$('.message-panel .close a').click(function(){if(slide){$('.message-panel').slideUp('fast');}else{$('.message-panel').hide();}
return false;});$('.password-reminder a').click(function(){$('.forgotten-password').toggle();return false;});$('button.btn').hover(function(){$(this).addClass('active');},function(){$(this).removeClass('active');});$('.print a, a.print').click(function(){window.print();return false;});$('.close-window a, a.close-window').click(function(){window.close();return false;});$('.share').click(function(){$('.sharing').toggle();});$('.send-to-friend').click(function(){$('#send-to-friend-email').toggle();});function removeHighlights()
{$('.cal-event-listing li').each(function(){$(this).removeClass('highlight');});}});

(function($){$.fn.pictureNavigatorCarousel=function(parameters){var settings=$.extend({timeInterval:4000,changeOnHover:true},parameters),windowWidth=window.innerWidth,maxLength=41,carouselID="#"+$(this).attr("id"),split=carouselID.split("#pictureCarousel"),customClass="."+split[1],url=document.location.toString();var isMobileDevice;if(window.innerWidth<10){isMobileDevice=true;}
$(customClass+' .full-Screen-Button').on('click',function(e){var height=$(customClass+" .gallery").height();$(customClass).parent('.gallery-wrapper').addClass("full-screen");$(customClass+" .gallery").height(height).css({backgroundColor:"#DDDDDD"});groupThumbnails(customClass);fullScreen(window.innerWidth,customClass);centerGalleryImage();});$('.gallery-header').on('click',function(e){$(".gallery-wrapper").removeClass("full-screen");$(".gallery").css('height','');$(".gallery").css('backgroundColor','');groupThumbnails(customClass);notFullScreen(customClass);centerGalleryImage();});$(document).keyup(function(e){if(e.keyCode==27&&$(customClass).parent('.gallery-wrapper').hasClass('full-screen')){$(".gallery-wrapper").removeClass("full-screen");$(".gallery").css('height','');$(".gallery").css('backgroundColor','');groupThumbnails(customClass);notFullScreen(customClass);centerGalleryImage();}});$(window).bind('resize',function(){windowWidth=window.innerWidth;groupThumbnails(customClass);if($('.full-screen').length){fullScreen(window.innerWidth,customClass);}
centerGalleryImage();});if(windowWidth>1023){groupThumbnails(customClass);}
$(window).on("load",function(){centerGalleryImage();});$(customClass+' .carousel-text').html($(customClass+' .slide-content-0').html());var activeFontSizeHtag=$('.picture-navigator-container '+customClass+' .carousel-text > a:first-child > *').css('font-size');var activeFontSizePtag=$('.picture-navigator-container '+customClass+' .carousel-text > a:last-child > *').css('font-size');$('.picture-navigator-container '+customClass+' .slide-content > div > a:first-child > *').css('font-size',activeFontSizeHtag);$('.picture-navigator-container '+customClass+' .slide-content > div > a:last-child > *').css('font-size',activeFontSizePtag);var max_num_items=$(customClass+' .carousel-inner .item').length,slide_num=$(customClass+' .carousel-inner .item.active').attr('data-slide-number');$(customClass+' .total-image-number').text(max_num_items);$(customClass+' .active-image-number').text(parseInt(slide_num)+1);$(carouselID).carousel({interval:settings.timeInterval});$(carouselID).on('slid',function(e){var id=$(customClass+' .item.active').data('slide-number');$('.picture-navigator-container '+customClass+' .slide-content').show();var idHeight=$('.picture-navigator-container '+customClass+' .slide-content-'+id).height();$('.picture-navigator-container '+customClass+' .slide-content').hide();$('.picture-navigator-container '+customClass+' .carousel-text').animate({height:idHeight+"px"},500);$(customClass+' .carousel-text').html($(customClass+' .slide-content-'+id).html());$(' #carousel-headline').html($(customClass+' .carousel-text').children().first().html());var extraContent=customClass+' #content-extra-'+id;$(' p.updated').html($(extraContent+' > p.lastUpdated').html());$('div.article-keywords').html($(extraContent+" > div.keywords").html());$(customClass+" .carousel-selector-"+id).addClass("active");$(customClass+" .item").each(function(index){if(index!==id){$(customClass+" .carousel-selector-"+index).removeClass("active");}});showActiveThumbnailGroup(id,customClass);$(customClass+' .active-image-number').text(+id+1);});if(isMobileDevice){$(customClass+' .carousel-control.left').bind('touchstart',function(){$(carouselID).carousel('prev');});$(customClass+' .carousel-control.right').bind('touchstart',function(){$(carouselID).carousel('next');});$(customClass+' .carousel-control.centre').bind('touchstart',function(){pausePlay(customClass,carouselID,settings);});$(customClass+' .thumbnail-control.left').bind('touchstart',function(){pushThumbnails("left",customClass);});$(customClass+' .thumbnail-control.right').bind('touchstart',function(){pushThumbnails("right",customClass);});}else{$(customClass+' .carousel-control.left').click(function(){$(carouselID).carousel('prev');});$(customClass+' .carousel-control.right').click(function(){$(carouselID).carousel('next');});$(customClass+' .carousel-control.centre').click(function(){pausePlay(customClass,carouselID,settings);});$(customClass+' .thumbnail-control.left').click(function(){pushThumbnails("left",customClass);});$(customClass+' .thumbnail-control.right').click(function(){pushThumbnails("right",customClass);});}
if(isMobileDevice){var startX,endX;$(customClass+' .thumbnail').bind('touchstart',function(){startX=event.touches[0].pageX;endX=startX;});$(customClass+' .thumbnail').bind('touchmove',function(){endX=event.touches[0].pageX;});$(customClass+' .thumbnail').bind('touchend',function(){var difference=startX-endX;if(difference<maxLength&&difference>maxLength*-1){showRelevantSlide(this,carouselID);}});}else{if(settings.changeOnHover){$(customClass+' [class^=carousel-selector-]').hover(function(){showRelevantSlide(this,carouselID);$(carouselID).carousel('pause');},function(){$(carouselID).carousel({interval:settings.timeInterval});});}else{$(customClass+' [class^=carousel-selector-]').click(function(){showRelevantSlide(this,carouselID);});}}};function pausePlay(customClass,carouselID,settings){var paused=$(customClass+' .carousel-control.centre span').hasClass('glyphicon-play');if(paused==true){$(carouselID).carousel({interval:settings.timeInterval});$(customClass+' .carousel-control.centre span').removeClass("glyphicon-play").addClass("glyphicon-pause");}else{$(carouselID).carousel('pause');$(customClass+' .carousel-control.centre span').removeClass("glyphicon-pause").addClass("glyphicon-play");}}
function showRelevantSlide(e,carouselID){var id_selector=$(e).attr("class");var id=id_selector.split("-").pop();id=parseInt(id,10);$(carouselID).carousel(id);}
function groupThumbnails(customClass){var shouldBeDisplayed=getNumberOfThumbnails(),arrayCount=getGroupAndThumbnailCount(customClass),totalThumbs=arrayCount[1];for(var i=0;i<arrayCount[0];i++){var currentlyDisplayed=$(customClass+' .group-'+i+' > li').length,difference=shouldBeDisplayed-currentlyDisplayed;if(difference>0){for(var j=difference-1;j>-1;j--){var thumbId=(shouldBeDisplayed-1)-j+(shouldBeDisplayed*i);if(thumbId<totalThumbs){var thumnail=$(customClass+" li.thumb-"+thumbId),newThumnail=thumnail.clone(true);$(customClass+" li.thumb-"+thumbId).remove();$(customClass+" .group-"+(i)).append(newThumnail);};}}else if(difference<0){for(var j=difference;j<0;j++){var thumbId=(shouldBeDisplayed-1)-j+(shouldBeDisplayed*i),thumnail=$(customClass+" li.thumb-"+thumbId),newThumnail=thumnail.clone(true);$(customClass+" li.thumb-"+thumbId).remove();$(customClass+" .group-"+(i+1)).prepend(newThumnail);};}};var id=$(customClass+' .item.active').data('slide-number');showActiveThumbnailGroup(id,customClass);}
function showActiveThumbnailGroup(id,customClass){if($('#sliderGallery').length){while(Math.floor(id/$(customClass+' .group-0 > li').length)!==$(customClass+" .thumbnails.active").data('group-number')){if(Math.floor(id/$(customClass+' .group-0 > li').length)>$(customClass+" .thumbnails.active").data('group-number')){pushThumbnails("right",customClass);}else if(Math.floor(id/$(customClass+' .group-0 > li').length)<$(customClass+" .thumbnails.active").data('group-number')){pushThumbnails("left",customClass);}}
$(customClass+' .active-image-number').text(+id+1);}}
function pushThumbnails(direction,customClass){var array=getGroupAndThumbnailCount(customClass),totalGroups=array[0],totalThumbs=array[1],numberOfThumbnails=getNumberOfThumbnails();var numberOfGroups=Math.ceil(totalThumbs/numberOfThumbnails),currentSlide=$(customClass+" .thumbnails.active").data('group-number'),comparitor,leftPosition;if(direction==="left"){comparitor=0;leftPosition="+=100%";}else{comparitor=numberOfGroups-1;leftPosition="-=100%";}
if(currentSlide!==comparitor){$(customClass+" .thumbnails").each(function(){$(customClass+" .group-"+$(this).data('group-number')).animate({left:leftPosition},"slow");$(customClass+" .group-"+$(this).data('group-number')).removeClass("active");});if(direction==="left"){currentSlide-=1;}else{currentSlide+=1;}
$(customClass+" .group-"+currentSlide).addClass("active");}}
function getThumbnailsPerGroup(customClass){var imageWidth=$(customClass+" .carousel-bounding-box").width();if(window.innerWidth<727){imageWidth+=20;};var thumbnailWidth=$(customClass+" .thumbnails > li").width(),array=new Array();array[0]=Math.floor(imageWidth/thumbnailWidth);array[1]=imageWidth%thumbnailWidth;return array;}
function getGroupAndThumbnailCount(customClass){var totalGroups=$(customClass+' .thumbnails').length,totalThumbs=0;for(var i=0;i<totalGroups;i++){totalThumbs+=$(customClass+' .group-'+i+' > li').length;}
var array=new Array();array[0]=totalGroups;array[1]=totalThumbs;return array;}
function fullScreen(width,customClass){if(width>$(window).height()&&width<727){$(customClass).parent(".gallery-wrapper").addClass("landscape");}else{$(customClass).parent(".gallery-wrapper").removeClass("landscape");}
var containerHeight=$(customClass+".gallery-container").height(),galleryTopHeight=$(customClass+" .gallery-top").outerHeight();var thumbHeight=$(customClass+" .slider-thumbs").outerHeight(),textHeight=$(customClass+" .carousel-text").outerHeight(),shareHeight=$(customClass+" .article-share.in-gallery").outerHeight()+30;if(width>$(window).height()&&width<727){textHeight-=10;}
var maxHeight;if($(customClass).parent(".gallery-wrapper").hasClass("inline"))
{maxHeight=containerHeight-(galleryTopHeight+thumbHeight+textHeight+10);if(width<1024){maxHeight+=46;}}else
{maxHeight=containerHeight-(galleryTopHeight+thumbHeight+50);if(width<1024){maxHeight=containerHeight-(galleryTopHeight+thumbHeight+textHeight+shareHeight+50);if(width>$(window).height()&&width<727){maxHeight=containerHeight-(galleryTopHeight+shareHeight);}}}
$(customClass+' .carousel-bounding-box').css('maxWidth',(maxHeight*1.6)+"px");$('html body').addClass('modal-open');}
function notFullScreen(customClass){$(customClass+' .carousel-bounding-box').css('maxWidth',"");$('html body').removeClass('modal-open');}
function getNumberOfThumbnails(){var numberOfThumbnails=3;if($('.full-screen').length){if(window.innerWidth>615){numberOfThumbnails=4;}
if(window.innerWidth>1140){numberOfThumbnails=5;}
if((window.innerWidth>820&&window.innerWidth<1023)){numberOfThumbnails=5;}}else{if(window.innerWidth>1023){numberOfThumbnails=4;}}
return numberOfThumbnails;}
function centerGalleryImage(){$('.gallery .carousel-inner .item').show();$('.gallery .carousel-inner .item > img').each(function(){var thisWidth=$(this).width();var thisHeight=$(this).height();if(1.6>(thisWidth/thisHeight)){var minusMarL=thisWidth/2;$(this).animate({left:"50%",marginLeft:"-"+minusMarL+"px"});}else{$(this).css({"height":"auto","width":"100%","left":"0px","margin-left":" 0px"});var minusMarT=$(this).height()/2;$(this).animate({top:"50%",marginTop:"-"+minusMarT+"px"});}});$('.gallery .carousel-inner .item').hide();}})(jQuery);

(function($){var commands={touchStart:touchStart,touchMove:touchMove,touchEnd:touchEnd,touchCancel:touchCancel},carousel,slider,customClass,triggerElementID=null,fingerCount=0,startX=0,startY=0,curX=0,curY=0,deltaX=0,deltaY=0,horzDiff=0,vertDiff=0,minLength=72,swipeLength=0,swipeAngle=null,swipeDirection=null;$.fn.swipeCarousel=function(){var id="#"+$(this).attr("id"),split=id.split("#pictureCarousel");carousel=0;slider=0;if(split.length>1){carousel=id;}else{split=id.split("#slider");slider=id;}
customClass="."+split[1];customClass=customClass.toLowerCase();if(typeof arguments[0]==='string'){var property=arguments[1],args=Array.prototype.slice.call(arguments);args.splice(0,1);commands[arguments[0]].apply(this,args);}
return this;};function touchStart(event,passedName){fingerCount=event.touches.length;if(fingerCount===1){startX=event.touches[0].pageX;startY=event.touches[0].pageY;triggerElementID=passedName;}else{touchCancel(event);}}
function touchMove(event){if(event.touches.length===1){curX=event.touches[0].pageX;curY=event.touches[0].pageY;}else{touchCancel(event);}}
function touchEnd(event){if(fingerCount===1&&curX!==0){swipeLength=Math.round(Math.sqrt(Math.pow(curX-startX,2)+Math.pow(curY-startY,2)));if(swipeLength>=minLength){caluculateAngle();determineSwipeDirection();processingRoutine();touchCancel(event);}else{touchCancel(event);}}else{touchCancel(event);}}
function touchCancel(event){fingerCount=0;startX=0;startY=0;curX=0;curY=0;deltaX=0;deltaY=0;horzDiff=0;vertDiff=0;swipeLength=0;swipeAngle=null;swipeDirection=null;triggerElementID=null;}
function caluculateAngle(){var X=startX-curX,Y=curY-startY,Z=Math.round(Math.sqrt(Math.pow(X,2)+Math.pow(Y,2))),r=Math.atan2(Y,X);swipeAngle=Math.round(r*180/Math.PI);if(swipeAngle<0){swipeAngle=360-Math.abs(swipeAngle);}}
function determineSwipeDirection(){if((swipeAngle<=45)&&(swipeAngle>=0)){swipeDirection='left';}else if((swipeAngle<=360)&&(swipeAngle>=315)){swipeDirection='left';}else if((swipeAngle>=135)&&(swipeAngle<=225)){swipeDirection='right';}else if((swipeAngle>45)&&(swipeAngle<135)){swipeDirection='down';}else{swipeDirection='up';}}
function processingRoutine(){var swipedElement=document.getElementById(triggerElementID);if(swipeDirection==='left'){updateText();if(carousel){$(carousel).carousel('next');}else{pushThumbnails("right",customClass);}
event.preventDefault();}else if(swipeDirection==='right'){updateText();if(carousel){$(carousel).carousel('prev');}else{pushThumbnails("left",customClass);}
event.preventDefault();}}
function updateText(){var id=$(customClass+' .item.active').data('slide-number');$(customClass+' #carousel-text').html($(customClass+' #slide-content-'+id).html());$(customClass+" #carousel-selector-"+id).addClass("active");$(customClass+" .item").each(function(index){if(index!==id){$(customClass+" #carousel-selector-"+index).removeClass("active");}});$(customClass+' .image-counter .active-image-number').text(+id+1);}
function pushThumbnails(direction,customClass){var totalGroups=$(customClass+' .thumbnails').length,totalThumbs=0;for(var i=0;i<totalGroups;i++){totalThumbs+=$(customClass+' .thumbnails#group-'+i+' > li').length;}
var numberOfThumbnails=3;if($('.full-screen').length){if($(window).width()>615){numberOfThumbnails=4;}
if($(window).width()>1140){numberOfThumbnails=5;}
if(($(window).width()>820&&$(window).width()<979)){numberOfThumbnails=5;}}else{if($(window).width()>979){numberOfThumbnails=4;}}
var numberOfGroups=Math.ceil(totalThumbs/numberOfThumbnails),currentSlide=$(customClass+" .thumbnails.active").data('group-number'),comparitor,leftPosition;if(direction=="left"){comparitor=0;leftPosition="+=100%";}else{comparitor=numberOfGroups-1;leftPosition="-=100%";}
if(currentSlide!=comparitor){$(customClass+" .thumbnails").each(function(){$(customClass+" #group-"+$(this).data('group-number')).animate({left:leftPosition},"slow");$(customClass+" #group-"+$(this).data('group-number')).removeClass("active");});if(direction=="left"){currentSlide-=1;}else{currentSlide+=1;}
$(customClass+" #group-"+currentSlide).addClass("active");}}})(jQuery);

(function($){$.fn.pictureStorylist=function(parameters){var settings=$.extend({timeInterval:3000,changeOnHover:true,itemClass:"",containerClass:"",numberOfThumbsMob:1,numberOfThumbsDesk:4,targetID:""},parameters),windowWidth=window.innerWidth,carouselID="#"+$(this).attr("id"),split=carouselID.split(settings.targetID),customClass="."+split[1];var isMobileDevice;if(window.innerWidth<10){isMobileDevice=true;}
if(windowWidth>1023){groupThumbnails(customClass,settings);}
$(carouselID).carousel({pause:true,interval:false});if(isMobileDevice){$(customClass+' .carousel-control.left').bind('touchstart',function(){$(carouselID).carousel('prev');});$(customClass+' .carousel-control.right').bind('touchstart',function(){$(carouselID).carousel('next');});}else{$(customClass+' .carousel-control.left').click(function(){$(carouselID).carousel('prev');});$(customClass+' .carousel-control.right').click(function(){$(carouselID).carousel('next');});}
preventSlide(customClass,carouselID,settings);$('.picture-navigator').on('slid.bs.carousel',function(){$(customClass+' .carousel-control.right,'+customClass+' .carousel-control.left').show();preventSlide(customClass,carouselID,settings);});$(window).resize(function(){groupThumbnails(customClass,settings);$(customClass+' .carousel-control.right,'+customClass+' .carousel-control.left').show();preventSlide(customClass,carouselID,settings);});};function groupThumbnails(customClass,settings){var shouldBeDisplayed=getNumberOfItems(settings),totalThumbs=$(customClass+" ."+settings.itemClass).length;for(var i=0;i<$(customClass+" ."+settings.containerClass).length;i++){var currentlyDisplayed=$(customClass+" ."+settings.containerClass).eq(i).find(" ."+settings.itemClass).length,difference=shouldBeDisplayed-currentlyDisplayed;if(difference>0){for(var j=difference;j>-1;j--){var thumbId=(shouldBeDisplayed)-j+(shouldBeDisplayed*i);if(thumbId<totalThumbs){var thumnail=$(customClass+" ."+settings.itemClass).eq(thumbId),newThumnail=thumnail.clone(true);$(customClass+" ."+settings.itemClass).eq(thumbId).remove();$(customClass+" ."+settings.containerClass).eq(i).append(newThumnail);};}}else if(difference<0){for(var j=difference;j<0;j++){var thumbId=(shouldBeDisplayed-1)-j+(shouldBeDisplayed*i);thumnail=$(customClass+" ."+settings.itemClass).eq(thumbId);newThumnail=thumnail.clone(true);$(customClass+" ."+settings.itemClass).eq(thumbId).remove();$(customClass+" ."+settings.containerClass).eq(i+1).prepend(newThumnail);};}};}
function getNumberOfItems(settings){var numberOfThumbnails=settings.numberOfThumbsMob;if(window.innerWidth>1023){numberOfThumbnails=settings.numberOfThumbsDesk;}
return numberOfThumbnails;}
function preventSlide(customClass,carouselID,settings){var totalThumbs=$(customClass+" ."+settings.itemClass).length;var numberOfGroupsShould=Math.ceil(totalThumbs/getNumberOfItems(settings));var currentGroup=$(customClass+" .item.active").data("slide-number");if(currentGroup==(numberOfGroupsShould-1)){$(customClass+' .carousel-control.right').hide();}
if(currentGroup==0){$(customClass+' .carousel-control.left').hide();}
if($(customClass+' .item.active'+" ."+settings.containerClass+" ."+settings.itemClass).length==0){$(carouselID).carousel(numberOfGroupsShould-1);$(carouselID).carousel('pause');}}})(jQuery);

jQuery(".navbar-primary-container .nav li > span").click(function(){jQuery(this).toggleClass("nav-arrow-open").toggleClass("nav-arrow");jQuery(this).parent().find(".nav").eq(0).slideToggle();});if(jQuery("li").hasClass("active")){jQuery("li.active > span").toggleClass("nav-arrow-open").toggleClass("nav-arrow");}
var staticSecondMenu=$(".navbar-secondary-container").children();$('.primary.nav > li').hover(function(){if($(this).children().length>3&&staticSecondMenu.length!=0){var subWidth=$(this).find(".primary-drop .drop-content-a").outerWidth(true)+$(this).find(".primary-drop .drop-content-b").outerWidth(true);var navWidth=$(".navbar").outerWidth(true);var ulLeft=$(".navbar").offset().left;var ulRight=parseFloat(ulLeft+navWidth);var liLeft=$(this).offset().left;if(subWidth>ulRight-liLeft){var newLeft=navWidth-subWidth;$(this).find(".primary-drop").css("left",newLeft+"px");}}});$("#topLink").click(function(){$("html, body").animate({scrollTop:0},500);return false;});$(".popover-content > div > a").click(function(){$('#share-trigger-top').popover('hide');});$("body").click(function(e){if(e.target.className!=="text"&&e.target.id!=="share-trigger-top"){$('#share-trigger-top').popover('hide');}});

(function($){var cssTransitionsSupported=(function(){var s=document.createElement('p').style,v=['ms','O','Moz','Webkit'];if(s['transition']=='')return true;while(v.length)
if(v.pop()+'Transition'in s)
return true;return false;})();function scrollitems($strip,moveFirst){var settings=$strip.data('settings');if(typeof moveFirst==='undefined')
moveFirst=false;if(moveFirst){moveFirstElement($strip);}
var options=animationSettings($strip);$strip.animate(options.css,options.time,"linear",function(){$strip.css(settings.direction,'0');scrollitems($strip,true);});}
function animationSettings($strip){var settings=$strip.data('settings');var first=$strip.children().first();var distance=Math.abs(-$strip.css(settings.direction).replace('px','').replace('auto','0')-first.outerWidth(true));var settings=$strip.data('settings');var timeToComplete=distance*1000/settings.speed;var animationSettings={};animationSettings[settings.direction]=$strip.css(settings.direction).replace('px','').replace('auto','0')-distance;return{'css':animationSettings,'time':timeToComplete};}
function moveFirstElement($strip){var settings=$strip.data('settings');$strip.css('transition-duration','0s').css(settings.direction,'0');var $first=$strip.children().first();if($first.hasClass('webticker-init'))
$first.remove();else
$strip.children().last().after($first);}
function css3Scroll($strip,moveFirst){if(typeof moveFirst==='undefined')
moveFirst=false;if(moveFirst){moveFirstElement($strip);}
var options=animationSettings($strip);var time=options.time/1000;time+='s';$strip.css(options.css).css('transition-duration',time);}
function initalize($strip){var settings=$strip.data('settings');$strip.width('auto');var stripWidth=0;$strip.children('li').each(function(){stripWidth+=$(this).outerWidth(true);});if(stripWidth<$strip.parent().width()||$strip.children().length==1){if(settings.duplicate){itemWidth=Math.max.apply(Math,$strip.children().map(function(){return $(this).width();}).get());while(stripWidth-itemWidth<$strip.parent().width()||$strip.children().length==1){var listItems=$strip.children().clone();$strip.append(listItems);stripWidth=0;$strip.children('li').each(function(){stripWidth+=$(this).outerWidth(true);});itemWidth=Math.max.apply(Math,$strip.children().map(function(){return $(this).width();}).get());}}else{var emptySpace=$strip.parent().width()-stripWidth;emptySpace+=$strip.find("li:first").width();var height=$strip.find("li:first").height();$strip.append('<li class="ticker-spacer" style="width:'+emptySpace+'px;height:'+height+'px;"></li>');}}
if(settings.startEmpty){var height=$strip.find("li:first").height();$strip.prepend('<li class="webticker-init" style="width:'+$strip.parent().width()+'px;height:'+height+'px;"></li>');}
stripWidth=0;$strip.children('li').each(function(){stripWidth+=$(this).outerWidth(true);});$strip.width(stripWidth+200);widthCompare=0;$strip.children('li').each(function(){widthCompare+=$(this).outerWidth(true);});while(widthCompare>=$strip.width()){$strip.width($strip.width()+200);widthCompare=0;$strip.children('li').each(function(){widthCompare+=$(this).outerWidth(true);});}}
var methods={init:function(settings){settings=jQuery.extend({speed:50,direction:"left",moving:true,startEmpty:true,duplicate:false,hoverpause:true,rssfrequency:0,updatetype:"reset"},settings);return this.each(function(){jQuery(this).data('settings',settings);var $strip=jQuery(this);$strip.addClass("newsticker");var $tickercontainer=$strip.parent().wrap("<div class='tickercontainer'></div>");initalize($strip);if(cssTransitionsSupported){$strip.css('transition-duration','0s').css(settings.direction,'0');css3Scroll($strip,false);$strip.on('transitionend webkitTransitionEnd oTransitionEnd otransitionend',function(event){if(!$strip.is(event.target)){return false;}
css3Scroll($(this),true);});}else{scrollitems($(this));}
if(settings.hoverpause){$strip.hover(function(){if(cssTransitionsSupported){var currentPosition=$(this).css(settings.direction);$(this).css('transition-duration','0s').css(settings.direction,currentPosition);}else
jQuery(this).stop();},function(){if(jQuery(this).data('settings').moving){if(cssTransitionsSupported){css3Scroll($(this),false);}else{scrollitems($strip)}}});}});},stop:function(){var settings=$(this).data('settings');if(settings.moving){settings.moving=false;return this.each(function(){if(cssTransitionsSupported){var currentPosition=$(this).css(settings.direction);$(this).css('transition-duration','0s').css(settings.direction,currentPosition);}else
$(this).stop();});}},cont:function(){var settings=$(this).data('settings')
if(!settings.moving){settings.moving=true;return this.each(function(){if(cssTransitionsSupported){css3Scroll($(this),false);}else{scrollitems($(this));}});}},update:function(list,type,insert,remove){type=type||"reset";if(typeof insert==='undefined')
insert=true;if(typeof remove==='undefined')
remove=false;if(typeof list==='string'){list=$(list);}
var $strip=$(this);$strip.webTicker('stop');var settings=$(this).data('settings');if(type=='reset'){$strip.html(list);$strip.css(settings.direction,'0');initalize($strip);}else if(type=='swap'){$strip.children('li').addClass('old');for(var i=0;i<list.length;i++){id=$(list[i]).data('update');match=$strip.find('[data-update="'+id+'"]');if(match.length<1){if(insert){if($strip.find('.ticker-spacer:first-child').length==0&&$strip.find('.ticker-spacer').length>0){$strip.children('li.ticker-spacer').before(list[i]);}
else{$strip.append(list[i]);}}}else $strip.find('[data-update="'+id+'"]').replaceWith(list[i]);;};$strip.children('li.webticker-init, li.ticker-spacer').removeClass('old');if(remove)
$strip.children('li').remove('.old');stripWidth=0;$strip.children('li').each(function(){stripWidth+=$(this).outerWidth(true);});$strip.width(stripWidth+200);}
$strip.webTicker('cont');}};$.fn.webTicker=function(method){if(methods[method]){return methods[method].apply(this,Array.prototype.slice.call(arguments,1));}else if(typeof method==='object'||!method){return methods.init.apply(this,arguments);}else{$.error('Method '+method+' does not exist on jQuery.webTicker');}};})(jQuery);

var windowBig=true;function searchFilter(windowWidth){if(windowWidth<1024){jQuery(".search-filters-outer-container h3").click(function(e){jQuery(".search-filters-inner-container").slideToggle();e.preventDefault();});jQuery(".search-filters-inner-container").hide();jQuery(".search-filters-outer-container").appendTo(".search-sort-filter");}else if(windowWidth>1023){jQuery(".search-filters-outer-container h3").off();jQuery(".search-filters-inner-container").show();jQuery(".search-filters-outer-container").appendTo(".content-b .inner-d article");}}
$(function(){var windowWidth=window.innerWidth;searchFilter(windowWidth);jQuery(window).resize(function(){var newWindowWidth=window.innerWidth;if((newWindowWidth>1023&&windowWidth<1024)||(newWindowWidth<1024&&windowWidth>1023)){searchFilter(newWindowWidth);}
windowWidth=newWindowWidth;});});function searchFromDate(e){e.preventDefault();var $this=$(e.target);var fromDate=$this.data('from-date');var $form=$(e.target).parents('form');$form.find('input[name="fromDate"]').val(fromDate);$form.submit();}
function filterByDate(e){e.preventDefault();var $this=$(e.target);var $form=$(e.target).parents('form');var fromDate=$form.find('input[name="filterFromDate"]').val();var toDate=$form.find('input[name="filterToDate"]').val();$form.find('input[name="fromDate"]').val(fromDate);$form.find('input[name="toDate"]').val(toDate);$form.submit();}

function emptyFunction(a){}
window.console=window.console||{log:emptyFunction,info:emptyFunction,warn:emptyFunction,error:emptyFunction}
var defaultLocation='W1';$(function(){if(readCookie("sessionKey")!=false){console.log('user logged in');var postcode=qs('postcode');if(postcode!=null&&postcode!=undefined&&postcode.length>0){getWeatherForecast(postcode);}else{if(typeof(localStorage.todayTemp)!=="undefined"&&localStorage.override==="true"){if(!getStoredWeather()){getUserWeather();}}else{getUserWeather();}}}else{if(localStorage.override==="true")localStorage.override=false;getStoredWeather();}});function getUserWeather(){$.ajax({dataType:"json",url:'/ajax?action=loginStatus',success:function(json){if(json.loginStatus.postCode!=null){getWeatherForecast(json.loginStatus.postCode);}else{getStoredWeather();}},error:function(){getStoredWeather();}});}
function getStoredWeather(){if(typeof(localStorage.todayTemp)!=="undefined"){var todaysTime=new Date().getTime();var localStorageTime=localStorage.timeFetched;if(todaysTime<localStorageTime){console.log('LOCAL STORAGE');$('.weather-header .location').html(localStorage.weatherLocation).show();$('.temperature.current-climate').html(localStorage.todayTemp+"&deg;").show();$('.weather-header .weather-image').attr("src",localStorage.weatherImage).show();var pageUrl=$('.weather-header').data('weather-page');resetWeatherUrl(pageUrl,localStorage.weatherLocation);resetWeatherLocation(localStorage.weatherLocation);return true;}}
var preferedLocation=$('.weather-header').data('preffered-location');getWeather(preferedLocation);return false;}
function getWeatherForecast(locationName){getWeather(locationName);if(typeof(localStorage.todayTemp)!=="undefined"){localStorage.override=true;}}
function getWeather(locationName){console.log('locationName first: '+locationName);if(typeof(locationName)=="undefined"){console.log('using cookie value: '+defaultLocation);ajaxWeather(defaultLocation);}else{console.log('using form value: '+locationName);var isLocationNameSterile=regexPostCode(locationName);if(isLocationNameSterile==true){$('.weather-header .no-weather').addClass('hide');ajaxWeather(locationName);}else{$('.weather-header .no-weather').html('Please enter a valid UK postcode - thank you');$('.weather-header .hide.no-weather').removeClass('hide');}}}
function regexPostCode(location){var postCodeReg=/^[A-Za-z0-9 ]*[A-Za-z0-9][A-Za-z0-9 ]*$/;if(!postCodeReg.test(location)){console.log('failed regex');return false;}else{console.log('passed regex');return true;}}
function ajaxWeather(locationName){console.log('ajax: '+locationName);console.log('ajaxWeather() ran');var contentUrl=$('.weather-header').data('content-url');if(contentUrl==undefined||contentUrl==null)return;var url=contentUrl;var ot='archant.AjaxPageLayout.ot';$.ajax({url:url,data:{"ot":ot,"isAjaxView":"true","postcode":locationName},dataType:"json",success:function(result){if(typeof(result.todayTemp)!=="undefined"){$('.weather-header .location').html(locationName).show();$('.temperature.current-climate').html(result.todayTemp+"&deg;").show();$('.weather-header .weather-image').attr("src",result.weatherImage).show();localStorage.todayTemp=result.todayTemp;localStorage.weatherLocation=locationName;localStorage.weatherImage=result.weatherImage;localStorage.timeFetched=new Date().getTime()+30*60000;var pageUrl=$('.weather-header').data('weather-page');resetWeatherUrl(pageUrl,locationName);resetWeatherLocation(locationName);var win=$('#my-weather-modal');if(win.hasClass('in')){win.modal('hide');}}else{$('.weather-header .hide.no-weather').html("There was an error with your request, please try again.");}},error:function(xhr,status,error){$('.weather-header .hide.no-weather').html("We do not have a forecast for "
+locationName
+". <br> <span class='secondary-message'>Please ensure you enter a valid postcode and try again</span>");$('.weather-header .hide.no-weather').removeClass('hide');console.log('Ajax no results, error: ');console.log('xhr: '+xhr);console.log('status: '+status);console.log('error: '+error);}});}
function readCookie(cookieName){var re=new RegExp('[; ]'+cookieName+'=([^\\s;]*)');var sMatch=(' '+document.cookie).match(re);if(cookieName&&sMatch){return unescape(sMatch[1]);}else{return false;}}
function resetWeatherUrl(pageUrl,locationName){var url=pageUrl+"?postcode="+locationName;$('.weather-header .forecast-link').attr('href',url).show();}
function resetWeatherLocation(locationName){$('#weather-location input:text[name=location]').val(locationName);}
function qs(name){var query=window.location.search.substring(1);var vars=query.split("&");for(var i=0;i<vars.length;i++){var pair=vars[i].split("=");if(pair[0]==name){return pair[1];}}
return null;}

function removeHighlights()
{$('.cal-event-listing li').each(function(){$(this).removeClass('highlight');});}
function Epoch(name,mode,targetelement,multiselect,isDynamic,publishingQueue)
{this.state=0;this.name=name;this.publishingQueue=publishingQueue;this.curDate=new Date();this.mode=mode;this.selectMultiple=(multiselect==true);this.isDynamic=(isDynamic==true);this.selectedDates=new Array();this.calendar;this.calHeading;this.calCells;this.rows;this.cols;this.cells=new Array();this.monthSelect;this.yearSelect;this.dateDisplay;this.mousein=false;this.calConfig();this.setDays();this.displayYear=this.displayYearInitial;this.displayMonth=this.displayMonthInitial;this.createCalendar();if(this.mode=='popup'&&targetelement&&targetelement.type=='text')
{this.cont=document.createElement('div');this.iframe=document.createElement('iframe');this.cont.appendChild(this.iframe);this.cont.setAttribute('class','date-popup');this.cont.setAttribute('className','date-popup');this.tgt=targetelement;this.cont.style.position='absolute';this.topOffset=this.tgt.offsetHeight;this.leftOffset=0;this.cont.style.top=this.getTop(targetelement)+this.topOffset+'px';this.cont.style.left=this.getLeft(targetelement)+this.leftOffset+'px';this.cont.appendChild(this.calendar);document.body.appendChild(this.cont);this.tgt.calendar=this;this.tgt.onfocus=function(){this.calendar.show();};this.tgt.onblur=function(){if(!this.calendar.mousein){this.calendar.hide();}};}
else
{this.container=targetelement;this.container.appendChild(this.calendar);}
this.state=2;this.visible?this.show():this.hide();}
Epoch.prototype.calConfig=function()
{this.displayYearInitial=this.curDate.getFullYear();this.displayMonthInitial=this.curDate.getMonth();this.rangeYearLower=2008;this.rangeYearUpper=new Date().getFullYear()+2;this.minDate=new Date(2008,0,1);this.maxDate=new Date(2015,0,1);this.startDay=1;this.showWeeks=false;this.selCurMonthOnly=false;this.clearSelectedOnChange=true;switch(this.mode)
{case'popup':this.visible=false;break;case'flat':this.visible=true;break;}
this.setLang();};Epoch.prototype.setLang=function()
{this.daylist=new Array('S','M','T','W','T','F','S','S','M','T','W','T','F','S');this.months_sh=new Array('January','February','March','April','May','June','July','August','September','October','November','December');this.monthup_title='Go to the next month';this.monthdn_title='Go to the previous month';this.clearbtn_caption='Close';this.clearbtn_title='Close the calendar';this.maxrange_caption='This is the maximum range';};Epoch.prototype.getTop=function(element)
{var oNode=element;var iTop=0;var offset=$(element).offset();iTop=offset.top;return iTop;};Epoch.prototype.getLeft=function(element)
{var oNode=element;var iLeft=0;var offset=$(element).offset();iLeft=offset.left;return iLeft;};Epoch.prototype.show=function()
{this.calendar.style.display='block';if(this.cont)
{this.cont.style.display='block';}
this.visible=true;};Epoch.prototype.hide=function()
{this.calendar.style.display='none';if(this.cont)
{this.cont.style.display='none';}
this.visible=false;};Epoch.prototype.toggle=function()
{if(this.visible){this.hide();}
else{this.show();}};Epoch.prototype.setDays=function()
{this.daynames=new Array();var j=0;for(var i=this.startDay;i<this.startDay+7;i++){this.daynames[j++]=this.daylist[i];}
this.monthDayCount=new Array(31,((this.curDate.getFullYear()-2000)%4?28:29),31,30,31,30,31,31,30,31,30,31);};Epoch.prototype.setClass=function(element,className)
{element.setAttribute('class',className);element.setAttribute('className',className);};Epoch.prototype.createCalendar=function()
{var tbody,tr,td;this.calendar=document.createElement('table');this.calendar.setAttribute('id',this.name+'-calendar');this.calendar.setAttribute('class','web-form-calendar');this.calendar.setAttribute('className','web-form-calendar');this.calendar.onselectstart=function(){return false;};this.calendar.ondrag=function(){return false;};tbody=document.createElement('tbody');tr=document.createElement('tr');td=document.createElement('td');td.appendChild(this.createMainHeading());tr.appendChild(td);tbody.appendChild(tr);tr=document.createElement('tr');td=document.createElement('td');td.appendChild(this.createDayHeading());tr.appendChild(td);tbody.appendChild(tr);tr=document.createElement('tr');td=document.createElement('td');td.setAttribute('id','web-form-cell-td');this.calCellContainer=td;td.appendChild(this.createCalCells());tr.appendChild(td);tbody.appendChild(tr);if(this.mode=='popup'){tr=document.createElement('tr');td=document.createElement('td');td.appendChild(this.createFooter());tr.appendChild(td);tbody.appendChild(tr);}
this.calendar.appendChild(tbody);this.calendar.owner=this;this.calendar.onmouseover=function(){this.owner.mousein=true;};this.calendar.onmouseout=function(){this.owner.mousein=false;};};Epoch.prototype.createMainHeading=function()
{var container=document.createElement('div');container.setAttribute('id',this.name+'-mainheading');this.setClass(container,'mainheading');this.monthSelect=document.createElement('select');this.monthSelect.setAttribute('style','display:none;');this.yearSelect=document.createElement('select');this.yearSelect.setAttribute('style','display:none;');this.dateDisplay=document.createElement('span');this.dateDisplay.setAttribute('id',this.name+'-dateDisplay');var monthDn=document.createElement('a'),monthUp=document.createElement('a');var opt,i;var textDate='';for(i=0;i<12;i++)
{opt=document.createElement('option');opt.setAttribute('value',i);if(this.state==0&&this.displayMonth==i){opt.setAttribute('selected','selected');textDate+=this.months_sh[i];}
opt.appendChild(document.createTextNode(this.months_sh[i]));this.monthSelect.appendChild(opt);}
for(i=this.rangeYearLower;i<=this.rangeYearUpper;i++)
{opt=document.createElement('option');opt.setAttribute('value',i);if(this.state==0&&this.displayYear==i){opt.setAttribute('selected','selected');textDate+=" "+this.displayYear;}
opt.appendChild(document.createTextNode(i));this.yearSelect.appendChild(opt);}
this.dateDisplay.appendChild(document.createTextNode(textDate));var monthUpContent=document.createElement('span');var monthDownContent=document.createElement('span');monthUpContent.appendChild(document.createTextNode(this.monthup_title));monthUp.appendChild(monthUpContent);monthUp.setAttribute('href','#none');monthUp.setAttribute('class','nextBtn');monthUp.setAttribute('className','nextBtn');monthDownContent.appendChild(document.createTextNode(this.monthdn_title));monthDn.appendChild(monthDownContent);monthDn.setAttribute('href','#none');monthDn.setAttribute('class','prevBtn');monthDn.setAttribute('className','prevBtn');this.monthSelect.owner=this.yearSelect.owner=monthUp.owner=monthDn.owner=this;monthUp.onclick=function(){this.owner.nextMonth();this.owner.requestCalendarEvents(this.owner.monthSelect.value,this.owner.yearSelect.value);return false;};monthDn.onclick=function(){this.owner.prevMonth();this.owner.requestCalendarEvents(this.owner.monthSelect.value,this.owner.yearSelect.value);return false;};this.monthSelect.onchange=function(){this.owner.displayMonth=this.value;this.owner.displayYear=this.owner.yearSelect.value;this.owner.goToMonth(this.owner.displayYear,this.owner.displayMonth);};this.yearSelect.onchange=function(){this.owner.displayMonth=this.owner.monthSelect.value;this.owner.displayYear=this.value;this.owner.goToMonth(this.owner.displayYear,this.owner.displayMonth);};container.appendChild(monthDn);container.appendChild(this.monthSelect);container.appendChild(this.dateDisplay);container.appendChild(this.yearSelect);container.appendChild(monthUp);return container;};Epoch.prototype.createFooter=function()
{var container=document.createElement('div');var clearSelected=document.createElement('input');clearSelected.setAttribute('type','button');clearSelected.setAttribute('value',this.clearbtn_caption);clearSelected.setAttribute('title',this.clearbtn_title);clearSelected.owner=this;clearSelected.onclick=function(){var datesString="";for(i=0;i<this.owner.selectedDates.length;i++){datesString=datesString+this.owner.selectedDates[i].dateFormat()+" ";}
this.owner.tgt.value=datesString;this.owner.hide();};container.appendChild(clearSelected);return container;};Epoch.prototype.resetSelections=function(returnToDefaultMonth)
{this.selectedDates=new Array();this.rows=new Array(false,false,false,false,false,false,false);this.cols=new Array(false,false,false,false,false,false,false);if(this.tgt)
{this.tgt.value='';if(this.mode=='popup'){this.hide();}}
if(returnToDefaultMonth==true){this.goToMonth(this.displayYearInitial,this.displayMonthInitial);}
else{this.reDraw();}};Epoch.prototype.createDayHeading=function()
{this.calHeading=document.createElement('table');this.calHeading.setAttribute('id',this.name+'-caldayheading');this.setClass(this.calHeading,'caldayheading');var tbody,tr,td;tbody=document.createElement('tbody');tr=document.createElement('tr');this.cols=new Array(false,false,false,false,false,false,false);if(this.showWeeks)
{td=document.createElement('td');td.setAttribute('class','wkhead');td.setAttribute('className','wkhead');tr.appendChild(td);}
for(var dow=0;dow<7;dow++)
{td=document.createElement('td');td.appendChild(document.createTextNode(this.daynames[dow]));if(this.selectMultiple){td.headObj=new CalHeading(this,td,(dow+this.startDay<7?dow+this.startDay:dow+this.startDay-7));}
tr.appendChild(td);}
tbody.appendChild(tr);this.calHeading.appendChild(tbody);return this.calHeading;};Epoch.prototype.createCalCells=function()
{this.rows=new Array(false,false,false,false,false,false);this.cells=new Array();var row=-1,totalCells=(this.showWeeks?48:42);var beginDate=new Date(this.displayYear,this.displayMonth,1);var endDate=new Date(this.displayYear,this.displayMonth,this.monthDayCount[this.displayMonth]);var sdt=new Date(beginDate);sdt.setDate(sdt.getDate()+(this.startDay-beginDate.getDay())-(this.startDay-beginDate.getDay()>0?7:0));this.calCells=document.createElement('table');this.calCells.setAttribute('id',this.name+'-calcells');this.setClass(this.calCells,'calcells');var tbody,tr,td;tbody=document.createElement('tbody');for(var i=0;i<totalCells;i++)
{if(this.showWeeks)
{if(i%8==0)
{row++;tr=document.createElement('tr');td=document.createElement('td');if(this.selectMultiple){td.weekObj=new WeekHeading(this,td,sdt.getWeek(),row)}
else
{td.setAttribute('class','wkhead');td.setAttribute('className','wkhead');}
td.appendChild(document.createTextNode(sdt.getWeek()));tr.appendChild(td);i++;}}
else if(i%7==0)
{row++;tr=document.createElement('tr');}
td=document.createElement('td');td.appendChild(document.createTextNode(sdt.getDate()));var cell=new CalCell(this,td,sdt,row);this.cells.push(cell);td.cellObj=cell;sdt.setDate(sdt.getDate()+1);tr.appendChild(td);tbody.appendChild(tr);}
this.calCells.appendChild(tbody);this.reDraw();return this.calCells;};Epoch.prototype.reDraw=function()
{this.state=1;var i,j;for(i=0;i<this.cells.length;i++){this.cells[i].selected=false;}
for(i=0;i<this.cells.length;i++)
{for(j=0;j<this.selectedDates.length;j++){if(this.cells[i].date.getUeDay()==this.selectedDates[j].getUeDay()){this.cells[i].selected=true;this.cells[i].href=this.selectedDates[j].href;this.cells[i].title=this.selectedDates[j].title;}}
this.cells[i].setClass();}
this.state=2;};Epoch.prototype.deleteCells=function()
{this.calCellContainer.removeChild(this.calCellContainer.firstChild);this.cells=new Array();};Epoch.prototype.goToMonth=function(year,month)
{this.monthSelect.value=this.displayMonth=month;this.yearSelect.value=this.displayYear=year;this.deleteCells();this.calCellContainer.appendChild(this.createCalCells());};Epoch.prototype.nextMonth=function()
{if(this.monthSelect.value<11){this.monthSelect.value++;}
else
{if(this.yearSelect.value<this.rangeYearUpper)
{this.monthSelect.value=0;this.yearSelect.value++;}
else{alert(this.maxrange_caption);}}
this.displayMonth=this.monthSelect.value;this.displayYear=this.yearSelect.value;document.getElementById(this.name+'-dateDisplay').innerHTML=this.months_sh[this.displayMonth]+' '+this.displayYear;this.deleteCells();this.calCellContainer.appendChild(this.createCalCells());};Epoch.prototype.prevMonth=function()
{if(this.monthSelect.value>0)
this.monthSelect.value--;else
{if(this.yearSelect.value>this.rangeYearLower)
{this.monthSelect.value=11;this.yearSelect.value--;}
else{alert(this.maxrange_caption);}}
this.displayMonth=this.monthSelect.value;this.displayYear=this.yearSelect.value;document.getElementById(this.name+'-dateDisplay').innerHTML=this.months_sh[this.displayMonth]+' '+this.displayYear;this.deleteCells();this.calCellContainer.appendChild(this.createCalCells());};Epoch.prototype.addZero=function(vNumber)
{return((vNumber<10)?'0':'')+vNumber;};Epoch.prototype.addDates=function(dates,redraw)
{var j,in_sd;for(var i=0;i<dates.length;i++)
{in_sd=false;for(j=0;j<this.selectedDates.length;j++)
{if(dates[i].getUeDay()==this.selectedDates[j].getUeDay())
{in_sd=true;break;}}
if(!in_sd){this.selectedDates.push(dates[i]);}}
if(redraw!=false){this.reDraw();}};Epoch.prototype.removeDates=function(dates,redraw)
{var j;for(var i=0;i<dates.length;i++)
{for(j=0;j<this.selectedDates.length;j++)
{if(dates[i].getUeDay()==this.selectedDates[j].getUeDay()){this.selectedDates.splice(j,1);}}}
if(redraw!=false){this.reDraw();}};Epoch.prototype.outputDate=function(vDate,vFormat)
{var vDay=this.addZero(vDate.getDate());var vMonth=this.addZero(vDate.getMonth()+1);var vYearLong=this.addZero(vDate.getFullYear());var vYearShort=this.addZero(vDate.getFullYear().toString().substring(3,4));var vYear=(vFormat.indexOf('yyyy')>-1?vYearLong:vYearShort);var vHour=this.addZero(vDate.getHours());var vMinute=this.addZero(vDate.getMinutes());var vSecond=this.addZero(vDate.getSeconds());return vFormat.replace(/dd/g,vDay).replace(/mm/g,vMonth).replace(/y{1,4}/g,vYear).replace(/hh/g,vHour).replace(/nn/g,vMinute).replace(/ss/g,vSecond);};Epoch.prototype.updatePos=function(target)
{this.calendar.style.top=this.getTop(target)+this.topOffset+'px'
this.calendar.style.left=this.getLeft(target)+this.leftOffset+'px'}
function CalHeading(owner,tableCell,dow)
{this.owner=owner;this.tableCell=tableCell;this.dayOfWeek=dow;this.tableCell.onclick=this.onclick;}
CalHeading.prototype.onclick=function()
{var owner=this.headObj.owner;var sdates=owner.selectedDates;var cells=owner.cells;owner.cols[this.headObj.dayOfWeek]=!owner.cols[this.headObj.dayOfWeek];for(var i=0;i<cells.length;i++)
{if(cells[i].dayOfWeek==this.headObj.dayOfWeek&&(!owner.selCurMonthOnly||cells[i].date.getMonth()==owner.displayMonth&&cells[i].date.getFullYear()==owner.displayYear))
{if(owner.cols[this.headObj.dayOfWeek])
{if(owner.selectedDates.arrayIndex(cells[i].date)==-1){sdates.push(cells[i].date);}}
else
{for(var j=0;j<sdates.length;j++)
{if(cells[i].dayOfWeek==sdates[j].getDay())
{sdates.splice(j,1);break;}}}
cells[i].selected=owner.cols[this.headObj.dayOfWeek];}}
owner.reDraw();};function WeekHeading(owner,tableCell,week,row)
{this.owner=owner;this.tableCell=tableCell;this.week=week;this.tableRow=row;this.tableCell.setAttribute('class','wkhead');this.tableCell.setAttribute('className','wkhead');this.tableCell.onclick=this.onclick;}
WeekHeading.prototype.onclick=function()
{var owner=this.weekObj.owner;var cells=owner.cells;var sdates=owner.selectedDates;var i,j;owner.rows[this.weekObj.tableRow]=!owner.rows[this.weekObj.tableRow];for(i=0;i<cells.length;i++)
{if(cells[i].tableRow==this.weekObj.tableRow)
{if(owner.rows[this.weekObj.tableRow]&&(!owner.selCurMonthOnly||cells[i].date.getMonth()==owner.displayMonth&&cells[i].date.getFullYear()==owner.displayYear))
{if(owner.selectedDates.arrayIndex(cells[i].date)==-1){sdates.push(cells[i].date);}}
else
{for(j=0;j<sdates.length;j++)
{if(sdates[j].getTime()==cells[i].date.getTime())
{sdates.splice(j,1);break;}}}}}
owner.reDraw();};function CalCell(owner,tableCell,dateObj,row)
{this.owner=owner;this.tableCell=tableCell;this.cellClass;this.selected=false;this.date=new Date(dateObj);this.dayOfWeek=this.date.getDay();this.week=this.date.getWeek();this.tableRow=row;this.tableCell.onclick=this.onclick;this.tableCell.onmouseover=this.onmouseover;this.tableCell.onmouseout=this.onmouseout;this.setClass();}
CalCell.prototype.onmouseover=function()
{this.setAttribute('class',this.cellClass+' hover');this.setAttribute('className',this.cellClass+' hover');var cell=this.cellObj;var owner=cell.owner;if(cell.title)
{var customMonth=owner.displayMonth;if(customMonth==cell.date.getMonth()){highlightEvent(cell.title);}}};CalCell.prototype.onmouseout=function()
{removeHighlights();this.cellObj.setClass();};CalCell.prototype.onclick=function()
{var cell=this.cellObj;var owner=cell.owner;if(cell.href)
{window.location=cell.href;return;}
if(!owner.selCurMonthOnly||cell.date.getMonth()==owner.displayMonth&&cell.date.getFullYear()==owner.displayYear)
{if(owner.selectMultiple==true)
{if(!cell.selected)
{if(owner.selectedDates.arrayIndex(cell.date)==-1){owner.selectedDates.push(cell.date);}}
else
{var tmp=owner.selectedDates;for(var i=0;i<tmp.length;i++)
{if(tmp[i].getUeDay()==cell.date.getUeDay()){tmp.splice(i,1);}}}}
else
{if(owner.tgt)
{owner.selectedDates=new Array(cell.date);owner.tgt.value=owner.selectedDates[0].dateFormat();if(owner.mode=='popup'){owner.hide();}}}
owner.reDraw();}};CalCell.prototype.setClass=function()
{var customMonth=this.owner.displayMonth;var customYear=this.owner.displayYear;if(this.selected){if(customMonth==this.date.getMonth()){this.cellClass='cell-selected';}}
else if(customMonth!=this.date.getMonth()){this.cellClass='notmnth';if(this.date.getDay()==0||this.date.getDay()==6){this.cellClass='wkend notmnth-wkend';}}
else if(this.date.getDay()>0&&this.date.getDay()<6){this.cellClass='wkday';}
else{this.cellClass='wkend';}
if(this.date.getFullYear()==this.owner.curDate.getFullYear()&&this.date.getMonth()==this.owner.curDate.getMonth()&&this.date.getDate()==this.owner.curDate.getDate()){if(customMonth==this.date.getMonth()){this.cellClass=this.cellClass+' curdate';}}
if(this.title)
{this.cellClass=this.cellClass+' '+this.title;}
this.tableCell.setAttribute('class',this.cellClass);this.tableCell.setAttribute('className',this.cellClass);};Date.prototype.getDayOfYear=function()
{return parseInt((this.getTime()-new Date(this.getFullYear(),0,1).getTime())/86400000+1);};Date.prototype.getWeek=function()
{return parseInt((this.getTime()-new Date(this.getFullYear(),0,1).getTime())/604800000+1);};Date.prototype.getUeDay=function()
{return parseInt(Math.floor((this.getTime()-this.getTimezoneOffset()*60000)/86400000));};Date.prototype.dateFormat=function(format)
{if(!format){format='d/m/Y';}
LZ=function(x){return(x<0||x>9?'':'0')+x};var MONTH_NAMES=new Array('January','February','March','April','May','June','July','August','September','October','November','December','Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');var DAY_NAMES=new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sun','Mon','Tue','Wed','Thu','Fri','Sat');format=format+"";var result="";var i_format=0;var c="";var token="";var y=this.getFullYear().toString();var M=this.getMonth()+1;var d=this.getDate();var E=this.getDay();var H=this.getHours();var m=this.getMinutes();var s=this.getSeconds();var yyyy,yy,MMM,MM,dd,hh,h,mm,ss,ampm,HH,H,KK,K,kk,k;var value=new Object();value['Y']=y.toString();value['y']=y.substring(2);value['n']=M;value['m']=LZ(M);value['F']=MONTH_NAMES[M-1];value['M']=MONTH_NAMES[M+11];value['j']=d;value['d']=LZ(d);value['D']=DAY_NAMES[E+7];value['l']=DAY_NAMES[E];value['G']=H;value['H']=LZ(H);if(H==0){value['g']=12;}
else if(H>12){value['g']=H-12;}
else{value['g']=H;}
value['h']=LZ(value['g']);if(H>11){value['a']='pm';value['A']='PM';}
else{value['a']='am';value['A']='AM';}
value['i']=LZ(m);value['s']=LZ(s);while(i_format<format.length){c=format.charAt(i_format);token="";while((format.charAt(i_format)==c)&&(i_format<format.length)){token+=format.charAt(i_format++);}
if(value[token]!=null){result=result+value[token];}
else{result=result+token;}}
return result;};Array.prototype.arrayIndex=function(searchVal,startIndex)
{startIndex=(startIndex!=null?startIndex:0);for(var i=startIndex;i<this.length;i++)
{if(searchVal==this[i]){return i;}}
return-1;};Epoch.prototype.requestCalendarEvents=function(month,year){if(this.isDynamic){month++;var prevMonth=month-1;var nextMonth=month;var fromYear=year;var toYear=year;nextMonth++;if(month==1){fromYear--;prevMonth=12}
if(month==12){toYear++;nextMonth=01;}
var date=new Date();$.getJSON('/ajax?action=eventDays&fromDate='
+getDateFormatted(prevMonth,fromYear)+'23&toDate='
+getDateFormatted(nextMonth,toYear)+'13&publishingQueue='
+this.publishingQueue,loadJSONEvent);}};function getDateFormatted(month,year){if(month<10){return year+'0'+month;}else{return year+''+month;}}
!function($){function PersonalisedDropdown(select,options){this.options=$.extend({},this.defaults,options);this.$container=$(".btn-group");this.$button=$('.dropdown.btn-default');this.$ul=$(".dropdown-menu");this.buildDropdownOptions();this.setActiveSeletions();this.updateButtonText();};PersonalisedDropdown.prototype={defaults:{selectedClass:'active',nonSelectedText:'None selected',nSelectedText:'selected',numberOfStories:5,storageId:'psl',site:'Blah',buttonText:function(options){if(options.length===0){return this.nonSelectedText+' <b class="caret"></b>';}else{if(options.length>=2){return options.length+' '+this.nSelectedText+' <b class="caret"></b>';}else{var selected='';$(options).each(function(index){var label=options[index];if(index==options.length-1){selected+=label;}else{selected+=label+', ';}});return selected+' <b class="caret"></b>';}}},buttonTitle:function(options){if(options.length===0){return this.nonSelectedText;}else{var selected='';$(options).each(function(index){var label=options[index];if(index==options.length-1){selected+=label;}else{selected+=label+', ';}});return selected;}},},constructor:PersonalisedDropdown,buildDropdownOptions:function(){$('li input',this.$ul).on('change',$.proxy(function(event){var checked=$(event.target).prop('checked')||false;if(this.options.selectedClass){if(checked){$(event.target).parents('li').addClass(this.options.selectedClass);}else{$(event.target).parents('li').removeClass(this.options.selectedClass);}}
var value=$(event.target).val();var $option=$('option').filter(function(){return $(this).val()===value;});if(checked){$option.prop('selected',true);}else{$option.prop('selected',false);}
this.updateButtonText();},this));$('li a',this.$ul).on('touchstart click',function(event){event.stopPropagation();});var self=this;$($('.personalised-storylist .confirm.btn')).on('touchstart click',function(event){var selection=self.getActiveSeletions();localStorage[self.options.storageId]=selection;self.getStorylistContent(selection);});$('.personalised-storylist-bottom > a').on('touchstart click',function(event){self.getStorylistContent(self.getActiveSeletions());return false;});this.$container.on('keydown',$.proxy(function(event){if($('input[type="text"]',this.$container).is(':focus')){return;}
if((event.keyCode===9||event.keyCode===27)&&this.$container.hasClass('open')){this.$button.click();}else{var $items=$(this.$container).find("li:visible a");if(!$items.length){return;}
var index=$items.index($items.filter(':focus'));if(event.keyCode===38&&index>0){index--;}else if(event.keyCode===40&&index<$items.length-1){index++;}else if(!~index){index=0;}
var $current=$items.eq(index);$current.focus();if(event.keyCode===32||event.keyCode===13){var $checkbox=$current.find('input');$checkbox.prop("checked",!$checkbox.prop("checked"));$checkbox.change();}
event.stopPropagation();event.preventDefault();}},this));},updateButtonText:function(){var names=this.getActiveSeletionNames();$(this.$button,this.$container).html(this.options.buttonText(names));$(this.$button,this.$container).attr('title',this.options.buttonTitle(names));},getActiveSeletions:function(){var options=$('.dropdown-container li.active');var names=[];$(options).each(function(index){names.push($.trim($(this).find('input').prop('value')));});return names;},getActiveSeletionNames:function(){var options=$('.dropdown-container li.active');var names=[];$(options).each(function(index){names.push($.trim($(this).find('label').text()));});return names;},setActiveSeletions:function(){var selection;if(localStorage[this.options.storageId]){selection=localStorage[this.options.storageId];var array=selection.split(',');$("li label").each(function(i){var self=this;$(self).children('input').prop('checked',false);$(array).each(function(j){if($.trim($(self).children('input').prop('value'))==array[j]){$(self).parents('li').addClass('active');$(self).children('input').prop('checked',true);}});});}else{selection='';$("li label").each(function(i){var self=this;$(self).children('input').prop('checked',false);});}
this.getStorylistContent(selection);},getStorylistContent:function(selection){var self=this;$(".personalised-storylist .alert-danger").remove();$(".personalised-storylist-content").append('<div class="alert alert-info">Loading content...</div>');if(selection==''){var options=$('.dropdown-container li a');var names=[];$(options).each(function(index){names.push($.trim($(this).find('input').prop('value')));});selection=names;}
$.ajax({url:"/ajax?action=getPersonalisedStories&selection="+selection+"&length="+this.options.numberOfStories+"&site="+this.options.site,success:function(result){jsonresult=jQuery.parseJSON(result);if(jsonresult!=''||typeof jsonresult!=="undefined"){$('.personalised-storylist .teaser').removeClass('fade-in');$(".personalised-storylist-content").children().remove();$(jsonresult).each(function(index,teaser){var even="";if(index%2==0){even="even";}
$(".personalised-storylist-content").append('<div class="headline-teaser-item teaser '+even+' clearfix"><div class="teaser-title"><h4><span class="teaser-label">'+teaser['teaser.label']+': </span><a href="'+teaser['teaser.url']+'">'+teaser['teaser.headline']+'</a><span class="media-icon '+teaser['teaser.mediaIconClass']+'"></span></h4><span class="update-time">'+teaser['teaser.updatedTime']+'</span></div></div>');setTimeout(function(){$('.personalised-storylist .teaser').addClass('fade-in');},10);});}else{self.setErrorAlert();}},error:function(xhr,status,error){self.setErrorAlert();}});$(".personalised-storylist .alert-info").remove();},setErrorAlert:function(){var self=this;$(".personalised-storylist-content").append('<div class="alert alert-danger">Could not get new headlines, please try again by <a href="#" class="alert-link">clicking here</a></div>');$('.personalised-storylist-content .alert-link').on('touchstart click',function(event){self.getStorylistContent(self.getActiveSeletions());return false;});},};$.fn.personalisedDropdown=function(option,parameter){return this.each(function(){var data=$(this).data('dropdown');var options=typeof option==='object'&&option;if(!data){$(this).data('dropdown',(data=new PersonalisedDropdown(this,options)));}
if(typeof option==='string'){data[option](parameter);}});};$.fn.personalisedDropdown.Constructor=PersonalisedDropdown;}(window.jQuery);

var width=window.innerWidth;if(width<728){$(window).resize(function(){var currentWidth=window.innerWidth;if(currentWidth>729){$('.tablet, .desktop').hide();}else{$('.mobile').show();}});}else if(width>727&&width<1024){$(window).resize(function(){var currentWidth=window.innerWidth;if(currentWidth<728||currentWidth>1023){$('.mobile, .desktop').hide();}else{$('.tablet').show();}});}else if(width>1023){$(window).resize(function(){var currentWidth=window.innerWidth;if(currentWidth<1024){$('.mobile, .tablet').hide();}else{$('.desktop').show();}});}

$(document).ready(function(){$(".profile button[name='new-email-address'],.profile button[name='new-password'],.profile button[name='new-screen-name']").click(function(){var itemClass=$(this).attr('name');if($('fieldset.'+itemClass).data('visible'))
{$(this).text("Change");$('fieldset.'+itemClass).removeData('visible');$('fieldset.'+itemClass).hide();$(this).removeClass('btn-changeable');return false;}
else
{$(this).text("Cancel");$('fieldset.'+itemClass).data('visible','1');$('fieldset.'+itemClass).show();$(this).addClass('btn-changeable');return false;}});});

jQuery(document).ready(function(){(function($){var under1024=false;var clickEvent;jQuery(window).resize(function(e){if(jQuery('body').css('background-image').indexOf('adtech.de')!=-1){var width=window.innerWidth;if(width<1024&&under1024!==true){clickEvent=__theDocument.onclick
__theDocument.onclick=function(ev){}
jQuery('body').css('cursor','default');under1024=true;}else if(width>=1024&&under1024===true){__theDocument.onclick=clickEvent;jQuery('body').css('cursor','pointer');under1024=false;}}});})(jQuery);});

(function($,window,document,undefined){var lazyLoadXT='lazyLoadXT',dataLazied='lazied',load_error='load error',classLazyHidden='lazy-hidden',docElement=document.documentElement||document.body,forceLoad=(window.onscroll===undefined||!!window.operamini||!docElement.getBoundingClientRect),options={autoInit:true,selector:'img[data-src]',blankImage:'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7',throttle:99,forceLoad:forceLoad,loadEvent:'pageshow',updateEvent:'load orientationchange resize scroll touchmove focus',forceEvent:'lazyloadall',oninit:{removeClass:'lazy'},onshow:{addClass:classLazyHidden},onload:{removeClass:classLazyHidden,addClass:'lazy-loaded'},onerror:{removeClass:classLazyHidden},checkDuplicates:true},elementOptions={srcAttr:'data-src',edgeX:0,edgeY:0,visibleOnly:true},$window=$(window),$isFunction=$.isFunction,$extend=$.extend,$data=$.data||function(el,name){return $(el).data(name);},elements=[],topLazy=0,waitingMode=0;$[lazyLoadXT]=$extend(options,elementOptions,$[lazyLoadXT]);function getOrDef(obj,prop){return obj[prop]===undefined?options[prop]:obj[prop];}
function scrollTop(){var scroll=window.pageYOffset;return(scroll===undefined)?docElement.scrollTop:scroll;}
$.fn[lazyLoadXT]=function(overrides){overrides=overrides||{};var blankImage=getOrDef(overrides,'blankImage'),checkDuplicates=getOrDef(overrides,'checkDuplicates'),scrollContainer=getOrDef(overrides,'scrollContainer'),forceShow=getOrDef(overrides,'show'),elementOptionsOverrides={},prop;$(scrollContainer).on('scroll',queueCheckLazyElements);for(prop in elementOptions){elementOptionsOverrides[prop]=getOrDef(overrides,prop);}
return this.each(function(index,el){if(el===window){$(options.selector).lazyLoadXT(overrides);}else{var duplicate=checkDuplicates&&$data(el,dataLazied),$el=$(el).data(dataLazied,forceShow?-1:1);if(duplicate){queueCheckLazyElements();return;}
if(blankImage&&el.tagName==='IMG'&&!el.src){el.src=blankImage;}
$el[lazyLoadXT]=$extend({},elementOptionsOverrides);triggerEvent('init',$el);elements.push($el);queueCheckLazyElements();}});};function triggerEvent(event,$el){var handler=options['on'+event];if(handler){if($isFunction(handler)){handler.call($el[0]);}else{if(handler.addClass){$el.addClass(handler.addClass);}
if(handler.removeClass){$el.removeClass(handler.removeClass);}}}
$el.trigger('lazy'+event,[$el]);queueCheckLazyElements();}
function triggerLoadOrError(e){triggerEvent(e.type,$(this).off(load_error,triggerLoadOrError));}
function checkLazyElements(force){if(!elements.length){return;}
force=force||options.forceLoad;topLazy=Infinity;var viewportTop=scrollTop(),viewportHeight=window.innerHeight||docElement.clientHeight,viewportWidth=window.innerWidth||docElement.clientWidth,i,length;for(i=0,length=elements.length;i<length;i++){var $el=elements[i],el=$el[0],objData=$el[lazyLoadXT],removeNode=false,visible=force||$data(el,dataLazied)<0,topEdge;if(!$.contains(docElement,el)){removeNode=true;}else if(force||!objData.visibleOnly||el.offsetWidth||el.offsetHeight){if(!visible){var elPos=el.getBoundingClientRect(),edgeX=objData.edgeX,edgeY=objData.edgeY;topEdge=(elPos.top+viewportTop-edgeY)-viewportHeight;visible=(topEdge<=viewportTop&&elPos.bottom>-edgeY&&elPos.left<=viewportWidth+edgeX&&elPos.right>-edgeX);}
if(visible){$el.on(load_error,triggerLoadOrError);triggerEvent('show',$el);var srcAttr=objData.srcAttr,src=$isFunction(srcAttr)?srcAttr($el):el.getAttribute(srcAttr);if(src){el.src=src;}
removeNode=true;}else{if(topEdge<topLazy){topLazy=topEdge;}}}
if(removeNode){$data(el,dataLazied,0);elements.splice(i--,1);length--;}}
if(!length){triggerEvent('complete',$(docElement));}}
function timeoutLazyElements(){if(waitingMode>1){waitingMode=1;checkLazyElements();setTimeout(timeoutLazyElements,options.throttle);}else{waitingMode=0;}}
function queueCheckLazyElements(e){if(!elements.length){return;}
if(e&&e.type==='scroll'&&e.currentTarget===window){if(topLazy>=scrollTop()){return;}}
if(!waitingMode){setTimeout(timeoutLazyElements,0);}
waitingMode=2;}
function initLazyElements(){$window.lazyLoadXT();}
function forceLoadAll(){checkLazyElements(true);}
$(document).ready(function(){triggerEvent('start',$window);$window.on(options.updateEvent,queueCheckLazyElements).on(options.forceEvent,forceLoadAll);$(document).on(options.updateEvent,queueCheckLazyElements);if(options.autoInit){$window.on(options.loadEvent,initLazyElements);initLazyElements();}});})(window.jQuery||window.Zepto||window.$,window,document);(function($){var options=$.lazyLoadXT;options.selector+=',video,iframe[data-src]';options.videoPoster='data-poster';$(document).on('lazyshow','video',function(e,$el){var srcAttr=$el.lazyLoadXT.srcAttr,isFuncSrcAttr=$.isFunction(srcAttr),changed=false;$el.attr('poster',$el.attr(options.videoPoster));$el.children('source,track').each(function(index,el){var $child=$(el),src=isFuncSrcAttr?srcAttr($child):$child.attr(srcAttr);if(src){$child.attr('src',src);changed=true;}});if(changed){this.load();}});})(window.jQuery||window.Zepto||window.$);

(function($,window,document){var options=$.lazyLoadXT,dataLazyTag=options.dataLazyTag||'data-lazy-tag';window.L=function(tag){document.write('<br '+dataLazyTag+'="'+(tag||'img')+'" ');};window.Lb=function(tag){document.write('<span '+dataLazyTag+'="'+(tag||'video')+'" ');};window.Le=function(){document.write('</span>');};$(document).ready(function(){var srcAttr=options.srcAttr;if($.isFunction(srcAttr)){srcAttr='data-src';}
$('br['+dataLazyTag+'],span['+dataLazyTag+']').each(function(index,origElem){var attrs=origElem.attributes,el=document.createElement($(origElem).attr(dataLazyTag)),i;for(i=0;i<attrs.length;i++){var attr=attrs[i];if(attr.specified){var attrName=attr.nodeName,attrValue=attr.nodeValue;if(attrName.charAt(0)!=='<'){if(attrName==='src'){el.setAttribute(srcAttr,attrValue);}else{el.setAttribute(attrName,attrValue);}}}}
while(origElem.hasChildNodes()){var child=origElem.removeChild(origElem.firstChild);el.appendChild(child);}
origElem.parentNode.replaceChild(el,origElem);});$(window).lazyLoadXT();});})(window.jQuery||window.Zepto||window.$,window,document);

(function($,window,document,undefined){var options=$.lazyLoadXT,srcsetSupport=(function(){return'srcset'in(new Image());})(),reUrl=/^\s*(\S*)/,reWidth=/\S\s+(\d+)w/,reHeight=/\S\s+(\d+)h/,reDpr=/\S\s+([\d\.]+)x/,infty=[0,Infinity],one=[0,1],srcsetOptions={srcsetAttr:'data-srcset',srcsetExtended:true,srcsetBaseAttr:'data-srcset-base',srcsetExtAttr:'data-srcset-ext'},viewport={w:0,h:0,x:0},property,limit;for(property in srcsetOptions){if(options[property]===undefined){options[property]=srcsetOptions[property];}}
options.selector+=',img['+options.srcsetAttr+']';function mathFilter(array,action){return Math[action].apply(null,$.map(array,function(item){return item[property];}));}
function compareMax(item){return item[property]>=viewport[property]||item[property]===limit;}
function compareMin(item){return item[property]===limit;}
function parseSrcset($el){var srcset=$el.attr(options.srcsetAttr);if(!srcset){return false;}
var list=$.map(srcset.replace(/(\s[\d.]+[whx]),/g,'$1 @,@ ').split(' @,@ '),function(item){return{url:reUrl.exec(item)[1],w:parseFloat((reWidth.exec(item)||infty)[1]),h:parseFloat((reHeight.exec(item)||infty)[1]),x:parseFloat((reDpr.exec(item)||one)[1])};});if(!list.length){return false;}
var documentElement=document.documentElement,whx,src;viewport={w:window.innerWidth||documentElement.clientWidth,h:window.innerHeight||documentElement.clientHeight,x:window.devicePixelRatio||1};for(whx in viewport){property=whx;limit=mathFilter(list,'max');list=$.grep(list,compareMax);}
for(whx in viewport){property=whx;limit=mathFilter(list,'min');list=$.grep(list,compareMin);}
src=list[0].url;if(options.srcsetExtended){src=($el.attr(options.srcsetBaseAttr)||'')+src+($el.attr(options.srcsetExtAttr)||'');}
return src;}
$(document).on('lazyshow','img',function(e,$el){var srcset=$el.attr(options.srcsetAttr);if(srcset){if(!options.srcsetExtended&&srcsetSupport){$el.attr('srcset',srcset);}else{$el.lazyLoadXT.srcAttr=parseSrcset;}}});})(window.jQuery||window.Zepto||window.$,window,document);

(function($){'use strict';var options=$.lazyLoadXT,widgetAttr=options.widgetAttr||'data-lazy-widget',reComment=/<!--([\s\S]*)-->/;options.selector+=',['+widgetAttr+']';$(document).on('lazyshow','['+widgetAttr+']',function(){var $this=$(this),$target=$this,id=$this.attr(widgetAttr),match;if(id){$target=$('#'+id);}
if($target.length){match=reComment.exec($target.html());if(match){$target.replaceWith($.trim(match[1]));}}
$this.triggerHandler('load');});})(window.jQuery||window.Zepto||window.$);

(function(root,factory){if(typeof define==='function'&&define.amd){define(factory);}else if(typeof exports==='object'){module.exports=factory();}else{root.ScrollMagic=factory();}}(this,function(){"use strict";var ScrollMagic=function(){_util.log(2,'(COMPATIBILITY NOTICE) -> As of ScrollMagic 2.0.0 you need to use \'new ScrollMagic.Controller()\' to create a new controller instance. Use \'new ScrollMagic.Scene()\' to instance a scene.');};ScrollMagic.version="2.0.5";window.addEventListener("mousewheel",function(){});var PIN_SPACER_ATTRIBUTE="data-scrollmagic-pin-spacer";ScrollMagic.Controller=function(options){var
NAMESPACE='ScrollMagic.Controller',SCROLL_DIRECTION_FORWARD='FORWARD',SCROLL_DIRECTION_REVERSE='REVERSE',SCROLL_DIRECTION_PAUSED='PAUSED',DEFAULT_OPTIONS=CONTROLLER_OPTIONS.defaults;var
Controller=this,_options=_util.extend({},DEFAULT_OPTIONS,options),_sceneObjects=[],_updateScenesOnNextCycle=false,_scrollPos=0,_scrollDirection=SCROLL_DIRECTION_PAUSED,_isDocument=true,_viewPortSize=0,_enabled=true,_updateTimeout,_refreshTimeout;var construct=function(){for(var key in _options){if(!DEFAULT_OPTIONS.hasOwnProperty(key)){log(2,"WARNING: Unknown option \""+key+"\"");delete _options[key];}}
_options.container=_util.get.elements(_options.container)[0];if(!_options.container){log(1,"ERROR creating object "+NAMESPACE+": No valid scroll container supplied");throw NAMESPACE+" init failed.";}
_isDocument=_options.container===window||_options.container===document.body||!document.body.contains(_options.container);if(_isDocument){_options.container=window;}
_viewPortSize=getViewportSize();_options.container.addEventListener("resize",onChange);_options.container.addEventListener("scroll",onChange);_options.refreshInterval=parseInt(_options.refreshInterval)||DEFAULT_OPTIONS.refreshInterval;scheduleRefresh();log(3,"added new "+NAMESPACE+" controller (v"+ScrollMagic.version+")");};var scheduleRefresh=function(){if(_options.refreshInterval>0){_refreshTimeout=window.setTimeout(refresh,_options.refreshInterval);}};var getScrollPos=function(){return _options.vertical?_util.get.scrollTop(_options.container):_util.get.scrollLeft(_options.container);};var getViewportSize=function(){return _options.vertical?_util.get.height(_options.container):_util.get.width(_options.container);};var setScrollPos=this._setScrollPos=function(pos){if(_options.vertical){if(_isDocument){window.scrollTo(_util.get.scrollLeft(),pos);}else{_options.container.scrollTop=pos;}}else{if(_isDocument){window.scrollTo(pos,_util.get.scrollTop());}else{_options.container.scrollLeft=pos;}}};var updateScenes=function(){if(_enabled&&_updateScenesOnNextCycle){var scenesToUpdate=_util.type.Array(_updateScenesOnNextCycle)?_updateScenesOnNextCycle:_sceneObjects.slice(0);_updateScenesOnNextCycle=false;var oldScrollPos=_scrollPos;_scrollPos=Controller.scrollPos();var deltaScroll=_scrollPos-oldScrollPos;if(deltaScroll!==0){_scrollDirection=(deltaScroll>0)?SCROLL_DIRECTION_FORWARD:SCROLL_DIRECTION_REVERSE;}
if(_scrollDirection===SCROLL_DIRECTION_REVERSE){scenesToUpdate.reverse();}
scenesToUpdate.forEach(function(scene,index){log(3,"updating Scene "+(index+1)+"/"+scenesToUpdate.length+" ("+_sceneObjects.length+" total)");scene.update(true);});if(scenesToUpdate.length===0&&_options.loglevel>=3){log(3,"updating 0 Scenes (nothing added to controller)");}}};var debounceUpdate=function(){_updateTimeout=_util.rAF(updateScenes);};var onChange=function(e){log(3,"event fired causing an update:",e.type);if(e.type=="resize"){_viewPortSize=getViewportSize();_scrollDirection=SCROLL_DIRECTION_PAUSED;}
if(_updateScenesOnNextCycle!==true){_updateScenesOnNextCycle=true;debounceUpdate();}};var refresh=function(){if(!_isDocument){if(_viewPortSize!=getViewportSize()){var resizeEvent;try{resizeEvent=new Event('resize',{bubbles:false,cancelable:false});}catch(e){resizeEvent=document.createEvent("Event");resizeEvent.initEvent("resize",false,false);}
_options.container.dispatchEvent(resizeEvent);}}
_sceneObjects.forEach(function(scene,index){scene.refresh();});scheduleRefresh();};var log=this._log=function(loglevel,output){if(_options.loglevel>=loglevel){Array.prototype.splice.call(arguments,1,0,"("+NAMESPACE+") ->");_util.log.apply(window,arguments);}};this._options=_options;var sortScenes=function(ScenesArray){if(ScenesArray.length<=1){return ScenesArray;}else{var scenes=ScenesArray.slice(0);scenes.sort(function(a,b){return a.scrollOffset()>b.scrollOffset()?1:-1;});return scenes;}};this.addScene=function(newScene){if(_util.type.Array(newScene)){newScene.forEach(function(scene,index){Controller.addScene(scene);});}else if(newScene instanceof ScrollMagic.Scene){if(newScene.controller()!==Controller){newScene.addTo(Controller);}else if(_sceneObjects.indexOf(newScene)<0){_sceneObjects.push(newScene);_sceneObjects=sortScenes(_sceneObjects);newScene.on("shift.controller_sort",function(){_sceneObjects=sortScenes(_sceneObjects);});for(var key in _options.globalSceneOptions){if(newScene[key]){newScene[key].call(newScene,_options.globalSceneOptions[key]);}}
log(3,"adding Scene (now "+_sceneObjects.length+" total)");}}else{log(1,"ERROR: invalid argument supplied for '.addScene()'");}
return Controller;};this.removeScene=function(Scene){if(_util.type.Array(Scene)){Scene.forEach(function(scene,index){Controller.removeScene(scene);});}else{var index=_sceneObjects.indexOf(Scene);if(index>-1){Scene.off("shift.controller_sort");_sceneObjects.splice(index,1);log(3,"removing Scene (now "+_sceneObjects.length+" left)");Scene.remove();}}
return Controller;};this.updateScene=function(Scene,immediately){if(_util.type.Array(Scene)){Scene.forEach(function(scene,index){Controller.updateScene(scene,immediately);});}else{if(immediately){Scene.update(true);}else if(_updateScenesOnNextCycle!==true&&Scene instanceof ScrollMagic.Scene){_updateScenesOnNextCycle=_updateScenesOnNextCycle||[];if(_updateScenesOnNextCycle.indexOf(Scene)==-1){_updateScenesOnNextCycle.push(Scene);}
_updateScenesOnNextCycle=sortScenes(_updateScenesOnNextCycle);debounceUpdate();}}
return Controller;};this.update=function(immediately){onChange({type:"resize"});if(immediately){updateScenes();}
return Controller;};this.scrollTo=function(scrollTarget,additionalParameter){if(_util.type.Number(scrollTarget)){setScrollPos.call(_options.container,scrollTarget,additionalParameter);}else if(scrollTarget instanceof ScrollMagic.Scene){if(scrollTarget.controller()===Controller){Controller.scrollTo(scrollTarget.scrollOffset(),additionalParameter);}else{log(2,"scrollTo(): The supplied scene does not belong to this controller. Scroll cancelled.",scrollTarget);}}else if(_util.type.Function(scrollTarget)){setScrollPos=scrollTarget;}else{var elem=_util.get.elements(scrollTarget)[0];if(elem){while(elem.parentNode.hasAttribute(PIN_SPACER_ATTRIBUTE)){elem=elem.parentNode;}
var
param=_options.vertical?"top":"left",containerOffset=_util.get.offset(_options.container),elementOffset=_util.get.offset(elem);if(!_isDocument){containerOffset[param]-=Controller.scrollPos();}
Controller.scrollTo(elementOffset[param]-containerOffset[param],additionalParameter);}else{log(2,"scrollTo(): The supplied argument is invalid. Scroll cancelled.",scrollTarget);}}
return Controller;};this.scrollPos=function(scrollPosMethod){if(!arguments.length){return getScrollPos.call(Controller);}else{if(_util.type.Function(scrollPosMethod)){getScrollPos=scrollPosMethod;}else{log(2,"Provided value for method 'scrollPos' is not a function. To change the current scroll position use 'scrollTo()'.");}}
return Controller;};this.info=function(about){var values={size:_viewPortSize,vertical:_options.vertical,scrollPos:_scrollPos,scrollDirection:_scrollDirection,container:_options.container,isDocument:_isDocument};if(!arguments.length){return values;}else if(values[about]!==undefined){return values[about];}else{log(1,"ERROR: option \""+about+"\" is not available");return;}};this.loglevel=function(newLoglevel){if(!arguments.length){return _options.loglevel;}else if(_options.loglevel!=newLoglevel){_options.loglevel=newLoglevel;}
return Controller;};this.enabled=function(newState){if(!arguments.length){return _enabled;}else if(_enabled!=newState){_enabled=!!newState;Controller.updateScene(_sceneObjects,true);}
return Controller;};this.destroy=function(resetScenes){window.clearTimeout(_refreshTimeout);var i=_sceneObjects.length;while(i--){_sceneObjects[i].destroy(resetScenes);}
_options.container.removeEventListener("resize",onChange);_options.container.removeEventListener("scroll",onChange);_util.cAF(_updateTimeout);log(3,"destroyed "+NAMESPACE+" (reset: "+(resetScenes?"true":"false")+")");return null;};construct();return Controller;};var CONTROLLER_OPTIONS={defaults:{container:window,vertical:true,globalSceneOptions:{},loglevel:2,refreshInterval:100}};ScrollMagic.Controller.addOption=function(name,defaultValue){CONTROLLER_OPTIONS.defaults[name]=defaultValue;};ScrollMagic.Controller.extend=function(extension){var oldClass=this;ScrollMagic.Controller=function(){oldClass.apply(this,arguments);this.$super=_util.extend({},this);return extension.apply(this,arguments)||this;};_util.extend(ScrollMagic.Controller,oldClass);ScrollMagic.Controller.prototype=oldClass.prototype;ScrollMagic.Controller.prototype.constructor=ScrollMagic.Controller;};ScrollMagic.Scene=function(options){var
NAMESPACE='ScrollMagic.Scene',SCENE_STATE_BEFORE='BEFORE',SCENE_STATE_DURING='DURING',SCENE_STATE_AFTER='AFTER',DEFAULT_OPTIONS=SCENE_OPTIONS.defaults;var
Scene=this,_options=_util.extend({},DEFAULT_OPTIONS,options),_state=SCENE_STATE_BEFORE,_progress=0,_scrollOffset={start:0,end:0},_triggerPos=0,_enabled=true,_durationUpdateMethod,_controller;var construct=function(){for(var key in _options){if(!DEFAULT_OPTIONS.hasOwnProperty(key)){log(2,"WARNING: Unknown option \""+key+"\"");delete _options[key];}}
for(var optionName in DEFAULT_OPTIONS){addSceneOption(optionName);}
validateOption();};var _listeners={};this.on=function(names,callback){if(_util.type.Function(callback)){names=names.trim().split(' ');names.forEach(function(fullname){var
nameparts=fullname.split('.'),eventname=nameparts[0],namespace=nameparts[1];if(eventname!="*"){if(!_listeners[eventname]){_listeners[eventname]=[];}
_listeners[eventname].push({namespace:namespace||'',callback:callback});}});}else{log(1,"ERROR when calling '.on()': Supplied callback for '"+names+"' is not a valid function!");}
return Scene;};this.off=function(names,callback){if(!names){log(1,"ERROR: Invalid event name supplied.");return Scene;}
names=names.trim().split(' ');names.forEach(function(fullname,key){var
nameparts=fullname.split('.'),eventname=nameparts[0],namespace=nameparts[1]||'',removeList=eventname==='*'?Object.keys(_listeners):[eventname];removeList.forEach(function(remove){var
list=_listeners[remove]||[],i=list.length;while(i--){var listener=list[i];if(listener&&(namespace===listener.namespace||namespace==='*')&&(!callback||callback==listener.callback)){list.splice(i,1);}}
if(!list.length){delete _listeners[remove];}});});return Scene;};this.trigger=function(name,vars){if(name){var
nameparts=name.trim().split('.'),eventname=nameparts[0],namespace=nameparts[1],listeners=_listeners[eventname];log(3,'event fired:',eventname,vars?"->":'',vars||'');if(listeners){listeners.forEach(function(listener,key){if(!namespace||namespace===listener.namespace){listener.callback.call(Scene,new ScrollMagic.Event(eventname,listener.namespace,Scene,vars));}});}}else{log(1,"ERROR: Invalid event name supplied.");}
return Scene;};Scene.on("change.internal",function(e){if(e.what!=="loglevel"&&e.what!=="tweenChanges"){if(e.what==="triggerElement"){updateTriggerElementPosition();}else if(e.what==="reverse"){Scene.update();}}}).on("shift.internal",function(e){updateScrollOffset();Scene.update();});var log=this._log=function(loglevel,output){if(_options.loglevel>=loglevel){Array.prototype.splice.call(arguments,1,0,"("+NAMESPACE+") ->");_util.log.apply(window,arguments);}};this.addTo=function(controller){if(!(controller instanceof ScrollMagic.Controller)){log(1,"ERROR: supplied argument of 'addTo()' is not a valid ScrollMagic Controller");}else if(_controller!=controller){if(_controller){_controller.removeScene(Scene);}
_controller=controller;validateOption();updateDuration(true);updateTriggerElementPosition(true);updateScrollOffset();_controller.info("container").addEventListener('resize',onContainerResize);controller.addScene(Scene);Scene.trigger("add",{controller:_controller});log(3,"added "+NAMESPACE+" to controller");Scene.update();}
return Scene;};this.enabled=function(newState){if(!arguments.length){return _enabled;}else if(_enabled!=newState){_enabled=!!newState;Scene.update(true);}
return Scene;};this.remove=function(){if(_controller){_controller.info("container").removeEventListener('resize',onContainerResize);var tmpParent=_controller;_controller=undefined;tmpParent.removeScene(Scene);Scene.trigger("remove");log(3,"removed "+NAMESPACE+" from controller");}
return Scene;};this.destroy=function(reset){Scene.trigger("destroy",{reset:reset});Scene.remove();Scene.off("*.*");log(3,"destroyed "+NAMESPACE+" (reset: "+(reset?"true":"false")+")");return null;};this.update=function(immediately){if(_controller){if(immediately){if(_controller.enabled()&&_enabled){var
scrollPos=_controller.info("scrollPos"),newProgress;if(_options.duration>0){newProgress=(scrollPos-_scrollOffset.start)/(_scrollOffset.end-_scrollOffset.start);}else{newProgress=scrollPos>=_scrollOffset.start?1:0;}
Scene.trigger("update",{startPos:_scrollOffset.start,endPos:_scrollOffset.end,scrollPos:scrollPos});Scene.progress(newProgress);}else if(_pin&&_state===SCENE_STATE_DURING){updatePinState(true);}}else{_controller.updateScene(Scene,false);}}
return Scene;};this.refresh=function(){updateDuration();updateTriggerElementPosition();return Scene;};this.progress=function(progress){if(!arguments.length){return _progress;}else{var
doUpdate=false,oldState=_state,scrollDirection=_controller?_controller.info("scrollDirection"):'PAUSED',reverseOrForward=_options.reverse||progress>=_progress;if(_options.duration===0){doUpdate=_progress!=progress;_progress=progress<1&&reverseOrForward?0:1;_state=_progress===0?SCENE_STATE_BEFORE:SCENE_STATE_DURING;}else{if(progress<0&&_state!==SCENE_STATE_BEFORE&&reverseOrForward){_progress=0;_state=SCENE_STATE_BEFORE;doUpdate=true;}else if(progress>=0&&progress<1&&reverseOrForward){_progress=progress;_state=SCENE_STATE_DURING;doUpdate=true;}else if(progress>=1&&_state!==SCENE_STATE_AFTER){_progress=1;_state=SCENE_STATE_AFTER;doUpdate=true;}else if(_state===SCENE_STATE_DURING&&!reverseOrForward){updatePinState();}}
if(doUpdate){var
eventVars={progress:_progress,state:_state,scrollDirection:scrollDirection},stateChanged=_state!=oldState;var trigger=function(eventName){Scene.trigger(eventName,eventVars);};if(stateChanged){if(oldState!==SCENE_STATE_DURING){trigger("enter");trigger(oldState===SCENE_STATE_BEFORE?"start":"end");}}
trigger("progress");if(stateChanged){if(_state!==SCENE_STATE_DURING){trigger(_state===SCENE_STATE_BEFORE?"start":"end");trigger("leave");}}}
return Scene;}};var updateScrollOffset=function(){_scrollOffset={start:_triggerPos+_options.offset};if(_controller&&_options.triggerElement){_scrollOffset.start-=_controller.info("size")*_options.triggerHook;}
_scrollOffset.end=_scrollOffset.start+_options.duration;};var updateDuration=function(suppressEvents){if(_durationUpdateMethod){var varname="duration";if(changeOption(varname,_durationUpdateMethod.call(Scene))&&!suppressEvents){Scene.trigger("change",{what:varname,newval:_options[varname]});Scene.trigger("shift",{reason:varname});}}};var updateTriggerElementPosition=function(suppressEvents){var
elementPos=0,telem=_options.triggerElement;if(_controller&&telem){var
controllerInfo=_controller.info(),containerOffset=_util.get.offset(controllerInfo.container),param=controllerInfo.vertical?"top":"left";while(telem.parentNode.hasAttribute(PIN_SPACER_ATTRIBUTE)){telem=telem.parentNode;}
var elementOffset=_util.get.offset(telem);if(!controllerInfo.isDocument){containerOffset[param]-=_controller.scrollPos();}
elementPos=elementOffset[param]-containerOffset[param];}
var changed=elementPos!=_triggerPos;_triggerPos=elementPos;if(changed&&!suppressEvents){Scene.trigger("shift",{reason:"triggerElementPosition"});}};var onContainerResize=function(e){if(_options.triggerHook>0){Scene.trigger("shift",{reason:"containerResize"});}};var _validate=_util.extend(SCENE_OPTIONS.validate,{duration:function(val){if(_util.type.String(val)&&val.match(/^(\.|\d)*\d+%$/)){var perc=parseFloat(val)/100;val=function(){return _controller?_controller.info("size")*perc:0;};}
if(_util.type.Function(val)){_durationUpdateMethod=val;try{val=parseFloat(_durationUpdateMethod());}catch(e){val=-1;}}
val=parseFloat(val);if(!_util.type.Number(val)||val<0){if(_durationUpdateMethod){_durationUpdateMethod=undefined;throw["Invalid return value of supplied function for option \"duration\":",val];}else{throw["Invalid value for option \"duration\":",val];}}
return val;}});var validateOption=function(check){check=arguments.length?[check]:Object.keys(_validate);check.forEach(function(optionName,key){var value;if(_validate[optionName]){try{value=_validate[optionName](_options[optionName]);}catch(e){value=DEFAULT_OPTIONS[optionName];var logMSG=_util.type.String(e)?[e]:e;if(_util.type.Array(logMSG)){logMSG[0]="ERROR: "+logMSG[0];logMSG.unshift(1);log.apply(this,logMSG);}else{log(1,"ERROR: Problem executing validation callback for option '"+optionName+"':",e.message);}}finally{_options[optionName]=value;}}});};var changeOption=function(varname,newval){var
changed=false,oldval=_options[varname];if(_options[varname]!=newval){_options[varname]=newval;validateOption(varname);changed=oldval!=_options[varname];}
return changed;};var addSceneOption=function(optionName){if(!Scene[optionName]){Scene[optionName]=function(newVal){if(!arguments.length){return _options[optionName];}else{if(optionName==="duration"){_durationUpdateMethod=undefined;}
if(changeOption(optionName,newVal)){Scene.trigger("change",{what:optionName,newval:_options[optionName]});if(SCENE_OPTIONS.shifts.indexOf(optionName)>-1){Scene.trigger("shift",{reason:optionName});}}}
return Scene;};}};this.controller=function(){return _controller;};this.state=function(){return _state;};this.scrollOffset=function(){return _scrollOffset.start;};this.triggerPosition=function(){var pos=_options.offset;if(_controller){if(_options.triggerElement){pos+=_triggerPos;}else{pos+=_controller.info("size")*Scene.triggerHook();}}
return pos;};var
_pin,_pinOptions;Scene.on("shift.internal",function(e){var durationChanged=e.reason==="duration";if((_state===SCENE_STATE_AFTER&&durationChanged)||(_state===SCENE_STATE_DURING&&_options.duration===0)){updatePinState();}
if(durationChanged){updatePinDimensions();}}).on("progress.internal",function(e){updatePinState();}).on("add.internal",function(e){updatePinDimensions();}).on("destroy.internal",function(e){Scene.removePin(e.reset);});var updatePinState=function(forceUnpin){if(_pin&&_controller){var
containerInfo=_controller.info(),pinTarget=_pinOptions.spacer.firstChild;if(!forceUnpin&&_state===SCENE_STATE_DURING){if(_util.css(pinTarget,"position")!="fixed"){_util.css(pinTarget,{"position":"fixed"});updatePinDimensions();}
var
fixedPos=_util.get.offset(_pinOptions.spacer,true),scrollDistance=_options.reverse||_options.duration===0?containerInfo.scrollPos-_scrollOffset.start:Math.round(_progress*_options.duration*10)/10;fixedPos[containerInfo.vertical?"top":"left"]+=scrollDistance;_util.css(_pinOptions.spacer.firstChild,{top:fixedPos.top,left:fixedPos.left});}else{var
newCSS={position:_pinOptions.inFlow?"relative":"absolute",top:0,left:0},change=_util.css(pinTarget,"position")!=newCSS.position;if(!_pinOptions.pushFollowers){newCSS[containerInfo.vertical?"top":"left"]=_options.duration*_progress;}else if(_options.duration>0){if(_state===SCENE_STATE_AFTER&&parseFloat(_util.css(_pinOptions.spacer,"padding-top"))===0){change=true;}else if(_state===SCENE_STATE_BEFORE&&parseFloat(_util.css(_pinOptions.spacer,"padding-bottom"))===0){change=true;}}
_util.css(pinTarget,newCSS);if(change){updatePinDimensions();}}}};var updatePinDimensions=function(){if(_pin&&_controller&&_pinOptions.inFlow){var
after=(_state===SCENE_STATE_AFTER),before=(_state===SCENE_STATE_BEFORE),during=(_state===SCENE_STATE_DURING),vertical=_controller.info("vertical"),pinTarget=_pinOptions.spacer.firstChild,marginCollapse=_util.isMarginCollapseType(_util.css(_pinOptions.spacer,"display")),css={};if(_pinOptions.relSize.width||_pinOptions.relSize.autoFullWidth){if(during){_util.css(_pin,{"width":_util.get.width(_pinOptions.spacer)});}else{_util.css(_pin,{"width":"100%"});}}else{css["min-width"]=_util.get.width(vertical?_pin:pinTarget,true,true);css.width=during?css["min-width"]:"auto";}
if(_pinOptions.relSize.height){if(during){_util.css(_pin,{"height":_util.get.height(_pinOptions.spacer)-(_pinOptions.pushFollowers?_options.duration:0)});}else{_util.css(_pin,{"height":"100%"});}}else{css["min-height"]=_util.get.height(vertical?pinTarget:_pin,true,!marginCollapse);css.height=during?css["min-height"]:"auto";}
if(_pinOptions.pushFollowers){css["padding"+(vertical?"Top":"Left")]=_options.duration*_progress;css["padding"+(vertical?"Bottom":"Right")]=_options.duration*(1-_progress);}
_util.css(_pinOptions.spacer,css);}};var updatePinInContainer=function(){if(_controller&&_pin&&_state===SCENE_STATE_DURING&&!_controller.info("isDocument")){updatePinState();}};var updateRelativePinSpacer=function(){if(_controller&&_pin&&_state===SCENE_STATE_DURING&&(((_pinOptions.relSize.width||_pinOptions.relSize.autoFullWidth)&&_util.get.width(window)!=_util.get.width(_pinOptions.spacer.parentNode))||(_pinOptions.relSize.height&&_util.get.height(window)!=_util.get.height(_pinOptions.spacer.parentNode)))){updatePinDimensions();}};var onMousewheelOverPin=function(e){if(_controller&&_pin&&_state===SCENE_STATE_DURING&&!_controller.info("isDocument")){e.preventDefault();_controller._setScrollPos(_controller.info("scrollPos")-((e.wheelDelta||e[_controller.info("vertical")?"wheelDeltaY":"wheelDeltaX"])/3||-e.detail*30));}};this.setPin=function(element,settings){var
defaultSettings={pushFollowers:true,spacerClass:"scrollmagic-pin-spacer"};settings=_util.extend({},defaultSettings,settings);element=_util.get.elements(element)[0];if(!element){log(1,"ERROR calling method 'setPin()': Invalid pin element supplied.");return Scene;}else if(_util.css(element,"position")==="fixed"){log(1,"ERROR calling method 'setPin()': Pin does not work with elements that are positioned 'fixed'.");return Scene;}
if(_pin){if(_pin===element){return Scene;}else{Scene.removePin();}}
_pin=element;var
parentDisplay=_pin.parentNode.style.display,boundsParams=["top","left","bottom","right","margin","marginLeft","marginRight","marginTop","marginBottom"];_pin.parentNode.style.display='none';var
inFlow=_util.css(_pin,"position")!="absolute",pinCSS=_util.css(_pin,boundsParams.concat(["display"])),sizeCSS=_util.css(_pin,["width","height"]);_pin.parentNode.style.display=parentDisplay;if(!inFlow&&settings.pushFollowers){log(2,"WARNING: If the pinned element is positioned absolutely pushFollowers will be disabled.");settings.pushFollowers=false;}
window.setTimeout(function(){if(_pin&&_options.duration===0&&settings.pushFollowers){log(2,"WARNING: pushFollowers =",true,"has no effect, when scene duration is 0.");}},0);var
spacer=_pin.parentNode.insertBefore(document.createElement('div'),_pin),spacerCSS=_util.extend(pinCSS,{position:inFlow?"relative":"absolute",boxSizing:"content-box",mozBoxSizing:"content-box",webkitBoxSizing:"content-box"});if(!inFlow){_util.extend(spacerCSS,_util.css(_pin,["width","height"]));}
_util.css(spacer,spacerCSS);spacer.setAttribute(PIN_SPACER_ATTRIBUTE,"");_util.addClass(spacer,settings.spacerClass);_pinOptions={spacer:spacer,relSize:{width:sizeCSS.width.slice(-1)==="%",height:sizeCSS.height.slice(-1)==="%",autoFullWidth:sizeCSS.width==="auto"&&inFlow&&_util.isMarginCollapseType(pinCSS.display)},pushFollowers:settings.pushFollowers,inFlow:inFlow,};if(!_pin.___origStyle){_pin.___origStyle={};var
pinInlineCSS=_pin.style,copyStyles=boundsParams.concat(["width","height","position","boxSizing","mozBoxSizing","webkitBoxSizing"]);copyStyles.forEach(function(val){_pin.___origStyle[val]=pinInlineCSS[val]||"";});}
if(_pinOptions.relSize.width){_util.css(spacer,{width:sizeCSS.width});}
if(_pinOptions.relSize.height){_util.css(spacer,{height:sizeCSS.height});}
spacer.appendChild(_pin);_util.css(_pin,{position:inFlow?"relative":"absolute",margin:"auto",top:"auto",left:"auto",bottom:"auto",right:"auto"});if(_pinOptions.relSize.width||_pinOptions.relSize.autoFullWidth){_util.css(_pin,{boxSizing:"border-box",mozBoxSizing:"border-box",webkitBoxSizing:"border-box"});}
window.addEventListener('scroll',updatePinInContainer);window.addEventListener('resize',updatePinInContainer);window.addEventListener('resize',updateRelativePinSpacer);_pin.addEventListener("mousewheel",onMousewheelOverPin);_pin.addEventListener("DOMMouseScroll",onMousewheelOverPin);log(3,"added pin");updatePinState();return Scene;};this.removePin=function(reset){if(_pin){if(_state===SCENE_STATE_DURING){updatePinState(true);}
if(reset||!_controller){var pinTarget=_pinOptions.spacer.firstChild;if(pinTarget.hasAttribute(PIN_SPACER_ATTRIBUTE)){var
style=_pinOptions.spacer.style,values=["margin","marginLeft","marginRight","marginTop","marginBottom"];margins={};values.forEach(function(val){margins[val]=style[val]||"";});_util.css(pinTarget,margins);}
_pinOptions.spacer.parentNode.insertBefore(pinTarget,_pinOptions.spacer);_pinOptions.spacer.parentNode.removeChild(_pinOptions.spacer);if(!_pin.parentNode.hasAttribute(PIN_SPACER_ATTRIBUTE)){_util.css(_pin,_pin.___origStyle);delete _pin.___origStyle;}}
window.removeEventListener('scroll',updatePinInContainer);window.removeEventListener('resize',updatePinInContainer);window.removeEventListener('resize',updateRelativePinSpacer);_pin.removeEventListener("mousewheel",onMousewheelOverPin);_pin.removeEventListener("DOMMouseScroll",onMousewheelOverPin);_pin=undefined;log(3,"removed pin (reset: "+(reset?"true":"false")+")");}
return Scene;};var
_cssClasses,_cssClassElems=[];Scene.on("destroy.internal",function(e){Scene.removeClassToggle(e.reset);});this.setClassToggle=function(element,classes){var elems=_util.get.elements(element);if(elems.length===0||!_util.type.String(classes)){log(1,"ERROR calling method 'setClassToggle()': Invalid "+(elems.length===0?"element":"classes")+" supplied.");return Scene;}
if(_cssClassElems.length>0){Scene.removeClassToggle();}
_cssClasses=classes;_cssClassElems=elems;Scene.on("enter.internal_class leave.internal_class",function(e){var toggle=e.type==="enter"?_util.addClass:_util.removeClass;_cssClassElems.forEach(function(elem,key){toggle(elem,_cssClasses);});});return Scene;};this.removeClassToggle=function(reset){if(reset){_cssClassElems.forEach(function(elem,key){_util.removeClass(elem,_cssClasses);});}
Scene.off("start.internal_class end.internal_class");_cssClasses=undefined;_cssClassElems=[];return Scene;};construct();return Scene;};var SCENE_OPTIONS={defaults:{duration:0,offset:0,triggerElement:undefined,triggerHook:0.5,reverse:true,loglevel:2},validate:{offset:function(val){val=parseFloat(val);if(!_util.type.Number(val)){throw["Invalid value for option \"offset\":",val];}
return val;},triggerElement:function(val){val=val||undefined;if(val){var elem=_util.get.elements(val)[0];if(elem){val=elem;}else{throw["Element defined in option \"triggerElement\" was not found:",val];}}
return val;},triggerHook:function(val){var translate={"onCenter":0.5,"onEnter":1,"onLeave":0};if(_util.type.Number(val)){val=Math.max(0,Math.min(parseFloat(val),1));}else if(val in translate){val=translate[val];}else{throw["Invalid value for option \"triggerHook\": ",val];}
return val;},reverse:function(val){return!!val;},loglevel:function(val){val=parseInt(val);if(!_util.type.Number(val)||val<0||val>3){throw["Invalid value for option \"loglevel\":",val];}
return val;}},shifts:["duration","offset","triggerHook"],};ScrollMagic.Scene.addOption=function(name,defaultValue,validationCallback,shifts){if(!(name in SCENE_OPTIONS.defaults)){SCENE_OPTIONS.defaults[name]=defaultValue;SCENE_OPTIONS.validate[name]=validationCallback;if(shifts){SCENE_OPTIONS.shifts.push(name);}}else{ScrollMagic._util.log(1,"[static] ScrollMagic.Scene -> Cannot add Scene option '"+name+"', because it already exists.");}};ScrollMagic.Scene.extend=function(extension){var oldClass=this;ScrollMagic.Scene=function(){oldClass.apply(this,arguments);this.$super=_util.extend({},this);return extension.apply(this,arguments)||this;};_util.extend(ScrollMagic.Scene,oldClass);ScrollMagic.Scene.prototype=oldClass.prototype;ScrollMagic.Scene.prototype.constructor=ScrollMagic.Scene;};ScrollMagic.Event=function(type,namespace,target,vars){vars=vars||{};for(var key in vars){this[key]=vars[key];}
this.type=type;this.target=this.currentTarget=target;this.namespace=namespace||'';this.timeStamp=this.timestamp=Date.now();return this;};var _util=ScrollMagic._util=(function(window){var U={},i;var floatval=function(number){return parseFloat(number)||0;};var _getComputedStyle=function(elem){return elem.currentStyle?elem.currentStyle:window.getComputedStyle(elem);};var _dimension=function(which,elem,outer,includeMargin){elem=(elem===document)?window:elem;if(elem===window){includeMargin=false;}else if(!_type.DomElement(elem)){return 0;}
which=which.charAt(0).toUpperCase()+which.substr(1).toLowerCase();var dimension=(outer?elem['offset'+which]||elem['outer'+which]:elem['client'+which]||elem['inner'+which])||0;if(outer&&includeMargin){var style=_getComputedStyle(elem);dimension+=which==='Height'?floatval(style.marginTop)+floatval(style.marginBottom):floatval(style.marginLeft)+floatval(style.marginRight);}
return dimension;};var _camelCase=function(str){return str.replace(/^[^a-z]+([a-z])/g,'$1').replace(/-([a-z])/g,function(g){return g[1].toUpperCase();});};U.extend=function(obj){obj=obj||{};for(i=1;i<arguments.length;i++){if(!arguments[i]){continue;}
for(var key in arguments[i]){if(arguments[i].hasOwnProperty(key)){obj[key]=arguments[i][key];}}}
return obj;};U.isMarginCollapseType=function(str){return["block","flex","list-item","table","-webkit-box"].indexOf(str)>-1;};var
lastTime=0,vendors=['ms','moz','webkit','o'];var _requestAnimationFrame=window.requestAnimationFrame;var _cancelAnimationFrame=window.cancelAnimationFrame;for(i=0;!_requestAnimationFrame&&i<vendors.length;++i){_requestAnimationFrame=window[vendors[i]+'RequestAnimationFrame'];_cancelAnimationFrame=window[vendors[i]+'CancelAnimationFrame']||window[vendors[i]+'CancelRequestAnimationFrame'];}
if(!_requestAnimationFrame){_requestAnimationFrame=function(callback){var
currTime=new Date().getTime(),timeToCall=Math.max(0,16-(currTime-lastTime)),id=window.setTimeout(function(){callback(currTime+timeToCall);},timeToCall);lastTime=currTime+timeToCall;return id;};}
if(!_cancelAnimationFrame){_cancelAnimationFrame=function(id){window.clearTimeout(id);};}
U.rAF=_requestAnimationFrame.bind(window);U.cAF=_cancelAnimationFrame.bind(window);var
loglevels=["error","warn","log"],console=window.console||{};console.log=console.log||function(){};for(i=0;i<loglevels.length;i++){var method=loglevels[i];if(!console[method]){console[method]=console.log;}}
U.log=function(loglevel){if(loglevel>loglevels.length||loglevel<=0)loglevel=loglevels.length;var now=new Date(),time=("0"+now.getHours()).slice(-2)+":"+("0"+now.getMinutes()).slice(-2)+":"+("0"+now.getSeconds()).slice(-2)+":"+("00"+now.getMilliseconds()).slice(-3),method=loglevels[loglevel-1],args=Array.prototype.splice.call(arguments,1),func=Function.prototype.bind.call(console[method],console);args.unshift(time);func.apply(console,args);};var _type=U.type=function(v){return Object.prototype.toString.call(v).replace(/^\[object (.+)\]$/,"$1").toLowerCase();};_type.String=function(v){return _type(v)==='string';};_type.Function=function(v){return _type(v)==='function';};_type.Array=function(v){return Array.isArray(v);};_type.Number=function(v){return!_type.Array(v)&&(v-parseFloat(v)+1)>=0;};_type.DomElement=function(o){return(typeof HTMLElement==="object"?o instanceof HTMLElement:o&&typeof o==="object"&&o!==null&&o.nodeType===1&&typeof o.nodeName==="string");};var _get=U.get={};_get.elements=function(selector){var arr=[];if(_type.String(selector)){try{selector=document.querySelectorAll(selector);}catch(e){return arr;}}
if(_type(selector)==='nodelist'||_type.Array(selector)){for(var i=0,ref=arr.length=selector.length;i<ref;i++){var elem=selector[i];arr[i]=_type.DomElement(elem)?elem:_get.elements(elem);}}else if(_type.DomElement(selector)||selector===document||selector===window){arr=[selector];}
return arr;};_get.scrollTop=function(elem){return(elem&&typeof elem.scrollTop==='number')?elem.scrollTop:window.pageYOffset||0;};_get.scrollLeft=function(elem){return(elem&&typeof elem.scrollLeft==='number')?elem.scrollLeft:window.pageXOffset||0;};_get.width=function(elem,outer,includeMargin){return _dimension('width',elem,outer,includeMargin);};_get.height=function(elem,outer,includeMargin){return _dimension('height',elem,outer,includeMargin);};_get.offset=function(elem,relativeToViewport){var offset={top:0,left:0};if(elem&&elem.getBoundingClientRect){var rect=elem.getBoundingClientRect();offset.top=rect.top;offset.left=rect.left;if(!relativeToViewport){offset.top+=_get.scrollTop();offset.left+=_get.scrollLeft();}}
return offset;};U.addClass=function(elem,classname){if(classname){if(elem.classList)elem.classList.add(classname);else elem.className+=' '+classname;}};U.removeClass=function(elem,classname){if(classname){if(elem.classList)elem.classList.remove(classname);else elem.className=elem.className.replace(new RegExp('(^|\\b)'+classname.split(' ').join('|')+'(\\b|$)','gi'),' ');}};U.css=function(elem,options){if(_type.String(options)){return _getComputedStyle(elem)[_camelCase(options)];}else if(_type.Array(options)){var
obj={},style=_getComputedStyle(elem);options.forEach(function(option,key){obj[option]=style[_camelCase(option)];});return obj;}else{for(var option in options){var val=options[option];if(val==parseFloat(val)){val+='px';}
elem.style[_camelCase(option)]=val;}}};return U;}(window||{}));ScrollMagic.Scene.prototype.addIndicators=function(){ScrollMagic._util.log(1,'(ScrollMagic.Scene) -> ERROR calling addIndicators() due to missing Plugin \'debug.addIndicators\'. Please make sure to include plugins/debug.addIndicators.js');return this;}
ScrollMagic.Scene.prototype.removeIndicators=function(){ScrollMagic._util.log(1,'(ScrollMagic.Scene) -> ERROR calling removeIndicators() due to missing Plugin \'debug.addIndicators\'. Please make sure to include plugins/debug.addIndicators.js');return this;}
ScrollMagic.Scene.prototype.setTween=function(){ScrollMagic._util.log(1,'(ScrollMagic.Scene) -> ERROR calling setTween() due to missing Plugin \'animation.gsap\'. Please make sure to include plugins/animation.gsap.js');return this;}
ScrollMagic.Scene.prototype.removeTween=function(){ScrollMagic._util.log(1,'(ScrollMagic.Scene) -> ERROR calling removeTween() due to missing Plugin \'animation.gsap\'. Please make sure to include plugins/animation.gsap.js');return this;}
ScrollMagic.Scene.prototype.setVelocity=function(){ScrollMagic._util.log(1,'(ScrollMagic.Scene) -> ERROR calling setVelocity() due to missing Plugin \'animation.velocity\'. Please make sure to include plugins/animation.velocity.js');return this;}
ScrollMagic.Scene.prototype.removeVelocity=function(){ScrollMagic._util.log(1,'(ScrollMagic.Scene) -> ERROR calling removeVelocity() due to missing Plugin \'animation.velocity\'. Please make sure to include plugins/animation.velocity.js');return this;}
return ScrollMagic;}));

$('.picture-navigator').each(function(){if($('.picture-navigator').hasClass('vertical')!=true){var thumbs=$(this).children('.slider-thumbs');var carouselBox=$(this).children('.carousel-bounding-box');$(thumbs).insertBefore(carouselBox);}});

$(document).ready(function(){$('#useful-links').click(function(){$('#useful-links').toggleClass('useful-links-hover');});});
