text: if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");if(+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.4",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.4",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active"));a&&this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.4",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.4",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){b&&3===b.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=c(d),f={relatedTarget:this};e.hasClass("open")&&(b&&"click"==b.type&&/input|textarea/i.test(b.target.tagName)&&a.contains(e[0],b.target)||(e.trigger(b=a.Event("hide.bs.dropdown",f)),b.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger("hidden.bs.dropdown",f))))}))}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.4",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",b);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger("shown.bs.dropdown",h)}return!1}},g.prototype.keydown=function(b){if(/(38|40|27|32)/.test(b.which)&&!/input|textarea/i.test(b.target.tagName)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var e=c(d),g=e.hasClass("open");if(!g&&27!=b.which||g&&27==b.which)return 27==b.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find('[role="menu"]'+h+', [role="listbox"]'+h);if(i.length){var j=i.index(b.target);38==b.which&&j>0&&j--,40==b.which&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=h,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",f,g.prototype.toggle).on("keydown.bs.dropdown.data-api",f,g.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",g.prototype.keydown)}(jQuery),+function(a){"use strict";function b(b,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},c.DEFAULTS,e.data(),"object"==typeof b&&b);f||e.data("bs.modal",f=new c(this,g)),"string"==typeof b?f[b](d):g.show&&f.show(d)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};c.VERSION="3.3.4",c.TRANSITION_DURATION=300,c.BACKDROP_TRANSITION_DURATION=150,c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},c.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)},c.prototype.show=function(b){var d=this,e=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){d.$element.one("mouseup.dismiss.bs.modal",function(b){a(b.target).is(d.$element)&&(d.ignoreBackdropClick=!0)})}),this.backdrop(function(){var e=a.support.transition&&d.$element.hasClass("fade");d.$element.parent().length||d.$element.appendTo(d.$body),d.$element.show().scrollTop(0),d.adjustDialog(),e&&d.$element[0].offsetWidth,d.$element.addClass("in"),d.enforceFocus();var f=a.Event("shown.bs.modal",{relatedTarget:b});e?d.$dialog.one("bsTransitionEnd",function(){d.$element.trigger("focus").trigger(f)}).emulateTransitionEnd(c.TRANSITION_DURATION):d.$element.trigger("focus").trigger(f)}))},c.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(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(c.TRANSITION_DURATION):this.hideModal())},c.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.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},c.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$body.removeClass("modal-open"),a.resetAdjustments(),a.resetScrollbar(),a.$element.trigger("hidden.bs.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var d=this,e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var f=a.support.transition&&e;if(this.$backdrop=a(document.createElement("div")).addClass("modal-backdrop "+e).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;f?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.handleUpdate=function(){this.adjustDialog()},c.prototype.adjustDialog=function(){var a=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth<a,this.scrollbarWidth=this.measureScrollbar()},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevented()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.init("tooltip",a,b)};c.VERSION="3.3.4",c.TRANSITION_DURATION=150,c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(this.options.viewport.selector||this.options.viewport),this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c&&c.$tip&&c.$tip.is(":visible")?void(c.hoverState="in"):(c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.options.container?a(this.options.container):this.$element.parent(),p=this.getPosition(o);h="bottom"==h&&k.bottom+m>p.bottom?"top":"top"==h&&k.top-m<p.top?"bottom":"right"==h&&k.right+l>p.width?"left":"left"==h&&k.left-l<p.left?"right":h,f.removeClass(n).addClass(h)}var q=this.getCalculatedOffset(h,k,l,m);this.applyPlacement(q,h);var r=function(){var a=e.hoverState;e.$element.trigger("shown.bs."+e.type),e.hoverState=null,"out"==a&&e.leave(e)};a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",r).emulateTransitionEnd(c.TRANSITION_DURATION):r()}},c.prototype.applyPlacement=function(b,c){var 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),b.top=b.top+g,b.left=b.left+h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;"top"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=/top|bottom/.test(c),m=l?2*k.left-e+i:2*k.top-f+j,n=l?"offsetWidth":"offsetHeight";d.offset(b),this.replaceArrow(m,d[0][n],l)},c.prototype.replaceArrow=function(a,b,c){this.arrow().css(c?"left":"top",50*(1-a/b)+"%").css(c?"top":"left","")},c.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")},c.prototype.hide=function(b){function d(){"in"!=e.hoverState&&f.detach(),e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),b&&b()}var e=this,f=a(this.$tip),g=a.Event("hide.bs."+this.type);return this.$element.trigger(g),g.isDefaultPrevented()?void 0:(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",d).emulateTransitionEnd(c.TRANSITION_DURATION):d(),this.hoverState=null,this)},c.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","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d="BODY"==c.tagName,e=c.getBoundingClientRect();null==e.width&&(e=a.extend({},e,{width:e.right-e.left,height:e.bottom-e.top}));var f=d?{top:0,left:0}:b.offset(),g={scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop()},h=d?{width:a(window).width(),height:a(window).height()}:null;return a.extend({},e,g,h,f)},c.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}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.width&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type)})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.4",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.4",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<e[0])return this.activeTarget=null,this.clear();for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(void 0===e[a+1]||b<e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,this.clear();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.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.4",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.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"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});
  if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.4",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=a(document.body).height();"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery),window.Modernizr=function(a,b,c){function d(a){o.cssText=a}function e(a,b){return typeof a===b}var f,g,h,i="2.8.2",j={},k=!0,l=b.documentElement,m="modernizr",n=b.createElement(m),o=n.style,p=({}.toString," -webkit- -moz- -o- -ms- ".split(" ")),q={},r=[],s=r.slice,t=function(a,c,d,e){var f,g,h,i,j=b.createElement("div"),k=b.body,n=k||b.createElement("body");if(parseInt(d,10))for(;d--;)h=b.createElement("div"),h.id=e?e[d]:m+(d+1),j.appendChild(h);return f=["&#173;",'<style id="s',m,'">',a,"</style>"].join(""),j.id=m,(k?j:n).innerHTML+=f,n.appendChild(j),k||(n.style.background="",n.style.overflow="hidden",i=l.style.overflow,l.style.overflow="hidden",l.appendChild(n)),g=c(j,a),k?j.parentNode.removeChild(j):(n.parentNode.removeChild(n),l.style.overflow=i),!!g},u={}.hasOwnProperty;h=e(u,"undefined")||e(u.call,"undefined")?function(a,b){return b in a&&e(a.constructor.prototype[b],"undefined")}:function(a,b){return u.call(a,b)},Function.prototype.bind||(Function.prototype.bind=function(a){var b=this;if("function"!=typeof b)throw new TypeError;var c=s.call(arguments,1),d=function(){if(this instanceof d){var e=function(){};e.prototype=b.prototype;var f=new e,g=b.apply(f,c.concat(s.call(arguments)));return Object(g)===g?g:f}return b.apply(a,c.concat(s.call(arguments)))};return d}),q.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:t(["@media (",p.join("touch-enabled),("),m,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=9===a.offsetTop}),c};for(var v in q)h(q,v)&&(g=v.toLowerCase(),j[g]=q[v](),r.push((j[g]?"":"no-")+g));return j.addTest=function(a,b){if("object"==typeof a)for(var d in a)h(a,d)&&j.addTest(d,a[d]);else{if(a=a.toLowerCase(),j[a]!==c)return j;b="function"==typeof b?b():b,"undefined"!=typeof k&&k&&(l.className+=" "+(b?"":"no-")+a),j[a]=b}return j},d(""),n=f=null,function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=s.elements;return"string"==typeof a?a.split(" "):a}function e(a){var b=r[a[p]];return b||(b={},q++,a[p]=q,r[q]=b),b}function f(a,c,d){if(c||(c=b),k)return c.createElement(a);d||(d=e(c));var f;return f=d.cache[a]?d.cache[a].cloneNode():o.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!f.canHaveChildren||n.test(a)||f.tagUrn?f:d.frag.appendChild(f)}function g(a,c){if(a||(a=b),k)return a.createDocumentFragment();c=c||e(a);for(var f=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)f.createElement(h[g]);return f}function h(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return s.shivMethods?f(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(s,b.frag)}function i(a){a||(a=b);var d=e(a);return!s.shivCSS||j||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),k||h(a,d),a}var j,k,l="3.7.0",m=a.html5||{},n=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,o=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,p="_html5shiv",q=0,r={};!function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",j="hidden"in a,k=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){j=!0,k=!0}}();var s={elements:m.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:l,shivCSS:m.shivCSS!==!1,supportsUnknownElements:k,shivMethods:m.shivMethods!==!1,type:"default",shivDocument:i,createElement:f,createDocumentFragment:g};a.html5=s,i(b)}(this,b),j._version=i,j._prefixes=p,j.testStyles=t,l.className=l.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(k?" js "+r.join(" "):""),j}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==q.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=r.shift();s=1,a?a.t?o(function(){("c"==a.t?m.injectCss:m.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):s=0}function i(a,c,d,e,f,i,j){function k(b){if(!n&&g(l.readyState)&&(t.r=n=1,!s&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&o(function(){v.removeChild(l)},50);for(var d in A[c])A[c].hasOwnProperty(d)&&A[c][d].onload()}}var j=j||m.errorTimeout,l=b.createElement(a),n=0,q=0,t={t:d,s:c,e:f,a:i,x:j};1===A[c]&&(q=1,A[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,q)},r.splice(e,0,t),"img"!=a&&(q||2===A[c]?(v.insertBefore(l,u?null:p),o(k,j)):A[c].push(l))}function j(a,b,c,d,f){return s=0,b=b||"j",e(a)?i("c"==b?x:w,a,b,this.i++,c,d,f):(r.splice(this.i++,0,a),1==r.length&&h()),this}function k(){var a=m;return a.loader={load:j,i:0},a}var l,m,n=b.documentElement,o=a.setTimeout,p=b.getElementsByTagName("script")[0],q={}.toString,r=[],s=0,t="MozAppearance"in n.style,u=t&&!!b.createRange().compareNode,v=u?n:p.parentNode,n=a.opera&&"[object Opera]"==q.call(a.opera),n=!!b.attachEvent&&!n,w=t?"object":n?"script":"img",x=n?"script":w,y=Array.isArray||function(a){return"[object Array]"==q.call(a)},z=[],A={},B={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}};m=function(a){function b(a){var b,c,d,a=a.split("!"),e=z.length,f=a.pop(),g=a.length,f={url:f,origUrl:f,prefixes:a};for(c=0;g>c;c++)d=a[c].split("="),(b=B[d.shift()])&&(f=b(f,d));for(c=0;e>c;c++)f=z[c](f);return f}function g(a,e,f,g,h){var i=b(a),j=i.autoCallback;i.url.split(".").pop().split("?").shift(),i.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]),i.instead?i.instead(a,e,f,g,h):(A[i.url]?i.noexec=!0:A[i.url]=1,f.load(i.url,i.forceCSS||!i.forceJS&&"css"==i.url.split(".").pop().split("?").shift()?"c":c,i.noexec,i.attrs,i.timeout),(d(e)||d(j))&&f.load(function(){k(),e&&e(i.origUrl,h,g),j&&j(i.origUrl,h,g),A[i.url]=2})))}function h(a,b){function c(a,c){if(a){if(e(a))c||(l=function(){var a=[].slice.call(arguments);m.apply(this,a),n()}),g(a,l,b,0,j);else if(Object(a)===a)for(i in h=function(){var b,c=0;for(b in a)a.hasOwnProperty(b)&&c++;return c}(),a)a.hasOwnProperty(i)&&(!c&&!--h&&(d(l)?l=function(){var a=[].slice.call(arguments);m.apply(this,a),n()}:l[i]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),n()}}(m[i])),g(a[i],l,b,i,j))}else!c&&n()}var h,i,j=!!a.test,k=a.load||a.both,l=a.callback||f,m=l,n=a.complete||f;c(j?a.yep:a.nope,!!k),k&&c(k)}var i,j,l=this.yepnope.loader;if(e(a))g(a,0,l,0);else if(y(a))for(i=0;i<a.length;i++)j=a[i],e(j)?g(j,0,l,0):y(j)?m(j):Object(j)===j&&h(j,l);else Object(a)===a&&h(a,l)},m.addPrefix=function(a,b){B[a]=b},m.addFilter=function(a){z.push(a)},m.errorTimeout=1e4,null==b.readyState&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",l=function(){b.removeEventListener("DOMContentLoaded",l,0),b.readyState="complete"},0)),a.yepnope=k(),a.yepnope.executeStack=h,a.yepnope.injectJs=function(a,c,d,e,i,j){var k,l,n=b.createElement("script"),e=e||m.errorTimeout;n.src=a;for(l in d)n.setAttribute(l,d[l]);c=j?h:c||f,n.onreadystatechange=n.onload=function(){!k&&g(n.readyState)&&(k=1,c(),n.onload=n.onreadystatechange=null)},o(function(){k||(k=1,c(1))},e),i?n.onload():p.parentNode.insertBefore(n,p)},a.yepnope.injectCss=function(a,c,d,e,g,i){var j,e=b.createElement("link"),c=i?h:c||f;e.href=a,e.rel="stylesheet",e.type="text/css";for(j in d)e.setAttribute(j,d[j]);g||(p.parentNode.insertBefore(e,p),o(c,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))},!function(a,b,c){"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=c:(a[b]=c,"function"==typeof define&&define.amd&&define(b,[],function(){return c}))}(this,"jRespond",function(a,b,c){"use strict";return function(a){var b=[],d=[],e=a,f="",g="",h=0,i=100,j=500,k=j,l=function(){var a=0;return a="number"!=typeof window.innerWidth?0!==document.documentElement.clientWidth?document.documentElement.clientWidth:document.body.clientWidth:window.innerWidth},m=function(a){if(a.length===c)n(a);else for(var b=0;b<a.length;b++)n(a[b])},n=function(a){var e=a.breakpoint,h=a.enter||c;b.push(a),d.push(!1),q(e)&&(h!==c&&h.call(null,{entering:f,exiting:g}),d[b.length-1]=!0)},o=function(){for(var a=[],e=[],h=0;h<b.length;h++){var i=b[h].breakpoint,j=b[h].enter||c,k=b[h].exit||c;"*"===i?(j!==c&&a.push(j),k!==c&&e.push(k)):q(i)?(j===c||d[h]||a.push(j),d[h]=!0):(k!==c&&d[h]&&e.push(k),d[h]=!1)}for(var l={entering:f,exiting:g},m=0;m<e.length;m++)e[m].call(null,l);for(var n=0;n<a.length;n++)a[n].call(null,l)},p=function(a){for(var b=!1,c=0;c<e.length;c++)if(a>=e[c].enter&&a<=e[c].exit){b=!0;break}b&&f!==e[c].label?(g=f,f=e[c].label,o()):b||""===f||(f="",o())},q=function(a){if("object"==typeof a){if(a.join().indexOf(f)>=0)return!0}else{if("*"===a)return!0;if("string"==typeof a&&f===a)return!0}},r=function(){var a=l();a!==h?(k=i,p(a)):k=j,h=a,setTimeout(r,k)};return r(),{addFunc:function(a){m(a)},getBreakpoint:function(){return f}}}}(this,this.document)),function(a){jQuery.fn.extend({slimScroll:function(b){var c=a.extend({width:"auto",height:"250px",size:"7px",color:"#000",position:"right",distance:"1px",start:"top",opacity:.4,alwaysVisible:!1,disableFadeOut:!1,railVisible:!1,railColor:"#333",railOpacity:.2,railDraggable:!0,railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:!1,wheelStep:20,touchScrollStep:200,borderRadius:"7px",railBorderRadius:"7px"},b);return this.each(function(){function d(b){if(j){b=b||window.event;var d=0;b.wheelDelta&&(d=-b.wheelDelta/120),b.detail&&(d=b.detail/3),a(b.target||b.srcTarget||b.srcElement).closest("."+c.wrapperClass).is(u.parent())&&e(d,!0),b.preventDefault&&!s&&b.preventDefault(),s||(b.returnValue=!1)}}function e(a,b,d){s=!1;var e=a,f=u.outerHeight()-w.outerHeight();b&&(e=parseInt(w.css("top"))+a*parseInt(c.wheelStep)/100*w.outerHeight(),e=Math.min(Math.max(e,0),f),e=a>0?Math.ceil(e):Math.floor(e),w.css({top:e+"px"})),p=parseInt(w.css("top"))/(u.outerHeight()-w.outerHeight()),e=p*(u[0].scrollHeight-u.outerHeight()),d&&(e=a,a=e/u[0].scrollHeight*u.outerHeight(),a=Math.min(Math.max(a,0),f),w.css({top:a+"px"})),u.scrollTop(e),u.trigger("slimscrolling",~~e),h(),i()}function f(){window.addEventListener?(this.addEventListener("DOMMouseScroll",d,!1),this.addEventListener("mousewheel",d,!1),this.addEventListener("MozMousePixelScroll",null,!1)):document.attachEvent("onmousewheel",d)}function g(){o=Math.max(u.outerHeight()/u[0].scrollHeight*u.outerHeight(),r),w.css({height:o+"px"});var a=o==u.outerHeight()?"none":"block";w.css({display:a})}function h(){g(),clearTimeout(m),p==~~p?(s=c.allowPageScroll,q!=p&&u.trigger("slimscroll",0==~~p?"top":"bottom")):s=!1,q=p,o>=u.outerHeight()?s=!0:(w.stop(!0,!0).fadeIn("fast"),c.railVisible&&x.stop(!0,!0).fadeIn("fast"))}function i(){c.alwaysVisible||(m=setTimeout(function(){c.disableFadeOut&&j||k||l||(w.fadeOut("slow"),x.fadeOut("slow"))},1e3))}var j,k,l,m,n,o,p,q,r=30,s=!1,u=a(this);if(u.parent().hasClass(c.wrapperClass)){var v=u.scrollTop(),w=u.parent().find("."+c.barClass),x=u.parent().find("."+c.railClass);if(g(),a.isPlainObject(b)){if("height"in b&&"auto"==b.height){u.parent().css("height","auto"),u.css("height","auto");var y=u.parent().parent().height();u.parent().css("height",y),u.css("height",y)}if("scrollTo"in b)v=parseInt(c.scrollTo);else if("scrollBy"in b)v+=parseInt(c.scrollBy);else if("destroy"in b)return w.remove(),x.remove(),void u.unwrap();e(v,!1,!0)}}else{c.height="auto"==c.height?u.parent().height():c.height,v=a("<div></div>").addClass(c.wrapperClass).css({position:"relative",overflow:"hidden",width:c.width,height:c.height}),u.css({overflow:"hidden",width:c.width,height:c.height});var x=a("<div></div>").addClass(c.railClass).css({width:c.size,height:"100%",position:"absolute",top:0,display:c.alwaysVisible&&c.railVisible?"block":"none","border-radius":c.railBorderRadius,background:c.railColor,opacity:c.railOpacity,zIndex:90}),w=a("<div></div>").addClass(c.barClass).css({background:c.color,width:c.size,position:"absolute",top:0,opacity:c.opacity,display:c.alwaysVisible?"block":"none","border-radius":c.borderRadius,BorderRadius:c.borderRadius,MozBorderRadius:c.borderRadius,WebkitBorderRadius:c.borderRadius,zIndex:99}),y="right"==c.position?{right:c.distance}:{left:c.distance};x.css(y),w.css(y),u.wrap(v),u.parent().append(w),u.parent().append(x),c.railDraggable&&w.bind("mousedown",function(b){var c=a(document);return l=!0,t=parseFloat(w.css("top")),pageY=b.pageY,c.bind("mousemove.slimscroll",function(a){currTop=t+a.pageY-pageY,w.css("top",currTop),e(0,w.position().top,!1)}),c.bind("mouseup.slimscroll",function(){l=!1,i(),c.unbind(".slimscroll")}),!1}).bind("selectstart.slimscroll",function(a){return a.stopPropagation(),a.preventDefault(),!1}),x.hover(function(){h()},function(){i()}),w.hover(function(){k=!0},function(){k=!1}),u.hover(function(){j=!0,h(),i()},function(){j=!1,i()}),u.bind("touchstart",function(a){a.originalEvent.touches.length&&(n=a.originalEvent.touches[0].pageY)}),u.bind("touchmove",function(a){s||a.originalEvent.preventDefault(),a.originalEvent.touches.length&&(e((n-a.originalEvent.touches[0].pageY)/c.touchScrollStep,!0),n=a.originalEvent.touches[0].pageY)}),g(),"bottom"===c.start?(w.css({top:u.outerHeight()-w.outerHeight()}),e(0,!0)):"top"!==c.start&&(e(a(c.start).position().top,null,!0),c.alwaysVisible||w.hide()),f()}}),this}}),jQuery.fn.extend({slimscroll:jQuery.fn.slimScroll})}(jQuery),function(a){jQuery.fn.extend({slimScrollHorizontal:function(b){var c={wheelStep:20,height:"auto",width:"250px",size:"7px",color:"#000",position:"bottom",distance:"1px",start:"left",opacity:.4,alwaysVisible:!1,disableFadeOut:!1,railVisible:!1,railColor:"#333",railOpacity:"0.2",railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:!1,scroll:0,touchScrollStep:200},d=a.extend(c,b);return this.each(function(){function b(a,b,c){var g=a;if("auto"==u.css("left")&&u.css("left","0px"),b){g=parseInt(u.css("left"))+a*parseInt(d.wheelStep)/100*u.outerWidth();var h=r.outerWidth()-u.outerWidth();g=Math.min(Math.max(g,0),h),u.css({left:g+"px"})}if(m=parseInt(u.css("left"))/(r.outerWidth()-u.outerWidth()),g=m*(r[0].scrollWidth-r.outerWidth()),c){g=a;var i=g/r[0].scrollWidth*r.outerWidth();u.css({left:i+"px"})}r.scrollLeft(g),e(),f()}function c(){l=Math.max(r.outerWidth()/r[0].scrollWidth*r.outerWidth(),p),u.css({width:l+"px"})}function e(){if(c(),clearTimeout(j),m==~~m&&(q=d.allowPageScroll,n!=m)){var a=0==~~m?"left":"right";r.trigger("slimscroll",a)}return n=m,l>=r.outerWidth()?void(q=!0):(u.stop(!0,!0).fadeIn("fast"),void(d.railVisible&&t.stop(!0,!0).fadeIn("fast")))}function f(){d.alwaysVisible||(j=setTimeout(function(){d.disableFadeOut&&g||h||i||(u.fadeOut("slow"),t.fadeOut("slow"))},1e3))}var g,h,i,j,k,l,m,n,o="<div></div>",p=30,q=!1,r=a(this);if(r.parent().hasClass("slimScrollDiv"))return void(scroll&&(u=r.parent().find(".slimScrollBar"),t=r.parent().find(".slimScrollRail"),b(r.scrollLeft()+parseInt(scroll),!1,!0)));var s=a(o).addClass(d.wrapperClass).css({position:"relative",overflow:"hidden",width:d.width,height:d.height});r.css({overflow:"hidden",width:d.width,height:d.height});var t=a(o).addClass(d.railClass).css({width:"100%",height:d.size,position:"absolute",bottom:0,display:d.alwaysVisible&&d.railVisible?"block":"none","border-radius":d.size,background:d.railColor,opacity:d.railOpacity,zIndex:90}),u=a(o).addClass(d.barClass).css({background:d.color,height:d.size,position:"absolute",bottom:0,opacity:d.opacity,display:d.alwaysVisible?"block":"none","border-radius":d.size,BorderRadius:d.size,MozBorderRadius:d.size,WebkitBorderRadius:d.size,zIndex:99}),v="top"==d.position?{top:d.distance}:{bottom:d.distance};t.css(v),u.css(v),r.wrap(s),r.parent().append(u),r.parent().append(t),u.draggable({axis:"x",containment:"parent",start:function(){i=!0},stop:function(){i=!1,f()},drag:function(){b(0,a(this).position().left,!1)}}),t.hover(function(){e()},function(){f()}),u.hover(function(){h=!0},function(){h=!1}),r.hover(function(){g=!0,e(),f()},function(){g=!1,f()}),r.bind("touchstart",function(a){a.originalEvent.touches.length&&(k=a.originalEvent.touches[0].pageX)}),r.bind("touchmove",function(a){if(a.originalEvent.preventDefault(),a.originalEvent.touches.length){var c=(k-a.originalEvent.touches[0].pageX)/d.touchScrollStep;b(c,!0)}});var w=function(a){if(g){var a=a||window.event,c=0;a.wheelDelta&&(c=-a.wheelDelta/120),a.detail&&(c=a.detail/3),b(c,!0),a.preventDefault&&!q&&a.preventDefault(),q||(a.returnValue=!1)}},x=function(){window.addEventListener?(this.addEventListener("DOMMouseScroll",w,!1),this.addEventListener("mousewheel",w,!1)):document.attachEvent("onmousewheel",w)};x(),c(),"right"==d.start?(u.css({left:r.outerWidth()-u.outerWidth()}),b(0,!0)):"object"==typeof d.start&&(b(a(d.start).position().left,null,!0),d.alwaysVisible||u.hide())}),this}}),jQuery.fn.extend({slimscrollHorizontal:jQuery.fn.slimScrollHorizontal})}(jQuery),function(){"use strict";function a(c,d){function e(a,b){return function(){return a.apply(b,arguments)}}var f;if(d=d||{},this.trackingClick=!1,this.trackingClickStart=0,this.targetElement=null,this.touchStartX=0,this.touchStartY=0,this.lastTouchIdentifier=0,this.touchBoundary=d.touchBoundary||10,this.layer=c,this.tapDelay=d.tapDelay||200,!a.notNeeded(c)){for(var g=["onMouse","onClick","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel"],h=this,i=0,j=g.length;j>i;i++)h[g[i]]=e(h[g[i]],h);b&&(c.addEventListener("mouseover",this.onMouse,!0),c.addEventListener("mousedown",this.onMouse,!0),c.addEventListener("mouseup",this.onMouse,!0)),c.addEventListener("click",this.onClick,!0),c.addEventListener("touchstart",this.onTouchStart,!1),c.addEventListener("touchmove",this.onTouchMove,!1),c.addEventListener("touchend",this.onTouchEnd,!1),c.addEventListener("touchcancel",this.onTouchCancel,!1),Event.prototype.stopImmediatePropagation||(c.removeEventListener=function(a,b,d){var e=Node.prototype.removeEventListener;"click"===a?e.call(c,a,b.hijacked||b,d):e.call(c,a,b,d)},c.addEventListener=function(a,b,d){var e=Node.prototype.addEventListener;"click"===a?e.call(c,a,b.hijacked||(b.hijacked=function(a){a.propagationStopped||b(a)}),d):e.call(c,a,b,d)}),"function"==typeof c.onclick&&(f=c.onclick,c.addEventListener("click",function(a){f(a)},!1),c.onclick=null)}}var b=navigator.userAgent.indexOf("Android")>0,c=/iP(ad|hone|od)/.test(navigator.userAgent),d=c&&/OS 4_\d(_\d)?/.test(navigator.userAgent),e=c&&/OS ([6-9]|\d{2})_\d/.test(navigator.userAgent),f=navigator.userAgent.indexOf("BB10")>0;a.prototype.needsClick=function(a){switch(a.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(a.disabled)return!0;break;case"input":if(c&&"file"===a.type||a.disabled)return!0;break;case"label":case"video":return!0}return/\bneedsclick\b/.test(a.className)},a.prototype.needsFocus=function(a){switch(a.nodeName.toLowerCase()){case"textarea":return!0;case"select":return!b;case"input":switch(a.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return!1}return!a.disabled&&!a.readOnly;default:return/\bneedsfocus\b/.test(a.className)}},a.prototype.sendClick=function(a,b){var c,d;document.activeElement&&document.activeElement!==a&&document.activeElement.blur(),d=b.changedTouches[0],c=document.createEvent("MouseEvents"),c.initMouseEvent(this.determineEventType(a),!0,!0,window,1,d.screenX,d.screenY,d.clientX,d.clientY,!1,!1,!1,!1,0,null),c.forwardedTouchEvent=!0,a.dispatchEvent(c)},a.prototype.determineEventType=function(a){return b&&"select"===a.tagName.toLowerCase()?"mousedown":"click"},a.prototype.focus=function(a){var b;c&&a.setSelectionRange&&0!==a.type.indexOf("date")&&"time"!==a.type?(b=a.value.length,a.setSelectionRange(b,b)):a.focus()},a.prototype.updateScrollParent=function(a){var b,c;if(b=a.fastClickScrollParent,!b||!b.contains(a)){c=a;do{if(c.scrollHeight>c.offsetHeight){b=c,a.fastClickScrollParent=c;break}c=c.parentElement}while(c)}b&&(b.fastClickLastScrollTop=b.scrollTop)},a.prototype.getTargetElementFromEventTarget=function(a){return a.nodeType===Node.TEXT_NODE?a.parentNode:a},a.prototype.onTouchStart=function(a){var b,e,f;if(a.targetTouches.length>1)return!0;if(b=this.getTargetElementFromEventTarget(a.target),e=a.targetTouches[0],c){if(f=window.getSelection(),f.rangeCount&&!f.isCollapsed)return!0;if(!d){if(e.identifier&&e.identifier===this.lastTouchIdentifier)return a.preventDefault(),!1;this.lastTouchIdentifier=e.identifier,this.updateScrollParent(b)}}return this.trackingClick=!0,this.trackingClickStart=a.timeStamp,this.targetElement=b,this.touchStartX=e.pageX,this.touchStartY=e.pageY,a.timeStamp-this.lastClickTime<this.tapDelay&&a.preventDefault(),!0},a.prototype.touchHasMoved=function(a){var b=a.changedTouches[0],c=this.touchBoundary;return Math.abs(b.pageX-this.touchStartX)>c||Math.abs(b.pageY-this.touchStartY)>c?!0:!1},a.prototype.onTouchMove=function(a){return this.trackingClick?((this.targetElement!==this.getTargetElementFromEventTarget(a.target)||this.touchHasMoved(a))&&(this.trackingClick=!1,this.targetElement=null),!0):!0},a.prototype.findControl=function(a){return void 0!==a.control?a.control:a.htmlFor?document.getElementById(a.htmlFor):a.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")},a.prototype.onTouchEnd=function(a){var f,g,h,i,j,k=this.targetElement;if(!this.trackingClick)return!0;if(a.timeStamp-this.lastClickTime<this.tapDelay)return this.cancelNextClick=!0,!0;if(this.cancelNextClick=!1,this.lastClickTime=a.timeStamp,g=this.trackingClickStart,this.trackingClick=!1,this.trackingClickStart=0,e&&(j=a.changedTouches[0],k=document.elementFromPoint(j.pageX-window.pageXOffset,j.pageY-window.pageYOffset)||k,k.fastClickScrollParent=this.targetElement.fastClickScrollParent),h=k.tagName.toLowerCase(),"label"===h){if(f=this.findControl(k)){if(this.focus(k),b)return!1;k=f}}else if(this.needsFocus(k))return a.timeStamp-g>100||c&&window.top!==window&&"input"===h?(this.targetElement=null,!1):(this.focus(k),this.sendClick(k,a),c&&"select"===h||(this.targetElement=null,a.preventDefault()),!1);return c&&!d&&(i=k.fastClickScrollParent,i&&i.fastClickLastScrollTop!==i.scrollTop)?!0:(this.needsClick(k)||(a.preventDefault(),this.sendClick(k,a)),!1)},a.prototype.onTouchCancel=function(){this.trackingClick=!1,this.targetElement=null},a.prototype.onMouse=function(a){return this.targetElement?a.forwardedTouchEvent?!0:a.cancelable&&(!this.needsClick(this.targetElement)||this.cancelNextClick)?(a.stopImmediatePropagation?a.stopImmediatePropagation():a.propagationStopped=!0,a.stopPropagation(),a.preventDefault(),!1):!0:!0},a.prototype.onClick=function(a){var b;return this.trackingClick?(this.targetElement=null,this.trackingClick=!1,!0):"submit"===a.target.type&&0===a.detail?!0:(b=this.onMouse(a),b||(this.targetElement=null),b)},a.prototype.destroy=function(){var a=this.layer;b&&(a.removeEventListener("mouseover",this.onMouse,!0),a.removeEventListener("mousedown",this.onMouse,!0),a.removeEventListener("mouseup",this.onMouse,!0)),a.removeEventListener("click",this.onClick,!0),a.removeEventListener("touchstart",this.onTouchStart,!1),a.removeEventListener("touchmove",this.onTouchMove,!1),a.removeEventListener("touchend",this.onTouchEnd,!1),a.removeEventListener("touchcancel",this.onTouchCancel,!1)},a.notNeeded=function(a){var c,d,e;if("undefined"==typeof window.ontouchstart)return!0;if(d=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1]){if(!b)return!0;if(c=document.querySelector("meta[name=viewport]")){if(-1!==c.content.indexOf("user-scalable=no"))return!0;if(d>31&&document.documentElement.scrollWidth<=window.outerWidth)return!0}}if(f&&(e=navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/),e[1]>=10&&e[2]>=3&&(c=document.querySelector("meta[name=viewport]")))){if(-1!==c.content.indexOf("user-scalable=no"))return!0;if(document.documentElement.scrollWidth<=window.outerWidth)return!0}return"none"===a.style.msTouchAction?!0:!1},a.attach=function(b,c){return new a(b,c)},"function"==typeof define&&"object"==typeof define.amd&&define.amd?define(function(){return a}):"undefined"!=typeof module&&module.exports?(module.exports=a.attach,module.exports.FastClick=a):window.FastClick=a}(),!function(a){"object"==typeof module&&"object"==typeof module.exports?module.exports=a(window.Velocity?window.jQuery:require("jquery")):"function"==typeof define&&define.amd?window.Velocity?define(a):define(["jquery"],a):a(window.jQuery)}(function(a){return function(b,c,d,e){function f(a){for(var b=-1,c=a?a.length:0,d=[];++b<c;){var e=a[b];e&&d.push(e)}return d}function g(a){return q.isNode(a)?[a]:a}function h(a){var b=n.data(a,"velocity");return null===b?e:b}function i(a){return function(b){return Math.round(b*a)*(1/a)}}function j(a,b,d,e){function f(a,b){return 1-3*b+3*a}function g(a,b){return 3*b-6*a}function h(a){return 3*a}function i(a,b,c){return((f(b,c)*a+g(b,c))*a+h(b))*a}function j(a,b,c){return 3*f(b,c)*a*a+2*g(b,c)*a+h(b)}function k(b,c){for(var e=0;p>e;++e){var f=j(c,a,d);if(0===f)return c;var g=i(c,a,d)-b;c-=g/f}return c}function l(){for(var b=0;t>b;++b)x[b]=i(b*u,a,d)}function m(b,c,e){var f,g,h=0;do g=c+(e-c)/2,f=i(g,a,d)-b,f>0?e=g:c=g;while(Math.abs(f)>r&&++h<s);return g}function n(b){for(var c=0,e=1,f=t-1;e!=f&&x[e]<=b;++e)c+=u;--e;var g=(b-x[e])/(x[e+1]-x[e]),h=c+g*u,i=j(h,a,d);return i>=q?k(b,h):0==i?h:m(b,c,c+u)}function o(){y=!0,(a!=b||d!=e)&&l()}var p=4,q=.001,r=1e-7,s=10,t=11,u=1/(t-1),v="Float32Array"in c;if(4!==arguments.length)return!1;for(var w=0;4>w;++w)if("number"!=typeof arguments[w]||isNaN(arguments[w])||!isFinite(arguments[w]))return!1;a=Math.min(a,1),d=Math.min(d,1),a=Math.max(a,0),d=Math.max(d,0);var x=v?new Float32Array(t):new Array(t),y=!1,z=function(c){return y||o(),a===b&&d===e?c:0===c?0:1===c?1:i(n(c),b,e)};z.getControlPoints=function(){return[{x:a,y:b},{x:d,y:e}]};var A="generateBezier("+[a,b,d,e]+")";return z.toString=function(){return A},z}function k(a,b){var c=a;return q.isString(a)?t.Easings[a]||(c=!1):c=q.isArray(a)&&1===a.length?i.apply(null,a):q.isArray(a)&&2===a.length?u.apply(null,a.concat([b])):q.isArray(a)&&4===a.length?j.apply(null,a):!1,c===!1&&(c=t.Easings[t.defaults.easing]?t.defaults.easing:s),c}function l(a){if(a)for(var b=(new Date).getTime(),c=0,d=t.State.calls.length;d>c;c++)if(t.State.calls[c]){var f=t.State.calls[c],g=f[0],i=f[2],j=f[3];j||(j=t.State.calls[c][3]=b-16);for(var k=Math.min((b-j)/i.duration,1),n=0,p=g.length;p>n;n++){var r=g[n],s=r.element;if(h(s)){var u=!1;i.display!==e&&null!==i.display&&"none"!==i.display&&("flex"===i.display&&v.setPropertyValue(s,"display",(o?"-ms-":"-webkit-")+i.display),v.setPropertyValue(s,"display",i.display)),i.visibility&&"hidden"!==i.visibility&&v.setPropertyValue(s,"visibility",i.visibility);for(var w in r)if("element"!==w){var y,z=r[w],A=q.isString(z.easing)?t.Easings[z.easing]:z.easing;if(y=1===k?z.endValue:z.startValue+(z.endValue-z.startValue)*A(k),z.currentValue=y,v.Hooks.registered[w]){var B=v.Hooks.getRoot(w),C=h(s).rootPropertyValueCache[B];C&&(z.rootPropertyValue=C)}var D=v.setPropertyValue(s,w,z.currentValue+(0===parseFloat(y)?"":z.unitType),z.rootPropertyValue,z.scrollData);v.Hooks.registered[w]&&(h(s).rootPropertyValueCache[B]=v.Normalizations.registered[B]?v.Normalizations.registered[B]("extract",null,D[1]):D[1]),"transform"===D[0]&&(u=!0)}i.mobileHA&&h(s).transformCache.translate3d===e&&(h(s).transformCache.translate3d="(0px, 0px, 0px)",u=!0),u&&v.flushTransformCache(s)}}i.display!==e&&"none"!==i.display&&(t.State.calls[c][2].display=!1),i.visibility&&"hidden"!==i.visibility&&(t.State.calls[c][2].visibility=!1),i.progress&&i.progress.call(f[1],f[1],k,Math.max(0,j+i.duration-b),j),1===k&&m(c)
  }t.State.isTicking&&x(l)}function m(a,b){if(!t.State.calls[a])return!1;for(var c=t.State.calls[a][0],d=t.State.calls[a][1],f=t.State.calls[a][2],g=t.State.calls[a][4],i=!1,j=0,k=c.length;k>j;j++){var l=c[j].element;if(b||f.loop||("none"===f.display&&v.setPropertyValue(l,"display",f.display),"hidden"===f.visibility&&v.setPropertyValue(l,"visibility",f.visibility)),(n.queue(l)[1]===e||!/\.velocityQueueEntryFlag/i.test(n.queue(l)[1]))&&h(l)){h(l).isAnimating=!1,h(l).rootPropertyValueCache={};var m=!1;n.each(v.Lists.transforms3D,function(a,b){var c=/^scale/.test(b)?1:0,d=h(l).transformCache[b];h(l).transformCache[b]!==e&&new RegExp("^\\("+c+"[^.]").test(d)&&(m=!0,delete h(l).transformCache[b])}),f.mobileHA&&(m=!0,delete h(l).transformCache.translate3d),m&&v.flushTransformCache(l),v.Values.removeClass(l,"velocity-animating")}if(!b&&f.complete&&!f.loop&&j===k-1)try{f.complete.call(d,d)}catch(o){setTimeout(function(){throw o},1)}g&&f.loop!==!0&&g(d),f.loop!==!0||b||t(l,"reverse",{loop:!0,delay:f.delay}),f.queue!==!1&&n.dequeue(l,f.queue)}t.State.calls[a]=!1;for(var p=0,q=t.State.calls.length;q>p;p++)if(t.State.calls[p]!==!1){i=!0;break}i===!1&&(t.State.isTicking=!1,delete t.State.calls,t.State.calls=[])}var n,o=function(){if(d.documentMode)return d.documentMode;for(var a=7;a>4;a--){var b=d.createElement("div");if(b.innerHTML="<!--[if IE "+a+"]><span></span><![endif]-->",b.getElementsByTagName("span").length)return b=null,a}return e}(),p=function(){var a=0;return c.webkitRequestAnimationFrame||c.mozRequestAnimationFrame||function(b){var c,d=(new Date).getTime();return c=Math.max(0,16-(d-a)),a=d+c,setTimeout(function(){b(d+c)},c)}}(),q={isString:function(a){return"string"==typeof a},isArray:Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)},isFunction:function(a){return"[object Function]"===Object.prototype.toString.call(a)},isNode:function(a){return a&&a.nodeType},isNodeList:function(a){return"object"==typeof a&&/^\[object (HTMLCollection|NodeList|Object)\]$/.test(Object.prototype.toString.call(a))&&a.length!==e&&(0===a.length||"object"==typeof a[0]&&a[0].nodeType>0)},isWrapped:function(a){return a&&(a.jquery||c.Zepto&&c.Zepto.zepto.isZ(a))},isSVG:function(a){return c.SVGElement&&a instanceof SVGElement},isEmptyObject:function(a){var b;for(b in a)return!1;return!0}};if(a&&a.fn!==e?n=a:c.Velocity&&c.Velocity.Utilities&&(n=c.Velocity.Utilities),!n)throw new Error("Velocity: Either jQuery or Velocity's jQuery shim must first be loaded.");if(b.Velocity!==e&&b.Velocity.Utilities==e)throw new Error("Velocity: Namespace is occupied.");if(7>=o){if(a)return void(a.fn.velocity=a.fn.animate);throw new Error("Velocity: In IE<=7, Velocity falls back to jQuery, which must first be loaded.")}if(8===o&&!a)throw new Error("Velocity: In IE8, Velocity requires jQuery proper to be loaded; Velocity's jQuery shim does not work with IE8.");var r=400,s="swing",t={State:{isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),isAndroid:/Android/i.test(navigator.userAgent),isGingerbread:/Android 2\.3\.[3-7]/i.test(navigator.userAgent),isChrome:c.chrome,isFirefox:/Firefox/i.test(navigator.userAgent),prefixElement:d.createElement("div"),prefixMatches:{},scrollAnchor:null,scrollPropertyLeft:null,scrollPropertyTop:null,isTicking:!1,calls:[]},CSS:{},Utilities:n,Sequences:{},Easings:{},Promise:c.Promise,defaults:{queue:"",duration:r,easing:s,begin:null,complete:null,progress:null,display:e,loop:!1,delay:!1,mobileHA:!0,_cacheValues:!0},init:function(a){n.data(a,"velocity",{isSVG:q.isSVG(a),isAnimating:!1,computedStyle:null,tweensContainer:null,rootPropertyValueCache:{},transformCache:{}})},animate:null,hook:null,mock:!1,version:{major:0,minor:11,patch:9},debug:!1};c.pageYOffset!==e?(t.State.scrollAnchor=c,t.State.scrollPropertyLeft="pageXOffset",t.State.scrollPropertyTop="pageYOffset"):(t.State.scrollAnchor=d.documentElement||d.body.parentNode||d.body,t.State.scrollPropertyLeft="scrollLeft",t.State.scrollPropertyTop="scrollTop");var u=function(){function a(a){return-a.tension*a.x-a.friction*a.v}function b(b,c,d){var e={x:b.x+d.dx*c,v:b.v+d.dv*c,tension:b.tension,friction:b.friction};return{dx:e.v,dv:a(e)}}function c(c,d){var e={dx:c.v,dv:a(c)},f=b(c,.5*d,e),g=b(c,.5*d,f),h=b(c,d,g),i=1/6*(e.dx+2*(f.dx+g.dx)+h.dx),j=1/6*(e.dv+2*(f.dv+g.dv)+h.dv);return c.x=c.x+i*d,c.v=c.v+j*d,c}return function d(a,b,e){var f,g,h,i={x:-1,v:0,tension:null,friction:null},j=[0],k=0,l=1e-4,m=.016;for(a=parseFloat(a)||500,b=parseFloat(b)||20,e=e||null,i.tension=a,i.friction=b,f=null!==e,f?(k=d(a,b),g=k/e*m):g=m;h=c(h||i,g),j.push(1+h.x),k+=16,Math.abs(h.x)>l&&Math.abs(h.v)>l;);return f?function(a){return j[a*(j.length-1)|0]}:k}}();t.Easings={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},spring:function(a){return 1-Math.cos(4.5*a*Math.PI)*Math.exp(6*-a)}},n.each([["ease",[.25,.1,.25,1]],["ease-in",[.42,0,1,1]],["ease-out",[0,0,.58,1]],["ease-in-out",[.42,0,.58,1]],["easeInSine",[.47,0,.745,.715]],["easeOutSine",[.39,.575,.565,1]],["easeInOutSine",[.445,.05,.55,.95]],["easeInQuad",[.55,.085,.68,.53]],["easeOutQuad",[.25,.46,.45,.94]],["easeInOutQuad",[.455,.03,.515,.955]],["easeInCubic",[.55,.055,.675,.19]],["easeOutCubic",[.215,.61,.355,1]],["easeInOutCubic",[.645,.045,.355,1]],["easeInQuart",[.895,.03,.685,.22]],["easeOutQuart",[.165,.84,.44,1]],["easeInOutQuart",[.77,0,.175,1]],["easeInQuint",[.755,.05,.855,.06]],["easeOutQuint",[.23,1,.32,1]],["easeInOutQuint",[.86,0,.07,1]],["easeInExpo",[.95,.05,.795,.035]],["easeOutExpo",[.19,1,.22,1]],["easeInOutExpo",[1,0,0,1]],["easeInCirc",[.6,.04,.98,.335]],["easeOutCirc",[.075,.82,.165,1]],["easeInOutCirc",[.785,.135,.15,.86]]],function(a,b){t.Easings[b[0]]=j.apply(null,b[1])});var v=t.CSS={RegEx:{isHex:/^#([A-f\d]{3}){1,2}$/i,valueUnwrap:/^[A-z]+\((.*)\)$/i,wrappedValueAlreadyExtracted:/[0-9.]+ [0-9.]+ [0-9.]+( [0-9.]+)?/,valueSplit:/([A-z]+\(.+\))|(([A-z0-9#-.]+?)(?=\s|$))/gi},Lists:{colors:["fill","stroke","stopColor","color","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","outlineColor"],transformsBase:["translateX","translateY","scale","scaleX","scaleY","skewX","skewY","rotateZ"],transforms3D:["transformPerspective","translateZ","scaleZ","rotateX","rotateY"]},Hooks:{templates:{textShadow:["Color X Y Blur","black 0px 0px 0px"],boxShadow:["Color X Y Blur Spread","black 0px 0px 0px 0px"],clip:["Top Right Bottom Left","0px 0px 0px 0px"],backgroundPosition:["X Y","0% 0%"],transformOrigin:["X Y Z","50% 50% 0px"],perspectiveOrigin:["X Y","50% 50%"]},registered:{},register:function(){for(var a=0;a<v.Lists.colors.length;a++)v.Hooks.templates[v.Lists.colors[a]]=["Red Green Blue Alpha","255 255 255 1"];var b,c,d;if(o)for(b in v.Hooks.templates){c=v.Hooks.templates[b],d=c[0].split(" ");var e=c[1].match(v.RegEx.valueSplit);"Color"===d[0]&&(d.push(d.shift()),e.push(e.shift()),v.Hooks.templates[b]=[d.join(" "),e.join(" ")])}for(b in v.Hooks.templates){c=v.Hooks.templates[b],d=c[0].split(" ");for(var a in d){var f=b+d[a],g=a;v.Hooks.registered[f]=[b,g]}}},getRoot:function(a){var b=v.Hooks.registered[a];return b?b[0]:a},cleanRootPropertyValue:function(a,b){return v.RegEx.valueUnwrap.test(b)&&(b=b.match(v.Hooks.RegEx.valueUnwrap)[1]),v.Values.isCSSNullValue(b)&&(b=v.Hooks.templates[a][1]),b},extractValue:function(a,b){var c=v.Hooks.registered[a];if(c){var d=c[0],e=c[1];return b=v.Hooks.cleanRootPropertyValue(d,b),b.toString().match(v.RegEx.valueSplit)[e]}return b},injectValue:function(a,b,c){var d=v.Hooks.registered[a];if(d){var e,f,g=d[0],h=d[1];return c=v.Hooks.cleanRootPropertyValue(g,c),e=c.toString().match(v.RegEx.valueSplit),e[h]=b,f=e.join(" ")}return c}},Normalizations:{registered:{clip:function(a,b,c){switch(a){case"name":return"clip";case"extract":var d;return v.RegEx.wrappedValueAlreadyExtracted.test(c)?d=c:(d=c.toString().match(v.RegEx.valueUnwrap),d=d?d[1].replace(/,(\s+)?/g," "):c),d;case"inject":return"rect("+c+")"}},opacity:function(a,b,c){if(8>=o)switch(a){case"name":return"filter";case"extract":var d=c.toString().match(/alpha\(opacity=(.*)\)/i);return c=d?d[1]/100:1;case"inject":return b.style.zoom=1,parseFloat(c)>=1?"":"alpha(opacity="+parseInt(100*parseFloat(c),10)+")"}else switch(a){case"name":return"opacity";case"extract":return c;case"inject":return c}}},register:function(){9>=o||t.State.isGingerbread||(v.Lists.transformsBase=v.Lists.transformsBase.concat(v.Lists.transforms3D));for(var a=0;a<v.Lists.transformsBase.length;a++)!function(){var b=v.Lists.transformsBase[a];v.Normalizations.registered[b]=function(a,c,d){switch(a){case"name":return"transform";case"extract":return h(c)===e||h(c).transformCache[b]===e?/^scale/i.test(b)?1:0:h(c).transformCache[b].replace(/[()]/g,"");case"inject":var f=!1;switch(b.substr(0,b.length-1)){case"translate":f=!/(%|px|em|rem|vw|vh|\d)$/i.test(d);break;case"scal":case"scale":t.State.isAndroid&&h(c).transformCache[b]===e&&1>d&&(d=1),f=!/(\d)$/i.test(d);break;case"skew":f=!/(deg|\d)$/i.test(d);break;case"rotate":f=!/(deg|\d)$/i.test(d)}return f||(h(c).transformCache[b]="("+d+")"),h(c).transformCache[b]}}}();for(var a=0;a<v.Lists.colors.length;a++)!function(){var b=v.Lists.colors[a];v.Normalizations.registered[b]=function(a,c,d){switch(a){case"name":return b;case"extract":var f;if(v.RegEx.wrappedValueAlreadyExtracted.test(d))f=d;else{var g,h={black:"rgb(0, 0, 0)",blue:"rgb(0, 0, 255)",gray:"rgb(128, 128, 128)",green:"rgb(0, 128, 0)",red:"rgb(255, 0, 0)",white:"rgb(255, 255, 255)"};/^[A-z]+$/i.test(d)?g=h[d]!==e?h[d]:h.black:v.RegEx.isHex.test(d)?g="rgb("+v.Values.hexToRgb(d).join(" ")+")":/^rgba?\(/i.test(d)||(g=h.black),f=(g||d).toString().match(v.RegEx.valueUnwrap)[1].replace(/,(\s+)?/g," ")}return 8>=o||3!==f.split(" ").length||(f+=" 1"),f;case"inject":return 8>=o?4===d.split(" ").length&&(d=d.split(/\s+/).slice(0,3).join(" ")):3===d.split(" ").length&&(d+=" 1"),(8>=o?"rgb":"rgba")+"("+d.replace(/\s+/g,",").replace(/\.(\d)+(?=,)/g,"")+")"}}}()}},Names:{camelCase:function(a){return a.replace(/-(\w)/g,function(a,b){return b.toUpperCase()})},SVGAttribute:function(a){var b="width|height|x|y|cx|cy|r|rx|ry|x1|x2|y1|y2";return(o||t.State.isAndroid&&!t.State.isChrome)&&(b+="|transform"),new RegExp("^("+b+")$","i").test(a)},prefixCheck:function(a){if(t.State.prefixMatches[a])return[t.State.prefixMatches[a],!0];for(var b=["","Webkit","Moz","ms","O"],c=0,d=b.length;d>c;c++){var e;if(e=0===c?a:b[c]+a.replace(/^\w/,function(a){return a.toUpperCase()}),q.isString(t.State.prefixElement.style[e]))return t.State.prefixMatches[a]=e,[e,!0]}return[a,!1]}},Values:{hexToRgb:function(a){var b,c=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,d=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i;return a=a.replace(c,function(a,b,c,d){return b+b+c+c+d+d}),b=d.exec(a),b?[parseInt(b[1],16),parseInt(b[2],16),parseInt(b[3],16)]:[0,0,0]},isCSSNullValue:function(a){return 0==a||/^(none|auto|transparent|(rgba\(0, ?0, ?0, ?0\)))$/i.test(a)},getUnitType:function(a){return/^(rotate|skew)/i.test(a)?"deg":/(^(scale|scaleX|scaleY|scaleZ|alpha|flexGrow|flexHeight|zIndex|fontWeight)$)|((opacity|red|green|blue|alpha)$)/i.test(a)?"":"px"},getDisplayType:function(a){var b=a.tagName.toString().toLowerCase();return/^(b|big|i|small|tt|abbr|acronym|cite|code|dfn|em|kbd|strong|samp|var|a|bdo|br|img|map|object|q|script|span|sub|sup|button|input|label|select|textarea)$/i.test(b)?"inline":/^(li)$/i.test(b)?"list-item":/^(tr)$/i.test(b)?"table-row":"block"},addClass:function(a,b){a.classList?a.classList.add(b):a.className+=(a.className.length?" ":"")+b},removeClass:function(a,b){a.classList?a.classList.remove(b):a.className=a.className.toString().replace(new RegExp("(^|\\s)"+b.split(" ").join("|")+"(\\s|$)","gi")," ")}},getPropertyValue:function(a,b,d,f){function g(a,b){function d(){j&&v.setPropertyValue(a,"display","none")}var i=0;if(8>=o)i=n.css(a,b);else{var j=!1;if(/^(width|height)$/.test(b)&&0===v.getPropertyValue(a,"display")&&(j=!0,v.setPropertyValue(a,"display",v.Values.getDisplayType(a))),!f){if("height"===b&&"border-box"!==v.getPropertyValue(a,"boxSizing").toString().toLowerCase()){var k=a.offsetHeight-(parseFloat(v.getPropertyValue(a,"borderTopWidth"))||0)-(parseFloat(v.getPropertyValue(a,"borderBottomWidth"))||0)-(parseFloat(v.getPropertyValue(a,"paddingTop"))||0)-(parseFloat(v.getPropertyValue(a,"paddingBottom"))||0);return d(),k}if("width"===b&&"border-box"!==v.getPropertyValue(a,"boxSizing").toString().toLowerCase()){var l=a.offsetWidth-(parseFloat(v.getPropertyValue(a,"borderLeftWidth"))||0)-(parseFloat(v.getPropertyValue(a,"borderRightWidth"))||0)-(parseFloat(v.getPropertyValue(a,"paddingLeft"))||0)-(parseFloat(v.getPropertyValue(a,"paddingRight"))||0);return d(),l}}var m;m=h(a)===e?c.getComputedStyle(a,null):h(a).computedStyle?h(a).computedStyle:h(a).computedStyle=c.getComputedStyle(a,null),(o||t.State.isFirefox)&&"borderColor"===b&&(b="borderTopColor"),i=9===o&&"filter"===b?m.getPropertyValue(b):m[b],(""===i||null===i)&&(i=a.style[b]),d()}if("auto"===i&&/^(top|right|bottom|left)$/i.test(b)){var p=g(a,"position");("fixed"===p||"absolute"===p&&/top|left/i.test(b))&&(i=n(a).position()[b]+"px")}return i}var i;if(v.Hooks.registered[b]){var j=b,k=v.Hooks.getRoot(j);d===e&&(d=v.getPropertyValue(a,v.Names.prefixCheck(k)[0])),v.Normalizations.registered[k]&&(d=v.Normalizations.registered[k]("extract",a,d)),i=v.Hooks.extractValue(j,d)}else if(v.Normalizations.registered[b]){var l,m;l=v.Normalizations.registered[b]("name",a),"transform"!==l&&(m=g(a,v.Names.prefixCheck(l)[0]),v.Values.isCSSNullValue(m)&&v.Hooks.templates[b]&&(m=v.Hooks.templates[b][1])),i=v.Normalizations.registered[b]("extract",a,m)}return/^[\d-]/.test(i)||(i=h(a)&&h(a).isSVG&&v.Names.SVGAttribute(b)?/^(height|width)$/i.test(b)?a.getBBox()[b]:a.getAttribute(b):g(a,v.Names.prefixCheck(b)[0])),v.Values.isCSSNullValue(i)&&(i=0),t.debug>=2&&console.log("Get "+b+": "+i),i},setPropertyValue:function(a,b,d,e,f){var g=b;if("scroll"===b)f.container?f.container["scroll"+f.direction]=d:"Left"===f.direction?c.scrollTo(d,f.alternateValue):c.scrollTo(f.alternateValue,d);else if(v.Normalizations.registered[b]&&"transform"===v.Normalizations.registered[b]("name",a))v.Normalizations.registered[b]("inject",a,d),g="transform",d=h(a).transformCache[b];else{if(v.Hooks.registered[b]){var i=b,j=v.Hooks.getRoot(b);e=e||v.getPropertyValue(a,j),d=v.Hooks.injectValue(i,d,e),b=j}if(v.Normalizations.registered[b]&&(d=v.Normalizations.registered[b]("inject",a,d),b=v.Normalizations.registered[b]("name",a)),g=v.Names.prefixCheck(b)[0],8>=o)try{a.style[g]=d}catch(k){t.debug&&console.log("Browser does not support ["+d+"] for ["+g+"]")}else h(a)&&h(a).isSVG&&v.Names.SVGAttribute(b)?a.setAttribute(b,d):a.style[g]=d;t.debug>=2&&console.log("Set "+b+" ("+g+"): "+d)}return[g,d]},flushTransformCache:function(a){function b(b){return parseFloat(v.getPropertyValue(a,b))}var c="";if((o||t.State.isAndroid&&!t.State.isChrome)&&h(a).isSVG){var d={translate:[b("translateX"),b("translateY")],skewX:[b("skewX")],skewY:[b("skewY")],scale:1!==b("scale")?[b("scale"),b("scale")]:[b("scaleX"),b("scaleY")],rotate:[b("rotateZ"),0,0]};n.each(h(a).transformCache,function(a){/^translate/i.test(a)?a="translate":/^scale/i.test(a)?a="scale":/^rotate/i.test(a)&&(a="rotate"),d[a]&&(c+=a+"("+d[a].join(" ")+") ",delete d[a])})}else{var e,f;n.each(h(a).transformCache,function(b){return e=h(a).transformCache[b],"transformPerspective"===b?(f=e,!0):(9===o&&"rotateZ"===b&&(b="rotate"),void(c+=b+e+" "))}),f&&(c="perspective"+f+" "+c)}v.setPropertyValue(a,"transform",c)}};v.Hooks.register(),v.Normalizations.register(),t.hook=function(a,b,c){var d=e;return q.isWrapped(a)&&(a=[].slice.call(a)),n.each(g(a),function(a,f){if(h(f)===e&&t.init(f),c===e)d===e&&(d=t.CSS.getPropertyValue(f,b));else{var g=t.CSS.setPropertyValue(f,b,c);"transform"===g[0]&&t.CSS.flushTransformCache(f),d=g}}),d};var w=function(){function a(){return i?B.promise||null:j}function b(){function a(){function a(a,b){var c=e,d=e,f=e;return q.isArray(a)?(c=a[0],!q.isArray(a[1])&&/^[\d-]/.test(a[1])||q.isFunction(a[1])||v.RegEx.isHex.test(a[1])?f=a[1]:(q.isString(a[1])&&!v.RegEx.isHex.test(a[1])||q.isArray(a[1]))&&(d=b?a[1]:k(a[1],i.duration),a[2]!==e&&(f=a[2]))):c=a,b||(d=d||i.easing),q.isFunction(c)&&(c=c.call(g,y,x)),q.isFunction(f)&&(f=f.call(g,y,x)),[c||0,d,f]}function m(a,b){var c,d;return d=(b||0).toString().toLowerCase().replace(/[%A-z]+$/,function(a){return c=a,""}),c||(c=v.Values.getUnitType(a)),[d,c]}function o(){var a={myParent:g.parentNode||d.body,position:v.getPropertyValue(g,"position"),fontSize:v.getPropertyValue(g,"fontSize")},b=a.position===I.lastPosition&&a.myParent===I.lastParent,e=a.fontSize===I.lastFontSize;I.lastParent=a.myParent,I.lastPosition=a.position,I.lastFontSize=a.fontSize;var f=100,i={};if(e&&b)i.emToPx=I.lastEmToPx,i.percentToPxWidth=I.lastPercentToPxWidth,i.percentToPxHeight=I.lastPercentToPxHeight;else{var j=h(g).isSVG?d.createElementNS("http://www.w3.org/2000/svg","rect"):d.createElement("div");t.init(j),a.myParent.appendChild(j),n.each(["overflow","overflowX","overflowY"],function(a,b){t.CSS.setPropertyValue(j,b,"hidden")}),t.CSS.setPropertyValue(j,"position",a.position),t.CSS.setPropertyValue(j,"fontSize",a.fontSize),t.CSS.setPropertyValue(j,"boxSizing","content-box"),n.each(["minWidth","maxWidth","width","minHeight","maxHeight","height"],function(a,b){t.CSS.setPropertyValue(j,b,f+"%")}),t.CSS.setPropertyValue(j,"paddingLeft",f+"em"),i.percentToPxWidth=I.lastPercentToPxWidth=(parseFloat(v.getPropertyValue(j,"width",null,!0))||1)/f,i.percentToPxHeight=I.lastPercentToPxHeight=(parseFloat(v.getPropertyValue(j,"height",null,!0))||1)/f,i.emToPx=I.lastEmToPx=(parseFloat(v.getPropertyValue(j,"paddingLeft"))||1)/f,a.myParent.removeChild(j)}return null===I.remToPx&&(I.remToPx=parseFloat(v.getPropertyValue(d.body,"fontSize"))||16),null===I.vwToPx&&(I.vwToPx=parseFloat(c.innerWidth)/100,I.vhToPx=parseFloat(c.innerHeight)/100),i.remToPx=I.remToPx,i.vwToPx=I.vwToPx,i.vhToPx=I.vhToPx,t.debug>=1&&console.log("Unit ratios: "+JSON.stringify(i),g),i}if(i.begin&&0===y)try{i.begin.call(p,p)}catch(r){setTimeout(function(){throw r},1)}if("scroll"===C){var w,z,A,D=/^x$/i.test(i.axis)?"Left":"Top",E=parseFloat(i.offset)||0;i.container?q.isWrapped(i.container)||q.isNode(i.container)?(i.container=i.container[0]||i.container,w=i.container["scroll"+D],A=w+n(g).position()[D.toLowerCase()]+E):i.container=null:(w=t.State.scrollAnchor[t.State["scrollProperty"+D]],z=t.State.scrollAnchor[t.State["scrollProperty"+("Left"===D?"Top":"Left")]],A=n(g).offset()[D.toLowerCase()]+E),j={scroll:{rootPropertyValue:!1,startValue:w,currentValue:w,endValue:A,unitType:"",easing:i.easing,scrollData:{container:i.container,direction:D,alternateValue:z}},element:g},t.debug&&console.log("tweensContainer (scroll): ",j.scroll,g)}else if("reverse"===C){if(!h(g).tweensContainer)return void n.dequeue(g,i.queue);"none"===h(g).opts.display&&(h(g).opts.display="auto"),"hidden"===h(g).opts.visibility&&(h(g).opts.visibility="visible"),h(g).opts.loop=!1,h(g).opts.begin=null,h(g).opts.complete=null,u.easing||delete i.easing,u.duration||delete i.duration,i=n.extend({},h(g).opts,i);var F=n.extend(!0,{},h(g).tweensContainer);for(var G in F)if("element"!==G){var H=F[G].startValue;F[G].startValue=F[G].currentValue=F[G].endValue,F[G].endValue=H,q.isEmptyObject(u)||(F[G].easing=i.easing),t.debug&&console.log("reverse tweensContainer ("+G+"): "+JSON.stringify(F[G]),g)}j=F}else if("start"===C){var F;h(g).tweensContainer&&h(g).isAnimating===!0&&(F=h(g).tweensContainer),n.each(s,function(b,c){if(RegExp("^"+v.Lists.colors.join("$|^")+"$").test(b)){var d=a(c,!0),f=d[0],g=d[1],h=d[2];if(v.RegEx.isHex.test(f)){for(var i=["Red","Green","Blue"],j=v.Values.hexToRgb(f),k=h?v.Values.hexToRgb(h):e,l=0;l<i.length;l++)s[b+i[l]]=[j[l],g,k?k[l]:k];delete s[b]}}});for(var K in s){var L=a(s[K]),M=L[0],N=L[1],O=L[2];K=v.Names.camelCase(K);var P=v.Hooks.getRoot(K),Q=!1;if(h(g).isSVG||v.Names.prefixCheck(P)[1]!==!1||v.Normalizations.registered[P]!==e){(i.display!==e&&null!==i.display&&"none"!==i.display||i.visibility&&"hidden"!==i.visibility)&&/opacity|filter/.test(K)&&!O&&0!==M&&(O=0),i._cacheValues&&F&&F[K]?(O===e&&(O=F[K].endValue+F[K].unitType),Q=h(g).rootPropertyValueCache[P]):v.Hooks.registered[K]?O===e?(Q=v.getPropertyValue(g,P),O=v.getPropertyValue(g,K,Q)):Q=v.Hooks.templates[P][1]:O===e&&(O=v.getPropertyValue(g,K));var R,S,T,U=!1;if(R=m(K,O),O=R[0],T=R[1],R=m(K,M),M=R[0].replace(/^([+-\/*])=/,function(a,b){return U=b,""}),S=R[1],O=parseFloat(O)||0,M=parseFloat(M)||0,"%"===S&&(/^(fontSize|lineHeight)$/.test(K)?(M/=100,S="em"):/^scale/.test(K)?(M/=100,S=""):/(Red|Green|Blue)$/i.test(K)&&(M=M/100*255,S="")),/[\/*]/.test(U))S=T;else if(T!==S&&0!==O)if(0===M)S=T;else{b=b||o();var V=/margin|padding|left|right|width|text|word|letter/i.test(K)||/X$/.test(K)||"x"===K?"x":"y";switch(T){case"%":O*="x"===V?b.percentToPxWidth:b.percentToPxHeight;break;case"px":break;default:O*=b[T+"ToPx"]}switch(S){case"%":O*=1/("x"===V?b.percentToPxWidth:b.percentToPxHeight);break;case"px":break;default:O*=1/b[S+"ToPx"]}}switch(U){case"+":M=O+M;break;case"-":M=O-M;break;case"*":M=O*M;break;case"/":M=O/M}j[K]={rootPropertyValue:Q,startValue:O,currentValue:O,endValue:M,unitType:S,easing:N},t.debug&&console.log("tweensContainer ("+K+"): "+JSON.stringify(j[K]),g)}else t.debug&&console.log("Skipping ["+P+"] due to a lack of browser support.")}j.element=g}j.element&&(v.Values.addClass(g,"velocity-animating"),J.push(j),""===i.queue&&(h(g).tweensContainer=j,h(g).opts=i),h(g).isAnimating=!0,y===x-1?(t.State.calls.length>1e4&&(t.State.calls=f(t.State.calls)),t.State.calls.push([J,p,i,null,B.resolver]),t.State.isTicking===!1&&(t.State.isTicking=!0,l())):y++)}var b,g=this,i=n.extend({},t.defaults,u),j={};if(h(g)===e&&t.init(g),parseFloat(i.delay)&&i.queue!==!1&&n.queue(g,i.queue,function(a){t.velocityQueueEntryFlag=!0,h(g).delayTimer={setTimeout:setTimeout(a,parseFloat(i.delay)),next:a}}),t.mock===!0)i.duration=1;else switch(i.duration.toString().toLowerCase()){case"fast":i.duration=200;break;case"normal":i.duration=r;break;case"slow":i.duration=600;break;default:i.duration=parseFloat(i.duration)||1}i.easing=k(i.easing,i.duration),i.begin&&!q.isFunction(i.begin)&&(i.begin=null),i.progress&&!q.isFunction(i.progress)&&(i.progress=null),i.complete&&!q.isFunction(i.complete)&&(i.complete=null),i.display!==e&&null!==i.display&&(i.display=i.display.toString().toLowerCase(),"auto"===i.display&&(i.display=t.CSS.Values.getDisplayType(g))),i.visibility&&(i.visibility=i.visibility.toString().toLowerCase()),i.mobileHA=i.mobileHA&&t.State.isMobile&&!t.State.isGingerbread,i.queue===!1?i.delay?setTimeout(a,i.delay):a():n.queue(g,i.queue,function(b,c){return c===!0?(B.promise&&B.resolver(p),!0):(t.velocityQueueEntryFlag=!0,void a(b))}),""!==i.queue&&"fx"!==i.queue||"inprogress"===n.queue(g)[0]||n.dequeue(g)}var i,j,o,p,s,u,w=arguments[0]&&(n.isPlainObject(arguments[0].properties)&&!arguments[0].properties.names||q.isString(arguments[0].properties));if(q.isWrapped(this)?(i=!1,o=0,p=this,j=this):(i=!0,o=1,p=w?arguments[0].elements:arguments[0]),p=q.isWrapped(p)?[].slice.call(p):p){w?(s=arguments[0].properties,u=arguments[0].options):(s=arguments[o],u=arguments[o+1]);var x=q.isArray(p)||q.isNodeList(p)?p.length:1,y=0;if("stop"!==s&&!n.isPlainObject(u)){var z=o+1;u={};for(var A=z;A<arguments.length;A++)!q.isArray(arguments[A])&&/^\d/.test(arguments[A])?u.duration=parseFloat(arguments[A]):q.isString(arguments[A])||q.isArray(arguments[A])?u.easing=arguments[A]:q.isFunction(arguments[A])&&(u.complete=arguments[A])}var B={promise:null,resolver:null,rejecter:null};i&&t.Promise&&(B.promise=new t.Promise(function(a,b){B.resolver=a,B.rejecter=b}));var C;switch(s){case"scroll":C="scroll";break;case"reverse":C="reverse";break;case"stop":n.each(g(p),function(a,b){h(b)&&h(b).delayTimer&&(clearTimeout(h(b).delayTimer.setTimeout),h(b).delayTimer.next&&h(b).delayTimer.next(),delete h(b).delayTimer)});var D=[];return n.each(t.State.calls,function(a,b){b&&n.each(g(b[1]),function(c,d){var f=q.isString(u)?u:"";return u!==e&&b[2].queue!==f?!0:void n.each(g(p),function(b,c){c===d&&(u!==e&&(n.each(n.queue(c,f),function(a,b){q.isFunction(b)&&b(null,!0)}),n.queue(c,f,[])),h(c)&&""===f&&n.each(h(c).tweensContainer,function(a,b){b.endValue=b.currentValue}),D.push(a))})})}),n.each(D,function(a,b){m(b,!0)}),B.promise&&B.resolver(p),a();default:if(!n.isPlainObject(s)||q.isEmptyObject(s)){if(q.isString(s)&&t.Sequences[s]){var E=n.extend({},u),F=E.duration,G=E.delay||0;return E.backwards===!0&&(p=(q.isWrapped(p)?[].slice.call(p):p).reverse()),n.each(g(p),function(a,b){parseFloat(E.stagger)?E.delay=G+parseFloat(E.stagger)*a:q.isFunction(E.stagger)&&(E.delay=G+E.stagger.call(b,a,x)),E.drag&&(E.duration=parseFloat(F)||(/^(callout|transition)/.test(s)?1e3:r),E.duration=Math.max(E.duration*(E.backwards?1-a/x:(a+1)/x),.75*E.duration,200)),t.Sequences[s].call(b,b,E||{},a,x,p,B.promise?B:e)}),a()}var H="Velocity: First argument ("+s+") was not a property map, a known action, or a registered sequence. Aborting.";return B.promise?B.rejecter(new Error(H)):console.log(H),a()}C="start"}var I={lastParent:null,lastPosition:null,lastFontSize:null,lastPercentToPxWidth:null,lastPercentToPxHeight:null,lastEmToPx:null,remToPx:null,vwToPx:null,vhToPx:null},J=[];n.each(g(p),function(a,c){q.isNode(c)&&b.call(c)});var K,E=n.extend({},t.defaults,u);if(E.loop=parseInt(E.loop),K=2*E.loop-1,E.loop)for(var L=0;K>L;L++){var M={delay:E.delay};L===K-1&&(M.display=E.display,M.visibility=E.visibility,M.complete=E.complete),t(p,"reverse",M)}return a()}};t=n.extend(w,t),t.animate=w;var x=c.requestAnimationFrame||p;t.State.isMobile||d.hidden===e||d.addEventListener("visibilitychange",function(){d.hidden?(x=function(a){return setTimeout(function(){a(!0)},16)},l()):x=c.requestAnimationFrame||p});var y;return a&&a.fn!==e?y=a:c.Zepto&&(y=c.Zepto),(y||c).Velocity=t,y&&(y.fn.velocity=w,y.fn.velocity.defaults=t.defaults),n.each(["Down","Up"],function(a,b){t.Sequences["slide"+b]=function(a,c,d,f,g,h){var i=n.extend({},c),j=i.begin,k=i.complete,l={height:"",marginTop:"",marginBottom:"",paddingTop:"",paddingBottom:""},m={};i.display===e&&(i.display="Down"===b?"inline"===t.CSS.Values.getDisplayType(a)?"inline-block":"block":"none"),i.begin=function(a){j&&j.call(a,a),m.overflowY=a.style.overflowY,a.style.overflowY="hidden";for(var c in l){m[c]=a.style[c];var d=t.CSS.getPropertyValue(a,c);l[c]="Down"===b?[d,0]:[0,d]}},i.complete=function(a){for(var b in m)a.style[b]=m[b];k&&k.call(a,a),h&&h.resolver(g||a)},t(a,l,i)}}),n.each(["In","Out"],function(a,b){t.Sequences["fade"+b]=function(a,c,d,f,g,h){var i=n.extend({},c),j={opacity:"In"===b?1:0},k=i.complete;i.complete=d!==f-1?i.begin=null:function(){k&&k.call(a,a),h&&h.resolver(g||a)},i.display===e&&(i.display="In"===b?"auto":"none"),t(this,j,i)}}),t}(a||window,window,document)}),function(a,b){"use strict";a.quicksearch={defaults:{delay:100,selector:null,stripeRows:null,loader:null,noResults:"",matchedResultsCount:0,bind:"keyup search input",removeDiacritics:!1,minValLength:0,onBefore:a.noop,onAfter:a.noop,onValTooSmall:a.noop,show:function(){a(this).show()},hide:function(){a(this).hide()},prepareQuery:function(a){return a.toLowerCase().split(" ")},testQuery:function(a,b){for(var c=0;c<a.length;c+=1)if(-1===b.indexOf(a[c]))return!1;return!0}},diacriticsRemovalMap:[{base:"A",letters:/[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g},{base:"AA",letters:/[\uA732]/g},{base:"AE",letters:/[\u00C6\u01FC\u01E2]/g},{base:"AO",letters:/[\uA734]/g},{base:"AU",letters:/[\uA736]/g},{base:"AV",letters:/[\uA738\uA73A]/g},{base:"AY",letters:/[\uA73C]/g},{base:"B",letters:/[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g},{base:"C",letters:/[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g},{base:"D",letters:/[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g},{base:"DZ",letters:/[\u01F1\u01C4]/g},{base:"Dz",letters:/[\u01F2\u01C5]/g},{base:"E",letters:/[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g},{base:"F",letters:/[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g},{base:"G",letters:/[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g},{base:"H",letters:/[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g},{base:"I",letters:/[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g},{base:"J",letters:/[\u004A\u24BF\uFF2A\u0134\u0248]/g},{base:"K",letters:/[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g},{base:"L",letters:/[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g},{base:"LJ",letters:/[\u01C7]/g},{base:"Lj",letters:/[\u01C8]/g},{base:"M",letters:/[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g},{base:"N",letters:/[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g},{base:"NJ",letters:/[\u01CA]/g},{base:"Nj",letters:/[\u01CB]/g},{base:"O",letters:/[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g},{base:"OI",letters:/[\u01A2]/g},{base:"OO",letters:/[\uA74E]/g},{base:"OU",letters:/[\u0222]/g},{base:"P",letters:/[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g},{base:"Q",letters:/[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g},{base:"R",letters:/[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g},{base:"S",letters:/[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g},{base:"T",letters:/[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g},{base:"TZ",letters:/[\uA728]/g},{base:"U",letters:/[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g},{base:"V",letters:/[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g},{base:"VY",letters:/[\uA760]/g},{base:"W",letters:/[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g},{base:"X",letters:/[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g},{base:"Y",letters:/[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g},{base:"Z",letters:/[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g},{base:"a",letters:/[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g},{base:"aa",letters:/[\uA733]/g},{base:"ae",letters:/[\u00E6\u01FD\u01E3]/g},{base:"ao",letters:/[\uA735]/g},{base:"au",letters:/[\uA737]/g},{base:"av",letters:/[\uA739\uA73B]/g},{base:"ay",letters:/[\uA73D]/g},{base:"b",letters:/[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g},{base:"c",letters:/[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g},{base:"d",letters:/[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g},{base:"dz",letters:/[\u01F3\u01C6]/g},{base:"e",letters:/[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g},{base:"f",letters:/[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g},{base:"g",letters:/[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g},{base:"h",letters:/[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g},{base:"hv",letters:/[\u0195]/g},{base:"i",letters:/[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g},{base:"j",letters:/[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g},{base:"k",letters:/[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g},{base:"l",letters:/[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g},{base:"lj",letters:/[\u01C9]/g},{base:"m",letters:/[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g},{base:"n",letters:/[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g},{base:"nj",letters:/[\u01CC]/g},{base:"o",letters:/[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g},{base:"oi",letters:/[\u01A3]/g},{base:"ou",letters:/[\u0223]/g},{base:"oo",letters:/[\uA74F]/g},{base:"p",letters:/[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g},{base:"q",letters:/[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g},{base:"r",letters:/[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g},{base:"s",letters:/[\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g},{base:"t",letters:/[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g},{base:"tz",letters:/[\uA729]/g},{base:"u",letters:/[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g},{base:"v",letters:/[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g},{base:"vy",letters:/[\uA761]/g},{base:"w",letters:/[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g},{base:"x",letters:/[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g},{base:"y",letters:/[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g},{base:"z",letters:/[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g}]},a.fn.quicksearch=function(c,d){this.removeDiacritics=function(b){for(var c=a.quicksearch.diacriticsRemovalMap,d=0;d<c.length;d++)b=b.replace(c[d].letters,c[d].base);
  return b};var e,f,g,h,i="",j="",k=this,l=a.extend({},a.quicksearch.defaults,d);return l.noResults=l.noResults?a(l.noResults):a(),l.loader=l.loader?a(l.loader):a(),this.go=function(){var a,b=0,c=0,d=0,e=!0,h=0===i.replace(" ","").length;for(l.removeDiacritics&&(i=k.removeDiacritics(i)),a=l.prepareQuery(i),b=0,c=g.length;c>b;b++)a.length>0&&a[0].length<l.minValLength?(l.show.apply(g[b]),e=!1,d++):h||l.testQuery(a,f[b],g[b])?(l.show.apply(g[b]),e=!1,d++):l.hide.apply(g[b]);return e?this.results(!1):(this.results(!0),this.stripe()),this.matchedResultsCount=d,this.loader(!1),l.onAfter.call(this),j=i,this},this.search=function(a){i=a,k.trigger()},this.reset=function(){i="",this.loader(!0),l.onBefore.call(this),b.clearTimeout(e),e=b.setTimeout(function(){k.go()},l.delay)},this.currentMatchedResults=function(){return this.matchedResultsCount},this.stripe=function(){if("object"==typeof l.stripeRows&&null!==l.stripeRows){var b=l.stripeRows.join(" "),c=l.stripeRows.length;h.not(":hidden").each(function(d){a(this).removeClass(b).addClass(l.stripeRows[d%c])})}return this},this.strip_html=function(b){var c=b.replace(new RegExp("<[^<]+\\>","g"),"");return c=a.trim(c.toLowerCase())},this.results=function(a){return l.noResults.length&&l.noResults[a?"hide":"show"](),this},this.loader=function(a){return l.loader.length&&l.loader[a?"show":"hide"](),this},this.cache=function(b){b="undefined"==typeof b?!0:b,h=l.noResults?a(c).not(l.noResults):a(c);var d="string"==typeof l.selector?h.find(l.selector):a(c).not(l.noResults);return f=d.map(function(){var a=k.strip_html(this.innerHTML);return l.removeDiacritics?k.removeDiacritics(a):a}),g=h.map(function(){return this}),i=i||this.val()||"",b&&this.go(),this},this.trigger=function(){return i.length<l.minValLength&&i.length>j.length||i.length<l.minValLength-1&&i.length<j.length?(l.onValTooSmall.call(this,i),k.go()):(this.loader(!0),l.onBefore.call(this),b.clearTimeout(e),e=b.setTimeout(function(){k.go()},l.delay)),this},this.cache(),this.results(!0),this.stripe(),this.loader(!1),this.each(function(){a(this).on(l.bind,function(){i=a(this).val(),k.trigger()}),a(this).on(l.resetBind,function(){i="",k.reset()})})}}(jQuery,this,document),function(a,b){"use strict";"function"==typeof define&&define.amd?define(["jquery"],b):"object"==typeof exports?module.exports=b(require("jquery")):a.bootbox=b(a.jQuery)}(this,function a(b,c){"use strict";function d(a){var b=q[o.locale];return b?b[a]:q.en[a]}function e(a,c,d){a.stopPropagation(),a.preventDefault();var e=b.isFunction(d)&&d(a)===!1;e||c.modal("hide")}function f(a){var b,c=0;for(b in a)c++;return c}function g(a,c){var d=0;b.each(a,function(a,b){c(a,b,d++)})}function h(a){var c,d;if("object"!=typeof a)throw new Error("Please supply an object of options");if(!a.message)throw new Error("Please specify a message");return a=b.extend({},o,a),a.buttons||(a.buttons={}),a.backdrop=a.backdrop?"static":!1,c=a.buttons,d=f(c),g(c,function(a,e,f){if(b.isFunction(e)&&(e=c[a]={callback:e}),"object"!==b.type(e))throw new Error("button with key "+a+" must be an object");e.label||(e.label=a),e.className||(e.className=2>=d&&f===d-1?"btn-primary":"btn-default")}),a}function i(a,b){var c=a.length,d={};if(1>c||c>2)throw new Error("Invalid argument length");return 2===c||"string"==typeof a[0]?(d[b[0]]=a[0],d[b[1]]=a[1]):d=a[0],d}function j(a,c,d){return b.extend(!0,{},a,i(c,d))}function k(a,b,c,d){var e={className:"bootbox-"+a,buttons:l.apply(null,b)};return m(j(e,d,c),b)}function l(){for(var a={},b=0,c=arguments.length;c>b;b++){var e=arguments[b],f=e.toLowerCase(),g=e.toUpperCase();a[f]={label:d(g)}}return a}function m(a,b){var d={};return g(b,function(a,b){d[b]=!0}),g(a.buttons,function(a){if(d[a]===c)throw new Error("button key "+a+" is not allowed (options are "+b.join("\n")+")")}),a}var n={dialog:"<div class='bootbox modal' tabindex='-1' role='dialog'><div class='modal-dialog'><div class='modal-content'><div class='modal-body'><div class='bootbox-body'></div></div></div></div></div>",header:"<div class='modal-header'><h4 class='modal-title'></h4></div>",footer:"<div class='modal-footer'></div>",closeButton:"<button type='button' class='bootbox-close-button close' data-dismiss='modal' aria-hidden='true'>&times;</button>",form:"<form class='bootbox-form'></form>",inputs:{text:"<input class='bootbox-input bootbox-input-text form-control' autocomplete=off type=text />",textarea:"<textarea class='bootbox-input bootbox-input-textarea form-control'></textarea>",email:"<input class='bootbox-input bootbox-input-email form-control' autocomplete='off' type='email' />",select:"<select class='bootbox-input bootbox-input-select form-control'></select>",checkbox:"<div class='checkbox'><label><input class='bootbox-input bootbox-input-checkbox' type='checkbox' /></label></div>",date:"<input class='bootbox-input bootbox-input-date form-control' autocomplete=off type='date' />",time:"<input class='bootbox-input bootbox-input-time form-control' autocomplete=off type='time' />",number:"<input class='bootbox-input bootbox-input-number form-control' autocomplete=off type='number' />",password:"<input class='bootbox-input bootbox-input-password form-control' autocomplete='off' type='password' />"}},o={locale:"en",backdrop:!0,animate:!0,className:null,closeButton:!0,show:!0,container:"body"},p={};p.alert=function(){var a;if(a=k("alert",["ok"],["message","callback"],arguments),a.callback&&!b.isFunction(a.callback))throw new Error("alert requires callback property to be a function when provided");return a.buttons.ok.callback=a.onEscape=function(){return b.isFunction(a.callback)?a.callback():!0},p.dialog(a)},p.confirm=function(){var a;if(a=k("confirm",["cancel","confirm"],["message","callback"],arguments),a.buttons.cancel.callback=a.onEscape=function(){return a.callback(!1)},a.buttons.confirm.callback=function(){return a.callback(!0)},!b.isFunction(a.callback))throw new Error("confirm requires a callback");return p.dialog(a)},p.prompt=function(){var a,d,e,f,h,i,k;f=b(n.form),d={className:"bootbox-prompt",buttons:l("cancel","confirm"),value:"",inputType:"text"},a=m(j(d,arguments,["title","callback"]),["cancel","confirm"]),i=a.show===c?!0:a.show;var o=["date","time","number"],q=document.createElement("input");if(q.setAttribute("type",a.inputType),o[a.inputType]&&(a.inputType=q.type),a.message=f,a.buttons.cancel.callback=a.onEscape=function(){return a.callback(null)},a.buttons.confirm.callback=function(){var c;switch(a.inputType){case"text":case"textarea":case"email":case"select":case"date":case"time":case"number":case"password":c=h.val();break;case"checkbox":var d=h.find("input:checked");c=[],g(d,function(a,d){c.push(b(d).val())})}return a.callback(c)},a.show=!1,!a.title)throw new Error("prompt requires a title");if(!b.isFunction(a.callback))throw new Error("prompt requires a callback");if(!n.inputs[a.inputType])throw new Error("invalid prompt type");switch(h=b(n.inputs[a.inputType]),a.inputType){case"text":case"textarea":case"email":case"date":case"time":case"number":case"password":h.val(a.value);break;case"select":var r={};if(k=a.inputOptions||[],!k.length)throw new Error("prompt with select requires options");g(k,function(a,d){var e=h;if(d.value===c||d.text===c)throw new Error("given options in wrong format");d.group&&(r[d.group]||(r[d.group]=b("<optgroup/>").attr("label",d.group)),e=r[d.group]),e.append("<option value='"+d.value+"'>"+d.text+"</option>")}),g(r,function(a,b){h.append(b)}),h.val(a.value);break;case"checkbox":var s=b.isArray(a.value)?a.value:[a.value];if(k=a.inputOptions||[],!k.length)throw new Error("prompt with checkbox requires options");if(!k[0].value||!k[0].text)throw new Error("given options in wrong format");h=b("<div/>"),g(k,function(c,d){var e=b(n.inputs[a.inputType]);e.find("input").attr("value",d.value),e.find("label").append(d.text),g(s,function(a,b){b===d.value&&e.find("input").prop("checked",!0)}),h.append(e)})}return a.placeholder&&h.attr("placeholder",a.placeholder),a.pattern&&h.attr("pattern",a.pattern),f.append(h),f.on("submit",function(a){a.preventDefault(),a.stopPropagation(),e.find(".btn-primary").click()}),e=p.dialog(a),e.off("shown.bs.modal"),e.on("shown.bs.modal",function(){h.focus()}),i===!0&&e.modal("show"),e},p.dialog=function(a){a=h(a);var c=b(n.dialog),d=c.find(".modal-dialog"),f=c.find(".modal-body"),i=a.buttons,j="",k={onEscape:a.onEscape};if(g(i,function(a,b){j+="<button data-bb-handler='"+a+"' type='button' class='btn "+b.className+"'>"+b.label+"</button>",k[a]=b.callback}),f.find(".bootbox-body").html(a.message),a.animate===!0&&c.addClass("fade"),a.className&&c.addClass(a.className),"large"===a.size&&d.addClass("modal-lg"),"small"===a.size&&d.addClass("modal-sm"),a.title&&f.before(n.header),a.closeButton){var l=b(n.closeButton);a.title?c.find(".modal-header").prepend(l):l.css("margin-top","-10px").prependTo(f)}return a.title&&c.find(".modal-title").html(a.title),j.length&&(f.after(n.footer),c.find(".modal-footer").html(j)),c.on("hidden.bs.modal",function(a){a.target===this&&c.remove()}),c.on("shown.bs.modal",function(){c.find(".btn-primary:first").focus()}),c.on("escape.close.bb",function(a){k.onEscape&&e(a,c,k.onEscape)}),c.on("click",".modal-footer button",function(a){var d=b(this).data("bb-handler");e(a,c,k[d])}),c.on("click",".bootbox-close-button",function(a){e(a,c,k.onEscape)}),c.on("keyup",function(a){27===a.which&&c.trigger("escape.close.bb")}),b(a.container).append(c),c.modal({backdrop:a.backdrop,keyboard:!1,show:!1}),a.show&&c.modal("show"),c},p.setDefaults=function(){var a={};2===arguments.length?a[arguments[0]]=arguments[1]:a=arguments[0],b.extend(o,a)},p.hideAll=function(){b(".bootbox").modal("hide")};var q={br:{OK:"OK",CANCEL:"Cancelar",CONFIRM:"Sim"},da:{OK:"OK",CANCEL:"Annuller",CONFIRM:"Accepter"},de:{OK:"OK",CANCEL:"Abbrechen",CONFIRM:"Akzeptieren"},el:{OK:"Εντάξει",CANCEL:"Ακύρωση",CONFIRM:"Επιβεβαίωση"},en:{OK:"OK",CANCEL:"Cancel",CONFIRM:"OK"},es:{OK:"OK",CANCEL:"Cancelar",CONFIRM:"Aceptar"},fi:{OK:"OK",CANCEL:"Peruuta",CONFIRM:"OK"},fr:{OK:"OK",CANCEL:"Annuler",CONFIRM:"D'accord"},he:{OK:"אישור",CANCEL:"ביטול",CONFIRM:"אישור"},it:{OK:"OK",CANCEL:"Annulla",CONFIRM:"Conferma"},lt:{OK:"Gerai",CANCEL:"Atšaukti",CONFIRM:"Patvirtinti"},lv:{OK:"Labi",CANCEL:"Atcelt",CONFIRM:"Apstiprināt"},nl:{OK:"OK",CANCEL:"Annuleren",CONFIRM:"Accepteren"},no:{OK:"OK",CANCEL:"Avbryt",CONFIRM:"OK"},pl:{OK:"OK",CANCEL:"Anuluj",CONFIRM:"Potwierdź"},ru:{OK:"OK",CANCEL:"Отмена",CONFIRM:"Применить"},sv:{OK:"OK",CANCEL:"Avbryt",CONFIRM:"OK"},tr:{OK:"Tamam",CANCEL:"İptal",CONFIRM:"Onayla"},zh_CN:{OK:"OK",CANCEL:"取消",CONFIRM:"确认"},zh_TW:{OK:"OK",CANCEL:"取消",CONFIRM:"確認"}};return p.init=function(c){return a(c||b)},p}),function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){"use strict";var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H={},I=0;b=function(){return{common:{type:"line",lineColor:"#00f",fillColor:"#cdf",defaultPixelsPerValue:3,width:"auto",height:"auto",composite:!1,tagValuesAttribute:"values",tagOptionsPrefix:"spark",enableTagOptions:!1,enableHighlight:!0,highlightLighten:1.4,tooltipSkipNull:!0,tooltipPrefix:"",tooltipSuffix:"",disableHiddenCheck:!1,numberFormatter:!1,numberDigitGroupCount:3,numberDigitGroupSep:",",numberDecimalMark:".",disableTooltips:!1,disableInteraction:!1},line:{spotColor:"#f80",highlightSpotColor:"#5f5",highlightLineColor:"#f22",spotRadius:1.5,minSpotColor:"#f80",maxSpotColor:"#f80",lineWidth:1,normalRangeMin:void 0,normalRangeMax:void 0,normalRangeColor:"#ccc",drawNormalOnTop:!1,chartRangeMin:void 0,chartRangeMax:void 0,chartRangeMinX:void 0,chartRangeMaxX:void 0,tooltipFormat:new d('<span style="color: {{color}}">&#9679;</span> {{prefix}}{{y}}{{suffix}}')},bar:{barColor:"#3366cc",negBarColor:"#f44",stackedBarColor:["#3366cc","#dc3912","#ff9900","#109618","#66aa00","#dd4477","#0099c6","#990099"],zeroColor:void 0,nullColor:void 0,zeroAxis:!0,barWidth:4,barSpacing:1,chartRangeMax:void 0,chartRangeMin:void 0,chartRangeClip:!1,colorMap:void 0,tooltipFormat:new d('<span style="color: {{color}}">&#9679;</span> {{prefix}}{{value}}{{suffix}}')},tristate:{barWidth:4,barSpacing:1,posBarColor:"#6f6",negBarColor:"#f44",zeroBarColor:"#999",colorMap:{},tooltipFormat:new d('<span style="color: {{color}}">&#9679;</span> {{value:map}}'),tooltipValueLookups:{map:{"-1":"Loss",0:"Draw",1:"Win"}}},discrete:{lineHeight:"auto",thresholdColor:void 0,thresholdValue:0,chartRangeMax:void 0,chartRangeMin:void 0,chartRangeClip:!1,tooltipFormat:new d("{{prefix}}{{value}}{{suffix}}")},bullet:{targetColor:"#f33",targetWidth:3,performanceColor:"#33f",rangeColors:["#d3dafe","#a8b6ff","#7f94ff"],base:void 0,tooltipFormat:new d("{{fieldkey:fields}} - {{value}}"),tooltipValueLookups:{fields:{r:"Range",p:"Performance",t:"Target"}}},pie:{offset:0,sliceColors:["#3366cc","#dc3912","#ff9900","#109618","#66aa00","#dd4477","#0099c6","#990099"],borderWidth:0,borderColor:"#000",tooltipFormat:new d('<span style="color: {{color}}">&#9679;</span> {{value}} ({{percent.1}}%)')},box:{raw:!1,boxLineColor:"#000",boxFillColor:"#cdf",whiskerColor:"#000",outlierLineColor:"#333",outlierFillColor:"#fff",medianColor:"#f00",showOutliers:!0,outlierIQR:1.5,spotRadius:1.5,target:void 0,targetColor:"#4a2",chartRangeMax:void 0,chartRangeMin:void 0,tooltipFormat:new d("{{field:fields}}: {{value}}"),tooltipFormatFieldlistKey:"field",tooltipValueLookups:{fields:{lq:"Lower Quartile",med:"Median",uq:"Upper Quartile",lo:"Left Outlier",ro:"Right Outlier",lw:"Left Whisker",rw:"Right Whisker"}}}}},A='.jqstooltip { position: absolute;left: 0px;top: 0px;visibility: hidden;background: rgb(0, 0, 0) transparent;background-color: rgba(0,0,0,0.6);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000);-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)";color: white;font: 10px arial, san serif;text-align: left;white-space: nowrap;padding: 5px;border: 1px solid white;z-index: 10000;}.jqsfield { color: white;font: 10px arial, san serif;text-align: left;}',c=function(){var b,c;return b=function(){this.init.apply(this,arguments)},arguments.length>1?(arguments[0]?(b.prototype=a.extend(new arguments[0],arguments[arguments.length-1]),b._super=arguments[0].prototype):b.prototype=arguments[arguments.length-1],arguments.length>2&&(c=Array.prototype.slice.call(arguments,1,-1),c.unshift(b.prototype),a.extend.apply(a,c))):b.prototype=arguments[0],b.prototype.cls=b,b},a.SPFormatClass=d=c({fre:/\{\{([\w.]+?)(:(.+?))?\}\}/g,precre:/(\w+)\.(\d+)/,init:function(a,b){this.format=a,this.fclass=b},render:function(a,b,c){var d,e,f,g,h,i=this,k=a;return this.format.replace(this.fre,function(){var a;return e=arguments[1],f=arguments[3],d=i.precre.exec(e),d?(h=d[2],e=d[1]):h=!1,g=k[e],void 0===g?"":f&&b&&b[f]?(a=b[f],a.get?b[f].get(g)||g:b[f][g]||g):(j(g)&&(g=c.get("numberFormatter")?c.get("numberFormatter")(g):o(g,h,c.get("numberDigitGroupCount"),c.get("numberDigitGroupSep"),c.get("numberDecimalMark"))),g)})}}),a.spformat=function(a,b){return new d(a,b)},e=function(a,b,c){return b>a?b:a>c?c:a},f=function(a,b){var c;return 2===b?(c=Math.floor(a.length/2),a.length%2?a[c]:(a[c-1]+a[c])/2):a.length%2?(c=(a.length*b+b)/4,c%1?(a[Math.floor(c)]+a[Math.floor(c)-1])/2:a[c-1]):(c=(a.length*b+2)/4,c%1?(a[Math.floor(c)]+a[Math.floor(c)-1])/2:a[c-1])},g=function(a){var b;switch(a){case"undefined":a=void 0;break;case"null":a=null;break;case"true":a=!0;break;case"false":a=!1;break;default:b=parseFloat(a),a==b&&(a=b)}return a},h=function(a){var b,c=[];for(b=a.length;b--;)c[b]=g(a[b]);return c},i=function(a,b){var c,d,e=[];for(c=0,d=a.length;d>c;c++)a[c]!==b&&e.push(a[c]);return e},j=function(a){return!isNaN(parseFloat(a))&&isFinite(a)},o=function(b,c,d,e,f){var g,h;for(b=(c===!1?parseFloat(b).toString():b.toFixed(c)).split(""),g=(g=a.inArray(".",b))<0?b.length:g,g<b.length&&(b[g]=f),h=g-d;h>0;h-=d)b.splice(h,0,e);return b.join("")},k=function(a,b,c){var d;for(d=b.length;d--;)if((!c||null!==b[d])&&b[d]!==a)return!1;return!0},l=function(a){var b,c=0;for(b=a.length;b--;)c+="number"==typeof a[b]?a[b]:0;return c},n=function(b){return a.isArray(b)?b:[b]},m=function(a){var b;document.createStyleSheet?document.createStyleSheet().cssText=a:(b=document.createElement("style"),b.type="text/css",document.getElementsByTagName("head")[0].appendChild(b),b["string"==typeof document.body.style.WebkitAppearance?"innerText":"innerHTML"]=a)},a.fn.simpledraw=function(b,c,d,e){var f,g;if(d&&(f=this.data("_jqs_vcanvas")))return f;if(void 0===b&&(b=a(this).innerWidth()),void 0===c&&(c=a(this).innerHeight()),a.fn.sparkline.hasCanvas)f=new E(b,c,this,e);else{if(!a.fn.sparkline.hasVML)return!1;f=new F(b,c,this)}return g=a(this).data("_jqs_mhandler"),g&&g.registerCanvas(f),f},a.fn.cleardraw=function(){var a=this.data("_jqs_vcanvas");a&&a.reset()},a.RangeMapClass=p=c({init:function(a){var b,c,d=[];for(b in a)a.hasOwnProperty(b)&&"string"==typeof b&&b.indexOf(":")>-1&&(c=b.split(":"),c[0]=0===c[0].length?-1/0:parseFloat(c[0]),c[1]=0===c[1].length?1/0:parseFloat(c[1]),c[2]=a[b],d.push(c));this.map=a,this.rangelist=d||!1},get:function(a){var b,c,d,e=this.rangelist;if(void 0!==(d=this.map[a]))return d;if(e)for(b=e.length;b--;)if(c=e[b],c[0]<=a&&c[1]>=a)return c[2];return void 0}}),a.range_map=function(a){return new p(a)},q=c({init:function(b,c){var d=a(b);this.$el=d,this.options=c,this.currentPageX=0,this.currentPageY=0,this.el=b,this.splist=[],this.tooltip=null,this.over=!1,this.displayTooltips=!c.get("disableTooltips"),this.highlightEnabled=!c.get("disableHighlight")},registerSparkline:function(a){this.splist.push(a),this.over&&this.updateDisplay()},registerCanvas:function(b){var c=a(b.canvas);this.canvas=b,this.$canvas=c,c.mouseenter(a.proxy(this.mouseenter,this)),c.mouseleave(a.proxy(this.mouseleave,this)),c.click(a.proxy(this.mouseclick,this))},reset:function(a){this.splist=[],this.tooltip&&a&&(this.tooltip.remove(),this.tooltip=void 0)},mouseclick:function(b){var c=a.Event("sparklineClick");c.originalEvent=b,c.sparklines=this.splist,this.$el.trigger(c)},mouseenter:function(b){a(document.body).unbind("mousemove.jqs"),a(document.body).bind("mousemove.jqs",a.proxy(this.mousemove,this)),this.over=!0,this.currentPageX=b.pageX,this.currentPageY=b.pageY,this.currentEl=b.target,!this.tooltip&&this.displayTooltips&&(this.tooltip=new r(this.options),this.tooltip.updatePosition(b.pageX,b.pageY)),this.updateDisplay()},mouseleave:function(){a(document.body).unbind("mousemove.jqs");var b,c,d=this.splist,e=d.length,f=!1;for(this.over=!1,this.currentEl=null,this.tooltip&&(this.tooltip.remove(),this.tooltip=null),c=0;e>c;c++)b=d[c],b.clearRegionHighlight()&&(f=!0);f&&this.canvas.render()},mousemove:function(a){this.currentPageX=a.pageX,this.currentPageY=a.pageY,this.currentEl=a.target,this.tooltip&&this.tooltip.updatePosition(a.pageX,a.pageY),this.updateDisplay()},updateDisplay:function(){var b,c,d,e,f,g=this.splist,h=g.length,i=!1,j=this.$canvas.offset(),k=this.currentPageX-j.left,l=this.currentPageY-j.top;if(this.over){for(d=0;h>d;d++)c=g[d],e=c.setRegionHighlight(this.currentEl,k,l),e&&(i=!0);if(i){if(f=a.Event("sparklineRegionChange"),f.sparklines=this.splist,this.$el.trigger(f),this.tooltip){for(b="",d=0;h>d;d++)c=g[d],b+=c.getCurrentRegionTooltip();this.tooltip.setContent(b)}this.disableHighlight||this.canvas.render()}null===e&&this.mouseleave()}}}),r=c({sizeStyle:"position: static !important;display: block !important;visibility: hidden !important;float: left !important;",init:function(b){var c,d=b.get("tooltipClassname","jqstooltip"),e=this.sizeStyle;this.container=b.get("tooltipContainer")||document.body,this.tooltipOffsetX=b.get("tooltipOffsetX",10),this.tooltipOffsetY=b.get("tooltipOffsetY",12),a("#jqssizetip").remove(),a("#jqstooltip").remove(),this.sizetip=a("<div/>",{id:"jqssizetip",style:e,"class":d}),this.tooltip=a("<div/>",{id:"jqstooltip","class":d}).appendTo(this.container),c=this.tooltip.offset(),this.offsetLeft=c.left,this.offsetTop=c.top,this.hidden=!0,a(window).unbind("resize.jqs scroll.jqs"),a(window).bind("resize.jqs scroll.jqs",a.proxy(this.updateWindowDims,this)),this.updateWindowDims()},updateWindowDims:function(){this.scrollTop=a(window).scrollTop(),this.scrollLeft=a(window).scrollLeft(),this.scrollRight=this.scrollLeft+a(window).width(),this.updatePosition()},getSize:function(a){this.sizetip.html(a).appendTo(this.container),this.width=this.sizetip.width()+1,this.height=this.sizetip.height(),this.sizetip.remove()},setContent:function(a){return a?(this.getSize(a),this.tooltip.html(a).css({width:this.width,height:this.height,visibility:"visible"}),void(this.hidden&&(this.hidden=!1,this.updatePosition()))):(this.tooltip.css("visibility","hidden"),void(this.hidden=!0))},updatePosition:function(a,b){if(void 0===a){if(void 0===this.mousex)return;a=this.mousex-this.offsetLeft,b=this.mousey-this.offsetTop}else this.mousex=a-=this.offsetLeft,this.mousey=b-=this.offsetTop;this.height&&this.width&&!this.hidden&&(b-=this.height+this.tooltipOffsetY,a+=this.tooltipOffsetX,b<this.scrollTop&&(b=this.scrollTop),a<this.scrollLeft?a=this.scrollLeft:a+this.width>this.scrollRight&&(a=this.scrollRight-this.width),this.tooltip.css({left:a,top:b}))},remove:function(){this.tooltip.remove(),this.sizetip.remove(),this.sizetip=this.tooltip=void 0,a(window).unbind("resize.jqs scroll.jqs")}}),B=function(){m(A)},a(B),G=[],a.fn.sparkline=function(b,c){return this.each(function(){var d,e,f=new a.fn.sparkline.options(this,c),g=a(this);if(d=function(){var c,d,e,h,i,j,k;return"html"===b||void 0===b?(k=this.getAttribute(f.get("tagValuesAttribute")),(void 0===k||null===k)&&(k=g.html()),c=k.replace(/(^\s*<!--)|(-->\s*$)|\s+/g,"").split(",")):c=b,d="auto"===f.get("width")?c.length*f.get("defaultPixelsPerValue"):f.get("width"),"auto"===f.get("height")?f.get("composite")&&a.data(this,"_jqs_vcanvas")||(h=document.createElement("span"),h.innerHTML="a",g.html(h),e=a(h).innerHeight()||a(h).height(),a(h).remove(),h=null):e=f.get("height"),f.get("disableInteraction")?i=!1:(i=a.data(this,"_jqs_mhandler"),i?f.get("composite")||i.reset():(i=new q(this,f),a.data(this,"_jqs_mhandler",i))),f.get("composite")&&!a.data(this,"_jqs_vcanvas")?void(a.data(this,"_jqs_errnotify")||(alert("Attempted to attach a composite sparkline to an element with no existing sparkline"),a.data(this,"_jqs_errnotify",!0))):(j=new(a.fn.sparkline[f.get("type")])(this,c,f,d,e),j.render(),void(i&&i.registerSparkline(j)))},a(this).html()&&!f.get("disableHiddenCheck")&&a(this).is(":hidden")||a.fn.jquery<"1.3.0"&&a(this).parents().is(":hidden")||!a(this).parents("body").length){if(!f.get("composite")&&a.data(this,"_jqs_pending"))for(e=G.length;e;e--)G[e-1][0]==this&&G.splice(e-1,1);G.push([this,d]),a.data(this,"_jqs_pending",!0)}else d.call(this)})},a.fn.sparkline.defaults=b(),a.sparkline_display_visible=function(){var b,c,d,e=[];for(c=0,d=G.length;d>c;c++)b=G[c][0],a(b).is(":visible")&&!a(b).parents().is(":hidden")?(G[c][1].call(b),a.data(G[c][0],"_jqs_pending",!1),e.push(c)):a(b).closest("html").length||a.data(b,"_jqs_pending")||(a.data(G[c][0],"_jqs_pending",!1),e.push(c));for(c=e.length;c;c--)G.splice(e[c-1],1)},a.fn.sparkline.options=c({init:function(b,c){var d,e,f,g;this.userOptions=c=c||{},this.tag=b,this.tagValCache={},e=a.fn.sparkline.defaults,f=e.common,this.tagOptionsPrefix=c.enableTagOptions&&(c.tagOptionsPrefix||f.tagOptionsPrefix),g=this.getTagSetting("type"),d=g===H?e[c.type||f.type]:e[g],this.mergedOptions=a.extend({},f,d,c)},getTagSetting:function(a){var b,c,d,e,f=this.tagOptionsPrefix;if(f===!1||void 0===f)return H;if(this.tagValCache.hasOwnProperty(a))b=this.tagValCache.key;else{if(b=this.tag.getAttribute(f+a),void 0===b||null===b)b=H;else if("["===b.substr(0,1))for(b=b.substr(1,b.length-2).split(","),c=b.length;c--;)b[c]=g(b[c].replace(/(^\s*)|(\s*$)/g,""));else if("{"===b.substr(0,1))for(d=b.substr(1,b.length-2).split(","),b={},c=d.length;c--;)e=d[c].split(":",2),b[e[0].replace(/(^\s*)|(\s*$)/g,"")]=g(e[1].replace(/(^\s*)|(\s*$)/g,""));else b=g(b);this.tagValCache.key=b}return b},get:function(a,b){var c,d=this.getTagSetting(a);return d!==H?d:void 0===(c=this.mergedOptions[a])?b:c}}),a.fn.sparkline._base=c({disabled:!1,init:function(b,c,d,e,f){this.el=b,this.$el=a(b),this.values=c,this.options=d,this.width=e,this.height=f,this.currentRegion=void 0},initTarget:function(){var a=!this.options.get("disableInteraction");(this.target=this.$el.simpledraw(this.width,this.height,this.options.get("composite"),a))?(this.canvasWidth=this.target.pixelWidth,this.canvasHeight=this.target.pixelHeight):this.disabled=!0},render:function(){return this.disabled?(this.el.innerHTML="",!1):!0},getRegion:function(){},setRegionHighlight:function(a,b,c){var d,e=this.currentRegion,f=!this.options.get("disableHighlight");return b>this.canvasWidth||c>this.canvasHeight||0>b||0>c?null:(d=this.getRegion(a,b,c),e!==d?(void 0!==e&&f&&this.removeHighlight(),this.currentRegion=d,void 0!==d&&f&&this.renderHighlight(),!0):!1)},clearRegionHighlight:function(){return void 0!==this.currentRegion?(this.removeHighlight(),this.currentRegion=void 0,!0):!1},renderHighlight:function(){this.changeHighlight(!0)},removeHighlight:function(){this.changeHighlight(!1)},changeHighlight:function(){},getCurrentRegionTooltip:function(){var b,c,e,f,g,h,i,j,k,l,m,n,o,p,q=this.options,r="",s=[];if(void 0===this.currentRegion)return"";if(b=this.getCurrentRegionFields(),m=q.get("tooltipFormatter"))return m(this,q,b);if(q.get("tooltipChartTitle")&&(r+='<div class="jqs jqstitle">'+q.get("tooltipChartTitle")+"</div>\n"),c=this.options.get("tooltipFormat"),!c)return"";if(a.isArray(c)||(c=[c]),a.isArray(b)||(b=[b]),i=this.options.get("tooltipFormatFieldlist"),j=this.options.get("tooltipFormatFieldlistKey"),i&&j){for(k=[],h=b.length;h--;)l=b[h][j],-1!=(p=a.inArray(l,i))&&(k[p]=b[h]);b=k}for(e=c.length,o=b.length,h=0;e>h;h++)for(n=c[h],"string"==typeof n&&(n=new d(n)),f=n.fclass||"jqsfield",p=0;o>p;p++)b[p].isNull&&q.get("tooltipSkipNull")||(a.extend(b[p],{prefix:q.get("tooltipPrefix"),suffix:q.get("tooltipSuffix")}),g=n.render(b[p],q.get("tooltipValueLookups"),q),s.push('<div class="'+f+'">'+g+"</div>"));return s.length?r+s.join("\n"):""},getCurrentRegionFields:function(){},calcHighlightColor:function(a,b){var c,d,f,g,h=b.get("highlightColor"),i=b.get("highlightLighten");if(h)return h;if(i&&(c=/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i.exec(a)||/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(a))){for(f=[],d=4===a.length?16:1,g=0;3>g;g++)f[g]=e(Math.round(parseInt(c[g+1],16)*d*i),0,255);return"rgb("+f.join(",")+")"}return a}}),s={changeHighlight:function(b){var c,d=this.currentRegion,e=this.target,f=this.regionShapes[d];f&&(c=this.renderRegion(d,b),a.isArray(c)||a.isArray(f)?(e.replaceWithShapes(f,c),this.regionShapes[d]=a.map(c,function(a){return a.id})):(e.replaceWithShape(f,c),this.regionShapes[d]=c.id))},render:function(){var b,c,d,e,f=this.values,g=this.target,h=this.regionShapes;if(this.cls._super.render.call(this)){for(d=f.length;d--;)if(b=this.renderRegion(d))if(a.isArray(b)){for(c=[],e=b.length;e--;)b[e].append(),c.push(b[e].id);h[d]=c}else b.append(),h[d]=b.id;else h[d]=null;g.render()}}},a.fn.sparkline.line=t=c(a.fn.sparkline._base,{type:"line",init:function(a,b,c,d,e){t._super.init.call(this,a,b,c,d,e),this.vertices=[],this.regionMap=[],this.xvalues=[],this.yvalues=[],this.yminmax=[],this.hightlightSpotId=null,this.lastShapeId=null,this.initTarget()},getRegion:function(a,b){var c,d=this.regionMap;for(c=d.length;c--;)if(null!==d[c]&&b>=d[c][0]&&b<=d[c][1])return d[c][2];return void 0},getCurrentRegionFields:function(){var a=this.currentRegion;return{isNull:null===this.yvalues[a],x:this.xvalues[a],y:this.yvalues[a],color:this.options.get("lineColor"),fillColor:this.options.get("fillColor"),offset:a}},renderHighlight:function(){var a,b,c=this.currentRegion,d=this.target,e=this.vertices[c],f=this.options,g=f.get("spotRadius"),h=f.get("highlightSpotColor"),i=f.get("highlightLineColor");e&&(g&&h&&(a=d.drawCircle(e[0],e[1],g,void 0,h),this.highlightSpotId=a.id,d.insertAfterShape(this.lastShapeId,a)),i&&(b=d.drawLine(e[0],this.canvasTop,e[0],this.canvasTop+this.canvasHeight,i),this.highlightLineId=b.id,d.insertAfterShape(this.lastShapeId,b)))},removeHighlight:function(){var a=this.target;this.highlightSpotId&&(a.removeShapeId(this.highlightSpotId),this.highlightSpotId=null),this.highlightLineId&&(a.removeShapeId(this.highlightLineId),this.highlightLineId=null)},scanValues:function(){var a,b,c,d,e,f=this.values,g=f.length,h=this.xvalues,i=this.yvalues,j=this.yminmax;for(a=0;g>a;a++)b=f[a],c="string"==typeof f[a],d="object"==typeof f[a]&&f[a]instanceof Array,e=c&&f[a].split(":"),c&&2===e.length?(h.push(Number(e[0])),i.push(Number(e[1])),j.push(Number(e[1]))):d?(h.push(b[0]),i.push(b[1]),j.push(b[1])):(h.push(a),null===f[a]||"null"===f[a]?i.push(null):(i.push(Number(b)),j.push(Number(b))));this.options.get("xvalues")&&(h=this.options.get("xvalues")),this.maxy=this.maxyorg=Math.max.apply(Math,j),this.miny=this.minyorg=Math.min.apply(Math,j),this.maxx=Math.max.apply(Math,h),this.minx=Math.min.apply(Math,h),this.xvalues=h,this.yvalues=i,this.yminmax=j},processRangeOptions:function(){var a=this.options,b=a.get("normalRangeMin"),c=a.get("normalRangeMax");void 0!==b&&(b<this.miny&&(this.miny=b),c>this.maxy&&(this.maxy=c)),void 0!==a.get("chartRangeMin")&&(a.get("chartRangeClip")||a.get("chartRangeMin")<this.miny)&&(this.miny=a.get("chartRangeMin")),void 0!==a.get("chartRangeMax")&&(a.get("chartRangeClip")||a.get("chartRangeMax")>this.maxy)&&(this.maxy=a.get("chartRangeMax")),void 0!==a.get("chartRangeMinX")&&(a.get("chartRangeClipX")||a.get("chartRangeMinX")<this.minx)&&(this.minx=a.get("chartRangeMinX")),void 0!==a.get("chartRangeMaxX")&&(a.get("chartRangeClipX")||a.get("chartRangeMaxX")>this.maxx)&&(this.maxx=a.get("chartRangeMaxX"))},drawNormalRange:function(a,b,c,d,e){var f=this.options.get("normalRangeMin"),g=this.options.get("normalRangeMax"),h=b+Math.round(c-c*((g-this.miny)/e)),i=Math.round(c*(g-f)/e);this.target.drawRect(a,h,d,i,void 0,this.options.get("normalRangeColor")).append()},render:function(){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,q,r,s,u,v,w,x,y,z,A,B,C=this.options,D=this.target,E=this.canvasWidth,F=this.canvasHeight,G=this.vertices,H=C.get("spotRadius"),I=this.regionMap;if(t._super.render.call(this)&&(this.scanValues(),this.processRangeOptions(),z=this.xvalues,A=this.yvalues,this.yminmax.length&&!(this.yvalues.length<2))){for(e=f=0,b=this.maxx-this.minx===0?1:this.maxx-this.minx,c=this.maxy-this.miny===0?1:this.maxy-this.miny,d=this.yvalues.length-1,H&&(4*H>E||4*H>F)&&(H=0),H&&(x=C.get("highlightSpotColor")&&!C.get("disableInteraction"),(x||C.get("minSpotColor")||C.get("spotColor")&&A[d]===this.miny)&&(F-=Math.ceil(H)),(x||C.get("maxSpotColor")||C.get("spotColor")&&A[d]===this.maxy)&&(F-=Math.ceil(H),e+=Math.ceil(H)),(x||(C.get("minSpotColor")||C.get("maxSpotColor"))&&(A[0]===this.miny||A[0]===this.maxy))&&(f+=Math.ceil(H),E-=Math.ceil(H)),(x||C.get("spotColor")||C.get("minSpotColor")||C.get("maxSpotColor")&&(A[d]===this.miny||A[d]===this.maxy))&&(E-=Math.ceil(H))),F--,void 0===C.get("normalRangeMin")||C.get("drawNormalOnTop")||this.drawNormalRange(f,e,F,E,c),h=[],i=[h],o=q=null,r=A.length,B=0;r>B;B++)j=z[B],l=z[B+1],k=A[B],m=f+Math.round((j-this.minx)*(E/b)),n=r-1>B?f+Math.round((l-this.minx)*(E/b)):E,q=m+(n-m)/2,I[B]=[o||0,q,B],o=q,null===k?B&&(null!==A[B-1]&&(h=[],i.push(h)),G.push(null)):(k<this.miny&&(k=this.miny),k>this.maxy&&(k=this.maxy),h.length||h.push([m,e+F]),g=[m,e+Math.round(F-F*((k-this.miny)/c))],h.push(g),G.push(g));for(s=[],u=[],v=i.length,B=0;v>B;B++)h=i[B],h.length&&(C.get("fillColor")&&(h.push([h[h.length-1][0],e+F]),u.push(h.slice(0)),h.pop()),h.length>2&&(h[0]=[h[0][0],h[1][1]]),s.push(h));for(v=u.length,B=0;v>B;B++)D.drawShape(u[B],C.get("fillColor"),C.get("fillColor")).append();for(void 0!==C.get("normalRangeMin")&&C.get("drawNormalOnTop")&&this.drawNormalRange(f,e,F,E,c),v=s.length,B=0;v>B;B++)D.drawShape(s[B],C.get("lineColor"),void 0,C.get("lineWidth")).append();
  if(H&&C.get("valueSpots"))for(w=C.get("valueSpots"),void 0===w.get&&(w=new p(w)),B=0;r>B;B++)y=w.get(A[B]),y&&D.drawCircle(f+Math.round((z[B]-this.minx)*(E/b)),e+Math.round(F-F*((A[B]-this.miny)/c)),H,void 0,y).append();H&&C.get("spotColor")&&null!==A[d]&&D.drawCircle(f+Math.round((z[z.length-1]-this.minx)*(E/b)),e+Math.round(F-F*((A[d]-this.miny)/c)),H,void 0,C.get("spotColor")).append(),this.maxy!==this.minyorg&&(H&&C.get("minSpotColor")&&(j=z[a.inArray(this.minyorg,A)],D.drawCircle(f+Math.round((j-this.minx)*(E/b)),e+Math.round(F-F*((this.minyorg-this.miny)/c)),H,void 0,C.get("minSpotColor")).append()),H&&C.get("maxSpotColor")&&(j=z[a.inArray(this.maxyorg,A)],D.drawCircle(f+Math.round((j-this.minx)*(E/b)),e+Math.round(F-F*((this.maxyorg-this.miny)/c)),H,void 0,C.get("maxSpotColor")).append())),this.lastShapeId=D.getLastShapeId(),this.canvasTop=e,D.render()}}}),a.fn.sparkline.bar=u=c(a.fn.sparkline._base,s,{type:"bar",init:function(b,c,d,f,j){var k,l,m,n,o,q,r,s,t,v,w,x,y,z,A,B,C,D,E,F,G,H,I=parseInt(d.get("barWidth"),10),J=parseInt(d.get("barSpacing"),10),K=d.get("chartRangeMin"),L=d.get("chartRangeMax"),M=d.get("chartRangeClip"),N=1/0,O=-1/0;for(u._super.init.call(this,b,c,d,f,j),q=0,r=c.length;r>q;q++)F=c[q],k="string"==typeof F&&F.indexOf(":")>-1,(k||a.isArray(F))&&(A=!0,k&&(F=c[q]=h(F.split(":"))),F=i(F,null),l=Math.min.apply(Math,F),m=Math.max.apply(Math,F),N>l&&(N=l),m>O&&(O=m));this.stacked=A,this.regionShapes={},this.barWidth=I,this.barSpacing=J,this.totalBarWidth=I+J,this.width=f=c.length*I+(c.length-1)*J,this.initTarget(),M&&(y=void 0===K?-1/0:K,z=void 0===L?1/0:L),o=[],n=A?[]:o;var P=[],Q=[];for(q=0,r=c.length;r>q;q++)if(A)for(B=c[q],c[q]=E=[],P[q]=0,n[q]=Q[q]=0,C=0,D=B.length;D>C;C++)F=E[C]=M?e(B[C],y,z):B[C],null!==F&&(F>0&&(P[q]+=F),0>N&&O>0?0>F?Q[q]+=Math.abs(F):n[q]+=F:n[q]+=Math.abs(F-(0>F?O:N)),o.push(F));else F=M?e(c[q],y,z):c[q],F=c[q]=g(F),null!==F&&o.push(F);this.max=x=Math.max.apply(Math,o),this.min=w=Math.min.apply(Math,o),this.stackMax=O=A?Math.max.apply(Math,P):x,this.stackMin=N=A?Math.min.apply(Math,o):w,void 0!==d.get("chartRangeMin")&&(d.get("chartRangeClip")||d.get("chartRangeMin")<w)&&(w=d.get("chartRangeMin")),void 0!==d.get("chartRangeMax")&&(d.get("chartRangeClip")||d.get("chartRangeMax")>x)&&(x=d.get("chartRangeMax")),this.zeroAxis=t=d.get("zeroAxis",!0),v=0>=w&&x>=0&&t?0:0==t?w:w>0?w:x,this.xaxisOffset=v,s=A?Math.max.apply(Math,n)+Math.max.apply(Math,Q):x-w,this.canvasHeightEf=t&&0>w?this.canvasHeight-2:this.canvasHeight-1,v>w?(H=A&&x>=0?O:x,G=(H-v)/s*this.canvasHeight,G!==Math.ceil(G)&&(this.canvasHeightEf-=2,G=Math.ceil(G))):G=this.canvasHeight,this.yoffset=G,a.isArray(d.get("colorMap"))?(this.colorMapByIndex=d.get("colorMap"),this.colorMapByValue=null):(this.colorMapByIndex=null,this.colorMapByValue=d.get("colorMap"),this.colorMapByValue&&void 0===this.colorMapByValue.get&&(this.colorMapByValue=new p(this.colorMapByValue))),this.range=s},getRegion:function(a,b){var c=Math.floor(b/this.totalBarWidth);return 0>c||c>=this.values.length?void 0:c},getCurrentRegionFields:function(){var a,b,c=this.currentRegion,d=n(this.values[c]),e=[];for(b=d.length;b--;)a=d[b],e.push({isNull:null===a,value:a,color:this.calcColor(b,a,c),offset:c});return e},calcColor:function(b,c,d){var e,f,g=this.colorMapByIndex,h=this.colorMapByValue,i=this.options;return e=i.get(this.stacked?"stackedBarColor":0>c?"negBarColor":"barColor"),0===c&&void 0!==i.get("zeroColor")&&(e=i.get("zeroColor")),h&&(f=h.get(c))?e=f:g&&g.length>d&&(e=g[d]),a.isArray(e)?e[b%e.length]:e},renderRegion:function(b,c){var d,e,f,g,h,i,j,l,m,n,o=this.values[b],p=this.options,q=this.xaxisOffset,r=[],s=this.range,t=this.stacked,u=this.target,v=b*this.totalBarWidth,w=this.canvasHeightEf,x=this.yoffset;if(o=a.isArray(o)?o:[o],j=o.length,l=o[0],g=k(null,o),n=k(q,o,!0),g)return p.get("nullColor")?(f=c?p.get("nullColor"):this.calcHighlightColor(p.get("nullColor"),p),d=x>0?x-1:x,u.drawRect(v,d,this.barWidth-1,0,f,f)):void 0;for(h=x,i=0;j>i;i++){if(l=o[i],t&&l===q){if(!n||m)continue;m=!0}e=s>0?Math.floor(w*(Math.abs(l-q)/s))+1:1,q>l||l===q&&0===x?(d=h,h+=e):(d=x-e,x-=e),f=this.calcColor(i,l,b),c&&(f=this.calcHighlightColor(f,p)),r.push(u.drawRect(v,d,this.barWidth-1,e-1,f,f))}return 1===r.length?r[0]:r}}),a.fn.sparkline.tristate=v=c(a.fn.sparkline._base,s,{type:"tristate",init:function(b,c,d,e,f){var g=parseInt(d.get("barWidth"),10),h=parseInt(d.get("barSpacing"),10);v._super.init.call(this,b,c,d,e,f),this.regionShapes={},this.barWidth=g,this.barSpacing=h,this.totalBarWidth=g+h,this.values=a.map(c,Number),this.width=e=c.length*g+(c.length-1)*h,a.isArray(d.get("colorMap"))?(this.colorMapByIndex=d.get("colorMap"),this.colorMapByValue=null):(this.colorMapByIndex=null,this.colorMapByValue=d.get("colorMap"),this.colorMapByValue&&void 0===this.colorMapByValue.get&&(this.colorMapByValue=new p(this.colorMapByValue))),this.initTarget()},getRegion:function(a,b){return Math.floor(b/this.totalBarWidth)},getCurrentRegionFields:function(){var a=this.currentRegion;return{isNull:void 0===this.values[a],value:this.values[a],color:this.calcColor(this.values[a],a),offset:a}},calcColor:function(a,b){var c,d,e=this.values,f=this.options,g=this.colorMapByIndex,h=this.colorMapByValue;return c=h&&(d=h.get(a))?d:g&&g.length>b?g[b]:f.get(e[b]<0?"negBarColor":e[b]>0?"posBarColor":"zeroBarColor")},renderRegion:function(a,b){var c,d,e,f,g,h,i=this.values,j=this.options,k=this.target;return c=k.pixelHeight,e=Math.round(c/2),f=a*this.totalBarWidth,i[a]<0?(g=e,d=e-1):i[a]>0?(g=0,d=e-1):(g=e-1,d=2),h=this.calcColor(i[a],a),null!==h?(b&&(h=this.calcHighlightColor(h,j)),k.drawRect(f,g,this.barWidth-1,d-1,h,h)):void 0}}),a.fn.sparkline.discrete=w=c(a.fn.sparkline._base,s,{type:"discrete",init:function(b,c,d,e,f){w._super.init.call(this,b,c,d,e,f),this.regionShapes={},this.values=c=a.map(c,Number),this.min=Math.min.apply(Math,c),this.max=Math.max.apply(Math,c),this.range=this.max-this.min,this.width=e="auto"===d.get("width")?2*c.length:this.width,this.interval=Math.floor(e/c.length),this.itemWidth=e/c.length,void 0!==d.get("chartRangeMin")&&(d.get("chartRangeClip")||d.get("chartRangeMin")<this.min)&&(this.min=d.get("chartRangeMin")),void 0!==d.get("chartRangeMax")&&(d.get("chartRangeClip")||d.get("chartRangeMax")>this.max)&&(this.max=d.get("chartRangeMax")),this.initTarget(),this.target&&(this.lineHeight="auto"===d.get("lineHeight")?Math.round(.3*this.canvasHeight):d.get("lineHeight"))},getRegion:function(a,b){return Math.floor(b/this.itemWidth)},getCurrentRegionFields:function(){var a=this.currentRegion;return{isNull:void 0===this.values[a],value:this.values[a],offset:a}},renderRegion:function(a,b){var c,d,f,g,h=this.values,i=this.options,j=this.min,k=this.max,l=this.range,m=this.interval,n=this.target,o=this.canvasHeight,p=this.lineHeight,q=o-p;return d=e(h[a],j,k),g=a*m,c=Math.round(q-q*((d-j)/l)),f=i.get(i.get("thresholdColor")&&d<i.get("thresholdValue")?"thresholdColor":"lineColor"),b&&(f=this.calcHighlightColor(f,i)),n.drawLine(g,c,g,c+p,f)}}),a.fn.sparkline.bullet=x=c(a.fn.sparkline._base,{type:"bullet",init:function(a,b,c,d,e){var f,g,i;x._super.init.call(this,a,b,c,d,e),this.values=b=h(b),i=b.slice(),i[0]=null===i[0]?i[2]:i[0],i[1]=null===b[1]?i[2]:i[1],f=Math.min.apply(Math,b),g=Math.max.apply(Math,b),f=void 0===c.get("base")?0>f?f:0:c.get("base"),this.min=f,this.max=g,this.range=g-f,this.shapes={},this.valueShapes={},this.regiondata={},this.width=d="auto"===c.get("width")?"4.0em":d,this.target=this.$el.simpledraw(d,e,c.get("composite")),b.length||(this.disabled=!0),this.initTarget()},getRegion:function(a,b,c){var d=this.target.getShapeAt(a,b,c);return void 0!==d&&void 0!==this.shapes[d]?this.shapes[d]:void 0},getCurrentRegionFields:function(){var a=this.currentRegion;return{fieldkey:a.substr(0,1),value:this.values[a.substr(1)],region:a}},changeHighlight:function(a){var b,c=this.currentRegion,d=this.valueShapes[c];switch(delete this.shapes[d],c.substr(0,1)){case"r":b=this.renderRange(c.substr(1),a);break;case"p":b=this.renderPerformance(a);break;case"t":b=this.renderTarget(a)}this.valueShapes[c]=b.id,this.shapes[b.id]=c,this.target.replaceWithShape(d,b)},renderRange:function(a,b){var c=this.values[a],d=Math.round(this.canvasWidth*((c-this.min)/this.range)),e=this.options.get("rangeColors")[a-2];return b&&(e=this.calcHighlightColor(e,this.options)),this.target.drawRect(0,0,d-1,this.canvasHeight-1,e,e)},renderPerformance:function(a){var b=this.values[1],c=Math.round(this.canvasWidth*((b-this.min)/this.range)),d=this.options.get("performanceColor");return a&&(d=this.calcHighlightColor(d,this.options)),this.target.drawRect(0,Math.round(.3*this.canvasHeight),c-1,Math.round(.4*this.canvasHeight)-1,d,d)},renderTarget:function(a){var b=this.values[0],c=Math.round(this.canvasWidth*((b-this.min)/this.range)-this.options.get("targetWidth")/2),d=Math.round(.1*this.canvasHeight),e=this.canvasHeight-2*d,f=this.options.get("targetColor");return a&&(f=this.calcHighlightColor(f,this.options)),this.target.drawRect(c,d,this.options.get("targetWidth")-1,e-1,f,f)},render:function(){var a,b,c=this.values.length,d=this.target;if(x._super.render.call(this)){for(a=2;c>a;a++)b=this.renderRange(a).append(),this.shapes[b.id]="r"+a,this.valueShapes["r"+a]=b.id;null!==this.values[1]&&(b=this.renderPerformance().append(),this.shapes[b.id]="p1",this.valueShapes.p1=b.id),null!==this.values[0]&&(b=this.renderTarget().append(),this.shapes[b.id]="t0",this.valueShapes.t0=b.id),d.render()}}}),a.fn.sparkline.pie=y=c(a.fn.sparkline._base,{type:"pie",init:function(b,c,d,e,f){var g,h=0;if(y._super.init.call(this,b,c,d,e,f),this.shapes={},this.valueShapes={},this.values=c=a.map(c,Number),"auto"===d.get("width")&&(this.width=this.height),c.length>0)for(g=c.length;g--;)h+=c[g];this.total=h,this.initTarget(),this.radius=Math.floor(Math.min(this.canvasWidth,this.canvasHeight)/2)},getRegion:function(a,b,c){var d=this.target.getShapeAt(a,b,c);return void 0!==d&&void 0!==this.shapes[d]?this.shapes[d]:void 0},getCurrentRegionFields:function(){var a=this.currentRegion;return{isNull:void 0===this.values[a],value:this.values[a],percent:this.values[a]/this.total*100,color:this.options.get("sliceColors")[a%this.options.get("sliceColors").length],offset:a}},changeHighlight:function(a){var b=this.currentRegion,c=this.renderSlice(b,a),d=this.valueShapes[b];delete this.shapes[d],this.target.replaceWithShape(d,c),this.valueShapes[b]=c.id,this.shapes[c.id]=b},renderSlice:function(a,b){var c,d,e,f,g,h=this.target,i=this.options,j=this.radius,k=i.get("borderWidth"),l=i.get("offset"),m=2*Math.PI,n=this.values,o=this.total,p=l?2*Math.PI*(l/360):0;for(f=n.length,e=0;f>e;e++){if(c=p,d=p,o>0&&(d=p+m*(n[e]/o)),a===e)return g=i.get("sliceColors")[e%i.get("sliceColors").length],b&&(g=this.calcHighlightColor(g,i)),h.drawPieSlice(j,j,j-k,c,d,void 0,g);p=d}},render:function(){var a,b,c=this.target,d=this.values,e=this.options,f=this.radius,g=e.get("borderWidth");if(y._super.render.call(this)){for(g&&c.drawCircle(f,f,Math.floor(f-g/2),e.get("borderColor"),void 0,g).append(),b=d.length;b--;)d[b]&&(a=this.renderSlice(b).append(),this.valueShapes[b]=a.id,this.shapes[a.id]=b);c.render()}}}),a.fn.sparkline.box=z=c(a.fn.sparkline._base,{type:"box",init:function(b,c,d,e,f){z._super.init.call(this,b,c,d,e,f),this.values=a.map(c,Number),this.width="auto"===d.get("width")?"4.0em":e,this.initTarget(),this.values.length||(this.disabled=1)},getRegion:function(){return 1},getCurrentRegionFields:function(){var a=[{field:"lq",value:this.quartiles[0]},{field:"med",value:this.quartiles[1]},{field:"uq",value:this.quartiles[2]}];return void 0!==this.loutlier&&a.push({field:"lo",value:this.loutlier}),void 0!==this.routlier&&a.push({field:"ro",value:this.routlier}),void 0!==this.lwhisker&&a.push({field:"lw",value:this.lwhisker}),void 0!==this.rwhisker&&a.push({field:"rw",value:this.rwhisker}),a},render:function(){var a,b,c,d,e,g,h,i,j,k,l,m=this.target,n=this.values,o=n.length,p=this.options,q=this.canvasWidth,r=this.canvasHeight,s=void 0===p.get("chartRangeMin")?Math.min.apply(Math,n):p.get("chartRangeMin"),t=void 0===p.get("chartRangeMax")?Math.max.apply(Math,n):p.get("chartRangeMax"),u=0;if(z._super.render.call(this)){if(p.get("raw"))p.get("showOutliers")&&n.length>5?(b=n[0],a=n[1],d=n[2],e=n[3],g=n[4],h=n[5],i=n[6]):(a=n[0],d=n[1],e=n[2],g=n[3],h=n[4]);else if(n.sort(function(a,b){return a-b}),d=f(n,1),e=f(n,2),g=f(n,3),c=g-d,p.get("showOutliers")){for(a=h=void 0,j=0;o>j;j++)void 0===a&&n[j]>d-c*p.get("outlierIQR")&&(a=n[j]),n[j]<g+c*p.get("outlierIQR")&&(h=n[j]);b=n[0],i=n[o-1]}else a=n[0],h=n[o-1];this.quartiles=[d,e,g],this.lwhisker=a,this.rwhisker=h,this.loutlier=b,this.routlier=i,l=q/(t-s+1),p.get("showOutliers")&&(u=Math.ceil(p.get("spotRadius")),q-=2*Math.ceil(p.get("spotRadius")),l=q/(t-s+1),a>b&&m.drawCircle((b-s)*l+u,r/2,p.get("spotRadius"),p.get("outlierLineColor"),p.get("outlierFillColor")).append(),i>h&&m.drawCircle((i-s)*l+u,r/2,p.get("spotRadius"),p.get("outlierLineColor"),p.get("outlierFillColor")).append()),m.drawRect(Math.round((d-s)*l+u),Math.round(.1*r),Math.round((g-d)*l),Math.round(.8*r),p.get("boxLineColor"),p.get("boxFillColor")).append(),m.drawLine(Math.round((a-s)*l+u),Math.round(r/2),Math.round((d-s)*l+u),Math.round(r/2),p.get("lineColor")).append(),m.drawLine(Math.round((a-s)*l+u),Math.round(r/4),Math.round((a-s)*l+u),Math.round(r-r/4),p.get("whiskerColor")).append(),m.drawLine(Math.round((h-s)*l+u),Math.round(r/2),Math.round((g-s)*l+u),Math.round(r/2),p.get("lineColor")).append(),m.drawLine(Math.round((h-s)*l+u),Math.round(r/4),Math.round((h-s)*l+u),Math.round(r-r/4),p.get("whiskerColor")).append(),m.drawLine(Math.round((e-s)*l+u),Math.round(.1*r),Math.round((e-s)*l+u),Math.round(.9*r),p.get("medianColor")).append(),p.get("target")&&(k=Math.ceil(p.get("spotRadius")),m.drawLine(Math.round((p.get("target")-s)*l+u),Math.round(r/2-k),Math.round((p.get("target")-s)*l+u),Math.round(r/2+k),p.get("targetColor")).append(),m.drawLine(Math.round((p.get("target")-s)*l+u-k),Math.round(r/2),Math.round((p.get("target")-s)*l+u+k),Math.round(r/2),p.get("targetColor")).append()),m.render()}}}),function(){document.namespaces&&!document.namespaces.v?(a.fn.sparkline.hasVML=!0,document.namespaces.add("v","urn:schemas-microsoft-com:vml","#default#VML")):a.fn.sparkline.hasVML=!1;var b=document.createElement("canvas");a.fn.sparkline.hasCanvas=!(!b.getContext||!b.getContext("2d"))}(),C=c({init:function(a,b,c,d){this.target=a,this.id=b,this.type=c,this.args=d},append:function(){return this.target.appendShape(this),this}}),D=c({_pxregex:/(\d+)(px)?\s*$/i,init:function(b,c,d){b&&(this.width=b,this.height=c,this.target=d,this.lastShapeId=null,d[0]&&(d=d[0]),a.data(d,"_jqs_vcanvas",this))},drawLine:function(a,b,c,d,e,f){return this.drawShape([[a,b],[c,d]],e,f)},drawShape:function(a,b,c,d){return this._genShape("Shape",[a,b,c,d])},drawCircle:function(a,b,c,d,e,f){return this._genShape("Circle",[a,b,c,d,e,f])},drawPieSlice:function(a,b,c,d,e,f,g){return this._genShape("PieSlice",[a,b,c,d,e,f,g])},drawRect:function(a,b,c,d,e,f){return this._genShape("Rect",[a,b,c,d,e,f])},getElement:function(){return this.canvas},getLastShapeId:function(){return this.lastShapeId},reset:function(){alert("reset not implemented")},_insert:function(b,c){a(c).html(b)},_calculatePixelDims:function(b,c,d){var e;e=this._pxregex.exec(c),this.pixelHeight=e?e[1]:a(d).height(),e=this._pxregex.exec(b),this.pixelWidth=e?e[1]:a(d).width()},_genShape:function(a,b){var c=I++;return b.unshift(c),new C(this,c,a,b)},appendShape:function(){alert("appendShape not implemented")},replaceWithShape:function(){alert("replaceWithShape not implemented")},insertAfterShape:function(){alert("insertAfterShape not implemented")},removeShapeId:function(){alert("removeShapeId not implemented")},getShapeAt:function(){alert("getShapeAt not implemented")},render:function(){alert("render not implemented")}}),E=c(D,{init:function(b,c,d,e){E._super.init.call(this,b,c,d),this.canvas=document.createElement("canvas"),d[0]&&(d=d[0]),a.data(d,"_jqs_vcanvas",this),a(this.canvas).css({display:"inline-block",width:b,height:c,verticalAlign:"top"}),this._insert(this.canvas,d),this._calculatePixelDims(b,c,this.canvas),this.canvas.width=this.pixelWidth,this.canvas.height=this.pixelHeight,this.interact=e,this.shapes={},this.shapeseq=[],this.currentTargetShapeId=void 0,a(this.canvas).css({width:this.pixelWidth,height:this.pixelHeight})},_getContext:function(a,b,c){var d=this.canvas.getContext("2d");return void 0!==a&&(d.strokeStyle=a),d.lineWidth=void 0===c?1:c,void 0!==b&&(d.fillStyle=b),d},reset:function(){var a=this._getContext();a.clearRect(0,0,this.pixelWidth,this.pixelHeight),this.shapes={},this.shapeseq=[],this.currentTargetShapeId=void 0},_drawShape:function(a,b,c,d,e){var f,g,h=this._getContext(c,d,e);for(h.beginPath(),h.moveTo(b[0][0]+.5,b[0][1]+.5),f=1,g=b.length;g>f;f++)h.lineTo(b[f][0]+.5,b[f][1]+.5);void 0!==c&&h.stroke(),void 0!==d&&h.fill(),void 0!==this.targetX&&void 0!==this.targetY&&h.isPointInPath(this.targetX,this.targetY)&&(this.currentTargetShapeId=a)},_drawCircle:function(a,b,c,d,e,f,g){var h=this._getContext(e,f,g);h.beginPath(),h.arc(b,c,d,0,2*Math.PI,!1),void 0!==this.targetX&&void 0!==this.targetY&&h.isPointInPath(this.targetX,this.targetY)&&(this.currentTargetShapeId=a),void 0!==e&&h.stroke(),void 0!==f&&h.fill()},_drawPieSlice:function(a,b,c,d,e,f,g,h){var i=this._getContext(g,h);i.beginPath(),i.moveTo(b,c),i.arc(b,c,d,e,f,!1),i.lineTo(b,c),i.closePath(),void 0!==g&&i.stroke(),h&&i.fill(),void 0!==this.targetX&&void 0!==this.targetY&&i.isPointInPath(this.targetX,this.targetY)&&(this.currentTargetShapeId=a)},_drawRect:function(a,b,c,d,e,f,g){return this._drawShape(a,[[b,c],[b+d,c],[b+d,c+e],[b,c+e],[b,c]],f,g)},appendShape:function(a){return this.shapes[a.id]=a,this.shapeseq.push(a.id),this.lastShapeId=a.id,a.id},replaceWithShape:function(a,b){var c,d=this.shapeseq;for(this.shapes[b.id]=b,c=d.length;c--;)d[c]==a&&(d[c]=b.id);delete this.shapes[a]},replaceWithShapes:function(a,b){var c,d,e,f=this.shapeseq,g={};for(d=a.length;d--;)g[a[d]]=!0;for(d=f.length;d--;)c=f[d],g[c]&&(f.splice(d,1),delete this.shapes[c],e=d);for(d=b.length;d--;)f.splice(e,0,b[d].id),this.shapes[b[d].id]=b[d]},insertAfterShape:function(a,b){var c,d=this.shapeseq;for(c=d.length;c--;)if(d[c]===a)return d.splice(c+1,0,b.id),void(this.shapes[b.id]=b)},removeShapeId:function(a){var b,c=this.shapeseq;for(b=c.length;b--;)if(c[b]===a){c.splice(b,1);break}delete this.shapes[a]},getShapeAt:function(a,b,c){return this.targetX=b,this.targetY=c,this.render(),this.currentTargetShapeId},render:function(){var a,b,c,d=this.shapeseq,e=this.shapes,f=d.length,g=this._getContext();for(g.clearRect(0,0,this.pixelWidth,this.pixelHeight),c=0;f>c;c++)a=d[c],b=e[a],this["_draw"+b.type].apply(this,b.args);this.interact||(this.shapes={},this.shapeseq=[])}}),F=c(D,{init:function(b,c,d){var e;F._super.init.call(this,b,c,d),d[0]&&(d=d[0]),a.data(d,"_jqs_vcanvas",this),this.canvas=document.createElement("span"),a(this.canvas).css({display:"inline-block",position:"relative",overflow:"hidden",width:b,height:c,margin:"0px",padding:"0px",verticalAlign:"top"}),this._insert(this.canvas,d),this._calculatePixelDims(b,c,this.canvas),this.canvas.width=this.pixelWidth,this.canvas.height=this.pixelHeight,e='<v:group coordorigin="0 0" coordsize="'+this.pixelWidth+" "+this.pixelHeight+'" style="position:absolute;top:0;left:0;width:'+this.pixelWidth+"px;height="+this.pixelHeight+'px;"></v:group>',this.canvas.insertAdjacentHTML("beforeEnd",e),this.group=a(this.canvas).children()[0],this.rendered=!1,this.prerender=""},_drawShape:function(a,b,c,d,e){var f,g,h,i,j,k,l,m=[];for(l=0,k=b.length;k>l;l++)m[l]=""+b[l][0]+","+b[l][1];return f=m.splice(0,1),e=void 0===e?1:e,g=void 0===c?' stroked="false" ':' strokeWeight="'+e+'px" strokeColor="'+c+'" ',h=void 0===d?' filled="false"':' fillColor="'+d+'" filled="true" ',i=m[0]===m[m.length-1]?"x ":"",j='<v:shape coordorigin="0 0" coordsize="'+this.pixelWidth+" "+this.pixelHeight+'"  id="jqsshape'+a+'" '+g+h+' style="position:absolute;left:0px;top:0px;height:'+this.pixelHeight+"px;width:"+this.pixelWidth+'px;padding:0px;margin:0px;"  path="m '+f+" l "+m.join(", ")+" "+i+'e"> </v:shape>'},_drawCircle:function(a,b,c,d,e,f,g){var h,i,j;return b-=d,c-=d,h=void 0===e?' stroked="false" ':' strokeWeight="'+g+'px" strokeColor="'+e+'" ',i=void 0===f?' filled="false"':' fillColor="'+f+'" filled="true" ',j='<v:oval  id="jqsshape'+a+'" '+h+i+' style="position:absolute;top:'+c+"px; left:"+b+"px; width:"+2*d+"px; height:"+2*d+'px"></v:oval>'},_drawPieSlice:function(a,b,c,d,e,f,g,h){var i,j,k,l,m,n,o,p;if(e===f)return"";if(f-e===2*Math.PI&&(e=0,f=2*Math.PI),j=b+Math.round(Math.cos(e)*d),k=c+Math.round(Math.sin(e)*d),l=b+Math.round(Math.cos(f)*d),m=c+Math.round(Math.sin(f)*d),j===l&&k===m){if(f-e<Math.PI)return"";j=l=b+d,k=m=c}return j===l&&k===m&&f-e<Math.PI?"":(i=[b-d,c-d,b+d,c+d,j,k,l,m],n=void 0===g?' stroked="false" ':' strokeWeight="1px" strokeColor="'+g+'" ',o=void 0===h?' filled="false"':' fillColor="'+h+'" filled="true" ',p='<v:shape coordorigin="0 0" coordsize="'+this.pixelWidth+" "+this.pixelHeight+'"  id="jqsshape'+a+'" '+n+o+' style="position:absolute;left:0px;top:0px;height:'+this.pixelHeight+"px;width:"+this.pixelWidth+'px;padding:0px;margin:0px;"  path="m '+b+","+c+" wa "+i.join(", ")+' x e"> </v:shape>')},_drawRect:function(a,b,c,d,e,f,g){return this._drawShape(a,[[b,c],[b,c+e],[b+d,c+e],[b+d,c],[b,c]],f,g)},reset:function(){this.group.innerHTML=""},appendShape:function(a){var b=this["_draw"+a.type].apply(this,a.args);return this.rendered?this.group.insertAdjacentHTML("beforeEnd",b):this.prerender+=b,this.lastShapeId=a.id,a.id},replaceWithShape:function(b,c){var d=a("#jqsshape"+b),e=this["_draw"+c.type].apply(this,c.args);d[0].outerHTML=e},replaceWithShapes:function(b,c){var d,e=a("#jqsshape"+b[0]),f="",g=c.length;for(d=0;g>d;d++)f+=this["_draw"+c[d].type].apply(this,c[d].args);for(e[0].outerHTML=f,d=1;d<b.length;d++)a("#jqsshape"+b[d]).remove()},insertAfterShape:function(b,c){var d=a("#jqsshape"+b),e=this["_draw"+c.type].apply(this,c.args);d[0].insertAdjacentHTML("afterEnd",e)},removeShapeId:function(b){var c=a("#jqsshape"+b);this.group.removeChild(c[0])},getShapeAt:function(a){var b=a.id.substr(8);return b},render:function(){this.rendered||(this.group.innerHTML=this.prerender,this.rendered=!0)}})}),!function(a,b){"use strict";function c(a,b){for(var c,d=[],f=0;f<a.length;++f){if(c=g[a[f]]||e(a[f]),!c)throw"module definition dependecy not found: "+a[f];d.push(c)}b.apply(null,d)}function d(a,d,e){if("string"!=typeof a)throw"invalid module definition, module id must be defined and be a string";if(d===b)throw"invalid module definition, dependencies must be specified";if(e===b)throw"invalid module definition, definition function must be specified";c(d,function(){g[a]=e.apply(null,arguments)})}function e(b){for(var c=a,d=b.split(/[.\/]/),e=0;e<d.length;++e){if(!c[d[e]])return;c=c[d[e]]}return c}function f(c){for(var d=0;d<c.length;d++){for(var e=a,f=c[d],h=f.split(/[.\/]/),i=0;i<h.length-1;++i)e[h[i]]===b&&(e[h[i]]={}),e=e[h[i]];e[h[h.length-1]]=g[f]}}var g={},h="moxie/core/utils/Basic",i="moxie/core/I18n",j="moxie/core/utils/Mime",k="moxie/core/utils/Env",l="moxie/core/utils/Dom",m="moxie/core/Exceptions",n="moxie/core/EventTarget",o="moxie/core/utils/Encode",p="moxie/runtime/Runtime",q="moxie/runtime/RuntimeClient",r="moxie/file/Blob",s="moxie/file/File",t="moxie/file/FileInput",u="moxie/file/FileDrop",v="moxie/runtime/RuntimeTarget",w="moxie/file/FileReader",x="moxie/core/utils/Url",y="moxie/file/FileReaderSync",z="moxie/xhr/FormData",A="moxie/xhr/XMLHttpRequest",B="moxie/runtime/Transporter",C="moxie/image/Image",D="moxie/runtime/html5/Runtime",E="moxie/runtime/html5/file/Blob",F="moxie/core/utils/Events",G="moxie/runtime/html5/file/FileInput",H="moxie/runtime/html5/file/FileDrop",I="moxie/runtime/html5/file/FileReader",J="moxie/runtime/html5/xhr/XMLHttpRequest",K="moxie/runtime/html5/utils/BinaryReader",L="moxie/runtime/html5/image/JPEGHeaders",M="moxie/runtime/html5/image/ExifParser",N="moxie/runtime/html5/image/JPEG",O="moxie/runtime/html5/image/PNG",P="moxie/runtime/html5/image/ImageInfo",Q="moxie/runtime/html5/image/MegaPixel",R="moxie/runtime/html5/image/Image",S="moxie/runtime/flash/Runtime",T="moxie/runtime/flash/file/Blob",U="moxie/runtime/flash/file/FileInput",V="moxie/runtime/flash/file/FileReader",W="moxie/runtime/flash/file/FileReaderSync",X="moxie/runtime/flash/xhr/XMLHttpRequest",Y="moxie/runtime/flash/runtime/Transporter",Z="moxie/runtime/flash/image/Image",$="moxie/runtime/silverlight/Runtime",_="moxie/runtime/silverlight/file/Blob",ab="moxie/runtime/silverlight/file/FileInput",bb="moxie/runtime/silverlight/file/FileDrop",cb="moxie/runtime/silverlight/file/FileReader",db="moxie/runtime/silverlight/file/FileReaderSync",eb="moxie/runtime/silverlight/xhr/XMLHttpRequest",fb="moxie/runtime/silverlight/runtime/Transporter",gb="moxie/runtime/silverlight/image/Image",hb="moxie/runtime/html4/Runtime",ib="moxie/runtime/html4/file/FileInput",jb="moxie/runtime/html4/file/FileReader",kb="moxie/runtime/html4/xhr/XMLHttpRequest",lb="moxie/runtime/html4/image/Image";d(h,[],function(){var a=function(a){var b;return a===b?"undefined":null===a?"null":a.nodeType?"node":{}.toString.call(a).match(/\s([a-z|A-Z]+)/)[1].toLowerCase()},b=function(d){var e;return c(arguments,function(f,h){h>0&&c(f,function(c,f){c!==e&&(a(d[f])===a(c)&&~g(a(c),["array","object"])?b(d[f],c):d[f]=c)})}),d},c=function(a,b){var c,d,e,f;if(a){try{c=a.length}catch(g){c=f}if(c===f){for(d in a)if(a.hasOwnProperty(d)&&b(a[d],d)===!1)return}else for(e=0;c>e;e++)if(b(a[e],e)===!1)return}},d=function(b){var c;if(!b||"object"!==a(b))return!0;for(c in b)return!1;return!0},e=function(b,c){function d(e){"function"===a(b[e])&&b[e](function(a){++e<f&&!a?d(e):c(a)})}var e=0,f=b.length;"function"!==a(c)&&(c=function(){}),b&&b.length||c(),d(e)},f=function(a,b){var d=0,e=a.length,f=new Array(e);c(a,function(a,c){a(function(a){if(a)return b(a);var g=[].slice.call(arguments);g.shift(),f[c]=g,d++,d===e&&(f.unshift(null),b.apply(this,f))})})},g=function(a,b){if(b){if(Array.prototype.indexOf)return Array.prototype.indexOf.call(b,a);for(var c=0,d=b.length;d>c;c++)if(b[c]===a)return c}return-1},h=function(b,c){var d=[];"array"!==a(b)&&(b=[b]),"array"!==a(c)&&(c=[c]);for(var e in b)-1===g(b[e],c)&&d.push(b[e]);return d.length?d:!1},i=function(a,b){var d=[];return c(a,function(a){-1!==g(a,b)&&d.push(a)}),d.length?d:null},j=function(a){var b,c=[];for(b=0;b<a.length;b++)c[b]=a[b];return c},k=function(){var a=0;return function(b){var c,d=(new Date).getTime().toString(32);for(c=0;5>c;c++)d+=Math.floor(65535*Math.random()).toString(32);return(b||"o_")+d+(a++).toString(32)}}(),l=function(a){return a?String.prototype.trim?String.prototype.trim.call(a):a.toString().replace(/^\s*/,"").replace(/\s*$/,""):a},m=function(a){if("string"!=typeof a)return a;var b,c={t:1099511627776,g:1073741824,m:1048576,k:1024};return a=/^([0-9]+)([mgk]?)$/.exec(a.toLowerCase().replace(/[^0-9mkg]/g,"")),b=a[2],a=+a[1],c.hasOwnProperty(b)&&(a*=c[b]),a};return{guid:k,typeOf:a,extend:b,each:c,isEmptyObj:d,inSeries:e,inParallel:f,inArray:g,arrayDiff:h,arrayIntersect:i,toArray:j,trim:l,parseSizeStr:m}}),d(i,[h],function(a){var b={};return{addI18n:function(c){return a.extend(b,c)},translate:function(a){return b[a]||a},_:function(a){return this.translate(a)},sprintf:function(b){var c=[].slice.call(arguments,1);return b.replace(/%[a-z]/g,function(){var b=c.shift();return"undefined"!==a.typeOf(b)?b:""})}}}),d(j,[h,i],function(a,b){var c="application/msword,doc dot,application/pdf,pdf,application/pgp-signature,pgp,application/postscript,ps ai eps,application/rtf,rtf,application/vnd.ms-excel,xls xlb,application/vnd.ms-powerpoint,ppt pps pot,application/zip,zip,application/x-shockwave-flash,swf swfl,application/vnd.openxmlformats-officedocument.wordprocessingml.document,docx,application/vnd.openxmlformats-officedocument.wordprocessingml.template,dotx,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,xlsx,application/vnd.openxmlformats-officedocument.presentationml.presentation,pptx,application/vnd.openxmlformats-officedocument.presentationml.template,potx,application/vnd.openxmlformats-officedocument.presentationml.slideshow,ppsx,application/x-javascript,js,application/json,json,audio/mpeg,mp3 mpga mpega mp2,audio/x-wav,wav,audio/x-m4a,m4a,audio/ogg,oga ogg,audio/aiff,aiff aif,audio/flac,flac,audio/aac,aac,audio/ac3,ac3,audio/x-ms-wma,wma,image/bmp,bmp,image/gif,gif,image/jpeg,jpg jpeg jpe,image/photoshop,psd,image/png,png,image/svg+xml,svg svgz,image/tiff,tiff tif,text/plain,asc txt text diff log,text/html,htm html xhtml,text/css,css,text/csv,csv,text/rtf,rtf,video/mpeg,mpeg mpg mpe m2v,video/quicktime,qt mov,video/mp4,mp4,video/x-m4v,m4v,video/x-flv,flv,video/x-ms-wmv,wmv,video/avi,avi,video/webm,webm,video/3gpp,3gpp 3gp,video/3gpp2,3g2,video/vnd.rn-realvideo,rv,video/ogg,ogv,video/x-matroska,mkv,application/vnd.oasis.opendocument.formula-template,otf,application/octet-stream,exe",d={mimes:{},extensions:{},addMimeType:function(a){var b,c,d,e=a.split(/,/);for(b=0;b<e.length;b+=2){for(d=e[b+1].split(/ /),c=0;c<d.length;c++)this.mimes[d[c]]=e[b];this.extensions[e[b]]=d}},extList2mimes:function(b,c){var d,e,f,g,h=this,i=[];for(e=0;e<b.length;e++)for(d=b[e].extensions.split(/\s*,\s*/),f=0;f<d.length;f++){if("*"===d[f])return[];if(g=h.mimes[d[f]])-1===a.inArray(g,i)&&i.push(g);else{if(!c||!/^\w+$/.test(d[f]))return[];i.push("."+d[f])}}return i},mimes2exts:function(b){var c=this,d=[];return a.each(b,function(b){if("*"===b)return d=[],!1;var e=b.match(/^(\w+)\/(\*|\w+)$/);e&&("*"===e[2]?a.each(c.extensions,function(a,b){new RegExp("^"+e[1]+"/").test(b)&&[].push.apply(d,c.extensions[b])}):c.extensions[b]&&[].push.apply(d,c.extensions[b]))}),d},mimes2extList:function(c){var d=[],e=[];return"string"===a.typeOf(c)&&(c=a.trim(c).split(/\s*,\s*/)),e=this.mimes2exts(c),d.push({title:b.translate("Files"),extensions:e.length?e.join(","):"*"}),d.mimes=c,d},getFileExtension:function(a){var b=a&&a.match(/\.([^.]+)$/);return b?b[1].toLowerCase():""},getFileMime:function(a){return this.mimes[this.getFileExtension(a)]||""}};return d.addMimeType(c),d}),d(k,[h],function(a){function b(a,b,c){var d=0,e=0,f=0,g={dev:-6,alpha:-5,a:-5,beta:-4,b:-4,RC:-3,rc:-3,"#":-2,p:1,pl:1},h=function(a){return a=(""+a).replace(/[_\-+]/g,"."),a=a.replace(/([^.\d]+)/g,".$1.").replace(/\.{2,}/g,"."),a.length?a.split("."):[-8]},i=function(a){return a?isNaN(a)?g[a]||-7:parseInt(a,10):0};for(a=h(a),b=h(b),e=Math.max(a.length,b.length),d=0;e>d;d++)if(a[d]!=b[d]){if(a[d]=i(a[d]),b[d]=i(b[d]),a[d]<b[d]){f=-1;break}if(a[d]>b[d]){f=1;break}}if(!c)return f;switch(c){case">":case"gt":return f>0;case">=":case"ge":return f>=0;case"<=":case"le":return 0>=f;case"==":case"=":case"eq":return 0===f;case"<>":case"!=":case"ne":return 0!==f;case"":case"<":case"lt":return 0>f;default:return null}}var c=function(a){var b="",c="?",d="function",e="undefined",f="object",g="major",h="name",i="version",j={has:function(a,b){return-1!==b.toLowerCase().indexOf(a.toLowerCase())},lowerize:function(a){return a.toLowerCase()}},k={rgx:function(){for(var b,c,g,h,i,j,k,l=0,m=arguments;l<m.length;l+=2){var n=m[l],o=m[l+1];if(typeof b===e){b={};for(h in o)i=o[h],typeof i===f?b[i[0]]=a:b[i]=a}for(c=g=0;c<n.length;c++)if(j=n[c].exec(this.getUA())){for(h=0;h<o.length;h++)k=j[++g],i=o[h],typeof i===f&&i.length>0?2==i.length?b[i[0]]=typeof i[1]==d?i[1].call(this,k):i[1]:3==i.length?b[i[0]]=typeof i[1]!==d||i[1].exec&&i[1].test?k?k.replace(i[1],i[2]):a:k?i[1].call(this,k,i[2]):a:4==i.length&&(b[i[0]]=k?i[3].call(this,k.replace(i[1],i[2])):a):b[i]=k?k:a;break}if(j)break}return b},str:function(b,d){for(var e in d)if(typeof d[e]===f&&d[e].length>0){for(var g=0;g<d[e].length;g++)if(j.has(d[e][g],b))return e===c?a:e}else if(j.has(d[e],b))return e===c?a:e;return b}},l={browser:{oldsafari:{major:{1:["/8","/1","/3"],2:"/4","?":"/"},version:{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}}},device:{sprint:{model:{"Evo Shift 4G":"7373KT"},vendor:{HTC:"APA",Sprint:"Sprint"}}},os:{windows:{version:{ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",RT:"ARM"}}}},m={browser:[[/(opera\smini)\/((\d+)?[\w\.-]+)/i,/(opera\s[mobiletab]+).+version\/((\d+)?[\w\.-]+)/i,/(opera).+version\/((\d+)?[\w\.]+)/i,/(opera)[\/\s]+((\d+)?[\w\.]+)/i],[h,i,g],[/\s(opr)\/((\d+)?[\w\.]+)/i],[[h,"Opera"],i,g],[/(kindle)\/((\d+)?[\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?((\d+)?[\w\.]+)*/i,/(avant\s|iemobile|slim|baidu)(?:browser)?[\/\s]?((\d+)?[\w\.]*)/i,/(?:ms|\()(ie)\s((\d+)?[\w\.]+)/i,/(rekonq)((?:\/)[\w\.]+)*/i,/(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron)\/((\d+)?[\w\.-]+)/i],[h,i,g],[/(trident).+rv[:\s]((\d+)?[\w\.]+).+like\sgecko/i],[[h,"IE"],i,g],[/(yabrowser)\/((\d+)?[\w\.]+)/i],[[h,"Yandex"],i,g],[/(comodo_dragon)\/((\d+)?[\w\.]+)/i],[[h,/_/g," "],i,g],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?((\d+)?[\w\.]+)/i],[h,i,g],[/(dolfin)\/((\d+)?[\w\.]+)/i],[[h,"Dolphin"],i,g],[/((?:android.+)crmo|crios)\/((\d+)?[\w\.]+)/i],[[h,"Chrome"],i,g],[/((?:android.+))version\/((\d+)?[\w\.]+)\smobile\ssafari/i],[[h,"Android Browser"],i,g],[/version\/((\d+)?[\w\.]+).+?mobile\/\w+\s(safari)/i],[i,g,[h,"Mobile Safari"]],[/version\/((\d+)?[\w\.]+).+?(mobile\s?safari|safari)/i],[i,g,h],[/webkit.+?(mobile\s?safari|safari)((\/[\w\.]+))/i],[h,[g,k.str,l.browser.oldsafari.major],[i,k.str,l.browser.oldsafari.version]],[/(konqueror)\/((\d+)?[\w\.]+)/i,/(webkit|khtml)\/((\d+)?[\w\.]+)/i],[h,i,g],[/(navigator|netscape)\/((\d+)?[\w\.-]+)/i],[[h,"Netscape"],i,g],[/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?((\d+)?[\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix)\/((\d+)?[\w\.-]+)/i,/(mozilla)\/((\d+)?[\w\.]+).+rv\:.+gecko\/\d+/i,/(uc\s?browser|polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|qqbrowser)[\/\s]?((\d+)?[\w\.]+)/i,/(links)\s\(((\d+)?[\w\.]+)/i,/(gobrowser)\/?((\d+)?[\w\.]+)*/i,/(ice\s?browser)\/v?((\d+)?[\w\._]+)/i,/(mosaic)[\/\s]((\d+)?[\w\.]+)/i],[h,i,g]],engine:[[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[h,i],[/rv\:([\w\.]+).*(gecko)/i],[i,h]],os:[[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*|windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[h,[i,k.str,l.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[h,"Windows"],[i,k.str,l.os.windows.version]],[/\((bb)(10);/i],[[h,"BlackBerry"],i],[/(blackberry)\w*\/?([\w\.]+)*/i,/(tizen)\/([\w\.]+)/i,/(android|webos|palm\os|qnx|bada|rim\stablet\sos|meego)[\/\s-]?([\w\.]+)*/i],[h,i],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]+)*/i],[[h,"Symbian"],i],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[h,"Firefox OS"],i],[/(nintendo|playstation)\s([wids3portablevu]+)/i,/(mint)[\/\s\(]?(\w+)*/i,/(joli|[kxln]?ubuntu|debian|[open]*suse|gentoo|arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk)[\/\s-]?([\w\.-]+)*/i,/(hurd|linux)\s?([\w\.]+)*/i,/(gnu)\s?([\w\.]+)*/i],[h,i],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[h,"Chromium OS"],i],[/(sunos)\s?([\w\.]+\d)*/i],[[h,"Solaris"],i],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]+)*/i],[h,i],[/(ip[honead]+)(?:.*os\s*([\w]+)*\slike\smac|;\sopera)/i],[[h,"iOS"],[i,/_/g,"."]],[/(mac\sos\sx)\s?([\w\s\.]+\w)*/i],[h,[i,/_/g,"."]],[/(haiku)\s(\w+)/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.]*)*/i,/(macintosh|mac(?=_powerpc)|plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos)/i,/(unix)\s?([\w\.]+)*/i],[h,i]]},n=function(a){var c=a||(window&&window.navigator&&window.navigator.userAgent?window.navigator.userAgent:b);
  this.getBrowser=function(){return k.rgx.apply(this,m.browser)},this.getEngine=function(){return k.rgx.apply(this,m.engine)},this.getOS=function(){return k.rgx.apply(this,m.os)},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS()}},this.getUA=function(){return c},this.setUA=function(a){return c=a,this},this.setUA(c)};return(new n).getResult()}(),d=function(){var b={define_property:function(){return!1}(),create_canvas:function(){var a=document.createElement("canvas");return!(!a.getContext||!a.getContext("2d"))}(),return_response_type:function(b){try{if(-1!==a.inArray(b,["","text","document"]))return!0;if(window.XMLHttpRequest){var c=new XMLHttpRequest;if(c.open("get","/"),"responseType"in c)return c.responseType=b,c.responseType!==b?!1:!0}}catch(d){}return!1},use_data_uri:function(){var a=new Image;return a.onload=function(){b.use_data_uri=1===a.width&&1===a.height},setTimeout(function(){a.src="data:image/gif;base64,R0lGODlhAQABAIAAAP8AAAAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw=="},1),!1}(),use_data_uri_over32kb:function(){return b.use_data_uri&&("IE"!==e.browser||e.version>=9)},use_data_uri_of:function(a){return b.use_data_uri&&33e3>a||b.use_data_uri_over32kb()},use_fileinput:function(){var a=document.createElement("input");return a.setAttribute("type","file"),!a.disabled}};return function(c){var d=[].slice.call(arguments);return d.shift(),"function"===a.typeOf(b[c])?b[c].apply(this,d):!!b[c]}}(),e={can:d,browser:c.browser.name,version:parseFloat(c.browser.major),os:c.os.name,osVersion:c.os.version,verComp:b,swf_url:"../flash/Moxie.swf",xap_url:"../silverlight/Moxie.xap",global_event_dispatcher:"moxie.core.EventTarget.instance.dispatchEvent"};return e.OS=e.os,e}),d(l,[k],function(a){var b=function(a){return"string"!=typeof a?a:document.getElementById(a)},c=function(a,b){if(!a.className)return!1;var c=new RegExp("(^|\\s+)"+b+"(\\s+|$)");return c.test(a.className)},d=function(a,b){c(a,b)||(a.className=a.className?a.className.replace(/\s+$/,"")+" "+b:b)},e=function(a,b){if(a.className){var c=new RegExp("(^|\\s+)"+b+"(\\s+|$)");a.className=a.className.replace(c,function(a,b,c){return" "===b&&" "===c?" ":""})}},f=function(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null)[b]:void 0},g=function(b,c){function d(a){var b,c,d=0,e=0;return a&&(c=a.getBoundingClientRect(),b="CSS1Compat"===j.compatMode?j.documentElement:j.body,d=c.left+b.scrollLeft,e=c.top+b.scrollTop),{x:d,y:e}}var e,f,g,h=0,i=0,j=document;if(b=b,c=c||j.body,b&&b.getBoundingClientRect&&"IE"===a.browser&&(!j.documentMode||j.documentMode<8))return f=d(b),g=d(c),{x:f.x-g.x,y:f.y-g.y};for(e=b;e&&e!=c&&e.nodeType;)h+=e.offsetLeft||0,i+=e.offsetTop||0,e=e.offsetParent;for(e=b.parentNode;e&&e!=c&&e.nodeType;)h-=e.scrollLeft||0,i-=e.scrollTop||0,e=e.parentNode;return{x:h,y:i}},h=function(a){return{w:a.offsetWidth||a.clientWidth,h:a.offsetHeight||a.clientHeight}};return{get:b,hasClass:c,addClass:d,removeClass:e,getStyle:f,getPos:g,getSize:h}}),d(m,[h],function(a){function b(a,b){var c;for(c in a)if(a[c]===b)return c;return null}return{RuntimeError:function(){function c(a){this.code=a,this.name=b(d,a),this.message=this.name+": RuntimeError "+this.code}var d={NOT_INIT_ERR:1,NOT_SUPPORTED_ERR:9,JS_ERR:4};return a.extend(c,d),c.prototype=Error.prototype,c}(),OperationNotAllowedException:function(){function b(a){this.code=a,this.name="OperationNotAllowedException"}return a.extend(b,{NOT_ALLOWED_ERR:1}),b.prototype=Error.prototype,b}(),ImageError:function(){function c(a){this.code=a,this.name=b(d,a),this.message=this.name+": ImageError "+this.code}var d={WRONG_FORMAT:1,MAX_RESOLUTION_ERR:2};return a.extend(c,d),c.prototype=Error.prototype,c}(),FileException:function(){function c(a){this.code=a,this.name=b(d,a),this.message=this.name+": FileException "+this.code}var d={NOT_FOUND_ERR:1,SECURITY_ERR:2,ABORT_ERR:3,NOT_READABLE_ERR:4,ENCODING_ERR:5,NO_MODIFICATION_ALLOWED_ERR:6,INVALID_STATE_ERR:7,SYNTAX_ERR:8};return a.extend(c,d),c.prototype=Error.prototype,c}(),DOMException:function(){function c(a){this.code=a,this.name=b(d,a),this.message=this.name+": DOMException "+this.code}var d={INDEX_SIZE_ERR:1,DOMSTRING_SIZE_ERR:2,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,INVALID_CHARACTER_ERR:5,NO_DATA_ALLOWED_ERR:6,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INUSE_ATTRIBUTE_ERR:10,INVALID_STATE_ERR:11,SYNTAX_ERR:12,INVALID_MODIFICATION_ERR:13,NAMESPACE_ERR:14,INVALID_ACCESS_ERR:15,VALIDATION_ERR:16,TYPE_MISMATCH_ERR:17,SECURITY_ERR:18,NETWORK_ERR:19,ABORT_ERR:20,URL_MISMATCH_ERR:21,QUOTA_EXCEEDED_ERR:22,TIMEOUT_ERR:23,INVALID_NODE_TYPE_ERR:24,DATA_CLONE_ERR:25};return a.extend(c,d),c.prototype=Error.prototype,c}(),EventException:function(){function b(a){this.code=a,this.name="EventException"}return a.extend(b,{UNSPECIFIED_EVENT_TYPE_ERR:0}),b.prototype=Error.prototype,b}()}}),d(n,[m,h],function(a,b){function c(){var c={};b.extend(this,{uid:null,init:function(){this.uid||(this.uid=b.guid("uid_"))},addEventListener:function(a,d,e,f){var g,h=this;return a=b.trim(a),/\s/.test(a)?void b.each(a.split(/\s+/),function(a){h.addEventListener(a,d,e,f)}):(a=a.toLowerCase(),e=parseInt(e,10)||0,g=c[this.uid]&&c[this.uid][a]||[],g.push({fn:d,priority:e,scope:f||this}),c[this.uid]||(c[this.uid]={}),void(c[this.uid][a]=g))},hasEventListener:function(a){return a?!(!c[this.uid]||!c[this.uid][a]):!!c[this.uid]},removeEventListener:function(a,d){a=a.toLowerCase();var e,f=c[this.uid]&&c[this.uid][a];if(f){if(d){for(e=f.length-1;e>=0;e--)if(f[e].fn===d){f.splice(e,1);break}}else f=[];f.length||(delete c[this.uid][a],b.isEmptyObj(c[this.uid])&&delete c[this.uid])}},removeAllEventListeners:function(){c[this.uid]&&delete c[this.uid]},dispatchEvent:function(d){var e,f,g,h,i,j={},k=!0;if("string"!==b.typeOf(d)){if(h=d,"string"!==b.typeOf(h.type))throw new a.EventException(a.EventException.UNSPECIFIED_EVENT_TYPE_ERR);d=h.type,h.total!==i&&h.loaded!==i&&(j.total=h.total,j.loaded=h.loaded),j.async=h.async||!1}if(-1!==d.indexOf("::")?!function(a){e=a[0],d=a[1]}(d.split("::")):e=this.uid,d=d.toLowerCase(),f=c[e]&&c[e][d]){f.sort(function(a,b){return b.priority-a.priority}),g=[].slice.call(arguments),g.shift(),j.type=d,g.unshift(j);var l=[];b.each(f,function(a){g[0].target=a.scope,l.push(j.async?function(b){setTimeout(function(){b(a.fn.apply(a.scope,g)===!1)},1)}:function(b){b(a.fn.apply(a.scope,g)===!1)})}),l.length&&b.inSeries(l,function(a){k=!a})}return k},bind:function(){this.addEventListener.apply(this,arguments)},unbind:function(){this.removeEventListener.apply(this,arguments)},unbindAll:function(){this.removeAllEventListeners.apply(this,arguments)},trigger:function(){return this.dispatchEvent.apply(this,arguments)},convertEventPropsToHandlers:function(a){var c;"array"!==b.typeOf(a)&&(a=[a]);for(var d=0;d<a.length;d++)c="on"+a[d],"function"===b.typeOf(this[c])?this.addEventListener(a[d],this[c]):"undefined"===b.typeOf(this[c])&&(this[c]=null)}})}return c.instance=new c,c}),d(o,[],function(){var a=function(a){return unescape(encodeURIComponent(a))},b=function(a){return decodeURIComponent(escape(a))},c=function(a,c){if("function"==typeof window.atob)return c?b(window.atob(a)):window.atob(a);var d,e,f,g,h,i,j,k,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",m=0,n=0,o="",p=[];if(!a)return a;a+="";do g=l.indexOf(a.charAt(m++)),h=l.indexOf(a.charAt(m++)),i=l.indexOf(a.charAt(m++)),j=l.indexOf(a.charAt(m++)),k=g<<18|h<<12|i<<6|j,d=k>>16&255,e=k>>8&255,f=255&k,p[n++]=64==i?String.fromCharCode(d):64==j?String.fromCharCode(d,e):String.fromCharCode(d,e,f);while(m<a.length);return o=p.join(""),c?b(o):o},d=function(b,c){if(c&&a(b),"function"==typeof window.btoa)return window.btoa(b);var d,e,f,g,h,i,j,k,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",m=0,n=0,o="",p=[];if(!b)return b;do d=b.charCodeAt(m++),e=b.charCodeAt(m++),f=b.charCodeAt(m++),k=d<<16|e<<8|f,g=k>>18&63,h=k>>12&63,i=k>>6&63,j=63&k,p[n++]=l.charAt(g)+l.charAt(h)+l.charAt(i)+l.charAt(j);while(m<b.length);o=p.join("");var q=b.length%3;return(q?o.slice(0,q-3):o)+"===".slice(q||3)};return{utf8_encode:a,utf8_decode:b,atob:c,btoa:d}}),d(p,[h,l,n],function(a,b,c){function d(c,e,g,h,i){var j,k=this,l=a.guid(e+"_"),m=i||"browser";c=c||{},f[l]=this,g=a.extend({access_binary:!1,access_image_binary:!1,display_media:!1,do_cors:!1,drag_and_drop:!1,filter_by_extension:!0,resize_image:!1,report_upload_progress:!1,return_response_headers:!1,return_response_type:!1,return_status_code:!0,send_custom_headers:!1,select_file:!1,select_folder:!1,select_multiple:!0,send_binary_string:!1,send_browser_cookies:!0,send_multipart:!0,slice_blob:!1,stream_upload:!1,summon_file_dialog:!1,upload_filesize:!0,use_http_method:!0},g),c.preferred_caps&&(m=d.getMode(h,c.preferred_caps,m)),j=function(){var b={};return{exec:function(a,c,d,e){return j[c]&&(b[a]||(b[a]={context:this,instance:new j[c]}),b[a].instance[d])?b[a].instance[d].apply(this,e):void 0},removeInstance:function(a){delete b[a]},removeAllInstances:function(){var c=this;a.each(b,function(b,d){"function"===a.typeOf(b.instance.destroy)&&b.instance.destroy.call(b.context),c.removeInstance(d)})}}}(),a.extend(this,{initialized:!1,uid:l,type:e,mode:d.getMode(h,c.required_caps,m),shimid:l+"_container",clients:0,options:c,can:function(b,c){var e=arguments[2]||g;if("string"===a.typeOf(b)&&"undefined"===a.typeOf(c)&&(b=d.parseCaps(b)),"object"===a.typeOf(b)){for(var f in b)if(!this.can(f,b[f],e))return!1;return!0}return"function"===a.typeOf(e[b])?e[b].call(this,c):c===e[b]},getShimContainer:function(){var c,d=b.get(this.shimid);return d||(c=this.options.container?b.get(this.options.container):document.body,d=document.createElement("div"),d.id=this.shimid,d.className="moxie-shim moxie-shim-"+this.type,a.extend(d.style,{position:"absolute",top:"0px",left:"0px",width:"1px",height:"1px",overflow:"hidden"}),c.appendChild(d),c=null),d},getShim:function(){return j},shimExec:function(a,b){var c=[].slice.call(arguments,2);return k.getShim().exec.call(this,this.uid,a,b,c)},exec:function(a,b){var c=[].slice.call(arguments,2);return k[a]&&k[a][b]?k[a][b].apply(this,c):k.shimExec.apply(this,arguments)},destroy:function(){if(k){var a=b.get(this.shimid);a&&a.parentNode.removeChild(a),j&&j.removeAllInstances(),this.unbindAll(),delete f[this.uid],this.uid=null,l=k=j=a=null}}}),this.mode&&c.required_caps&&!this.can(c.required_caps)&&(this.mode=!1)}var e={},f={};return d.order="html5,flash,silverlight,html4",d.getRuntime=function(a){return f[a]?f[a]:!1},d.addConstructor=function(a,b){b.prototype=c.instance,e[a]=b},d.getConstructor=function(a){return e[a]||null},d.getInfo=function(a){var b=d.getRuntime(a);return b?{uid:b.uid,type:b.type,mode:b.mode,can:function(){return b.can.apply(b,arguments)}}:null},d.parseCaps=function(b){var c={};return"string"!==a.typeOf(b)?b||{}:(a.each(b.split(","),function(a){c[a]=!0}),c)},d.can=function(a,b){var c,e,f=d.getConstructor(a);return f?(c=new f({required_caps:b}),e=c.mode,c.destroy(),!!e):!1},d.thatCan=function(a,b){var c=(b||d.order).split(/\s*,\s*/);for(var e in c)if(d.can(c[e],a))return c[e];return null},d.getMode=function(b,c,d){var e=null;if("undefined"===a.typeOf(d)&&(d="browser"),c&&!a.isEmptyObj(b)){if(a.each(c,function(c,d){if(b.hasOwnProperty(d)){var f=b[d](c);if("string"==typeof f&&(f=[f]),e){if(!(e=a.arrayIntersect(e,f)))return e=!1}else e=f}}),e)return-1!==a.inArray(d,e)?d:e[0];if(e===!1)return!1}return d},d.capTrue=function(){return!0},d.capFalse=function(){return!1},d.capTest=function(a){return function(){return!!a}},d}),d(q,[m,h,p],function(a,b,c){return function d(){var d;b.extend(this,{connectRuntime:function(e){function f(b){var g,i;return b.length?(g=b.shift(),(i=c.getConstructor(g))?(d=new i(e),d.bind("Init",function(){d.initialized=!0,setTimeout(function(){d.clients++,h.trigger("RuntimeInit",d)},1)}),d.bind("Error",function(){d.destroy(),f(b)}),d.mode?void d.init():void d.trigger("Error")):void f(b)):(h.trigger("RuntimeError",new a.RuntimeError(a.RuntimeError.NOT_INIT_ERR)),void(d=null))}var g,h=this;if("string"===b.typeOf(e)?g=e:"string"===b.typeOf(e.ruid)&&(g=e.ruid),g){if(d=c.getRuntime(g))return d.clients++,d;throw new a.RuntimeError(a.RuntimeError.NOT_INIT_ERR)}f((e.runtime_order||c.order).split(/\s*,\s*/))},getRuntime:function(){return d&&d.uid?d:(d=null,null)},disconnectRuntime:function(){d&&--d.clients<=0&&(d.destroy(),d=null)}})}}),d(r,[h,o,q],function(a,b,c){function d(f,g){function h(b,c,f){var g,h=e[this.uid];return"string"===a.typeOf(h)&&h.length?(g=new d(null,{type:f,size:c-b}),g.detach(h.substr(b,g.size)),g):null}c.call(this),f&&this.connectRuntime(f),g?"string"===a.typeOf(g)&&(g={data:g}):g={},a.extend(this,{uid:g.uid||a.guid("uid_"),ruid:f,size:g.size||0,type:g.type||"",slice:function(a,b,c){return this.isDetached()?h.apply(this,arguments):this.getRuntime().exec.call(this,"Blob","slice",this.getSource(),a,b,c)},getSource:function(){return e[this.uid]?e[this.uid]:null},detach:function(a){this.ruid&&(this.getRuntime().exec.call(this,"Blob","destroy"),this.disconnectRuntime(),this.ruid=null),a=a||"";var c=a.match(/^data:([^;]*);base64,/);c&&(this.type=c[1],a=b.atob(a.substring(a.indexOf("base64,")+7))),this.size=a.length,e[this.uid]=a},isDetached:function(){return!this.ruid&&"string"===a.typeOf(e[this.uid])},destroy:function(){this.detach(),delete e[this.uid]}}),g.data?this.detach(g.data):e[this.uid]=g}var e={};return d}),d(s,[h,j,r],function(a,b,c){function d(d,e){var f,g;if(e||(e={}),g=e.type&&""!==e.type?e.type:b.getFileMime(e.name),e.name)f=e.name.replace(/\\/g,"/"),f=f.substr(f.lastIndexOf("/")+1);else{var h=g.split("/")[0];f=a.guid((""!==h?h:"file")+"_"),b.extensions[g]&&(f+="."+b.extensions[g][0])}c.apply(this,arguments),a.extend(this,{type:g||"",name:f||a.guid("file_"),lastModifiedDate:e.lastModifiedDate||(new Date).toLocaleString()})}return d.prototype=c.prototype,d}),d(t,[h,j,l,m,n,i,s,p,q],function(a,b,c,d,e,f,g,h,i){function j(e){var j,l,m,n=this;if(-1!==a.inArray(a.typeOf(e),["string","node"])&&(e={browse_button:e}),l=c.get(e.browse_button),!l)throw new d.DOMException(d.DOMException.NOT_FOUND_ERR);m={accept:[{title:f.translate("All Files"),extensions:"*"}],name:"file",multiple:!1,required_caps:!1,container:l.parentNode||document.body},e=a.extend({},m,e),"string"==typeof e.required_caps&&(e.required_caps=h.parseCaps(e.required_caps)),"string"==typeof e.accept&&(e.accept=b.mimes2extList(e.accept)),j=c.get(e.container),j||(j=document.body),"static"===c.getStyle(j,"position")&&(j.style.position="relative"),j=l=null,i.call(n),a.extend(n,{uid:a.guid("uid_"),ruid:null,shimid:null,files:null,init:function(){n.convertEventPropsToHandlers(k),n.bind("RuntimeInit",function(b,d){n.ruid=d.uid,n.shimid=d.shimid,n.bind("Ready",function(){n.trigger("Refresh")},999),n.bind("Change",function(){var b=d.exec.call(n,"FileInput","getFiles");n.files=[],a.each(b,function(a){return 0===a.size?!0:void n.files.push(new g(n.ruid,a))})},999),n.bind("Refresh",function(){var b,f,g,h;g=c.get(e.browse_button),h=c.get(d.shimid),g&&(b=c.getPos(g,c.get(e.container)),f=c.getSize(g),h&&a.extend(h.style,{top:b.y+"px",left:b.x+"px",width:f.w+"px",height:f.h+"px"})),h=g=null}),d.exec.call(n,"FileInput","init",e)}),n.connectRuntime(a.extend({},e,{required_caps:{select_file:!0}}))},disable:function(b){var c=this.getRuntime();c&&c.exec.call(this,"FileInput","disable","undefined"===a.typeOf(b)?!0:b)},refresh:function(){n.trigger("Refresh")},destroy:function(){var b=this.getRuntime();b&&(b.exec.call(this,"FileInput","destroy"),this.disconnectRuntime()),"array"===a.typeOf(this.files)&&a.each(this.files,function(a){a.destroy()}),this.files=null}})}var k=["ready","change","cancel","mouseenter","mouseleave","mousedown","mouseup"];return j.prototype=e.instance,j}),d(u,[i,l,m,h,s,q,n,j],function(a,b,c,d,e,f,g,h){function i(c){var g,i=this;"string"==typeof c&&(c={drop_zone:c}),g={accept:[{title:a.translate("All Files"),extensions:"*"}],required_caps:{drag_and_drop:!0}},c="object"==typeof c?d.extend({},g,c):g,c.container=b.get(c.drop_zone)||document.body,"static"===b.getStyle(c.container,"position")&&(c.container.style.position="relative"),"string"==typeof c.accept&&(c.accept=h.mimes2extList(c.accept)),f.call(i),d.extend(i,{uid:d.guid("uid_"),ruid:null,files:null,init:function(){i.convertEventPropsToHandlers(j),i.bind("RuntimeInit",function(a,b){i.ruid=b.uid,i.bind("Drop",function(){var a=b.exec.call(i,"FileDrop","getFiles");i.files=[],d.each(a,function(a){i.files.push(new e(i.ruid,a))})},999),b.exec.call(i,"FileDrop","init",c),i.dispatchEvent("ready")}),i.connectRuntime(c)},destroy:function(){var a=this.getRuntime();a&&(a.exec.call(this,"FileDrop","destroy"),this.disconnectRuntime()),this.files=null}})}var j=["ready","dragenter","dragleave","drop","error"];return i.prototype=g.instance,i}),d(v,[h,q,n],function(a,b,c){function d(){this.uid=a.guid("uid_"),b.call(this),this.destroy=function(){this.disconnectRuntime(),this.unbindAll()}}return d.prototype=c.instance,d}),d(w,[h,o,m,n,r,s,v],function(a,b,c,d,e,f,g){function h(){function d(a,d){function k(a){j.readyState=h.DONE,j.error=a,j.trigger("error"),l()}function l(){f.destroy(),f=null,j.trigger("loadend")}function m(b){f.bind("Error",function(a,b){k(b)}),f.bind("Progress",function(a){j.result=b.exec.call(f,"FileReader","getResult"),j.trigger(a)}),f.bind("Load",function(a){j.readyState=h.DONE,j.result=b.exec.call(f,"FileReader","getResult"),j.trigger(a),l()}),b.exec.call(f,"FileReader","read",a,d)}if(f=new g,this.convertEventPropsToHandlers(i),this.readyState===h.LOADING)return k(new c.DOMException(c.DOMException.INVALID_STATE_ERR));if(this.readyState=h.LOADING,this.trigger("loadstart"),d instanceof e)if(d.isDetached()){var n=d.getSource();switch(a){case"readAsText":case"readAsBinaryString":this.result=n;break;case"readAsDataURL":this.result="data:"+d.type+";base64,"+b.btoa(n)}this.readyState=h.DONE,this.trigger("load"),l()}else m(f.connectRuntime(d.ruid));else k(new c.DOMException(c.DOMException.NOT_FOUND_ERR))}var f,j=this;a.extend(this,{uid:a.guid("uid_"),readyState:h.EMPTY,result:null,error:null,readAsBinaryString:function(a){d.call(this,"readAsBinaryString",a)},readAsDataURL:function(a){d.call(this,"readAsDataURL",a)},readAsText:function(a){d.call(this,"readAsText",a)},abort:function(){this.result=null,-1===a.inArray(this.readyState,[h.EMPTY,h.DONE])&&(this.readyState===h.LOADING&&(this.readyState=h.DONE),f&&f.getRuntime().exec.call(this,"FileReader","abort"),this.trigger("abort"),this.trigger("loadend"))},destroy:function(){this.abort(),f&&(f.getRuntime().exec.call(this,"FileReader","destroy"),f.disconnectRuntime()),j=f=null}})}var i=["loadstart","progress","load","abort","error","loadend"];return h.EMPTY=0,h.LOADING=1,h.DONE=2,h.prototype=d.instance,h}),d(x,[],function(){var a=function(b,c){for(var d=["source","scheme","authority","userInfo","user","pass","host","port","relative","path","directory","file","query","fragment"],e=d.length,f={http:80,https:443},g={},h=/^(?:([^:\/?#]+):)?(?:\/\/()(?:(?:()(?:([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?()(?:(()(?:(?:[^?#\/]*\/)*)()(?:[^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,i=h.exec(b||"");e--;)i[e]&&(g[d[e]]=i[e]);if(!g.scheme){c&&"string"!=typeof c||(c=a(c||document.location.href)),g.scheme=c.scheme,g.host=c.host,g.port=c.port;var j="";/^[^\/]/.test(g.path)&&(j=c.path,/(\/|\/[^\.]+)$/.test(j)?j+="/":j=j.replace(/\/[^\/]+$/,"/")),g.path=j+(g.path||"")}return g.port||(g.port=f[g.scheme]||80),g.port=parseInt(g.port,10),g.path||(g.path="/"),delete g.source,g},b=function(b){var c={http:80,https:443},d=a(b);return d.scheme+"://"+d.host+(d.port!==c[d.scheme]?":"+d.port:"")+d.path+(d.query?d.query:"")},c=function(b){function c(a){return[a.scheme,a.host,a.port].join("/")}return"string"==typeof b&&(b=a(b)),c(a())===c(b)};return{parseUrl:a,resolveUrl:b,hasSameOrigin:c}}),d(y,[h,q,o],function(a,b,c){return function(){function d(a,b){if(!b.isDetached()){var d=this.connectRuntime(b.ruid).exec.call(this,"FileReaderSync","read",a,b);return this.disconnectRuntime(),d}var e=b.getSource();switch(a){case"readAsBinaryString":return e;case"readAsDataURL":return"data:"+b.type+";base64,"+c.btoa(e);case"readAsText":for(var f="",g=0,h=e.length;h>g;g++)f+=String.fromCharCode(e[g]);return f}}b.call(this),a.extend(this,{uid:a.guid("uid_"),readAsBinaryString:function(a){return d.call(this,"readAsBinaryString",a)},readAsDataURL:function(a){return d.call(this,"readAsDataURL",a)},readAsText:function(a){return d.call(this,"readAsText",a)}})}}),d(z,[m,h,r],function(a,b,c){function d(){var a,d=[];b.extend(this,{append:function(e,f){var g=this,h=b.typeOf(f);f instanceof c?a={name:e,value:f}:"array"===h?(e+="[]",b.each(f,function(a){g.append(e,a)})):"object"===h?b.each(f,function(a,b){g.append(e+"["+b+"]",a)}):"null"===h||"undefined"===h||"number"===h&&isNaN(f)?g.append(e,"false"):d.push({name:e,value:f.toString()})},hasBlob:function(){return!!this.getBlob()},getBlob:function(){return a&&a.value||null},getBlobName:function(){return a&&a.name||null},each:function(c){b.each(d,function(a){c(a.value,a.name)}),a&&c(a.value,a.name)},destroy:function(){a=null,d=[]}})}return d}),d(A,[h,m,n,o,x,p,v,r,y,z,k,j],function(a,b,c,d,e,f,g,h,i,j,k,l){function m(){this.uid=a.guid("uid_")}function n(){function c(a,b){return A.hasOwnProperty(a)?1===arguments.length?k.can("define_property")?A[a]:z[a]:void(k.can("define_property")?A[a]=b:z[a]=b):void 0}function i(b){function d(){x&&(x.destroy(),x=null),h.dispatchEvent("loadend"),h=null}function e(e){x.bind("LoadStart",function(a){c("readyState",n.LOADING),h.dispatchEvent("readystatechange"),h.dispatchEvent(a),H&&h.upload.dispatchEvent(a)}),x.bind("Progress",function(a){c("readyState")!==n.LOADING&&(c("readyState",n.LOADING),h.dispatchEvent("readystatechange")),h.dispatchEvent(a)}),x.bind("UploadProgress",function(a){H&&h.upload.dispatchEvent({type:"progress",lengthComputable:!1,total:a.total,loaded:a.loaded})}),x.bind("Load",function(b){c("readyState",n.DONE),c("status",Number(e.exec.call(x,"XMLHttpRequest","getStatus")||0)),c("statusText",o[c("status")]||""),c("response",e.exec.call(x,"XMLHttpRequest","getResponse",c("responseType"))),~a.inArray(c("responseType"),["text",""])?c("responseText",c("response")):"document"===c("responseType")&&c("responseXML",c("response")),O=e.exec.call(x,"XMLHttpRequest","getAllResponseHeaders"),h.dispatchEvent("readystatechange"),c("status")>0?(H&&h.upload.dispatchEvent(b),h.dispatchEvent(b)):(J=!0,h.dispatchEvent("error")),d()}),x.bind("Abort",function(a){h.dispatchEvent(a),d()}),x.bind("Error",function(a){J=!0,c("readyState",n.DONE),h.dispatchEvent("readystatechange"),I=!0,h.dispatchEvent(a),d()}),e.exec.call(x,"XMLHttpRequest","send",{url:r,method:s,async:B,user:t,password:u,headers:C,mimeType:E,encoding:D,responseType:h.responseType,withCredentials:h.withCredentials,options:N},b)}var h=this;v=(new Date).getTime(),x=new g,"string"==typeof N.required_caps&&(N.required_caps=f.parseCaps(N.required_caps)),N.required_caps=a.extend({},N.required_caps,{return_response_type:h.responseType}),b instanceof j&&(N.required_caps.send_multipart=!0),K||(N.required_caps.do_cors=!0),N.ruid?e(x.connectRuntime(N)):(x.bind("RuntimeInit",function(a,b){e(b)}),x.bind("RuntimeError",function(a,b){h.dispatchEvent("RuntimeError",b)}),x.connectRuntime(N))}function q(){c("responseText",""),c("responseXML",null),c("response",null),c("status",0),c("statusText",""),v=w=null}var r,s,t,u,v,w,x,y,z=this,A={timeout:0,readyState:n.UNSENT,withCredentials:!1,status:0,statusText:"",responseType:"",responseXML:null,responseText:null,response:null},B=!0,C={},D=null,E=null,F=!1,G=!1,H=!1,I=!1,J=!1,K=!1,L=null,M=null,N={},O="";a.extend(this,A,{uid:a.guid("uid_"),upload:new m,open:function(f,g,h,i,j){var k;if(!f||!g)throw new b.DOMException(b.DOMException.SYNTAX_ERR);if(/[\u0100-\uffff]/.test(f)||d.utf8_encode(f)!==f)throw new b.DOMException(b.DOMException.SYNTAX_ERR);if(~a.inArray(f.toUpperCase(),["CONNECT","DELETE","GET","HEAD","OPTIONS","POST","PUT","TRACE","TRACK"])&&(s=f.toUpperCase()),~a.inArray(s,["CONNECT","TRACE","TRACK"]))throw new b.DOMException(b.DOMException.SECURITY_ERR);if(g=d.utf8_encode(g),k=e.parseUrl(g),K=e.hasSameOrigin(k),r=e.resolveUrl(g),(i||j)&&!K)throw new b.DOMException(b.DOMException.INVALID_ACCESS_ERR);if(t=i||k.user,u=j||k.pass,B=h||!0,B===!1&&(c("timeout")||c("withCredentials")||""!==c("responseType")))throw new b.DOMException(b.DOMException.INVALID_ACCESS_ERR);F=!B,G=!1,C={},q.call(this),c("readyState",n.OPENED),this.convertEventPropsToHandlers(["readystatechange"]),this.dispatchEvent("readystatechange")},setRequestHeader:function(e,f){var g=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","content-transfer-encoding","date","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"];if(c("readyState")!==n.OPENED||G)throw new b.DOMException(b.DOMException.INVALID_STATE_ERR);if(/[\u0100-\uffff]/.test(e)||d.utf8_encode(e)!==e)throw new b.DOMException(b.DOMException.SYNTAX_ERR);return e=a.trim(e).toLowerCase(),~a.inArray(e,g)||/^(proxy\-|sec\-)/.test(e)?!1:(C[e]?C[e]+=", "+f:C[e]=f,!0)},getAllResponseHeaders:function(){return O||""},getResponseHeader:function(b){return b=b.toLowerCase(),J||~a.inArray(b,["set-cookie","set-cookie2"])?null:O&&""!==O&&(y||(y={},a.each(O.split(/\r\n/),function(b){var c=b.split(/:\s+/);2===c.length&&(c[0]=a.trim(c[0]),y[c[0].toLowerCase()]={header:c[0],value:a.trim(c[1])})})),y.hasOwnProperty(b))?y[b].header+": "+y[b].value:null},overrideMimeType:function(d){var e,f;if(~a.inArray(c("readyState"),[n.LOADING,n.DONE]))throw new b.DOMException(b.DOMException.INVALID_STATE_ERR);if(d=a.trim(d.toLowerCase()),/;/.test(d)&&(e=d.match(/^([^;]+)(?:;\scharset\=)?(.*)$/))&&(d=e[1],e[2]&&(f=e[2])),!l.mimes[d])throw new b.DOMException(b.DOMException.SYNTAX_ERR);L=d,M=f},send:function(c,e){if(N="string"===a.typeOf(e)?{ruid:e}:e?e:{},this.convertEventPropsToHandlers(p),this.upload.convertEventPropsToHandlers(p),this.readyState!==n.OPENED||G)throw new b.DOMException(b.DOMException.INVALID_STATE_ERR);if(c instanceof h)N.ruid=c.ruid,E=c.type||"application/octet-stream";else if(c instanceof j){if(c.hasBlob()){var f=c.getBlob();N.ruid=f.ruid,E=f.type||"application/octet-stream"}}else"string"==typeof c&&(D="UTF-8",E="text/plain;charset=UTF-8",c=d.utf8_encode(c));this.withCredentials||(this.withCredentials=N.required_caps&&N.required_caps.send_browser_cookies&&!K),H=!F&&this.upload.hasEventListener(),J=!1,I=!c,F||(G=!0),i.call(this,c)},abort:function(){if(J=!0,F=!1,~a.inArray(c("readyState"),[n.UNSENT,n.OPENED,n.DONE]))c("readyState",n.UNSENT);else{if(c("readyState",n.DONE),G=!1,!x)throw new b.DOMException(b.DOMException.INVALID_STATE_ERR);x.getRuntime().exec.call(x,"XMLHttpRequest","abort",I),I=!0}},destroy:function(){x&&("function"===a.typeOf(x.destroy)&&x.destroy(),x=null),this.unbindAll(),this.upload&&(this.upload.unbindAll(),this.upload=null)}})}var o={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",306:"Reserved",307:"Temporary Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Request Entity Too Large",414:"Request-URI Too Long",415:"Unsupported Media Type",416:"Requested Range Not Satisfiable",417:"Expectation Failed",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",426:"Upgrade Required",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",510:"Not Extended"};m.prototype=c.instance;var p=["loadstart","progress","abort","error","load","timeout","loadend"];return n.UNSENT=0,n.OPENED=1,n.HEADERS_RECEIVED=2,n.LOADING=3,n.DONE=4,n.prototype=c.instance,n}),d(B,[h,o,q,n],function(a,b,c,d){function e(){function d(){k=l=0,j=this.result=null}function f(b,c){var d=this;i=c,d.bind("TransportingProgress",function(b){l=b.loaded,k>l&&-1===a.inArray(d.state,[e.IDLE,e.DONE])&&g.call(d)},999),d.bind("TransportingComplete",function(){l=k,d.state=e.DONE,j=null,d.result=i.exec.call(d,"Transporter","getAsBlob",b||"")},999),d.state=e.BUSY,d.trigger("TransportingStarted"),g.call(d)}function g(){var a,c=this,d=k-l;m>d&&(m=d),a=b.btoa(j.substr(l,m)),i.exec.call(c,"Transporter","receive",a,k)}var h,i,j,k,l,m;c.call(this),a.extend(this,{uid:a.guid("uid_"),state:e.IDLE,result:null,transport:function(b,c,e){var g=this;if(e=a.extend({chunk_size:204798},e),(h=e.chunk_size%3)&&(e.chunk_size+=3-h),m=e.chunk_size,d.call(this),j=b,k=b.length,"string"===a.typeOf(e)||e.ruid)f.call(g,c,this.connectRuntime(e));else{var i=function(a,b){g.unbind("RuntimeInit",i),f.call(g,c,b)};this.bind("RuntimeInit",i),this.connectRuntime(e)}},abort:function(){var a=this;a.state=e.IDLE,i&&(i.exec.call(a,"Transporter","clear"),a.trigger("TransportingAborted")),d.call(a)},destroy:function(){this.unbindAll(),i=null,this.disconnectRuntime(),d.call(this)}})}return e.IDLE=0,e.BUSY=1,e.DONE=2,e.prototype=d.instance,e}),d(C,[h,l,m,y,A,p,q,B,k,n,r,s,o],function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){function d(a){a||(a=this.getRuntime().exec.call(this,"Image","getInfo")),this.size=a.size,this.width=a.width,this.height=a.height,this.type=a.type,this.meta=a.meta,""===this.name&&(this.name=a.name)}function j(b){var d=a.typeOf(b);try{if(b instanceof n){if(!b.size)throw new c.DOMException(c.DOMException.INVALID_STATE_ERR);p.apply(this,arguments)}else if(b instanceof k){if(!~a.inArray(b.type,["image/jpeg","image/png"]))throw new c.ImageError(c.ImageError.WRONG_FORMAT);q.apply(this,arguments)}else if(-1!==a.inArray(d,["blob","file"]))j.call(this,new l(null,b),arguments[1]);else if("string"===d)/^data:[^;]*;base64,/.test(b)?j.call(this,new k(null,{data:b}),arguments[1]):r.apply(this,arguments);else{if("node"!==d||"img"!==b.nodeName.toLowerCase())throw new c.DOMException(c.DOMException.TYPE_MISMATCH_ERR);j.call(this,b.src,arguments[1])}}catch(e){this.trigger("error",e.code)}}function p(b,c){var d=this.connectRuntime(b.ruid);this.ruid=d.uid,d.exec.call(this,"Image","loadFromImage",b,"undefined"===a.typeOf(c)?!0:c)}function q(b,c){function d(a){e.ruid=a.uid,a.exec.call(e,"Image","loadFromBlob",b)}var e=this;e.name=b.name||"",b.isDetached()?(this.bind("RuntimeInit",function(a,b){d(b)}),c&&"string"==typeof c.required_caps&&(c.required_caps=f.parseCaps(c.required_caps)),this.connectRuntime(a.extend({required_caps:{access_image_binary:!0,resize_image:!0}},c))):d(this.connectRuntime(b.ruid))}function r(a,b){var c,d=this;c=new e,c.open("get",a),c.responseType="blob",c.onprogress=function(a){d.trigger(a)},c.onload=function(){q.call(d,c.response,!0)},c.onerror=function(a){d.trigger(a)},c.onloadend=function(){c.destroy()},c.bind("RuntimeError",function(a,b){d.trigger("RuntimeError",b)}),c.send(null,b)}g.call(this),a.extend(this,{uid:a.guid("uid_"),ruid:null,name:"",size:0,width:0,height:0,type:"",meta:{},clone:function(){this.load.apply(this,arguments)},load:function(){this.bind("Load Resize",function(){d.call(this)},999),this.convertEventPropsToHandlers(o),j.apply(this,arguments)},downsize:function(b){var d={width:this.width,height:this.height,crop:!1,preserveHeaders:!0};b="object"==typeof b?a.extend(d,b):a.extend(d,{width:arguments[0],height:arguments[1],crop:arguments[2],preserveHeaders:arguments[3]});try{if(!this.size)throw new c.DOMException(c.DOMException.INVALID_STATE_ERR);
  if(this.width>n.MAX_RESIZE_WIDTH||this.height>n.MAX_RESIZE_HEIGHT)throw new c.ImageError(c.ImageError.MAX_RESOLUTION_ERR);this.getRuntime().exec.call(this,"Image","downsize",b.width,b.height,b.crop,b.preserveHeaders)}catch(e){this.trigger("error",e.code)}},crop:function(a,b,c){this.downsize(a,b,!0,c)},getAsCanvas:function(){if(!i.can("create_canvas"))throw new c.RuntimeError(c.RuntimeError.NOT_SUPPORTED_ERR);var a=this.connectRuntime(this.ruid);return a.exec.call(this,"Image","getAsCanvas")},getAsBlob:function(a,b){if(!this.size)throw new c.DOMException(c.DOMException.INVALID_STATE_ERR);return a||(a="image/jpeg"),"image/jpeg"!==a||b||(b=90),this.getRuntime().exec.call(this,"Image","getAsBlob",a,b)},getAsDataURL:function(a,b){if(!this.size)throw new c.DOMException(c.DOMException.INVALID_STATE_ERR);return this.getRuntime().exec.call(this,"Image","getAsDataURL",a,b)},getAsBinaryString:function(a,b){var c=this.getAsDataURL(a,b);return m.atob(c.substring(c.indexOf("base64,")+7))},embed:function(d){function e(){if(i.can("create_canvas")){var b=f.getAsCanvas();if(b)return d.appendChild(b),b=null,f.destroy(),void o.trigger("embedded")}var e=f.getAsDataURL(g,j);if(!e)throw new c.ImageError(c.ImageError.WRONG_FORMAT);if(i.can("use_data_uri_of",e.length))d.innerHTML='<img src="'+e+'" width="'+f.width+'" height="'+f.height+'" />',f.destroy(),o.trigger("embedded");else{var k=new h;k.bind("TransportingComplete",function(){l=o.connectRuntime(this.result.ruid),o.bind("Embedded",function(){a.extend(l.getShimContainer().style,{top:"0px",left:"0px",width:f.width+"px",height:f.height+"px"}),l=null},999),l.exec.call(o,"ImageView","display",this.result.uid,q,r),f.destroy()}),k.transport(m.atob(e.substring(e.indexOf("base64,")+7)),g,a.extend({},p,{required_caps:{display_media:!0},runtime_order:"flash,silverlight",container:d}))}}var f,g,j,k,l,o=this,p=arguments[1]||{},q=this.width,r=this.height;try{if(!(d=b.get(d)))throw new c.DOMException(c.DOMException.INVALID_NODE_TYPE_ERR);if(!this.size)throw new c.DOMException(c.DOMException.INVALID_STATE_ERR);if(this.width>n.MAX_RESIZE_WIDTH||this.height>n.MAX_RESIZE_HEIGHT)throw new c.ImageError(c.ImageError.MAX_RESOLUTION_ERR);if(g=p.type||this.type||"image/jpeg",j=p.quality||90,k="undefined"!==a.typeOf(p.crop)?p.crop:!1,p.width)q=p.width,r=p.height||q;else{var s=b.getSize(d);s.w&&s.h&&(q=s.w,r=s.h)}return f=new n,f.bind("Resize",function(){e.call(o)}),f.bind("Load",function(){f.downsize(q,r,k,!1)}),f.clone(this,!1),f}catch(t){this.trigger("error",t.code)}},destroy:function(){this.ruid&&(this.getRuntime().exec.call(this,"Image","destroy"),this.disconnectRuntime()),this.unbindAll()}})}var o=["progress","load","error","resize","embedded"];return n.MAX_RESIZE_WIDTH=6500,n.MAX_RESIZE_HEIGHT=6500,n.prototype=j.instance,n}),d(D,[h,m,p,k],function(a,b,c,d){function e(b){var e=this,h=c.capTest,i=c.capTrue,j=a.extend({access_binary:h(window.FileReader||window.File&&window.File.getAsDataURL),access_image_binary:function(){return e.can("access_binary")&&!!g.Image},display_media:h(d.can("create_canvas")||d.can("use_data_uri_over32kb")),do_cors:h(window.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest),drag_and_drop:h(function(){var a=document.createElement("div");return("draggable"in a||"ondragstart"in a&&"ondrop"in a)&&("IE"!==d.browser||d.version>9)}()),filter_by_extension:h(function(){return"Chrome"===d.browser&&d.version>=28||"IE"===d.browser&&d.version>=10}()),return_response_headers:i,return_response_type:function(a){return"json"===a&&window.JSON?!0:d.can("return_response_type",a)},return_status_code:i,report_upload_progress:h(window.XMLHttpRequest&&(new XMLHttpRequest).upload),resize_image:function(){return e.can("access_binary")&&d.can("create_canvas")},select_file:function(){return d.can("use_fileinput")&&window.File},select_folder:function(){return e.can("select_file")&&"Chrome"===d.browser&&d.version>=21},select_multiple:function(){return!(!e.can("select_file")||"Safari"===d.browser&&"Windows"===d.os||"iOS"===d.os&&d.verComp(d.osVersion,"7.0.4","<"))},send_binary_string:h(window.XMLHttpRequest&&((new XMLHttpRequest).sendAsBinary||window.Uint8Array&&window.ArrayBuffer)),send_custom_headers:h(window.XMLHttpRequest),send_multipart:function(){return!!(window.XMLHttpRequest&&(new XMLHttpRequest).upload&&window.FormData)||e.can("send_binary_string")},slice_blob:h(window.File&&(File.prototype.mozSlice||File.prototype.webkitSlice||File.prototype.slice)),stream_upload:function(){return e.can("slice_blob")&&e.can("send_multipart")},summon_file_dialog:h(function(){return"Firefox"===d.browser&&d.version>=4||"Opera"===d.browser&&d.version>=12||"IE"===d.browser&&d.version>=10||!!~a.inArray(d.browser,["Chrome","Safari"])}()),upload_filesize:i},arguments[2]);c.call(this,b,arguments[1]||f,j),a.extend(this,{init:function(){this.trigger("Init")},destroy:function(a){return function(){a.call(e),a=e=null}}(this.destroy)}),a.extend(this.getShim(),g)}var f="html5",g={};return c.addConstructor(f,e),g}),d(E,[D,r],function(a,b){function c(){function a(a,b,c){var d;if(!window.File.prototype.slice)return(d=window.File.prototype.webkitSlice||window.File.prototype.mozSlice)?d.call(a,b,c):null;try{return a.slice(),a.slice(b,c)}catch(e){return a.slice(b,c-b)}}this.slice=function(){return new b(this.getRuntime().uid,a.apply(this,arguments))}}return a.Blob=c}),d(F,[h],function(a){function b(){this.returnValue=!1}function c(){this.cancelBubble=!0}var d={},e="moxie_"+a.guid(),f=function(f,g,h,i){var j,k;g=g.toLowerCase(),f.addEventListener?(j=h,f.addEventListener(g,j,!1)):f.attachEvent&&(j=function(){var a=window.event;a.target||(a.target=a.srcElement),a.preventDefault=b,a.stopPropagation=c,h(a)},f.attachEvent("on"+g,j)),f[e]||(f[e]=a.guid()),d.hasOwnProperty(f[e])||(d[f[e]]={}),k=d[f[e]],k.hasOwnProperty(g)||(k[g]=[]),k[g].push({func:j,orig:h,key:i})},g=function(b,c,f){var g,h;if(c=c.toLowerCase(),b[e]&&d[b[e]]&&d[b[e]][c]){g=d[b[e]][c];for(var i=g.length-1;i>=0&&(g[i].orig!==f&&g[i].key!==f||(b.removeEventListener?b.removeEventListener(c,g[i].func,!1):b.detachEvent&&b.detachEvent("on"+c,g[i].func),g[i].orig=null,g[i].func=null,g.splice(i,1),f===h));i--);if(g.length||delete d[b[e]][c],a.isEmptyObj(d[b[e]])){delete d[b[e]];try{delete b[e]}catch(j){b[e]=h}}}},h=function(b,c){b&&b[e]&&a.each(d[b[e]],function(a,d){g(b,d,c)})};return{addEvent:f,removeEvent:g,removeAllEvents:h}}),d(G,[D,h,l,F,j,k],function(a,b,c,d,e,f){function g(){var a,g=[];b.extend(this,{init:function(h){var i,j,k,l,m,n,o=this,p=o.getRuntime();a=h,g=[],k=a.accept.mimes||e.extList2mimes(a.accept,p.can("filter_by_extension")),j=p.getShimContainer(),j.innerHTML='<input id="'+p.uid+'" type="file" style="font-size:999px;opacity:0;"'+(a.multiple&&p.can("select_multiple")?"multiple":"")+(a.directory&&p.can("select_folder")?"webkitdirectory directory":"")+(k?' accept="'+k.join(",")+'"':"")+" />",i=c.get(p.uid),b.extend(i.style,{position:"absolute",top:0,left:0,width:"100%",height:"100%"}),l=c.get(a.browse_button),p.can("summon_file_dialog")&&("static"===c.getStyle(l,"position")&&(l.style.position="relative"),m=parseInt(c.getStyle(l,"z-index"),10)||1,l.style.zIndex=m,j.style.zIndex=m-1,d.addEvent(l,"click",function(a){var b=c.get(p.uid);b&&!b.disabled&&b.click(),a.preventDefault()},o.uid)),n=p.can("summon_file_dialog")?l:j,d.addEvent(n,"mouseover",function(){o.trigger("mouseenter")},o.uid),d.addEvent(n,"mouseout",function(){o.trigger("mouseleave")},o.uid),d.addEvent(n,"mousedown",function(){o.trigger("mousedown")},o.uid),d.addEvent(c.get(a.container),"mouseup",function(){o.trigger("mouseup")},o.uid),i.onchange=function q(){if(g=[],a.directory?b.each(this.files,function(a){"."!==a.name&&g.push(a)}):g=[].slice.call(this.files),"IE"!==f.browser&&"IEMobile"!==f.browser)this.value="";else{var c=this.cloneNode(!0);this.parentNode.replaceChild(c,this),c.onchange=q}o.trigger("change")},o.trigger({type:"ready",async:!0}),j=null},getFiles:function(){return g},disable:function(a){var b,d=this.getRuntime();(b=c.get(d.uid))&&(b.disabled=!!a)},destroy:function(){var b=this.getRuntime(),e=b.getShim(),f=b.getShimContainer();d.removeAllEvents(f,this.uid),d.removeAllEvents(a&&c.get(a.container),this.uid),d.removeAllEvents(a&&c.get(a.browse_button),this.uid),f&&(f.innerHTML=""),e.removeInstance(this.uid),g=a=f=e=null}})}return a.FileInput=g}),d(H,[D,h,l,F,j],function(a,b,c,d,e){function f(){function a(a){if(!a.dataTransfer||!a.dataTransfer.types)return!1;var c=b.toArray(a.dataTransfer.types||[]);return-1!==b.inArray("Files",c)||-1!==b.inArray("public.file-url",c)||-1!==b.inArray("application/x-moz-file",c)}function f(a){for(var c=[],d=0;d<a.length;d++)[].push.apply(c,a[d].extensions.split(/\s*,\s*/));return-1===b.inArray("*",c)?c:[]}function g(a){if(!n.length)return!0;var c=e.getFileExtension(a.name);return!c||-1!==b.inArray(c,n)}function h(a,c){var d=[];b.each(a,function(a){var b=a.webkitGetAsEntry();if(b)if(b.isFile){var c=a.getAsFile();g(c)&&m.push(c)}else d.push(b)}),d.length?i(d,c):c()}function i(a,c){var d=[];b.each(a,function(a){d.push(function(b){j(a,b)})}),b.inSeries(d,function(){c()})}function j(a,b){a.isFile?a.file(function(a){g(a)&&m.push(a),b()},function(){b()}):a.isDirectory?k(a,b):b()}function k(a,b){function c(a){e.readEntries(function(b){b.length?([].push.apply(d,b),c(a)):a()},a)}var d=[],e=a.createReader();c(function(){i(d,b)})}var l,m=[],n=[];b.extend(this,{init:function(c){var e,i=this;l=c,n=f(l.accept),e=l.container,d.addEvent(e,"dragover",function(b){a(b)&&(b.preventDefault(),b.dataTransfer.dropEffect="copy")},i.uid),d.addEvent(e,"drop",function(c){a(c)&&(c.preventDefault(),m=[],c.dataTransfer.items&&c.dataTransfer.items[0].webkitGetAsEntry?h(c.dataTransfer.items,function(){i.trigger("drop")}):(b.each(c.dataTransfer.files,function(a){g(a)&&m.push(a)}),i.trigger("drop")))},i.uid),d.addEvent(e,"dragenter",function(){i.trigger("dragenter")},i.uid),d.addEvent(e,"dragleave",function(){i.trigger("dragleave")},i.uid)},getFiles:function(){return m},destroy:function(){d.removeAllEvents(l&&c.get(l.container),this.uid),m=n=l=null}})}return a.FileDrop=f}),d(I,[D,o,h],function(a,b,c){function d(){function a(a){return b.atob(a.substring(a.indexOf("base64,")+7))}var d,e=!1;c.extend(this,{read:function(a,b){var f=this;d=new window.FileReader,d.addEventListener("progress",function(a){f.trigger(a)}),d.addEventListener("load",function(a){f.trigger(a)}),d.addEventListener("error",function(a){f.trigger(a,d.error)}),d.addEventListener("loadend",function(){d=null}),"function"===c.typeOf(d[a])?(e=!1,d[a](b.getSource())):"readAsBinaryString"===a&&(e=!0,d.readAsDataURL(b.getSource()))},getResult:function(){return d&&d.result?e?a(d.result):d.result:null},abort:function(){d&&d.abort()},destroy:function(){d=null}})}return a.FileReader=d}),d(J,[D,h,j,x,s,r,z,m,k],function(a,b,c,d,e,f,g,h,i){function j(){function a(a,b){var c,d,e=this;c=b.getBlob().getSource(),d=new window.FileReader,d.onload=function(){b.append(b.getBlobName(),new f(null,{type:c.type,data:d.result})),o.send.call(e,a,b)},d.readAsBinaryString(c)}function j(){return!window.XMLHttpRequest||"IE"===i.browser&&i.version<8?function(){for(var a=["Msxml2.XMLHTTP.6.0","Microsoft.XMLHTTP"],b=0;b<a.length;b++)try{return new ActiveXObject(a[b])}catch(c){}}():new window.XMLHttpRequest}function k(a){var b=a.responseXML,c=a.responseText;return"IE"===i.browser&&c&&b&&!b.documentElement&&/[^\/]+\/[^\+]+\+xml/.test(a.getResponseHeader("Content-Type"))&&(b=new window.ActiveXObject("Microsoft.XMLDOM"),b.async=!1,b.validateOnParse=!1,b.loadXML(c)),b&&("IE"===i.browser&&0!==b.parseError||!b.documentElement||"parsererror"===b.documentElement.tagName)?null:b}function l(a){var b="----moxieboundary"+(new Date).getTime(),c="--",d="\r\n",e="",g=this.getRuntime();if(!g.can("send_binary_string"))throw new h.RuntimeError(h.RuntimeError.NOT_SUPPORTED_ERR);return m.setRequestHeader("Content-Type","multipart/form-data; boundary="+b),a.each(function(a,g){e+=a instanceof f?c+b+d+'Content-Disposition: form-data; name="'+g+'"; filename="'+unescape(encodeURIComponent(a.name||"blob"))+'"'+d+"Content-Type: "+(a.type||"application/octet-stream")+d+d+a.getSource()+d:c+b+d+'Content-Disposition: form-data; name="'+g+'"'+d+d+unescape(encodeURIComponent(a))+d}),e+=c+b+c+d}var m,n,o=this;b.extend(this,{send:function(c,e){var h=this,k="Mozilla"===i.browser&&i.version>=4&&i.version<7,o="Android Browser"===i.browser,p=!1;if(n=c.url.replace(/^.+?\/([\w\-\.]+)$/,"$1").toLowerCase(),m=j(),m.open(c.method,c.url,c.async,c.user,c.password),e instanceof f)e.isDetached()&&(p=!0),e=e.getSource();else if(e instanceof g){if(e.hasBlob())if(e.getBlob().isDetached())e=l.call(h,e),p=!0;else if((k||o)&&"blob"===b.typeOf(e.getBlob().getSource())&&window.FileReader)return void a.call(h,c,e);if(e instanceof g){var q=new window.FormData;e.each(function(a,b){a instanceof f?q.append(b,a.getSource()):q.append(b,a)}),e=q}}m.upload?(c.withCredentials&&(m.withCredentials=!0),m.addEventListener("load",function(a){h.trigger(a)}),m.addEventListener("error",function(a){h.trigger(a)}),m.addEventListener("progress",function(a){h.trigger(a)}),m.upload.addEventListener("progress",function(a){h.trigger({type:"UploadProgress",loaded:a.loaded,total:a.total})})):m.onreadystatechange=function(){switch(m.readyState){case 1:break;case 2:break;case 3:var a,b;try{d.hasSameOrigin(c.url)&&(a=m.getResponseHeader("Content-Length")||0),m.responseText&&(b=m.responseText.length)}catch(e){a=b=0}h.trigger({type:"progress",lengthComputable:!!a,total:parseInt(a,10),loaded:b});break;case 4:m.onreadystatechange=function(){},h.trigger(0===m.status?"error":"load")}},b.isEmptyObj(c.headers)||b.each(c.headers,function(a,b){m.setRequestHeader(b,a)}),""!==c.responseType&&"responseType"in m&&(m.responseType="json"!==c.responseType||i.can("return_response_type","json")?c.responseType:"text"),p?m.sendAsBinary?m.sendAsBinary(e):!function(){for(var a=new Uint8Array(e.length),b=0;b<e.length;b++)a[b]=255&e.charCodeAt(b);m.send(a.buffer)}():m.send(e),h.trigger("loadstart")},getStatus:function(){try{if(m)return m.status}catch(a){}return 0},getResponse:function(a){var b=this.getRuntime();try{switch(a){case"blob":var d=new e(b.uid,m.response),f=m.getResponseHeader("Content-Disposition");if(f){var g=f.match(/filename=([\'\"'])([^\1]+)\1/);g&&(n=g[2])}return d.name=n,d.type||(d.type=c.getFileMime(n)),d;case"json":return i.can("return_response_type","json")?m.response:200===m.status&&window.JSON?JSON.parse(m.responseText):null;case"document":return k(m);default:return""!==m.responseText?m.responseText:null}}catch(h){return null}},getAllResponseHeaders:function(){try{return m.getAllResponseHeaders()}catch(a){}return""},abort:function(){m&&m.abort()},destroy:function(){o=n=null}})}return a.XMLHttpRequest=j}),d(K,[],function(){return function(){function a(a,b){var c,d=f?0:-8*(b-1),g=0;for(c=0;b>c;c++)g|=e.charCodeAt(a+c)<<Math.abs(d+8*c);return g}function c(a,b,c){c=3===arguments.length?c:e.length-b-1,e=e.substr(0,b)+a+e.substr(c+b)}function d(a,b,d){var e,g="",h=f?0:-8*(d-1);for(e=0;d>e;e++)g+=String.fromCharCode(b>>Math.abs(h+8*e)&255);c(g,a,d)}var e,f=!1;return{II:function(a){return a===b?f:void(f=a)},init:function(a){f=!1,e=a},SEGMENT:function(a,b,d){switch(arguments.length){case 1:return e.substr(a,e.length-a-1);case 2:return e.substr(a,b);case 3:c(d,a,b);break;default:return e}},BYTE:function(b){return a(b,1)},SHORT:function(b){return a(b,2)},LONG:function(c,e){return e===b?a(c,4):void d(c,e,4)},SLONG:function(b){var c=a(b,4);return c>2147483647?c-4294967296:c},STRING:function(b,c){var d="";for(c+=b;c>b;b++)d+=String.fromCharCode(a(b,1));return d}}}}),d(L,[K],function(a){return function b(c){var d,e,f,g=[],h=0;if(d=new a,d.init(c),65496===d.SHORT(0)){for(e=2;e<=c.length;)if(f=d.SHORT(e),f>=65488&&65495>=f)e+=2;else{if(65498===f||65497===f)break;h=d.SHORT(e+2)+2,f>=65505&&65519>=f&&g.push({hex:f,name:"APP"+(15&f),start:e,length:h,segment:d.SEGMENT(e,h)}),e+=h}return d.init(null),{headers:g,restore:function(a){var b,c;for(d.init(a),e=65504==d.SHORT(2)?4+d.SHORT(4):2,c=0,b=g.length;b>c;c++)d.SEGMENT(e,0,g[c].segment),e+=g[c].length;return a=d.SEGMENT(),d.init(null),a},strip:function(a){var c,e,f;for(e=new b(a),c=e.headers,e.purge(),d.init(a),f=c.length;f--;)d.SEGMENT(c[f].start,c[f].length,"");return a=d.SEGMENT(),d.init(null),a},get:function(a){for(var b=[],c=0,d=g.length;d>c;c++)g[c].name===a.toUpperCase()&&b.push(g[c].segment);return b},set:function(a,b){var c,d,e,f=[];for("string"==typeof b?f.push(b):f=b,c=d=0,e=g.length;e>c&&(g[c].name===a.toUpperCase()&&(g[c].segment=f[d],g[c].length=f[d].length,d++),!(d>=f.length));c++);},purge:function(){g=[],d.init(null),d=null}}}}}),d(M,[h,K],function(a,c){return function d(){function d(a,c){var d,e,f,h,i,l,m,n,o=g.SHORT(a),p=[],q={};for(d=0;o>d;d++)if(m=l=a+12*d+2,f=c[g.SHORT(m)],f!==b){switch(h=g.SHORT(m+=2),i=g.LONG(m+=2),m+=4,p=[],h){case 1:case 7:for(i>4&&(m=g.LONG(m)+k.tiffHeader),e=0;i>e;e++)p[e]=g.BYTE(m+e);break;case 2:i>4&&(m=g.LONG(m)+k.tiffHeader),q[f]=g.STRING(m,i-1);continue;case 3:for(i>2&&(m=g.LONG(m)+k.tiffHeader),e=0;i>e;e++)p[e]=g.SHORT(m+2*e);break;case 4:for(i>1&&(m=g.LONG(m)+k.tiffHeader),e=0;i>e;e++)p[e]=g.LONG(m+4*e);break;case 5:for(m=g.LONG(m)+k.tiffHeader,e=0;i>e;e++)p[e]=g.LONG(m+4*e)/g.LONG(m+4*e+4);break;case 9:for(m=g.LONG(m)+k.tiffHeader,e=0;i>e;e++)p[e]=g.SLONG(m+4*e);break;case 10:for(m=g.LONG(m)+k.tiffHeader,e=0;i>e;e++)p[e]=g.SLONG(m+4*e)/g.SLONG(m+4*e+4);break;default:continue}n=1==i?p[0]:p,q[f]=j.hasOwnProperty(f)&&"object"!=typeof n?j[f][n]:n}return q}function e(){var a=k.tiffHeader;return g.II(18761==g.SHORT(a)),42!==g.SHORT(a+=2)?!1:(k.IFD0=k.tiffHeader+g.LONG(a+=2),i=d(k.IFD0,h.tiff),"ExifIFDPointer"in i&&(k.exifIFD=k.tiffHeader+i.ExifIFDPointer,delete i.ExifIFDPointer),"GPSInfoIFDPointer"in i&&(k.gpsIFD=k.tiffHeader+i.GPSInfoIFDPointer,delete i.GPSInfoIFDPointer),!0)}function f(a,b,c){var d,e,f,i=0;if("string"==typeof b){var j=h[a.toLowerCase()];for(var l in j)if(j[l]===b){b=l;break}}d=k[a.toLowerCase()+"IFD"],e=g.SHORT(d);for(var m=0;e>m;m++)if(f=d+12*m+2,g.SHORT(f)==b){i=f+8;break}return i?(g.LONG(i,c),!0):!1}var g,h,i,j,k={};return g=new c,h={tiff:{274:"Orientation",270:"ImageDescription",271:"Make",272:"Model",305:"Software",34665:"ExifIFDPointer",34853:"GPSInfoIFDPointer"},exif:{36864:"ExifVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",36867:"DateTimeOriginal",33434:"ExposureTime",33437:"FNumber",34855:"ISOSpeedRatings",37377:"ShutterSpeedValue",37378:"ApertureValue",37383:"MeteringMode",37384:"LightSource",37385:"Flash",37386:"FocalLength",41986:"ExposureMode",41987:"WhiteBalance",41990:"SceneCaptureType",41988:"DigitalZoomRatio",41992:"Contrast",41993:"Saturation",41994:"Sharpness"},gps:{0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude"}},j={ColorSpace:{1:"sRGB",0:"Uncalibrated"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{1:"Daylight",2:"Fliorescent",3:"Tungsten",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 -5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire.",1:"Flash fired.",5:"Strobe return light not detected.",7:"Strobe return light detected.",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},ExposureMode:{0:"Auto exposure",1:"Manual exposure",2:"Auto bracket"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},GPSLatitudeRef:{N:"North latitude",S:"South latitude"},GPSLongitudeRef:{E:"East longitude",W:"West longitude"}},{init:function(a){return k={tiffHeader:10},a!==b&&a.length?(g.init(a),65505===g.SHORT(0)&&"EXIF\x00"===g.STRING(4,5).toUpperCase()?e():!1):!1},TIFF:function(){return i},EXIF:function(){var b;if(b=d(k.exifIFD,h.exif),b.ExifVersion&&"array"===a.typeOf(b.ExifVersion)){for(var c=0,e="";c<b.ExifVersion.length;c++)e+=String.fromCharCode(b.ExifVersion[c]);b.ExifVersion=e}return b},GPS:function(){var b;return b=d(k.gpsIFD,h.gps),b.GPSVersionID&&"array"===a.typeOf(b.GPSVersionID)&&(b.GPSVersionID=b.GPSVersionID.join(".")),b},setExif:function(a,b){return"PixelXDimension"!==a&&"PixelYDimension"!==a?!1:f("exif",a,b)},getBinary:function(){return g.SEGMENT()},purge:function(){g.init(null),g=i=null,k={}}}}}),d(N,[h,m,L,K,M],function(a,b,c,d,e){function f(f){function g(){for(var a,b,c=0;c<=i.length;){if(a=j.SHORT(c+=2),a>=65472&&65475>=a)return c+=5,{height:j.SHORT(c),width:j.SHORT(c+=2)};b=j.SHORT(c+=2),c+=b-2}return null}function h(){l&&k&&j&&(l.purge(),k.purge(),j.init(null),i=m=k=l=j=null)}var i,j,k,l,m,n;if(i=f,j=new d,j.init(i),65496!==j.SHORT(0))throw new b.ImageError(b.ImageError.WRONG_FORMAT);k=new c(f),l=new e,n=!!l.init(k.get("app1")[0]),m=g.call(this),a.extend(this,{type:"image/jpeg",size:i.length,width:m&&m.width||0,height:m&&m.height||0,setExif:function(b,c){return n?("object"===a.typeOf(b)?a.each(b,function(a,b){l.setExif(b,a)}):l.setExif(b,c),void k.set("app1",l.getBinary())):!1},writeHeaders:function(){return arguments.length?k.restore(arguments[0]):i=k.restore(i)},stripHeaders:function(a){return k.strip(a)},purge:function(){h.call(this)}}),n&&(this.meta={tiff:l.TIFF(),exif:l.EXIF(),gps:l.GPS()})}return f}),d(O,[m,h,K],function(a,b,c){function d(d){function e(){var a,b;return a=g.call(this,8),"IHDR"==a.type?(b=a.start,{width:i.LONG(b),height:i.LONG(b+=4)}):null}function f(){i&&(i.init(null),h=l=j=k=i=null)}function g(a){var b,c,d,e;return b=i.LONG(a),c=i.STRING(a+=4,4),d=a+=4,e=i.LONG(a+b),{length:b,type:c,start:d,CRC:e}}var h,i,j,k,l;h=d,i=new c,i.init(h),function(){var b=0,c=0,d=[35152,20039,3338,6666];for(c=0;c<d.length;c++,b+=2)if(d[c]!=i.SHORT(b))throw new a.ImageError(a.ImageError.WRONG_FORMAT)}(),l=e.call(this),b.extend(this,{type:"image/png",size:h.length,width:l.width,height:l.height,purge:function(){f.call(this)}}),f.call(this)}return d}),d(P,[h,m,N,O],function(a,b,c,d){return function(e){var f,g=[c,d];f=function(){for(var a=0;a<g.length;a++)try{return new g[a](e)}catch(c){}throw new b.ImageError(b.ImageError.WRONG_FORMAT)}(),a.extend(this,{type:"",size:0,width:0,height:0,setExif:function(){},writeHeaders:function(a){return a},stripHeaders:function(a){return a},purge:function(){}}),a.extend(this,f),this.purge=function(){f.purge(),f=null}}}),d(Q,[],function(){function a(a,d,e){var f=a.naturalWidth,g=a.naturalHeight,h=e.width,i=e.height,j=e.x||0,k=e.y||0,l=d.getContext("2d");b(a)&&(f/=2,g/=2);var m=1024,n=document.createElement("canvas");n.width=n.height=m;for(var o=n.getContext("2d"),p=c(a,f,g),q=0;g>q;){for(var r=q+m>g?g-q:m,s=0;f>s;){var t=s+m>f?f-s:m;o.clearRect(0,0,m,m),o.drawImage(a,-s,-q);var u=s*h/f+j<<0,v=Math.ceil(t*h/f),w=q*i/g/p+k<<0,x=Math.ceil(r*i/g/p);l.drawImage(n,0,0,t,r,u,w,v,x),s+=m}q+=m}n=o=null}function b(a){var b=a.naturalWidth,c=a.naturalHeight;if(b*c>1048576){var d=document.createElement("canvas");d.width=d.height=1;var e=d.getContext("2d");return e.drawImage(a,-b+1,0),0===e.getImageData(0,0,1,1).data[3]}return!1}function c(a,b,c){var d=document.createElement("canvas");d.width=1,d.height=c;var e=d.getContext("2d");e.drawImage(a,0,0);for(var f=e.getImageData(0,0,1,c).data,g=0,h=c,i=c;i>g;){var j=f[4*(i-1)+3];0===j?h=i:g=i,i=h+g>>1}d=null;var k=i/c;return 0===k?1:k}return{isSubsampled:b,renderTo:a}}),d(R,[D,h,m,o,s,P,Q,j,k],function(a,b,c,d,e,f,g,h,i){function j(){function a(){if(!t&&!r)throw new c.ImageError(c.DOMException.INVALID_STATE_ERR);return t||r}function j(a){return d.atob(a.substring(a.indexOf("base64,")+7))}function k(a,b){return"data:"+(b||"")+";base64,"+d.btoa(a)}function l(a){var b=this;r=new Image,r.onerror=function(){q.call(this),b.trigger("error",c.ImageError.WRONG_FORMAT)},r.onload=function(){b.trigger("load")},r.src=/^data:[^;]*;base64,/.test(a)?a:k(a,v.type)}function m(a,b){var d,e=this;return window.FileReader?(d=new FileReader,d.onload=function(){b(this.result)},d.onerror=function(){e.trigger("error",c.ImageError.WRONG_FORMAT)},void d.readAsDataURL(a)):b(a.getAsDataURL())}function n(c,d,e,f){var g,h,i,j,k,l=this,m=0,n=0;if(y=f,k=this.meta&&this.meta.tiff&&this.meta.tiff.Orientation||1,-1!==b.inArray(k,[5,6,7,8])){var q=c;c=d,d=q}return h=a(),e?(c=Math.min(c,h.width),d=Math.min(d,h.height),g=Math.max(c/h.width,d/h.height)):g=Math.min(c/h.width,d/h.height),g>1&&!e&&f?void this.trigger("Resize"):(t||(t=document.createElement("canvas")),i=Math.round(h.width*g),j=Math.round(h.height*g),e?(t.width=c,t.height=d,i>c&&(m=Math.round((i-c)/2)),j>d&&(n=Math.round((j-d)/2))):(t.width=i,t.height=j),y||p(t.width,t.height,k),o.call(this,h,t,-m,-n,i,j),this.width=t.width,this.height=t.height,x=!0,void l.trigger("Resize"))}function o(a,b,c,d,e,f){if("iOS"===i.OS)g.renderTo(a,b,{width:e,height:f,x:c,y:d});else{var h=b.getContext("2d");h.drawImage(a,c,d,e,f)}}function p(a,b,c){switch(c){case 5:case 6:case 7:case 8:t.width=b,t.height=a;break;default:t.width=a,t.height=b}var d=t.getContext("2d");switch(c){case 2:d.translate(a,0),d.scale(-1,1);break;case 3:d.translate(a,b),d.rotate(Math.PI);break;case 4:d.translate(0,b),d.scale(1,-1);break;case 5:d.rotate(.5*Math.PI),d.scale(1,-1);break;case 6:d.rotate(.5*Math.PI),d.translate(0,-b);break;case 7:d.rotate(.5*Math.PI),d.translate(a,-b),d.scale(-1,1);break;case 8:d.rotate(-.5*Math.PI),d.translate(-a,0)}}function q(){s&&(s.purge(),s=null),u=r=t=v=null,x=!1}var r,s,t,u,v,w=this,x=!1,y=!0;b.extend(this,{loadFromBlob:function(a){var b=this,d=b.getRuntime(),e=arguments.length>1?arguments[1]:!0;if(!d.can("access_binary"))throw new c.RuntimeError(c.RuntimeError.NOT_SUPPORTED_ERR);return v=a,a.isDetached()?(u=a.getSource(),void l.call(this,u)):void m.call(this,a.getSource(),function(a){e&&(u=j(a)),l.call(b,a)})},loadFromImage:function(a,b){this.meta=a.meta,v=new e(null,{name:a.name,size:a.size,type:a.type}),l.call(this,b?u=a.getAsBinaryString():a.getAsDataURL())},getInfo:function(){var b,c=this.getRuntime();return!s&&u&&c.can("access_image_binary")&&(s=new f(u)),b={width:a().width||0,height:a().height||0,type:v.type||h.getFileMime(v.name),size:u&&u.length||v.size||0,name:v.name||"",meta:s&&s.meta||this.meta||{}}},downsize:function(){n.apply(this,arguments)},getAsCanvas:function(){return t&&(t.id=this.uid+"_canvas"),t},getAsBlob:function(a,b){return a!==this.type&&n.call(this,this.width,this.height,!1),new e(null,{name:v.name||"",type:a,data:w.getAsBinaryString.call(this,a,b)})},getAsDataURL:function(a){var b=arguments[1]||90;if(!x)return r.src;if("image/jpeg"!==a)return t.toDataURL("image/png");try{return t.toDataURL("image/jpeg",b/100)}catch(c){return t.toDataURL("image/jpeg")}},getAsBinaryString:function(a,b){if(!x)return u||(u=j(w.getAsDataURL(a,b))),u;if("image/jpeg"!==a)u=j(w.getAsDataURL(a,b));else{var c;b||(b=90);try{c=t.toDataURL("image/jpeg",b/100)}catch(d){c=t.toDataURL("image/jpeg")}u=j(c),s&&(u=s.stripHeaders(u),y&&(s.meta&&s.meta.exif&&s.setExif({PixelXDimension:this.width,PixelYDimension:this.height}),u=s.writeHeaders(u)),s.purge(),s=null)}return x=!1,u},destroy:function(){w=null,q.call(this),this.getRuntime().getShim().removeInstance(this.uid)}})}return a.Image=j}),d(S,[h,k,l,m,p],function(a,b,c,d,e){function f(){var a;try{a=navigator.plugins["Shockwave Flash"],a=a.description}catch(b){try{a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version")}catch(c){a="0.0"}}return a=a.match(/\d+/g),parseFloat(a[0]+"."+a[1])}function g(g){var j,k=this;g=a.extend({swf_url:b.swf_url},g),e.call(this,g,h,{access_binary:function(a){return a&&"browser"===k.mode},access_image_binary:function(a){return a&&"browser"===k.mode},display_media:e.capTrue,do_cors:e.capTrue,drag_and_drop:!1,report_upload_progress:function(){return"client"===k.mode},resize_image:e.capTrue,return_response_headers:!1,return_response_type:function(b){return"json"===b&&window.JSON?!0:!a.arrayDiff(b,["","text","document"])||"browser"===k.mode},return_status_code:function(b){return"browser"===k.mode||!a.arrayDiff(b,[200,404])},select_file:e.capTrue,select_multiple:e.capTrue,send_binary_string:function(a){return a&&"browser"===k.mode},send_browser_cookies:function(a){return a&&"browser"===k.mode},send_custom_headers:function(a){return a&&"browser"===k.mode},send_multipart:e.capTrue,slice_blob:function(a){return a&&"browser"===k.mode},stream_upload:function(a){return a&&"browser"===k.mode},summon_file_dialog:!1,upload_filesize:function(b){return a.parseSizeStr(b)<=2097152||"client"===k.mode},use_http_method:function(b){return!a.arrayDiff(b,["GET","POST"])}},{access_binary:function(a){return a?"browser":"client"},access_image_binary:function(a){return a?"browser":"client"},report_upload_progress:function(a){return a?"browser":"client"},return_response_type:function(b){return a.arrayDiff(b,["","text","json","document"])?"browser":["client","browser"]},return_status_code:function(b){return a.arrayDiff(b,[200,404])?"browser":["client","browser"]},send_binary_string:function(a){return a?"browser":"client"},send_browser_cookies:function(a){return a?"browser":"client"},send_custom_headers:function(a){return a?"browser":"client"},stream_upload:function(a){return a?"client":"browser"},upload_filesize:function(b){return a.parseSizeStr(b)>=2097152?"client":"browser"}},"client"),f()<10&&(this.mode=!1),a.extend(this,{getShim:function(){return c.get(this.uid)},shimExec:function(a,b){var c=[].slice.call(arguments,2);return k.getShim().exec(this.uid,a,b,c)},init:function(){var c,e,f;f=this.getShimContainer(),a.extend(f.style,{position:"absolute",top:"-8px",left:"-8px",width:"9px",height:"9px",overflow:"hidden"}),c='<object id="'+this.uid+'" type="application/x-shockwave-flash" data="'+g.swf_url+'" ',"IE"===b.browser&&(c+='classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" '),c+='width="100%" height="100%" style="outline:0"><param name="movie" value="'+g.swf_url+'" /><param name="flashvars" value="uid='+escape(this.uid)+"&target="+b.global_event_dispatcher+'" /><param name="wmode" value="transparent" /><param name="allowscriptaccess" value="always" /></object>',"IE"===b.browser?(e=document.createElement("div"),f.appendChild(e),e.outerHTML=c,e=f=null):f.innerHTML=c,j=setTimeout(function(){k&&!k.initialized&&k.trigger("Error",new d.RuntimeError(d.RuntimeError.NOT_INIT_ERR))},5e3)},destroy:function(a){return function(){a.call(k),clearTimeout(j),g=j=a=k=null}}(this.destroy)},i)}var h="flash",i={};return e.addConstructor(h,g),i}),d(T,[S,r],function(a,b){var c={slice:function(a,c,d,e){var f=this.getRuntime();return 0>c?c=Math.max(a.size+c,0):c>0&&(c=Math.min(c,a.size)),0>d?d=Math.max(a.size+d,0):d>0&&(d=Math.min(d,a.size)),a=f.shimExec.call(this,"Blob","slice",c,d,e||""),a&&(a=new b(f.uid,a)),a
  }};return a.Blob=c}),d(U,[S],function(a){var b={init:function(a){this.getRuntime().shimExec.call(this,"FileInput","init",{name:a.name,accept:a.accept,multiple:a.multiple}),this.trigger("ready")}};return a.FileInput=b}),d(V,[S,o],function(a,b){function c(a,c){switch(c){case"readAsText":return b.atob(a,"utf8");case"readAsBinaryString":return b.atob(a);case"readAsDataURL":return a}return null}var d="",e={read:function(a,b){var e=this,f=e.getRuntime();return"readAsDataURL"===a&&(d="data:"+(b.type||"")+";base64,"),e.bind("Progress",function(b,e){e&&(d+=c(e,a))}),f.shimExec.call(this,"FileReader","readAsBase64",b.uid)},getResult:function(){return d},destroy:function(){d=null}};return a.FileReader=e}),d(W,[S,o],function(a,b){function c(a,c){switch(c){case"readAsText":return b.atob(a,"utf8");case"readAsBinaryString":return b.atob(a);case"readAsDataURL":return a}return null}var d={read:function(a,b){var d,e=this.getRuntime();return(d=e.shimExec.call(this,"FileReaderSync","readAsBase64",b.uid))?("readAsDataURL"===a&&(d="data:"+(b.type||"")+";base64,"+d),c(d,a,b.type)):null}};return a.FileReaderSync=d}),d(X,[S,h,r,s,y,z,B],function(a,b,c,d,e,f,g){var h={send:function(a,d){function e(){a.transport=k.mode,k.shimExec.call(j,"XMLHttpRequest","send",a,d)}function h(a,b){k.shimExec.call(j,"XMLHttpRequest","appendBlob",a,b.uid),d=null,e()}function i(a,b){var c=new g;c.bind("TransportingComplete",function(){b(this.result)}),c.transport(a.getSource(),a.type,{ruid:k.uid})}var j=this,k=j.getRuntime();if(b.isEmptyObj(a.headers)||b.each(a.headers,function(a,b){k.shimExec.call(j,"XMLHttpRequest","setRequestHeader",b,a.toString())}),d instanceof f){var l;if(d.each(function(a,b){a instanceof c?l=b:k.shimExec.call(j,"XMLHttpRequest","append",b,a)}),d.hasBlob()){var m=d.getBlob();m.isDetached()?i(m,function(a){m.destroy(),h(l,a)}):h(l,m)}else d=null,e()}else d instanceof c?d.isDetached()?i(d,function(a){d.destroy(),d=a.uid,e()}):(d=d.uid,e()):e()},getResponse:function(a){var c,f,g=this.getRuntime();if(f=g.shimExec.call(this,"XMLHttpRequest","getResponseAsBlob")){if(f=new d(g.uid,f),"blob"===a)return f;try{if(c=new e,~b.inArray(a,["","text"]))return c.readAsText(f);if("json"===a&&window.JSON)return JSON.parse(c.readAsText(f))}finally{f.destroy()}}return null},abort:function(){var a=this.getRuntime();a.shimExec.call(this,"XMLHttpRequest","abort"),this.dispatchEvent("readystatechange"),this.dispatchEvent("abort")}};return a.XMLHttpRequest=h}),d(Y,[S,r],function(a,b){var c={getAsBlob:function(a){var c=this.getRuntime(),d=c.shimExec.call(this,"Transporter","getAsBlob",a);return d?new b(c.uid,d):null}};return a.Transporter=c}),d(Z,[S,h,B,r,y],function(a,b,c,d,e){var f={loadFromBlob:function(a){function b(a){e.shimExec.call(d,"Image","loadFromBlob",a.uid),d=e=null}var d=this,e=d.getRuntime();if(a.isDetached()){var f=new c;f.bind("TransportingComplete",function(){b(f.result.getSource())}),f.transport(a.getSource(),a.type,{ruid:e.uid})}else b(a.getSource())},loadFromImage:function(a){var b=this.getRuntime();return b.shimExec.call(this,"Image","loadFromImage",a.uid)},getAsBlob:function(a,b){var c=this.getRuntime(),e=c.shimExec.call(this,"Image","getAsBlob",a,b);return e?new d(c.uid,e):null},getAsDataURL:function(){var a,b=this.getRuntime(),c=b.Image.getAsBlob.apply(this,arguments);return c?(a=new e,a.readAsDataURL(c)):null}};return a.Image=f}),d($,[h,k,l,m,p],function(a,b,c,d,e){function f(a){var b,c,d,e,f,g=!1,h=null,i=0;try{try{h=new ActiveXObject("AgControl.AgControl"),h.IsVersionSupported(a)&&(g=!0),h=null}catch(j){var k=navigator.plugins["Silverlight Plug-In"];if(k){for(b=k.description,"1.0.30226.2"===b&&(b="2.0.30226.2"),c=b.split(".");c.length>3;)c.pop();for(;c.length<4;)c.push(0);for(d=a.split(".");d.length>4;)d.pop();do e=parseInt(d[i],10),f=parseInt(c[i],10),i++;while(i<d.length&&e===f);f>=e&&!isNaN(e)&&(g=!0)}}}catch(l){g=!1}return g}function g(g){var j,k=this;g=a.extend({xap_url:b.xap_url},g),e.call(this,g,h,{access_binary:e.capTrue,access_image_binary:e.capTrue,display_media:e.capTrue,do_cors:e.capTrue,drag_and_drop:!1,report_upload_progress:e.capTrue,resize_image:e.capTrue,return_response_headers:function(a){return a&&"client"===k.mode},return_response_type:function(a){return"json"!==a?!0:!!window.JSON},return_status_code:function(b){return"client"===k.mode||!a.arrayDiff(b,[200,404])},select_file:e.capTrue,select_multiple:e.capTrue,send_binary_string:e.capTrue,send_browser_cookies:function(a){return a&&"browser"===k.mode},send_custom_headers:function(a){return a&&"client"===k.mode},send_multipart:e.capTrue,slice_blob:e.capTrue,stream_upload:!0,summon_file_dialog:!1,upload_filesize:e.capTrue,use_http_method:function(b){return"client"===k.mode||!a.arrayDiff(b,["GET","POST"])}},{return_response_headers:function(a){return a?"client":"browser"},return_status_code:function(b){return a.arrayDiff(b,[200,404])?"client":["client","browser"]},send_browser_cookies:function(a){return a?"browser":"client"},send_custom_headers:function(a){return a?"client":"browser"},use_http_method:function(b){return a.arrayDiff(b,["GET","POST"])?"client":["client","browser"]}}),f("2.0.31005.0")&&"Opera"!==b.browser||(this.mode=!1),a.extend(this,{getShim:function(){return c.get(this.uid).content.Moxie},shimExec:function(a,b){var c=[].slice.call(arguments,2);return k.getShim().exec(this.uid,a,b,c)},init:function(){var a;a=this.getShimContainer(),a.innerHTML='<object id="'+this.uid+'" data="data:application/x-silverlight," type="application/x-silverlight-2" width="100%" height="100%" style="outline:none;"><param name="source" value="'+g.xap_url+'"/><param name="background" value="Transparent"/><param name="windowless" value="true"/><param name="enablehtmlaccess" value="true"/><param name="initParams" value="uid='+this.uid+",target="+b.global_event_dispatcher+'"/></object>',j=setTimeout(function(){k&&!k.initialized&&k.trigger("Error",new d.RuntimeError(d.RuntimeError.NOT_INIT_ERR))},"Windows"!==b.OS?1e4:5e3)},destroy:function(a){return function(){a.call(k),clearTimeout(j),g=j=a=k=null}}(this.destroy)},i)}var h="silverlight",i={};return e.addConstructor(h,g),i}),d(_,[$,h,T],function(a,b,c){return a.Blob=b.extend({},c)}),d(ab,[$],function(a){var b={init:function(a){function b(a){for(var b="",c=0;c<a.length;c++)b+=(""!==b?"|":"")+a[c].title+" | *."+a[c].extensions.replace(/,/g,";*.");return b}this.getRuntime().shimExec.call(this,"FileInput","init",b(a.accept),a.name,a.multiple),this.trigger("ready")}};return a.FileInput=b}),d(bb,[$,l,F],function(a,b,c){var d={init:function(){var a,d=this,e=d.getRuntime();return a=e.getShimContainer(),c.addEvent(a,"dragover",function(a){a.preventDefault(),a.stopPropagation(),a.dataTransfer.dropEffect="copy"},d.uid),c.addEvent(a,"dragenter",function(a){a.preventDefault();var c=b.get(e.uid).dragEnter(a);c&&a.stopPropagation()},d.uid),c.addEvent(a,"drop",function(a){a.preventDefault();var c=b.get(e.uid).dragDrop(a);c&&a.stopPropagation()},d.uid),e.shimExec.call(this,"FileDrop","init")}};return a.FileDrop=d}),d(cb,[$,h,V],function(a,b,c){return a.FileReader=b.extend({},c)}),d(db,[$,h,W],function(a,b,c){return a.FileReaderSync=b.extend({},c)}),d(eb,[$,h,X],function(a,b,c){return a.XMLHttpRequest=b.extend({},c)}),d(fb,[$,h,Y],function(a,b,c){return a.Transporter=b.extend({},c)}),d(gb,[$,h,Z],function(a,b,c){return a.Image=b.extend({},c,{getInfo:function(){var a=this.getRuntime(),c=["tiff","exif","gps"],d={meta:{}},e=a.shimExec.call(this,"Image","getInfo");return e.meta&&b.each(c,function(a){var b,c,f,g,h=e.meta[a];if(h&&h.keys)for(d.meta[a]={},c=0,f=h.keys.length;f>c;c++)b=h.keys[c],g=h[b],g&&(/^(\d|[1-9]\d+)$/.test(g)?g=parseInt(g,10):/^\d*\.\d+$/.test(g)&&(g=parseFloat(g)),d.meta[a][b]=g)}),d.width=parseInt(e.width,10),d.height=parseInt(e.height,10),d.size=parseInt(e.size,10),d.type=e.type,d.name=e.name,d}})}),d(hb,[h,m,p,k],function(a,b,c,d){function e(b){var e=this,h=c.capTest,i=c.capTrue;c.call(this,b,f,{access_binary:h(window.FileReader||window.File&&File.getAsDataURL),access_image_binary:!1,display_media:h(g.Image&&(d.can("create_canvas")||d.can("use_data_uri_over32kb"))),do_cors:!1,drag_and_drop:!1,filter_by_extension:h(function(){return"Chrome"===d.browser&&d.version>=28||"IE"===d.browser&&d.version>=10}()),resize_image:function(){return g.Image&&e.can("access_binary")&&d.can("create_canvas")},report_upload_progress:!1,return_response_headers:!1,return_response_type:function(b){return"json"===b&&window.JSON?!0:!!~a.inArray(b,["text","document",""])},return_status_code:function(b){return!a.arrayDiff(b,[200,404])},select_file:function(){return d.can("use_fileinput")},select_multiple:!1,send_binary_string:!1,send_custom_headers:!1,send_multipart:!0,slice_blob:!1,stream_upload:function(){return e.can("select_file")},summon_file_dialog:h(function(){return"Firefox"===d.browser&&d.version>=4||"Opera"===d.browser&&d.version>=12||!!~a.inArray(d.browser,["Chrome","Safari"])}()),upload_filesize:i,use_http_method:function(b){return!a.arrayDiff(b,["GET","POST"])}}),a.extend(this,{init:function(){this.trigger("Init")},destroy:function(a){return function(){a.call(e),a=e=null}}(this.destroy)}),a.extend(this.getShim(),g)}var f="html4",g={};return c.addConstructor(f,e),g}),d(ib,[hb,h,l,F,j,k],function(a,b,c,d,e,f){function g(){function a(){var e,k,l,m,n,o,p=this,q=p.getRuntime();o=b.guid("uid_"),e=q.getShimContainer(),g&&(l=c.get(g+"_form"),l&&b.extend(l.style,{top:"100%"})),m=document.createElement("form"),m.setAttribute("id",o+"_form"),m.setAttribute("method","post"),m.setAttribute("enctype","multipart/form-data"),m.setAttribute("encoding","multipart/form-data"),b.extend(m.style,{overflow:"hidden",position:"absolute",top:0,left:0,width:"100%",height:"100%"}),n=document.createElement("input"),n.setAttribute("id",o),n.setAttribute("type","file"),n.setAttribute("name",h.name||"Filedata"),n.setAttribute("accept",j.join(",")),b.extend(n.style,{fontSize:"999px",opacity:0}),m.appendChild(n),e.appendChild(m),b.extend(n.style,{position:"absolute",top:0,left:0,width:"100%",height:"100%"}),"IE"===f.browser&&f.version<10&&b.extend(n.style,{filter:"progid:DXImageTransform.Microsoft.Alpha(opacity=0)"}),n.onchange=function(){var b;this.value&&(b=this.files?this.files[0]:{name:this.value},i=[b],this.onchange=function(){},a.call(p),p.bind("change",function d(){var a,b=c.get(o),e=c.get(o+"_form");p.unbind("change",d),p.files.length&&b&&e&&(a=p.files[0],b.setAttribute("id",a.uid),e.setAttribute("id",a.uid+"_form"),e.setAttribute("target",a.uid+"_iframe")),b=e=null},998),n=m=null,p.trigger("change"))},q.can("summon_file_dialog")&&(k=c.get(h.browse_button),d.removeEvent(k,"click",p.uid),d.addEvent(k,"click",function(a){n&&!n.disabled&&n.click(),a.preventDefault()},p.uid)),g=o,e=l=k=null}var g,h,i=[],j=[];b.extend(this,{init:function(b){var f,g=this,i=g.getRuntime();h=b,j=b.accept.mimes||e.extList2mimes(b.accept,i.can("filter_by_extension")),f=i.getShimContainer(),function(){var a,e,h;a=c.get(b.browse_button),i.can("summon_file_dialog")&&("static"===c.getStyle(a,"position")&&(a.style.position="relative"),e=parseInt(c.getStyle(a,"z-index"),10)||1,a.style.zIndex=e,f.style.zIndex=e-1),h=i.can("summon_file_dialog")?a:f,d.addEvent(h,"mouseover",function(){g.trigger("mouseenter")},g.uid),d.addEvent(h,"mouseout",function(){g.trigger("mouseleave")},g.uid),d.addEvent(h,"mousedown",function(){g.trigger("mousedown")},g.uid),d.addEvent(c.get(b.container),"mouseup",function(){g.trigger("mouseup")},g.uid),a=null}(),a.call(this),f=null,g.trigger({type:"ready",async:!0})},getFiles:function(){return i},disable:function(a){var b;(b=c.get(g))&&(b.disabled=!!a)},destroy:function(){var a=this.getRuntime(),b=a.getShim(),e=a.getShimContainer();d.removeAllEvents(e,this.uid),d.removeAllEvents(h&&c.get(h.container),this.uid),d.removeAllEvents(h&&c.get(h.browse_button),this.uid),e&&(e.innerHTML=""),b.removeInstance(this.uid),g=i=j=h=e=b=null}})}return a.FileInput=g}),d(jb,[hb,I],function(a,b){return a.FileReader=b}),d(kb,[hb,h,l,x,m,F,r,z],function(a,b,c,d,e,f,g,h){function i(){function a(a){var b,d,e,g,h=this,i=!1;if(k){if(b=k.id.replace(/_iframe$/,""),d=c.get(b+"_form")){for(e=d.getElementsByTagName("input"),g=e.length;g--;)switch(e[g].getAttribute("type")){case"hidden":e[g].parentNode.removeChild(e[g]);break;case"file":i=!0}e=[],i||d.parentNode.removeChild(d),d=null}setTimeout(function(){f.removeEvent(k,"load",h.uid),k.parentNode&&k.parentNode.removeChild(k);var b=h.getRuntime().getShimContainer();b.children.length||b.parentNode.removeChild(b),b=k=null,a()},1)}}var i,j,k;b.extend(this,{send:function(l,m){function n(){var c=t.getShimContainer()||document.body,e=document.createElement("div");e.innerHTML='<iframe id="'+o+'_iframe" name="'+o+'_iframe" src="javascript:&quot;&quot;" style="display:none"></iframe>',k=e.firstChild,c.appendChild(k),f.addEvent(k,"load",function(){var c;try{c=k.contentWindow.document||k.contentDocument||window.frames[k.id].document,/^4(0[0-9]|1[0-7]|2[2346])\s/.test(c.title)?i=c.title.replace(/^(\d+).*$/,"$1"):(i=200,j=b.trim(c.body.innerHTML),s.trigger({type:"progress",loaded:j.length,total:j.length}),r&&s.trigger({type:"uploadprogress",loaded:r.size||1025,total:r.size||1025}))}catch(e){if(!d.hasSameOrigin(l.url))return void a.call(s,function(){s.trigger("error")});i=404}a.call(s,function(){s.trigger("load")})},s.uid)}var o,p,q,r,s=this,t=s.getRuntime();if(i=j=null,m instanceof h&&m.hasBlob()){if(r=m.getBlob(),o=r.uid,q=c.get(o),p=c.get(o+"_form"),!p)throw new e.DOMException(e.DOMException.NOT_FOUND_ERR)}else o=b.guid("uid_"),p=document.createElement("form"),p.setAttribute("id",o+"_form"),p.setAttribute("method",l.method),p.setAttribute("enctype","multipart/form-data"),p.setAttribute("encoding","multipart/form-data"),p.setAttribute("target",o+"_iframe"),t.getShimContainer().appendChild(p);m instanceof h&&m.each(function(a,c){if(a instanceof g)q&&q.setAttribute("name",c);else{var d=document.createElement("input");b.extend(d,{type:"hidden",name:c,value:a}),q?p.insertBefore(d,q):p.appendChild(d)}}),p.setAttribute("action",l.url),n(),p.submit(),s.trigger("loadstart")},getStatus:function(){return i},getResponse:function(a){if("json"===a&&"string"===b.typeOf(j)&&window.JSON)try{return JSON.parse(j.replace(/^\s*<pre[^>]*>/,"").replace(/<\/pre>\s*$/,""))}catch(c){return null}return j},abort:function(){var b=this;k&&k.contentWindow&&(k.contentWindow.stop?k.contentWindow.stop():k.contentWindow.document.execCommand?k.contentWindow.document.execCommand("Stop"):k.src="about:blank"),a.call(this,function(){b.dispatchEvent("abort")})}})}return a.XMLHttpRequest=i}),d(lb,[hb,R],function(a,b){return a.Image=b}),f([h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,F])}(this),function(a){"use strict";var b={},c=a.moxie.core.utils.Basic.inArray;return function d(a){var e,f;for(e in a)f=typeof a[e],"object"!==f||~c(e,["Exceptions","Env","Mime"])?"function"===f&&(b[e]=a[e]):d(a[e])}(a.moxie),b.Env=a.moxie.core.utils.Env,b.Mime=a.moxie.core.utils.Mime,b.Exceptions=a.moxie.core.Exceptions,a.mOxie=b,a.o||(a.o=b),b}(this),function(a,b,c){function d(a){function b(a,b,c){var e={chunks:"slice_blob",jpgresize:"send_binary_string",pngresize:"send_binary_string",progress:"report_upload_progress",multi_selection:"select_multiple",dragdrop:"drag_and_drop",drop_element:"drag_and_drop",headers:"send_custom_headers",urlstream_upload:"send_binary_string",canSendBinary:"send_binary",triggerDialog:"summon_file_dialog"};e[a]?d[e[a]]=b:c||(d[a]=b)}var c=a.required_features,d={};return"string"==typeof c?g.each(c.split(/\s*,\s*/),function(a){b(a,!0)}):"object"==typeof c?g.each(c,function(a,c){b(c,a)}):c===!0&&(a.chunk_size>0&&(d.slice_blob=!0),(a.resize.enabled||!a.multipart)&&(d.send_binary_string=!0),g.each(a,function(a,c){b(c,!!a,!0)})),d}var e=a.setTimeout,f={},g={VERSION:"2.1.2",STOPPED:1,STARTED:2,QUEUED:1,UPLOADING:2,FAILED:4,DONE:5,GENERIC_ERROR:-100,HTTP_ERROR:-200,IO_ERROR:-300,SECURITY_ERROR:-400,INIT_ERROR:-500,FILE_SIZE_ERROR:-600,FILE_EXTENSION_ERROR:-601,FILE_DUPLICATE_ERROR:-602,IMAGE_FORMAT_ERROR:-700,MEMORY_ERROR:-701,IMAGE_DIMENSIONS_ERROR:-702,mimeTypes:b.mimes,ua:b.ua,typeOf:b.typeOf,extend:b.extend,guid:b.guid,get:function(a){var c,d=[];"array"!==b.typeOf(a)&&(a=[a]);for(var e=a.length;e--;)c=b.get(a[e]),c&&d.push(c);return d.length?d:null},each:b.each,getPos:b.getPos,getSize:b.getSize,xmlEncode:function(a){var b={"<":"lt",">":"gt","&":"amp",'"':"quot","'":"#39"},c=/[<>&\"\']/g;return a?(""+a).replace(c,function(a){return b[a]?"&"+b[a]+";":a}):a},toArray:b.toArray,inArray:b.inArray,addI18n:b.addI18n,translate:b.translate,isEmptyObj:b.isEmptyObj,hasClass:b.hasClass,addClass:b.addClass,removeClass:b.removeClass,getStyle:b.getStyle,addEvent:b.addEvent,removeEvent:b.removeEvent,removeAllEvents:b.removeAllEvents,cleanName:function(a){var b,c;for(c=[/[\300-\306]/g,"A",/[\340-\346]/g,"a",/\307/g,"C",/\347/g,"c",/[\310-\313]/g,"E",/[\350-\353]/g,"e",/[\314-\317]/g,"I",/[\354-\357]/g,"i",/\321/g,"N",/\361/g,"n",/[\322-\330]/g,"O",/[\362-\370]/g,"o",/[\331-\334]/g,"U",/[\371-\374]/g,"u"],b=0;b<c.length;b+=2)a=a.replace(c[b],c[b+1]);return a=a.replace(/\s+/g,"_"),a=a.replace(/[^a-z0-9_\-\.]+/gi,"")},buildUrl:function(a,b){var c="";return g.each(b,function(a,b){c+=(c?"&":"")+encodeURIComponent(b)+"="+encodeURIComponent(a)}),c&&(a+=(a.indexOf("?")>0?"&":"?")+c),a},formatSize:function(a){function b(a,b){return Math.round(a*Math.pow(10,b))/Math.pow(10,b)}if(a===c||/\D/.test(a))return g.translate("N/A");var d=Math.pow(1024,4);return a>d?b(a/d,1)+" "+g.translate("tb"):a>(d/=1024)?b(a/d,1)+" "+g.translate("gb"):a>(d/=1024)?b(a/d,1)+" "+g.translate("mb"):a>1024?Math.round(a/1024)+" "+g.translate("kb"):a+" "+g.translate("b")},parseSize:b.parseSizeStr,predictRuntime:function(a,c){var d,e;return d=new g.Uploader(a),e=b.Runtime.thatCan(d.getOption().required_features,c||a.runtimes),d.destroy(),e},addFileFilter:function(a,b){f[a]=b}};g.addFileFilter("mime_types",function(a,b,c){a.length&&!a.regexp.test(b.name)?(this.trigger("Error",{code:g.FILE_EXTENSION_ERROR,message:g.translate("File extension error."),file:b}),c(!1)):c(!0)}),g.addFileFilter("max_file_size",function(a,b,c){var d;a=g.parseSize(a),b.size!==d&&a&&b.size>a?(this.trigger("Error",{code:g.FILE_SIZE_ERROR,message:g.translate("File size error."),file:b}),c(!1)):c(!0)}),g.addFileFilter("prevent_duplicates",function(a,b,c){if(a)for(var d=this.files.length;d--;)if(b.name===this.files[d].name&&b.size===this.files[d].size)return this.trigger("Error",{code:g.FILE_DUPLICATE_ERROR,message:g.translate("Duplicate file error."),file:b}),void c(!1);c(!0)}),g.Uploader=function(a){function h(){var a,b,c=0;if(this.state==g.STARTED){for(b=0;b<D.length;b++)a||D[b].status!=g.QUEUED?c++:(a=D[b],this.trigger("BeforeUpload",a)&&(a.status=g.UPLOADING,this.trigger("UploadFile",a)));c==D.length&&(this.state!==g.STOPPED&&(this.state=g.STOPPED,this.trigger("StateChanged")),this.trigger("UploadComplete",D))}}function i(a){a.percent=a.size>0?Math.ceil(a.loaded/a.size*100):100,j()}function j(){var a,b;for(A.reset(),a=0;a<D.length;a++)b=D[a],b.size!==c?(A.size+=b.origSize,A.loaded+=b.loaded*b.origSize/b.size):A.size=c,b.status==g.DONE?A.uploaded++:b.status==g.FAILED?A.failed++:A.queued++;A.size===c?A.percent=D.length>0?Math.ceil(A.uploaded/D.length*100):0:(A.bytesPerSec=Math.ceil(A.loaded/((+new Date-z||1)/1e3)),A.percent=A.size>0?Math.ceil(A.loaded/A.size*100):0)}function k(){var a=F[0]||G[0];return a?a.getRuntime().uid:!1}function l(a,c){if(a.ruid){var d=b.Runtime.getInfo(a.ruid);if(d)return d.can(c)}return!1}function m(){this.bind("FilesAdded FilesRemoved",function(a){a.trigger("QueueChanged"),a.refresh()}),this.bind("CancelUpload",u),this.bind("BeforeUpload",q),this.bind("UploadFile",r),this.bind("UploadProgress",s),this.bind("StateChanged",t),this.bind("QueueChanged",j),this.bind("Error",w),this.bind("FileUploaded",v),this.bind("Destroy",x)}function n(a,c){var d=this,e=0,f=[],h={runtime_order:a.runtimes,required_caps:a.required_features,preferred_caps:E,swf_url:a.flash_swf_url,xap_url:a.silverlight_xap_url};g.each(a.runtimes.split(/\s*,\s*/),function(b){a[b]&&(h[b]=a[b])}),a.browse_button&&g.each(a.browse_button,function(c){f.push(function(f){var i=new b.FileInput(g.extend({},h,{accept:a.filters.mime_types,name:a.file_data_name,multiple:a.multi_selection,container:a.container,browse_button:c}));i.onready=function(){var a=b.Runtime.getInfo(this.ruid);b.extend(d.features,{chunks:a.can("slice_blob"),multipart:a.can("send_multipart"),multi_selection:a.can("select_multiple")}),e++,F.push(this),f()},i.onchange=function(){d.addFile(this.files)},i.bind("mouseenter mouseleave mousedown mouseup",function(d){H||(a.browse_button_hover&&("mouseenter"===d.type?b.addClass(c,a.browse_button_hover):"mouseleave"===d.type&&b.removeClass(c,a.browse_button_hover)),a.browse_button_active&&("mousedown"===d.type?b.addClass(c,a.browse_button_active):"mouseup"===d.type&&b.removeClass(c,a.browse_button_active)))}),i.bind("mousedown",function(){d.trigger("Browse")}),i.bind("error runtimeerror",function(){i=null,f()}),i.init()})}),a.drop_element&&g.each(a.drop_element,function(a){f.push(function(c){var f=new b.FileDrop(g.extend({},h,{drop_zone:a}));f.onready=function(){var a=b.Runtime.getInfo(this.ruid);d.features.dragdrop=a.can("drag_and_drop"),e++,G.push(this),c()},f.ondrop=function(){d.addFile(this.files)},f.bind("error runtimeerror",function(){f=null,c()}),f.init()})}),b.inSeries(f,function(){"function"==typeof c&&c(e)})}function o(a,d,e){var f=new b.Image;try{f.onload=function(){return d.width>this.width&&d.height>this.height&&d.quality===c&&d.preserve_headers&&!d.crop?(this.destroy(),e(a)):void f.downsize(d.width,d.height,d.crop,d.preserve_headers)},f.onresize=function(){e(this.getAsBlob(a.type,d.quality)),this.destroy()},f.onerror=function(){e(a)},f.load(a)}catch(g){e(a)}}function p(a,c,e){function f(a,b,c){var d=y[a];switch(a){case"max_file_size":"max_file_size"===a&&(y.max_file_size=y.filters.max_file_size=b);break;case"chunk_size":(b=g.parseSize(b))&&(y[a]=b,y.send_file_name=!0);break;case"multipart":y[a]=b,b||(y.send_file_name=!0);break;case"unique_names":y[a]=b,b&&(y.send_file_name=!0);break;case"filters":"array"===g.typeOf(b)&&(b={mime_types:b}),c?g.extend(y.filters,b):y.filters=b,b.mime_types&&(y.filters.mime_types.regexp=function(a){var b=[];return g.each(a,function(a){g.each(a.extensions.split(/,/),function(a){b.push(/^\s*\*\s*$/.test(a)?"\\.*":"\\."+a.replace(new RegExp("["+"/^$.*+?|()[]{}\\".replace(/./g,"\\$&")+"]","g"),"\\$&"))})}),new RegExp("("+b.join("|")+")$","i")}(y.filters.mime_types));break;case"resize":c?g.extend(y.resize,b,{enabled:!0}):y.resize=b;break;case"prevent_duplicates":y.prevent_duplicates=y.filters.prevent_duplicates=!!b;break;case"browse_button":case"drop_element":b=g.get(b);case"container":case"runtimes":case"multi_selection":case"flash_swf_url":case"silverlight_xap_url":y[a]=b,c||(i=!0);break;default:y[a]=b}c||h.trigger("OptionChanged",a,b,d)}var h=this,i=!1;"object"==typeof a?g.each(a,function(a,b){f(b,a,e)}):f(a,c,e),e?(y.required_features=d(g.extend({},y)),E=d(g.extend({},y,{required_features:!0}))):i&&(h.trigger("Destroy"),n.call(h,y,function(a){a?(h.runtime=b.Runtime.getInfo(k()).type,h.trigger("Init",{runtime:h.runtime}),h.trigger("PostInit")):h.trigger("Error",{code:g.INIT_ERROR,message:g.translate("Init error.")})}))}function q(a,b){if(a.settings.unique_names){var c=b.name.match(/\.([^.]+)$/),d="part";c&&(d=c[1]),b.target_name=b.id+"."+d}}function r(a,c){function d(){k-->0?e(f,1e3):(c.loaded=n,a.trigger("Error",{code:g.HTTP_ERROR,message:g.translate("HTTP Error."),file:c,response:B.responseText,status:B.status,responseHeaders:B.getAllResponseHeaders()}))}function f(){var l,o,p,q={};c.status===g.UPLOADING&&a.state!==g.STOPPED&&(a.settings.send_file_name&&(q.name=c.target_name||c.name),j&&m.chunks&&h.size>j?(p=Math.min(j,h.size-n),l=h.slice(n,n+p)):(p=h.size,l=h),j&&m.chunks&&(a.settings.send_chunk_number?(q.chunk=Math.ceil(n/j),q.chunks=Math.ceil(h.size/j)):(q.offset=n,q.total=h.size)),B=new b.XMLHttpRequest,B.upload&&(B.upload.onprogress=function(b){c.loaded=Math.min(c.size,n+b.loaded),a.trigger("UploadProgress",c)}),B.onload=function(){return B.status>=400?void d():(k=a.settings.max_retries,p<h.size?(l.destroy(),n+=p,c.loaded=Math.min(n,h.size),a.trigger("ChunkUploaded",c,{offset:c.loaded,total:h.size,response:B.responseText,status:B.status,responseHeaders:B.getAllResponseHeaders()}),"Android Browser"===b.Env.browser&&a.trigger("UploadProgress",c)):c.loaded=c.size,l=o=null,!n||n>=h.size?(c.size!=c.origSize&&(h.destroy(),h=null),a.trigger("UploadProgress",c),c.status=g.DONE,a.trigger("FileUploaded",c,{response:B.responseText,status:B.status,responseHeaders:B.getAllResponseHeaders()})):e(f,1),void 0)},B.onerror=function(){d()},B.onloadend=function(){this.destroy(),B=null},a.settings.multipart&&m.multipart?(B.open("post",i,!0),g.each(a.settings.headers,function(a,b){B.setRequestHeader(b,a)}),o=new b.FormData,g.each(g.extend(q,a.settings.multipart_params),function(a,b){o.append(b,a)}),o.append(a.settings.file_data_name,l),B.send(o,{runtime_order:a.settings.runtimes,required_caps:a.settings.required_features,preferred_caps:E,swf_url:a.settings.flash_swf_url,xap_url:a.settings.silverlight_xap_url})):(i=g.buildUrl(a.settings.url,g.extend(q,a.settings.multipart_params)),B.open("post",i,!0),B.setRequestHeader("Content-Type","application/octet-stream"),g.each(a.settings.headers,function(a,b){B.setRequestHeader(b,a)}),B.send(l,{runtime_order:a.settings.runtimes,required_caps:a.settings.required_features,preferred_caps:E,swf_url:a.settings.flash_swf_url,xap_url:a.settings.silverlight_xap_url})))}var h,i=a.settings.url,j=a.settings.chunk_size,k=a.settings.max_retries,m=a.features,n=0;c.loaded&&(n=c.loaded=j?j*Math.floor(c.loaded/j):0),h=c.getSource(),a.settings.resize.enabled&&l(h,"send_binary_string")&&~b.inArray(h.type,["image/jpeg","image/png"])?o.call(this,h,a.settings.resize,function(a){h=a,c.size=a.size,f()}):f()}function s(a,b){i(b)}function t(a){if(a.state==g.STARTED)z=+new Date;else if(a.state==g.STOPPED)for(var b=a.files.length-1;b>=0;b--)a.files[b].status==g.UPLOADING&&(a.files[b].status=g.QUEUED,j())}function u(){B&&B.abort()}function v(a){j(),e(function(){h.call(a)},1)}function w(a,b){b.code===g.INIT_ERROR?a.destroy():b.file&&(b.file.status=g.FAILED,i(b.file),a.state==g.STARTED&&(a.trigger("CancelUpload"),e(function(){h.call(a)},1)))}function x(a){a.stop(),g.each(D,function(a){a.destroy()}),D=[],F.length&&(g.each(F,function(a){a.destroy()}),F=[]),G.length&&(g.each(G,function(a){a.destroy()}),G=[]),E={},H=!1,z=B=null,A.reset()}var y,z,A,B,C=g.guid(),D=[],E={},F=[],G=[],H=!1;y={runtimes:b.Runtime.order,max_retries:0,chunk_size:0,multipart:!0,multi_selection:!0,file_data_name:"file",flash_swf_url:"js/Moxie.swf",silverlight_xap_url:"js/Moxie.xap",filters:{mime_types:[],prevent_duplicates:!1,max_file_size:0},resize:{enabled:!1,preserve_headers:!0,crop:!1},send_file_name:!0,send_chunk_number:!0},p.call(this,a,null,!0),A=new g.QueueProgress,g.extend(this,{id:C,uid:C,state:g.STOPPED,features:{},runtime:null,files:D,settings:y,total:A,init:function(){var a=this;return"function"==typeof y.preinit?y.preinit(a):g.each(y.preinit,function(b,c){a.bind(c,b)}),m.call(this),y.browse_button&&y.url?void n.call(this,y,function(c){"function"==typeof y.init?y.init(a):g.each(y.init,function(b,c){a.bind(c,b)}),c?(a.runtime=b.Runtime.getInfo(k()).type,a.trigger("Init",{runtime:a.runtime}),a.trigger("PostInit")):a.trigger("Error",{code:g.INIT_ERROR,message:g.translate("Init error.")})}):void this.trigger("Error",{code:g.INIT_ERROR,message:g.translate("Init error.")})},setOption:function(a,b){p.call(this,a,b,!this.runtime)},getOption:function(a){return a?y[a]:y},refresh:function(){F.length&&g.each(F,function(a){a.trigger("Refresh")}),this.trigger("Refresh")},start:function(){this.state!=g.STARTED&&(this.state=g.STARTED,this.trigger("StateChanged"),h.call(this))},stop:function(){this.state!=g.STOPPED&&(this.state=g.STOPPED,this.trigger("StateChanged"),this.trigger("CancelUpload"))},disableBrowse:function(){H=arguments[0]!==c?arguments[0]:!0,F.length&&g.each(F,function(a){a.disable(H)}),this.trigger("DisableBrowse",H)},getFile:function(a){var b;for(b=D.length-1;b>=0;b--)if(D[b].id===a)return D[b]},addFile:function(a,c){function d(a,c){var d=[];b.each(j.settings.filters,function(b,c){f[c]&&d.push(function(d){f[c].call(j,b,a,function(a){d(!a)})})}),b.inSeries(d,c)}function h(a){var f=b.typeOf(a);if(a instanceof b.File){if(!a.ruid&&!a.isDetached()){if(!i)return!1;a.ruid=i,a.connectRuntime(i)}h(new g.File(a))}else a instanceof b.Blob?(h(a.getSource()),a.destroy()):a instanceof g.File?(c&&(a.name=c),l.push(function(b){d(a,function(c){c||(D.push(a),m.push(a),j.trigger("FileFiltered",a)),e(b,1)})})):-1!==b.inArray(f,["file","blob"])?h(new b.File(null,a)):"node"===f&&"filelist"===b.typeOf(a.files)?b.each(a.files,h):"array"===f&&(c=null,b.each(a,h))}var i,j=this,l=[],m=[];i=k(),h(a),l.length&&b.inSeries(l,function(){m.length&&j.trigger("FilesAdded",m)})},removeFile:function(a){for(var b="string"==typeof a?a:a.id,c=D.length-1;c>=0;c--)if(D[c].id===b)return this.splice(c,1)[0]},splice:function(a,b){var d=D.splice(a===c?0:a,b===c?D.length:b),e=!1;return this.state==g.STARTED&&(g.each(d,function(a){return a.status===g.UPLOADING?(e=!0,!1):void 0}),e&&this.stop()),this.trigger("FilesRemoved",d),g.each(d,function(a){a.destroy()}),e&&this.start(),d},bind:function(a,b,c){var d=this;g.Uploader.prototype.bind.call(this,a,function(){var a=[].slice.call(arguments);return a.splice(0,1,d),b.apply(this,a)},0,c)},destroy:function(){this.trigger("Destroy"),y=A=null,this.unbindAll()}})},g.Uploader.prototype=b.EventTarget.instance,g.File=function(){function a(a){g.extend(this,{id:g.guid(),name:a.name||a.fileName,type:a.type||"",size:a.size||a.fileSize,origSize:a.size||a.fileSize,loaded:0,percent:0,status:g.QUEUED,lastModifiedDate:a.lastModifiedDate||(new Date).toLocaleString(),getNative:function(){var a=this.getSource().getSource();return-1!==b.inArray(b.typeOf(a),["blob","file"])?a:null},getSource:function(){return c[this.id]?c[this.id]:null},destroy:function(){var a=this.getSource();a&&(a.destroy(),delete c[this.id])}}),c[this.id]=a}var c={};return a}(),g.QueueProgress=function(){var a=this;a.size=0,a.loaded=0,a.uploaded=0,a.failed=0,a.queued=0,a.percent=0,a.bytesPerSec=0,a.reset=function(){a.size=a.loaded=a.uploaded=a.failed=a.queued=a.percent=a.bytesPerSec=0}},a.plupload=g}(window,mOxie),function(a,b){function c(a){return plupload.translate(a)||a}function d(b,d){d.contents().each(function(b,c){c=a(c),c.is(".plupload")||c.remove()}),d.prepend('<div class="plupload_wrapper plupload_scroll"><div id="'+b+'_container" class="plupload_container"><div class="plupload"><div class="plupload_header"><div class="plupload_header_content"><div class="plupload_header_title">'+c("Select files")+'</div><div class="plupload_header_text">'+c("Add files to the upload queue and click the start button.")+'</div></div></div><div class="plupload_content"><div class="plupload_filelist_header"><div class="plupload_file_name">'+c("Filename")+'</div><div class="plupload_file_action">&nbsp;</div><div class="plupload_file_status"><span>'+c("Status")+'</span></div><div class="plupload_file_size">'+c("Size")+'</div><div class="plupload_clearer">&nbsp;</div></div><ul id="'+b+'_filelist" class="plupload_filelist"></ul><div class="plupload_filelist_footer"><div class="plupload_file_name"><div class="plupload_buttons"><a href="#" class="plupload_button plupload_add" id="'+b+'_browse">'+c("Add Files")+'</a><a href="#" class="plupload_button plupload_start">'+c("Start Upload")+'</a></div><span class="plupload_upload_status"></span></div><div class="plupload_file_action"></div><div class="plupload_file_status"><span class="plupload_total_status">0%</span></div><div class="plupload_file_size"><span class="plupload_total_file_size">0 b</span></div><div class="plupload_progress"><div class="plupload_progress_container"><div class="plupload_progress_bar"></div></div></div><div class="plupload_clearer">&nbsp;</div></div></div></div></div><input type="hidden" id="'+b+'_count" name="'+b+'_count" value="0" /></div>')
  }var e={};a.fn.pluploadQueue=function(f){return f?(this.each(function(){function g(b){var c;b.status==plupload.DONE&&(c="plupload_done"),b.status==plupload.FAILED&&(c="plupload_failed"),b.status==plupload.QUEUED&&(c="plupload_delete"),b.status==plupload.UPLOADING&&(c="plupload_uploading");var d=a("#"+b.id).attr("class",c).find("a").css("display","block");b.hint&&d.attr("title",b.hint)}function h(){a("span.plupload_total_status",l).html(k.total.percent+"%"),a("div.plupload_progress_bar",l).css("width",k.total.percent+"%"),a("span.plupload_upload_status",l).html(b.sprintf(c("Uploaded %d/%d files"),k.total.uploaded,k.files.length))}function i(){var d,e=a("ul.plupload_filelist",l).html(""),f=0;a.each(k.files,function(b,c){d="",c.status==plupload.DONE&&(c.target_name&&(d+='<input type="hidden" name="'+m+"_"+f+'_tmpname" value="'+plupload.xmlEncode(c.target_name)+'" />'),d+='<input type="hidden" name="'+m+"_"+f+'_name" value="'+plupload.xmlEncode(c.name)+'" />',d+='<input type="hidden" name="'+m+"_"+f+'_status" value="'+(c.status==plupload.DONE?"done":"failed")+'" />',f++,a("#"+m+"_count").val(f)),e.append('<li id="'+c.id+'"><div class="plupload_file_name"><span>'+c.name+'</span></div><div class="plupload_file_action"><a href="#"></a></div><div class="plupload_file_status">'+c.percent+'%</div><div class="plupload_file_size">'+plupload.formatSize(c.size)+'</div><div class="plupload_clearer">&nbsp;</div>'+d+"</li>"),g(c),a("#"+c.id+".plupload_delete a").click(function(b){a("#"+c.id).remove(),k.removeFile(c),b.preventDefault()})}),a("span.plupload_total_file_size",l).html(plupload.formatSize(k.total.size)),a("span.plupload_add_text",l).html(0===k.total.queued?c("Add Files"):b.sprintf(c("%d files queued"),k.total.queued)),a("a.plupload_start",l).toggleClass("plupload_disabled",k.files.length==k.total.uploaded+k.total.failed),e[0].scrollTop=e[0].scrollHeight,h(),!k.files.length&&k.features.dragdrop&&k.settings.dragdrop&&a("#"+m+"_filelist").append('<li class="plupload_droptext">'+c("Drag files here.")+"</li>")}function j(){delete e[m],k.destroy(),l.html(n),k=l=n=null}var k,l,m,n;l=a(this),m=l.attr("id"),m||(m=plupload.guid(),l.attr("id",m)),n=l.html(),d(m,l),f=a.extend({dragdrop:!0,browse_button:m+"_browse",container:m},f),f.dragdrop&&(f.drop_element=m+"_filelist"),k=new plupload.Uploader(f),e[m]=k,k.bind("UploadFile",function(b,c){a("#"+c.id).addClass("plupload_current_file")}),k.bind("Init",function(b,c){!f.unique_names&&f.rename&&l.on("click","#"+m+"_filelist div.plupload_file_name span",function(c){var d,e,f,g=a(c.target),h="";d=b.getFile(g.parents("li")[0].id),f=d.name,e=/^(.+)(\.[^.]+)$/.exec(f),e&&(f=e[1],h=e[2]),g.hide().after('<input type="text" />'),g.next().val(f).focus().blur(function(){g.show().next().remove()}).keydown(function(b){var c=a(this);13==b.keyCode&&(b.preventDefault(),d.name=c.val()+h,g.html(d.name),c.blur())})}),a("#"+m+"_container").attr("title","Using runtime: "+c.runtime),a("a.plupload_start",l).click(function(b){a(this).hasClass("plupload_disabled")||k.start(),b.preventDefault()}),a("a.plupload_stop",l).click(function(a){a.preventDefault(),k.stop()}),a("a.plupload_start",l).addClass("plupload_disabled")}),k.bind("Error",function(b,d){var e,f=d.file;f&&(e=d.message,d.details&&(e+=" ("+d.details+")"),d.code==plupload.FILE_SIZE_ERROR&&alert(c("Error: File too large:")+" "+f.name),d.code==plupload.FILE_EXTENSION_ERROR&&alert(c("Error: Invalid file extension:")+" "+f.name),f.hint=e,a("#"+f.id).attr("class","plupload_failed").find("a").css("display","block").attr("title",e)),d.code===plupload.INIT_ERROR&&setTimeout(function(){j()},1)}),k.bind("PostInit",function(b){b.settings.dragdrop&&b.features.dragdrop&&a("#"+m+"_filelist").append('<li class="plupload_droptext">'+c("Drag files here.")+"</li>")}),k.init(),k.bind("StateChanged",function(){k.state===plupload.STARTED?(a("li.plupload_delete a,div.plupload_buttons",l).hide(),k.disableBrowse(!0),a("span.plupload_upload_status,div.plupload_progress,a.plupload_stop",l).css("display","block"),a("span.plupload_upload_status",l).html("Uploaded "+k.total.uploaded+"/"+k.files.length+" files"),f.multiple_queues&&a("span.plupload_total_status,span.plupload_total_file_size",l).show()):(i(),a("a.plupload_stop,div.plupload_progress",l).hide(),a("a.plupload_delete",l).css("display","block"),f.multiple_queues&&k.total.uploaded+k.total.failed==k.files.length&&(a(".plupload_buttons,.plupload_upload_status",l).css("display","inline"),k.disableBrowse(!1),a(".plupload_start",l).addClass("plupload_disabled"),a("span.plupload_total_status,span.plupload_total_file_size",l).hide()))}),k.bind("FilesAdded",i),k.bind("FilesRemoved",function(){var b=a("#"+m+"_filelist").scrollTop();i(),a("#"+m+"_filelist").scrollTop(b)}),k.bind("FileUploaded",function(a,b){g(b)}),k.bind("UploadProgress",function(b,c){a("#"+c.id+" div.plupload_file_status",l).html(c.percent+"%"),g(c),h()}),f.setup&&f.setup(k)}),this):e[a(this[0]).attr("id")]}}(jQuery,mOxie),function(a){a.supr=function(b,d){var e={customScroll:{color:"#fff",rscolor:"#fff",size:"3px",opacity:"1",alwaysVisible:!1},header:{fixed:!0,shrink:!0},breadcrumbs:{auto:!0,homeicon:"s16 icomoon-icon-screen-2",dividerIcon:"s16 icomoon-icon-arrow-right-3"},sidebar:{fixed:!0,rememberToggle:!0,offCanvas:!0},rightSidebar:{fixed:!0,rememberToggle:!0},sideNav:{toggleMode:!0,showArrows:!0,sideNavArrowIcon:"icomoon-icon-arrow-down-2 s16",subOpenSpeed:300,subCloseSpeed:400,animationEasing:"linear",absoluteUrl:!1,subDir:""},panels:{refreshIcon:"im-spinner6",toggleIcon:"im-minus",collapseIcon:"im-plus",closeIcon:"im-close",showControlsOnHover:!0,loadingEffect:"facebook",loaderColor:"#bac3d2",rememberSortablePosition:!0},accordion:{toggleIcon:"l-arrows-minus s16",collapseIcon:"l-arrows-plus s16"},tables:{responsive:!0,customscroll:!0},alerts:{animation:!0,closeEffect:"bounceOutDown"},dropdownMenu:{animation:!0,openEffect:"fadeIn"},backToTop:!0},f=this;f.settings={};var b=(a(b),b);f.init=function(){if(f.settings=a.extend({},e,d),this.browserSelector(),this.storejs(),this.firstImpression(),this.mouseWheel(),this.retinaReady(),this.toggleSidebar(),this.sideBarNav(),this.setCurrentNav(),this.waitMe(),this.panels(),this.checkBoxesAndRadios(),this.accordions(),this.quickSearch(),this.equalHeight(),this.respondjs(),f.settings.backToTop&&this.backToTop(),f.settings.breadcrumbs.auto&&this.breadCrumbs(),a(".modal").on("show.bs.modal",function(){f.centerModal()}),f.settings.dropdownMenu.animation&&this.dropdownMenuAnimations(),this.dropdownMenuFix(),this.animatedProgressBars(),f.settings.tables.responsive&&this.responsiveTables(),this.emailApp(),this.toDoWidget(),f.settings.header.fixed&&1==store.get("fixed-header")&&this.fixedHeader(!0),f.settings.header.shrink&&this.shrinkHeader(),f.settings.sidebar.fixed&&1==store.get("fixed-left-sidebar")&&this.fixedSidebar("left"),f.settings.rightSidebar.fixed&&1==store.get("fixed-right-sidebar")&&this.fixedSidebar("right"),f.settings.sidebar.rememberToggle){var b=f.getBreakPoint();(1==store.get("sidebarToggle")&&"large"==b||1==store.get("sidebarToggle")&&"laptop"==b)&&(f.toggleLeftSidebar(),f.sideBarNavToggle(),f.collapseSideBarNav(!1),f.removeFixedSidebar("left"))}if(f.settings.rightSidebar.rememberToggle){var b=f.getBreakPoint();(1==store.get("rightSidebarToggle")&&"large"==b||1==store.get("rightSidebarToggle")&&"laptop"==b)&&(f.toggleRightSidebarBtn("hide"),f.hideRightSidebar()),(1==store.get("rightSidebarToggle")&&"tablet"==b||1==store.get("rightSidebarToggle")&&"phone"==b)&&f.toggleRightSidebarBtn("hide")}a(window).load(function(){0==store.get("fixed-header")&&1==store.get("fixed-right-sidebar")&&f.rightSidebarTopPosition(),f.stickyFooter()}),a(window).resize(function(){f.centerModal(),f.stickyFooter()}),a(window).scroll(function(){0==store.get("fixed-header")&&1==store.get("fixed-right-sidebar")&&f.rightSidebarTopPosition(),f.stickyFooter()})},f.stickyFooter=function(){$footer=a("#footer");var b=a(".page-content");$footer.css(b.height()<a(window).height()?{position:"absolute"}:{position:"static"})},f.getBreakPoint=function(){var a=jRespond([{label:"phone",enter:0,exit:767},{label:"tablet",enter:768,exit:979},{label:"laptop",enter:980,exit:1366},{label:"large",enter:1367,exit:1e4}]);return a.getBreakpoint()},f.fixedHeader=function(b){var c=a("#header");return 1==b?(c.addClass("header-fixed"),store.set("fixed-header",1),a("body").addClass("fixed-header"),!0):(c.removeClass("header-fixed"),store.set("fixed-header",0),a("body").removeClass("fixed-header"),!1)},f.fixedSidebar=function(b){var c=a(".page-sidebar"),d=a("#right-sidebar"),e=f.getBreakPoint();return"left"!==b||"large"!=e&&"laptop"!=e&&c.hasClass("collapse-sidebar")?"right"!==b||"large"!=e&&"laptop"!=e?void 0:(d.addClass("sidebar-fixed"),f.addScrollTo(d.find(".sidebar-scrollarea"),"right",f.settings.customScroll.rscolor),store.set("fixed-right-sidebar",1),a("body").addClass("fixed-right-sidebar"),!0):(c.addClass("sidebar-fixed"),f.addScrollTo(c.find(".sidebar-scrollarea"),"right",f.settings.customScroll.color),store.set("fixed-left-sidebar",1),a("body").addClass("fixed-left-sidebar"),!0)},f.rightSidebarTopPosition=function(){var b=a(document).scrollTop();b>49?a("#right-sidebar").addClass("rstop"):a("#right-sidebar").removeClass("rstop")},f.addScrollTo=function(a,b,c){a.slimScroll({position:b,height:"100%",distance:"0px",railVisible:!1,size:f.settings.customScroll.size,color:c,railOpacity:f.settings.customScroll.opacity,railColor:f.settings.customScroll.railColor})},f.removeScrollTo=function(a){a.parent().hasClass("slimScrollDiv")&&(a.parent().replaceWith(a),a.attr("style",""))},f.removeFixedSidebar=function(b){if("left"===b){var c=a("#sidebar .sidebar-scrollarea");a("#sidebar").removeClass("sidebar-fixed"),f.removeScrollTo(c),store.set("fixed-left-sidebar",0),a("body").removeClass("fixed-left-sidebar")}if("right"===b){var c=a("#right-sidebar .sidebar-scrollarea");a("#right-sidebar").removeClass("sidebar-fixed"),f.removeScrollTo(c),store.set("fixed-right-sidebar",0),a("body").removeClass("fixed-right-sidebar")}},f.toggleRightSidebarBtn=function(b){var c=a("#toggle-right-sidebar");"hide"===b&&(c.addClass("hide-right-sidebar"),store.set("rightSidebarToggle",1),c.find("i").removeClass("s16 icomoon-icon-indent-increase").addClass("s16 icomoon-icon-indent-decrease")),"show"===b&&(c.removeClass("hide-right-sidebar"),store.set("rightSidebarToggle",0),c.find("i").removeClass("s16 icomoon-icon-indent-decrease").addClass("s16 icomoon-icon-indent-increase"))},f.toggleSidebar=function(){var b=a(".collapseBtn"),c=a("#toggle-right-sidebar"),d=f.getBreakPoint(),e=(a("#sidebar .sidebar-scrollarea"),a(".page-content"),a(".page-sidebar"));c.on("click",function(b){b.preventDefault(),a(this).hasClass("hide-right-sidebar")?(f.toggleRightSidebarBtn("show"),f.showRightSidebar()):(f.hideRightSidebar(),f.toggleRightSidebarBtn("hide"))}),b.on("click",function(a){a.preventDefault(),e.hasClass("hide-sidebar")?f.showLeftSidebar():e.hasClass("collapse-sidebar")?(f.unToggleLeftSidebar(),f.collapseSideBarNav(!0)):"phone"==d?f.hideLeftSidebar():(f.toggleLeftSidebar(),f.collapseSideBarNav(!1),f.stickyFooter()),e.hasClass("collapse-sidebar")?(store.set("sidebarToggle",1),f.sideBarNavToggle()):store.set("sidebarToggle",0)})},f.hideRightSidebar=function(){var b=f.getBreakPoint();a("#right-sidebar").addClass("hide-sidebar"),a("#right-sidebarbg").addClass("hide-sidebar"),a(".page-content, #footer").removeClass("right-sidebar-page"),("laptop"==b||"tablet"==b||"phone"==b)&&a(".page-content").removeClass("rOverLap"),a("#back-to-top").removeClass("rightsidebar")},f.showRightSidebar=function(){var b=f.getBreakPoint();a("#right-sidebar").removeClass("hide-sidebar"),a("#right-sidebarbg").removeClass("hide-sidebar"),("laptop"==b||"tablet"==b||"phone"==b)&&a(".page-content").addClass("rOverLap"),a(".page-content, #footer").addClass("right-sidebar-page"),a("#back-to-top").addClass("rightsidebar")},f.hideLeftSidebar=function(){var b=f.getBreakPoint();a(".page-sidebar").addClass("hide-sidebar"),a("#sidebarbg").addClass("hide-sidebar"),a(".page-content, #footer").addClass("full-page"),a(".page-content, #footer").removeClass("sidebar-page"),"phone"!=b||f.settings.sidebar.offCanvas||a(".page-content").addClass("overLap"),("phone"==b&&f.settings.sidebar.offCanvas||"tablet"==b&&f.settings.sidebar.offCanvas)&&a(".page-content, #footer").removeClass("offCanvas")},f.toggleLeftSidebar=function(){var b=f.getBreakPoint(),c=a("#sidebar .sidebar-scrollarea");f.settings.sidebar.fixed&&f.removeScrollTo(c),a(".page-sidebar, #sidebarbg").addClass("collapse-sidebar"),a(".page-content, #footer").addClass("collapsed-sidebar"),a(".page-content, #footer").removeClass("sidebar-page"),"tablet"!=b||f.settings.sidebar.offCanvas||a(".page-content, #footer").removeClass("overLap")},f.unToggleLeftSidebar=function(){var b=f.getBreakPoint(),c=a("#sidebar .sidebar-scrollarea");f.settings.sidebar.fixed&&f.addScrollTo(c,"right",f.settings.customScroll.color),a(".page-sidebar, #sidebarbg").removeClass("collapse-sidebar"),a(".page-content, #footer").removeClass("collapsed-sidebar"),a(".page-content, #footer").addClass("sidebar-page"),"tablet"!=b||f.settings.sidebar.offCanvas||a(".page-content, #footer").addClass("overLap")},f.showLeftSidebar=function(){var b=f.getBreakPoint(),c=a("#sidebar .sidebar-scrollarea");f.settings.sidebar.fixed&&f.addScrollTo(c),a(".page-sidebar").removeClass("hide-sidebar"),a("#sidebarbg").removeClass("hide-sidebar"),a("#sidebarbg").removeClass("collapse-sidebar"),a(".page-sidebar").removeClass("collapse-sidebar"),a(".page-content, #footer").removeClass("full-page"),("large"==b||"laptop"==b&&!f.settings.sidebar.offCanvas)&&a(".page-content, #footer").removeClass("overLap"),"phone"!=b||f.settings.sidebar.offCanvas||a(".page-content, #footer").addClass("overLap"),("phone"==b&&f.settings.sidebar.offCanvas||"tablet"==b&&f.settings.sidebar.offCanvas)&&a(".page-content, #footer").addClass("offCanvas"),a(".page-content, #footer").removeClass("collapsed-sidebar"),a(".page-content, #footer").addClass("sidebar-page")},f.sideBarNav=function(){var b=(a(".page-sidebar .sidebar-scrollarea"),a(".mainnav> ul")),c=(b.find("li.current"),b.find("li")),d=b.find("a"),e=b.find("li>ul.sub");e.closest("li").addClass("hasSub"),e.prev("a").hasClass("notExpand")||e.prev("a").addClass("notExpand"),f.settings.sideNav.showArrows&&(a(".mainnav").hasClass("show-arrows")||a(".mainnav").addClass("show-arrows"),e.prev("a").find("i.hasDrop").length||e.prev("a").prepend('<i class="'+f.settings.sideNav.sideNavArrowIcon+' hasDrop"></i>')),d.on("click",function(d){var e=a(this);e.hasClass("notExpand")?(d.preventDefault(),a(".page-sidebar").hasClass("collapse-sidebar")||(a(this).closest("li").closest("ul").hasClass("show")?(e.next("ul").slideDown(f.settings.sideNav.subOpenSpeed,f.settings.sideNav.animationEasing),e.next("ul").addClass("show"),e.addClass("expand").removeClass("notExpand"),c.removeClass("highlight-menu"),e.closest("li.hasSub").addClass("highlight-menu")):(navexpand=b.find("li.hasSub .expand"),navexpand.next("ul").removeClass("show"),navexpand.next("ul").slideUp(f.settings.sideNav.subCloseSpeed,f.settings.sideNav.animationEasing),navexpand.addClass("notExpand").removeClass("expand"),navexpand.find(".sideNav-arrow").removeClass("rotateM180").addClass("rotate0"),e.next("ul").slideDown(f.settings.sideNav.subOpenSpeed,f.settings.sideNav.animationEasing),e.next("ul").addClass("show"),e.addClass("expand").removeClass("notExpand"),c.removeClass("highlight-menu"),e.closest("li.hasSub").addClass("highlight-menu")))):e.hasClass("expand")&&(d.preventDefault(),e.next("ul").removeClass("show"),e.next("ul").slideUp(f.settings.sideNav.subCloseSpeed,f.settings.sideNav.animationEasing),e.addClass("notExpand").removeClass("expand"),c.removeClass("highlight-menu"))})},f.sideBarNavToggle=function(){var b=a(".mainnav"),c=b.find("li");Modernizr.touch?c.click(function(){_this=a(this),_this.hasClass("hover-li")?_this.removeClass("hover-li"):(c.each(function(){a(this).removeClass("hover-li")}),_this.addClass("hover-li"))}):c.hover(function(){a(this).addClass("hover-li")},function(){a(this).removeClass("hover-li")})},f.setCurrentNav=function(){var b=document.domain,c=a(".mainnav> ul"),d=c.find("a");if(""===b){var e=window.location.pathname.split("/"),g=e.pop();this.setCurrentClass(d,g)}else if(f.settings.sideNav.absoluteUrl){var h="http://"+b+window.location.pathname;setCurrentClass(d,h)}else{var i=window.location.pathname.split("/"),i=i.pop();if(""!=f.settings.sideNav.subDir)var i=window.location.pathname+f.settings.sideNav.subDir;this.setCurrentClass(d,i)}},f.setCurrentClass=function(b,c){b.each(function(){var b=a(this).attr("href");if(b===c){if(a(this).addClass("active"),f.settings.header.fixed&&1==store.get("fixed-header")&&a(this).append("<span class='indicator'></span>"),ulElem=a(this).closest("ul"),ulElem.hasClass("sub")){ulElem.addClass("show").css("display","block");var d=a(this).closest("li.hasSub").children("a.notExpand");d.removeClass("notExpand").addClass("expand active-state"),d.closest("li.hasSub").addClass("highlight-menu")}}else""==c&&(c="index.html"),b===c&&(a(this).addClass("active"),f.settings.header.fixed&&1==store.get("fixed-header")&&a(this).append("<span class='indicator'></span>"))})},f.panels=function(){var b=a(".panel");b.each(function(b){self=a(this),panelHeading=self.find(".panel-heading"),panelsid="supr"+b,self.attr("id",panelsid),(self.hasClass("toggle")||self.hasClass("panelClose")||self.hasClass("panelRefresh"))&&(panelHeading.find(".panel-controls-right").length?panelControlsRight=panelHeading.find(".panel-controls-right"):(panelHeading.append('<div class="panel-controls panel-controls-right">'),panelControlsRight=panelHeading.find(".panel-controls-right"))),self.hasClass("panelRefresh")&&!panelControlsRight.find("a.panel-refresh").length&&panelControlsRight.append('<a href="#" class="panel-refresh"><i class="'+f.settings.panels.refreshIcon+'"></i></a>'),self.hasClass("toggle")&&!panelControlsRight.find("a.toggle").length&&(self.hasClass("panel-closed")?(panelControlsRight.append('<a href="#" class="toggle panel-maximize"><i class="'+f.settings.panels.collapseIcon+'"></i></a>'),self.find(".panel-body").slideToggle(0),self.find(".panel-footer").slideToggle(0),self.find(".panel-heading").toggleClass("min")):panelControlsRight.append('<a href="#" class="toggle panel-minimize"><i class="'+f.settings.panels.toggleIcon+'"></i></a>')),self.hasClass("panelClose")&&!panelControlsRight.find("a.panel-close").length&&panelControlsRight.append('<a href="#" class="panel-close"><i class="'+f.settings.panels.closeIcon+'"></i></a>'),self.hasClass("showControls")?(self.find(".panel-controls-left").addClass("panel-controls-show"),self.find(".panel-controls-right").addClass("panel-controls-show")):f.settings.panels.showControlsOnHover&&(self.find(".panel-controls-left").addClass("panel-controls-hide"),self.find(".panel-controls-right").addClass("panel-controls-hide"));var c=a(this).find(".scroll"),d=c.data("height");c.slimScroll({position:"right",height:"100%",distance:"0",railVisible:!1,size:f.settings.customScroll.size,color:"#777",railOpacity:f.settings.customScroll.opacity,railColor:"#fff",height:d});var e=a(this).find(".scroll-horizontal");e.slimScrollHorizontal({size:f.settings.customScroll.size,color:"#777",railOpacity:f.settings.customScroll.opacity,railColor:"#fff",width:"100%",positon:"bottom",start:"left",railVisible:!0})}),panelControls=b.find(".panel-controls"),panelControlsLink=panelControls.find("a"),f.settings.panels.showControlsOnHover&&b.hover(function(){a(this).find(".panel-controls").hasClass("panel-controls-hide")&&a(this).find(".panel-controls").fadeIn(300)},function(){a(this).find(".panel-controls").hasClass("panel-controls-hide")&&a(this).find(".panel-controls").fadeOut(300)}),panelControlsLink.click(function(b){b.preventDefault(),self=a(this),thisIcon=self.find("i"),thisPanel=self.closest(".panel"),thisPanelBody=thisPanel.find(".panel-body"),thisPanelFooter=thisPanel.find(".panel-footer"),thisPanelHeading=thisPanel.find(".panel-heading"),self.hasClass("panel-close")&&setTimeout(function(){thisPanel.remove()},500),self.hasClass("toggle")&&(self.toggleClass("panel-minimize panel-maximize"),thisIcon.toggleClass(f.settings.panels.toggleIcon+" "+f.settings.panels.collapseIcon),thisPanelBody.slideToggle(200),thisPanelFooter.slideToggle(200),thisPanelHeading.toggleClass("min")),self.hasClass("panel-refresh")&&(self.closest(".panel").waitMe({effect:f.settings.panels.loadingEffect,text:"",bg:"rgba(255,255,255,0.7)",color:f.settings.panels.loaderColor}),setTimeout(function(){self.closest(".panel").waitMe("hide")},3e3))});var c="panels_position_"+h;if(!a(".contentwrapper").hasClass("notSortable")){var d=a(".contentwrapper").find(".sortable-layout"),e=d.find(".panelMove"),g=e.find(".panel-heading"),h=window.location.href,i=localStorage.getItem(c);if(f.settings.panels.rememberSortablePosition&&i){var j=JSON.parse(i);for(var k in j.grid){var l=d.eq(k);for(var m in j.grid[k].section)l.append(a("#"+j.grid[k].section[m].id))}}d.sortable({items:e,handle:g,placeholder:"panel-placeholder",forcePlaceholderSize:!0,helper:"original",forceHelperSize:!0,cursor:"move",delay:200,opacity:.8,zIndex:1e4,tolerance:"pointer",iframeFix:!1,revert:!0,update:function(a,b){f.settings.panels.rememberSortablePosition&&panelSavePosition(b.item)}}).sortable("option","connectWith",d),a(".reset-layout").click(function(){bootbox.confirm({message:"Warning!!! This action will reset panels position",title:"Are you sure ?",className:"modal-style2",callback:function(a){a&&(localStorage.removeItem(c),location.reload())}}),f.centerModal()}),panelSavePosition=function(){var b=[];d.each(function(){var c=[];a(this).children(".panelMove").each(function(){var b={};b.id=a(this).attr("id"),c.push(b)});var d={section:c};b.push(d)});var e=JSON.stringify({grid:b});i!=e&&localStorage.setItem(c,e,null)}}},f.waitMe=function(){!function(a){a.fn.waitMe=function(b){return this.each(function(){function c(){k.removeClass(l+"_container"),k.find("."+l).remove()}var d,e,f,g,h,i,j,k=a(this),l="waitMe",m=!1,n="background-color",o="",p="",q={init:function(){function c(){g=a('<div class="'+l+'"></div>');var b="width:"+j.sizeW+";height:"+j.sizeH;switch(j.effect){case"none":f=0;break;case"bounce":f=3,h="",i=b;break;case"rotateplane":f=1,h="",i=b;break;case"stretch":f=5,h="",i=b;break;case"orbit":f=2,h=b,i="";break;case"roundBounce":f=12,h=b,i="";break;case"win8":f=5,m=!0,h=b,i=b;break;case"win8_linear":f=5,m=!0,h=b,i="";break;case"ios":f=12,h=b,i="";break;case"facebook":f=3,h="",i=b;break;case"rotation":f=1,n="border-color",h="",i=b;break;case"timer":f=2,o="border-color:"+j.color,h=b,i="";break;case"pulse":f=1,n="border-color",h="",i=b;break;case"progressBar":f=1,h="",i=b;break;case"bouncePulse":f=3,h="",i=b}if(""==j.sizeW&&""==j.sizeH&&(i="",h=""),""!=h&&""!=o&&(o=";"+o),f>0){e=a('<div class="'+l+"_progress "+j.effect+'"></div>');for(var c=1;f>=c;++c)p+=m?'<div class="'+l+"_progress_elem"+c+'" style="'+i+'"><div style="'+n+":"+j.color+'"></div></div>':'<div class="'+l+"_progress_elem"+c+'" style="'+n+":"+j.color+";"+i+'"></div>';e=a('<div class="'+l+"_progress "+j.effect+'" style="'+h+o+'">'+p+"</div>")}j.text&&(d=a('<div class="'+l+'_text" style="color:'+j.color+'">'+j.text+"</div>")),k.find("> ."+l)&&k.find("> ."+l).remove(),waitMeDivObj=a('<div class="'+l+'_content"></div>'),waitMeDivObj.append(e,d),g.append(waitMeDivObj),"HTML"==k[0].tagName&&(k=a("body")),k.addClass(l+"_container").append(g),k.find("> ."+l).css({background:j.bg}),k.find("."+l+"_content").css({marginTop:-k.find("."+l+"_content").outerHeight()/2+"px"})}var q={effect:"bounce",text:"",bg:"rgba(255,255,255,0.7)",color:"#000",sizeW:"",sizeH:""};j=a.extend(q,b),c()},hide:function(){c()}};return q[b]?q[b].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof b&&b?void(a.event.special.destroyed={remove:function(a){a.handler&&a.handler()}}):q.init.apply(this,arguments)})}}(jQuery)},f.backToTop=function(){a(window).scroll(function(){a(window).scrollTop()>200?a("#back-to-top").fadeIn(200):a("#back-to-top").fadeOut(200)}),a("#back-to-top, .back-to-top").click(function(){return a("html, body").animate({scrollTop:0},"800"),!1})},f.centerModal=function(){a(".modal").each(function(){0==a(this).hasClass("in")&&a(this).show();var b=a(window).height()-60,c=a(this).find(".modal-header").outerHeight()||2,d=a(this).find(".modal-footer").outerHeight()||2;a(this).find(".modal-content").css({"max-height":function(){return b}}),a(this).find(".modal-body").css({"max-height":function(){return b-(c+d)}}),a(this).find(".modal-dialog").addClass("modal-dialog-center").css({"margin-top":function(){return-(a(this).outerHeight()/2)},"margin-left":function(){return-(a(this).outerWidth()/2)}}),0==a(this).hasClass("in")&&a(this).hide()})},f.accordions=function(){var b=a(".accordion");b.collapse(),accPutIcon=function(){b.each(function(){accExp=a(this).find(".panel-collapse.in"),accExp.prev(".panel-heading").addClass("content-in").find("a.accordion-toggle").append('<i class="'+f.settings.accordion.toggleIcon+'"></i>'),accNor=a(this).find(".panel-collapse").not(".panel-collapse.in"),accNor.prev(".panel-heading").find("a.accordion-toggle").append('<i class="'+f.settings.accordion.collapseIcon+'"></i>')})},accUpdIcon=function(){b.each(function(){accExp=a(this).find(".panel-collapse.in"),accExp.prev(".panel-heading").find("i").remove(),accExp.prev(".panel-heading").addClass("content-in").find("a.accordion-toggle").append('<i class="'+f.settings.accordion.toggleIcon+'"></i>'),accNor=a(this).find(".panel-collapse").not(".panel-collapse.in"),accNor.prev(".panel-heading").find("i").remove(),accNor.prev(".panel-heading").removeClass("content-in").find("a.accordion-toggle").append('<i class="'+f.settings.accordion.collapseIcon+'"></i>')})},accPutIcon(),a(".accordion").on("shown.bs.collapse",function(){accUpdIcon()}).on("hidden.bs.collapse",function(){accUpdIcon()})},f.breadCrumbs=function(){var b=a(".heading > .breadcrumb"),c='<i class="'+f.settings.breadcrumbs.homeicon+'"></i>',d=a(".mainnav a.active"),e=d.closest(".sub");b.empty(),b.append("<li>You are here:</li>"),b.append('<li><a href="index.html" class="tip" title="back to dashboard">'+c+"</a></li>"),b.append('<span class="divider"><i class="'+f.settings.breadcrumbs.dividerIcon+'"></i></span>'),e.closest("li").hasClass("hasSub")?(navel1=e.prev("a.active-state"),link=navel1.attr("href"),text1=navel1.children(".notification").remove().end().text().trim(),b.append('<li><a href="'+link+'">'+text1+"</a></li>"),text=d.children(".notification").remove().end().text(),b.append('<span class="divider"><i class="'+f.settings.breadcrumbs.dividerIcon+'"></i></span>'),b.append("<li>"+text+"</li>")):(text=d.children(".notification").remove().end().text(),b.append("<li>"+text+"</li>"))},f.checkBoxesAndRadios=function(){var b=a("input[type=checkbox]"),c=a("input[type=radio]");b.each(function(b){chboxClass="undefined"==typeof a(this).data("class")?"checkbox-custom":a(this).data("class"),"undefined"==typeof a(this).attr("id")?(chboxId="chbox"+b,a(this).attr("id",chboxId)):chboxId=a(this).attr("id"),chboxLabeltxt="undefined"==typeof a(this).data("label")?"":a(this).data("label"),a(this).parent().hasClass(chboxClass)||a(this).parent().hasClass("toggle")||(a(this).wrap('<div class="'+chboxClass+'">'),a(this).parent().append('<label for="'+chboxId+'">'+chboxLabeltxt+"</label>"))}),c.each(function(b){radioClass="undefined"==typeof a(this).data("class")?"radio-custom":a(this).data("class"),"undefined"==typeof a(this).attr("id")?(radioId="radio"+b,a(this).attr("id",radioId)):radioId=a(this).attr("id"),radioLabeltxt="undefined"==typeof a(this).data("label")?"":a(this).data("label"),a(this).parent().hasClass(radioClass)||a(this).parent().hasClass("toggle")||(a(this).wrap('<div class="'+radioClass+'">'),a(this).parent().append('<label for="'+radioId+'">'+radioLabeltxt+"</label>"))})},f.shrinkHeader=function(){var b,c,d,e=a("#header"),f=a("body");return d=e.position().top,b=a(document),c=!1,a(window).on("scroll touchmove",function(){return c=!0}),setInterval(function(){return c?(e.toggleClass("shrink",b.scrollTop()>d),f.toggleClass("shrink-header",b.scrollTop()>d),c=!1):void 0},250)},f.storejs=function(){!function(a){function b(){try{return h in a&&a[h]}catch(b){return!1}}function c(a){return function(){var b=Array.prototype.slice.call(arguments,0);b.unshift(e),j.appendChild(e),e.addBehavior("#default#userData"),e.load(h);var c=a.apply(f,b);return j.removeChild(e),c}}function d(a){return a.replace(/^d/,"___$&").replace(m,"___")}var e,f={},g=a.document,h="localStorage",i="script";if(f.disabled=!1,f.set=function(){},f.get=function(){},f.remove=function(){},f.clear=function(){},f.transact=function(a,b,c){var d=f.get(a);null==c&&(c=b,b=null),"undefined"==typeof d&&(d=b||{}),c(d),f.set(a,d)},f.getAll=function(){},f.forEach=function(){},f.serialize=function(a){return JSON.stringify(a)},f.deserialize=function(a){if("string"!=typeof a)return void 0;try{return JSON.parse(a)}catch(b){return a||void 0}},b())e=a[h],f.set=function(a,b){return void 0===b?f.remove(a):(e.setItem(a,f.serialize(b)),b)},f.get=function(a){return f.deserialize(e.getItem(a))},f.remove=function(a){e.removeItem(a)},f.clear=function(){e.clear()},f.getAll=function(){var a={};return f.forEach(function(b,c){a[b]=c}),a},f.forEach=function(a){for(var b=0;b<e.length;b++){var c=e.key(b);a(c,f.get(c))}};else if(g.documentElement.addBehavior){var j,k;try{k=new ActiveXObject("htmlfile"),k.open(),k.write("<"+i+">document.w=window</"+i+'><iframe src="/favicon.ico"></iframe>'),k.close(),j=k.w.frames[0].document,e=j.createElement("div")}catch(l){e=g.createElement("div"),j=g.body}var m=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");f.set=c(function(a,b,c){return b=d(b),void 0===c?f.remove(b):(a.setAttribute(b,f.serialize(c)),a.save(h),c)}),f.get=c(function(a,b){return b=d(b),f.deserialize(a.getAttribute(b))}),f.remove=c(function(a,b){b=d(b),a.removeAttribute(b),a.save(h)}),f.clear=c(function(a){var b=a.XMLDocument.documentElement.attributes;a.load(h);for(var c,d=0;c=b[d];d++)a.removeAttribute(c.name);a.save(h)}),f.getAll=function(){var a={};return f.forEach(function(b,c){a[b]=c}),a},f.forEach=c(function(a,b){for(var c,d=a.XMLDocument.documentElement.attributes,e=0;c=d[e];++e)b(c.name,f.deserialize(a.getAttribute(c.name)))})}try{var n="__storejs__";f.set(n,n),f.get(n)!=n&&(f.disabled=!0),f.remove(n)}catch(l){f.disabled=!0}f.enabled=!f.disabled,"undefined"!=typeof module&&module.exports&&this.module!==module?module.exports=f:"function"==typeof define&&define.amd?define(f):a.store=f}(Function("return this")())},f.mouseWheel=function(){!function(a){function b(b){var c=b||window.event,d=[].slice.call(arguments,1),e=0,f=0,g=0;return b=a.event.fix(c),b.type="mousewheel",c.wheelDelta&&(e=c.wheelDelta/120),c.detail&&(e=-c.detail/3),g=e,void 0!==c.axis&&c.axis===c.HORIZONTAL_AXIS&&(g=0,f=-1*e),void 0!==c.wheelDeltaY&&(g=c.wheelDeltaY/120),void 0!==c.wheelDeltaX&&(f=-1*c.wheelDeltaX/120),d.unshift(b,e,f,g),(a.event.dispatch||a.event.handle).apply(this,d)}var c=["DOMMouseScroll","mousewheel"];if(a.event.fixHooks)for(var d=c.length;d;)a.event.fixHooks[c[--d]]=a.event.mouseHooks;a.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=c.length;a;)this.addEventListener(c[--a],b,!1);else this.onmousewheel=b},teardown:function(){if(this.removeEventListener)for(var a=c.length;a;)this.removeEventListener(c[--a],b,!1);else this.onmousewheel=null}},a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}(jQuery)},f.dropdownMenuFix=function(){var b=f.getBreakPoint();a("ul.dropdown-menu").each("phone"==b||"tablet"==b?function(){a(this).removeClass("right"),a(this).removeClass("left");var b=a(this).parent().innerWidth(),c=a(this).innerWidth(),d=b/2-c/2;d+="px",a(this).css("margin-left",d)
  }:function(){if(!a(this).hasClass("left")){var b=a(this).parent().innerWidth(),c=a(this).innerWidth(),d=b/2-c/2;d+="px",a(this).css("margin-left",d)}}),a(".dropdown-form").click(function(a){a.stopPropagation()})},f.expandSideBarNav=function(){nav=a(".mainnav"),nava=nav.find("a"),nava.next("ul").slideDown(f.settings.sideNav.subOpenSpeed,f.settings.sideNav.animationEasing),nava.next("ul").addClass("expand"),nava.addClass("drop").removeClass("notExpand")},f.collapseSideBarNav=function(b){nav=a(".mainnav"),nava=nav.find("a.expand"),navactiv=nav.find("a.active-state"),b?(navactiv.next("ul").slideDown(f.settings.sideNav.subOpenSpeed,f.settings.sideNav.animationEasing).addClass("show"),navactiv.addClass("expand").removeClass("notExpand")):(nava.next("ul").slideUp(f.settings.sideNav.subOpenSpeed,f.settings.sideNav.animationEasing),nava.next("ul").removeClass("show"),setTimeout(function(){nava.next("ul").removeAttr("style")},f.settings.sideNav.subCloseSpeed),nava.addClass("notExpand").removeClass("expand"))},f.dropdownMenuAnimations=function(){openEffect="animated "+f.settings.dropdownMenu.openEffect,a(".dropdown").on("show.bs.dropdown",function(){a(this).find(".dropdown-menu").addClass(openEffect)})},f.retinaReady=function(){!function(){function a(){}function b(a){return f.retinaImageSuffix+a}function c(a,c){if(this.path=a||"","undefined"!=typeof c&&null!==c)this.at_2x_path=c,this.perform_check=!1;else{if(void 0!==document.createElement){var d=document.createElement("a");d.href=this.path,d.pathname=d.pathname.replace(g,b),this.at_2x_path=d.href}else{var e=this.path.split("?");e[0]=e[0].replace(g,b),this.at_2x_path=e.join("?")}this.perform_check=!0}}function d(a){this.el=a,this.path=new c(this.el.getAttribute("src"),this.el.getAttribute("data-at2x"));var b=this;this.path.check_2x_variant(function(a){a&&b.swap()})}var e="undefined"==typeof exports?window:exports,f={retinaImageSuffix:"@2x",check_mime_type:!0,force_original_dimensions:!0};e.Retina=a,a.configure=function(a){null===a&&(a={});for(var b in a)a.hasOwnProperty(b)&&(f[b]=a[b])},a.init=function(a){null===a&&(a=e);var b=a.onload||function(){};a.onload=function(){var a,c,e=document.getElementsByTagName("img"),f=[];for(a=0;a<e.length;a+=1)c=e[a],c.getAttributeNode("data-no-retina")||f.push(new d(c));b()}},a.isRetina=function(){var a="(-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (min-resolution: 1.5dppx)";return e.devicePixelRatio>1?!0:e.matchMedia&&e.matchMedia(a).matches?!0:!1};var g=/\.\w+$/;e.RetinaImagePath=c,c.confirmed_paths=[],c.prototype.is_external=function(){return!(!this.path.match(/^https?\:/i)||this.path.match("//"+document.domain))},c.prototype.check_2x_variant=function(a){var b,d=this;return this.is_external()?a(!1):this.perform_check||"undefined"==typeof this.at_2x_path||null===this.at_2x_path?this.at_2x_path in c.confirmed_paths?a(!0):(b=new XMLHttpRequest,b.open("HEAD",this.at_2x_path),b.onreadystatechange=function(){if(4!==b.readyState)return a(!1);if(b.status>=200&&b.status<=399){if(f.check_mime_type){var e=b.getResponseHeader("Content-Type");if(null===e||!e.match(/^image/i))return a(!1)}return c.confirmed_paths.push(d.at_2x_path),a(!0)}return a(!1)},void b.send()):a(!0)},e.RetinaImage=d,d.prototype.swap=function(a){function b(){c.el.complete?(f.force_original_dimensions&&(c.el.setAttribute("width",c.el.offsetWidth),c.el.setAttribute("height",c.el.offsetHeight)),c.el.setAttribute("src",a)):setTimeout(b,5)}"undefined"==typeof a&&(a=this.path.at_2x_path);var c=this;b()},a.isRetina()&&a.init(e)}()},f.waitMe=function(){!function(a){a.fn.waitMe=function(b){return this.each(function(){var c,d,e,f,g,h,i,j=a(this),k=!1,l="background-color",m="",n={init:function(){switch(i=a.extend({effect:"bounce",text:"",bg:"rgba(255,255,255,0.7)",color:"#000",sizeW:"",sizeH:""},b),f=a('<div class="waitMe"></div>'),i.effect){case"none":e=0;break;case"bounce":e=3,g="",h="width:"+i.sizeW+";height:"+i.sizeH;break;case"rotateplane":e=1,g="",h="width:"+i.sizeW+";height:"+i.sizeH;break;case"stretch":e=5,g="",h="width:"+i.sizeW+";height:"+i.sizeH;break;case"orbit":e=2,g="width:"+i.sizeW+";height:"+i.sizeH,h="";break;case"roundBounce":e=12,g="width:"+i.sizeW+";height:"+i.sizeH,h="";break;case"win8":e=5,k=!0,g="width:"+i.sizeW+";height:"+i.sizeH,h="width:"+i.sizeW+";height:"+i.sizeH;break;case"win8_linear":e=5,k=!0,g="width:"+i.sizeW+";height:"+i.sizeH,h="";break;case"ios":e=12,g="width:"+i.sizeW+";height:"+i.sizeH,h="";break;case"facebook":e=3,g="",h="width:"+i.sizeW+";height:"+i.sizeH;break;case"rotation":e=1,l="border-color",g="",h="width:"+i.sizeW+";height:"+i.sizeH}if(""==i.sizeW&&""==i.sizeH&&(g=h=""),e>0){d=a('<div class="waitMe_progress '+i.effect+'"></div>');for(var n=1;e>=n;++n)m=k?m+('<div class="waitMe_progress_elem'+n+'" style="'+h+'"><div style="'+l+":"+i.color+'"></div></div>'):m+('<div class="waitMe_progress_elem'+n+'" style="'+l+":"+i.color+";"+h+'"></div>');d=a('<div class="waitMe_progress '+i.effect+'" style="'+g+'">'+m+"</div>")}i.text&&(c=a('<div class="waitMe_text" style="color:'+i.color+'">'+i.text+"</div>")),j.find("> .waitMe")&&j.find("> .waitMe").remove(),waitMeDivObj=a('<div class="waitMe_content"></div>'),waitMeDivObj.append(d,c),f.append(waitMeDivObj),"HTML"==j[0].tagName&&(j=a("body")),j.addClass("waitMe_container").append(f),j.find("> .waitMe").css({background:i.bg}),j.find(".waitMe_content").css({marginTop:-j.find(".waitMe_content").outerHeight()/2+"px"})},hide:function(){j.removeClass("waitMe_container"),j.find(".waitMe").remove()}};return n[b]?n[b].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof b&&b?void(a.event.special.destroyed={remove:function(a){a.handler&&a.handler()}}):n.init.apply(this,arguments)})}}(jQuery)},f.animatedProgressBars=function(){!function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.defaults,d)};b.defaults={transition_delay:300,refresh_speed:50,display_text:"none",use_percentage:!0,percent_format:function(a){return a+"%"},amount_format:function(a,b){return a+" / "+b},update:a.noop,done:a.noop,fail:a.noop},b.prototype.transition=function(){var c=this.$element,d=c.parent(),e=this.$back_text,f=this.$front_text,g=this.options,h=parseInt(c.attr("data-transitiongoal")),i=parseInt(c.attr("aria-valuemin"))||0,j=parseInt(c.attr("aria-valuemax"))||100,k=d.hasClass("vertical"),l=g.update&&"function"==typeof g.update?g.update:b.defaults.update,m=g.done&&"function"==typeof g.done?g.done:b.defaults.done,n=g.fail&&"function"==typeof g.fail?g.fail:b.defaults.fail;if(isNaN(h))return void n("data-transitiongoal not set");var o=Math.round(100*(h-i)/(j-i));if("center"===g.display_text&&!e&&!f){this.$back_text=e=a("<span>").addClass("progressbar-back-text").prependTo(d),this.$front_text=f=a("<span>").addClass("progressbar-front-text").prependTo(c);var p;k?(p=d.css("height"),e.css({height:p,"line-height":p}),f.css({height:p,"line-height":p}),a(window).resize(function(){p=d.css("height"),e.css({height:p,"line-height":p}),f.css({height:p,"line-height":p})})):(p=d.css("width"),f.css({width:p}),a(window).resize(function(){p=d.css("width"),f.css({width:p})}))}setTimeout(function(){var a,b,n,p,q;k?c.css("height",o+"%"):c.css("width",o+"%");var r=setInterval(function(){k?(n=c.height(),p=d.height()):(n=c.width(),p=d.width()),a=Math.round(100*n/p),b=Math.round(i+n/p*(j-i)),a>=o&&(a=o,b=h,m(c),clearInterval(r)),"none"!==g.display_text&&(q=g.use_percentage?g.percent_format(a):g.amount_format(b,j,i),"fill"===g.display_text?c.text(q):"center"===g.display_text&&(e.text(q),f.text(q))),c.attr("aria-valuenow",b),l(a,c)},g.refresh_speed)},g.transition_delay)};var c=a.fn.progressbar;a.fn.progressbar=function(c){return this.each(function(){var d=a(this),e=d.data("bs.progressbar"),f="object"==typeof c&&c;e||d.data("bs.progressbar",e=new b(this,f)),e.transition()})},a.fn.progressbar.Constructor=b,a.fn.progressbar.noConflict=function(){return a.fn.progressbar=c,this}}(window.jQuery)},f.browserSelector=function(){function a(a){var b=a.toLowerCase(),d=function(a){return b.indexOf(a)>-1},e="gecko",f="webkit",g="safari",h="opera",i="mobile",j=document.documentElement,k=[!/opera|webtv/i.test(b)&&/msie\s(\d)/.test(b)?"ie ie"+RegExp.$1:d("firefox/2")?e+" ff2":d("firefox/3.5")?e+" ff3 ff3_5":d("firefox/3.6")?e+" ff3 ff3_6":d("firefox/3")?e+" ff3":d("gecko/")?e:d("opera")?h+(/version\/(\d+)/.test(b)?" "+h+RegExp.$1:/opera(\s|\/)(\d+)/.test(b)?" "+h+RegExp.$2:""):d("konqueror")?"konqueror":d("blackberry")?i+" blackberry":d("android")?i+" android":d("chrome")?f+" chrome":d("iron")?f+" iron":d("applewebkit/")?f+" "+g+(/version\/(\d+)/.test(b)?" "+g+RegExp.$1:""):d("mozilla/")?e:"",d("j2me")?i+" j2me":d("iphone")?i+" iphone":d("ipod")?i+" ipod":d("ipad")?i+" ipad":d("mac")?"mac":d("darwin")?"mac":d("webtv")?"webtv":d("win")?"win"+(d("windows nt 6.0")?" vista":""):d("freebsd")?"freebsd":d("x11")||d("linux")?"linux":"","js"];return c=k.join(" "),j.className+=" "+c,c}a(navigator.userAgent)},f.firstImpression=function(){window.firstImpression=function(a,b){var c,d,e,f;return c=function(a,b,c){var d,e,f;return arguments.length>1&&"[object Object]"!==String(b)?(c=c||{},(null===b||void 0===b)&&(c.expires=-1),"number"==typeof c.expires&&(d=c.expires,f=c.expires=new Date,f.setTime(f.getTime()+24*d*60*60*1e3)),c.path="/",document.cookie=[encodeURIComponent(a),"=",encodeURIComponent(b),c.expires?"; expires="+c.expires.toUTCString():"",c.path?"; path="+c.path:"",c.domain?"; domain="+c.domain:"",c.secure?"; secure":""].join("")):(e=new RegExp("(?:^|; )"+encodeURIComponent(a)+"=([^;]*)").exec(document.cookie),e?decodeURIComponent(e[1]):null)},void 0===a&&(a="_firstImpression"),void 0===b&&(b=730),null===a?void c("_firstImpression",null):null===b?void c(a,null):(d=function(){return c(a)},e=function(){c(a,!0,{expires:b})},(f=function(){var a=d();return a||e(),!a})())}},f.matchHeight=function(){!function(a){var b=-1,c=-1,d=function(b){var c=null,d=[];return a(b).each(function(){var b=a(this),f=b.offset().top-e(b.css("margin-top")),g=0<d.length?d[d.length-1]:null;null===g?d.push(b):1>=Math.floor(Math.abs(c-f))?d[d.length-1]=g.add(b):d.push(b),c=f}),d},e=function(a){return parseFloat(a)||0},f=function(b){var c={byRow:!0,remove:!1,property:"height"};return"object"==typeof b&&(c=a.extend(c,b)),"boolean"==typeof b&&(c.byRow=b),"remove"===b&&(c.remove=!0),c},g=a.fn.matchHeight=function(b){if(b=f(b),b.remove){var c=this;return this.css(b.property,""),a.each(g._groups,function(a,b){b.elements=b.elements.not(c)}),this}return 1>=this.length?this:(g._groups.push({elements:this,options:b}),g._apply(this,b),this)};g._groups=[],g._throttle=80,g._maintainScroll=!1,g._beforeUpdate=null,g._afterUpdate=null,g._apply=function(b,c){var h=f(c),i=a(b),j=[i],k=a(window).scrollTop(),l=a("html").outerHeight(!0),m=i.parents().filter(":hidden");return m.css("display","block"),h.byRow&&(i.each(function(){var b=a(this),c="inline-block"===b.css("display")?"inline-block":"block";b.data("style-cache",b.attr("style")),b.css({display:c,"padding-top":"0","padding-bottom":"0","margin-top":"0","margin-bottom":"0","border-top-width":"0","border-bottom-width":"0",height:"100px"})}),j=d(i),i.each(function(){var b=a(this);b.attr("style",b.data("style-cache")||"").css("height","")})),a.each(j,function(b,c){var d=a(c),f=0;h.byRow&&1>=d.length||(d.each(function(){var b=a(this),c={display:"inline-block"===b.css("display")?"inline-block":"block"};c[h.property]="",b.css(c),b.outerHeight(!1)>f&&(f=b.outerHeight(!1)),b.css("display","")}),d.each(function(){var b=a(this),c=0;"border-box"!==b.css("box-sizing")&&(c+=e(b.css("border-top-width"))+e(b.css("border-bottom-width")),c+=e(b.css("padding-top"))+e(b.css("padding-bottom"))),b.css(h.property,f-c)}))}),m.css("display",""),g._maintainScroll&&a(window).scrollTop(k/l*a("html").outerHeight(!0)),this},g._applyDataApi=function(){var b={};a("[data-match-height], [data-mh]").each(function(){var c=a(this),d=c.attr("data-match-height")||c.attr("data-mh");b[d]=d in b?b[d].add(c):c}),a.each(b,function(){this.matchHeight(!0)})};var h=function(b){g._beforeUpdate&&g._beforeUpdate(b,g._groups),a.each(g._groups,function(){g._apply(this.elements,this.options)}),g._afterUpdate&&g._afterUpdate(b,g._groups)};g._update=function(d,e){if(e&&"resize"===e.type){var f=a(window).width();if(f===b)return;b=f}d?-1===c&&(c=setTimeout(function(){h(e),c=-1},g._throttle)):h(e)},a(g._applyDataApi),a(window).bind("load",function(a){g._update(!1,a)}),a(window).bind("resize orientationchange",function(a){g._update(!0,a)})}(jQuery)},f.equalHeight=function(){f.matchHeight()},f.quickSearch=function(){a(".chat-search input").length&&a(".chat-search input").val("").quicksearch(".user-list .list-group-item",{removeDiacritics:!0}),a(".todo-search input").length&&a(".todo-search input").val("").quicksearch(".todo-list .todo-task-item"),a(".users-search input").length&&a(".users-search input").val("").quicksearch(".recent-users-widget .list-group-item"),a(".icon-search").length&&a(".icon-search").val("").quicksearch(".col-md-3",{removeDiacritics:!0})},f.resSearchButton=function(){var b=a(".resSearchBtn"),c=a(".closeSearchForm"),d=a("#header .navbar-form");b.click(function(){d.addClass("show animated fadeIn"),c.addClass("show")}),c.click(function(){a(this).removeClass("show"),d.removeClass("show animated fadeIn")})},f.resSidebarButton=function(){var b=a("#showNav");b.click(function(){a(this).hasClass("sidebar-showed")?(f.hideLeftSidebar(),a(this).removeClass("sidebar-showed")):(f.showLeftSidebar(),a(this).addClass("sidebar-showed"))})},f.responsiveTables=function(){var b=a(".table").not(".non-responsive");b.each(function(){a(this).wrap('<div class="table-responsive" />'),f.settings.tables.customscroll&&a("div.table-responsive").slimScrollHorizontal({size:f.settings.customScroll.size,color:"#f3f3f3",railOpacity:"0.3",width:"100%",positon:"bottom",start:"left",railVisible:!0,distance:"3px"})})},f.emailApp=function(){var b=a("#email-sidebar"),c=a("#email-content");a("#email-toggle").click(function(){a(this).hasClass("pushed")?(a(this).removeClass("pushed"),b.removeClass("email-sidebar-hide"),b.addClass("email-sidebar-show"),c.removeClass("email-content-expand"),c.addClass("email-content-contract")):(a(this).addClass("pushed"),b.removeClass("email-sidebar-show"),b.addClass("email-sidebar-hide"),c.removeClass("email-content-contract"),c.addClass("email-content-expand"))})},f.collapseEmailAppSidebar=function(){var b=a("#email-sidebar"),c=a("#email-content");b.removeClass("email-sidebar-show"),b.addClass("email-sidebar-hide"),c.removeClass("email-content-contract"),c.addClass("email-content-expand"),a("#email-toggle").addClass("pushed")},f.expandEmailAppSidebar=function(){var b=a("#email-sidebar"),c=a("#email-content");b.removeClass("email-sidebar-hide"),b.addClass("email-sidebar-show"),c.removeClass("email-content-expand"),c.addClass("email-content-contract"),a("#email-toggle").removeClass("pushed")},f.toDoWidget=function(){var b=a(".todo-widget"),c=b.find(".todo-task-item"),d=c.find('input[type="checkbox"]'),e=c.find(".close");d.change(function(){a(this).prop("checked")?a(this).closest(".todo-task-item").addClass("task-done"):a(this).closest(".todo-task-item").removeClass("task-done")}),e.click(function(){a(this).closest(".todo-task-item").fadeOut("500")})},f.removeDefaultClassess=function(){var b=(f.getBreakPoint(),a("#sidebar")),c=a("#right-sidebar"),d=a(".page-content");d.addClass("sidebar-page"),d.addClass("right-sidebar-page"),b.removeClass("hidden-lg hidden-md hidden-sm hidden-xs"),c.removeClass("hidden-lg hidden-md hidden-sm hidden-xs"),a("#sidebarbg, #right-sidebarbg").removeClass("hidden-lg hidden-md hidden-sm hidden-xs")},f.respondjs=function(){var b=jRespond([{label:"phone",enter:0,exit:767},{label:"tablet",enter:768,exit:979},{label:"laptop",enter:980,exit:1366},{label:"large",enter:1367,exit:1e4}]);return b.addFunc({breakpoint:"large",enter:function(){f.removeDefaultClassess(),store.set("rightSidebarToggle",0),f.toggleRightSidebarBtn("show"),f.showRightSidebar()},exit:function(){}}),b.addFunc({breakpoint:"laptop",enter:function(){f.removeDefaultClassess(),f.hideRightSidebar()},exit:function(){}}),b.addFunc({breakpoint:"tablet",enter:function(){f.removeDefaultClassess(),f.toggleLeftSidebar(),f.sideBarNavToggle(),f.collapseSideBarNav(!1),f.hideRightSidebar(),f.dropdownMenuFix()},exit:function(){f.showLeftSidebar(),f.dropdownMenuFix()}}),b.addFunc({breakpoint:"phone",enter:function(){f.removeDefaultClassess(),f.dropdownMenuFix(),f.hideLeftSidebar(),f.collapseEmailAppSidebar(),a("#email-content").addClass("email-content-offCanvas"),f.hideRightSidebar()},exit:function(){f.showLeftSidebar(),a("#email-content").removeClass("email-content-offCanvas"),f.expandEmailAppSidebar()}}),b},f.init()},a.fn.supr=function(b){return this.each(function(){if(void 0==a(this).data("supr")){var c=new a.supr(this,b);a(this).data("supr",c)}})}}(jQuery),window.console||(console={log:function(){}}),navigator.userAgent.match(/IEMobile\/10\.0/)){var msViewportStyle=document.createElement("style");msViewportStyle.appendChild(document.createTextNode("@-ms-viewport{width:auto!important}")),document.querySelector("head").appendChild(msViewportStyle)}var nua=navigator.userAgent,isAndroid=nua.indexOf("Mozilla/5.0")>-1&&nua.indexOf("Android ")>-1&&nua.indexOf("AppleWebKit")>-1&&-1===nua.indexOf("Chrome");isAndroid&&$("select.form-control").removeClass("form-control").css("width","100%"),window.addEventListener("load",function(){FastClick.attach(document.body)},!1),$(document).ready(function(){$("a[href^=#]").click(function(a){a.preventDefault()}),$("body").supr({customScroll:{color:"#c4c4c4",rscolor:"#95A5A6",size:"5px",opacity:"1",alwaysVisible:!1},header:{fixed:!0,shrink:!0},breadcrumbs:{auto:!0,homeicon:"s16 icomoon-icon-screen-2",dividerIcon:"s16 icomoon-icon-arrow-right-3"},sidebar:{fixed:!0,rememberToggle:!0,offCanvas:!1},rightSidebar:{fixed:!0,rememberToggle:!0},sideNav:{toggleMode:!0,showArrows:!0,sideNavArrowIcon:"icomoon-icon-arrow-down-2 s16",subOpenSpeed:200,subCloseSpeed:300,animationEasing:"linear",absoluteUrl:!1,subDir:""},panels:{refreshIcon:"brocco-icon-refresh s12",toggleIcon:"icomoon-icon-plus",collapseIcon:"icomoon-icon-minus",closeIcon:"icomoon-icon-close",showControlsOnHover:!1,loadingEffect:"rotateplane",loaderColor:"#616469",rememberSortablePosition:!0},accordion:{toggleIcon:"icomoon-icon-minus s12",collapseIcon:"icomoon-icon-plus s12"},tables:{responsive:!0,customscroll:!0},alerts:{animation:!0,closeEffect:"bounceOutDown"},dropdownMenu:{animation:!0,openEffect:"fadeIn"},backToTop:!0}),$("[data-toggle=tooltip]").tooltip({container:"body"}),$(".tip").tooltip({placement:"top",container:"body"}),$(".tipR").tooltip({placement:"right",container:"body"}),$(".tipB").tooltip({placement:"bottom",container:"body"}),$(".tipL").tooltip({placement:"left",container:"body"}),$("[data-toggle=popover]").popover({html:!0});var a=$("body").data("supr");firstImpression()&&(a.settings.header.fixed?store.set("fixed-header",1):store.set("fixed-header",0),a.settings.sidebar.fixed?store.set("fixed-left-sidebar",1):store.set("fixed-left-sidebar",0),a.settings.rightSidebar.fixed?store.set("fixed-right-sidebar",1):store.set("fixed-right-sidebar",0)),1==store.get("fixed-header")?$("#fixed-header-toggle").prop("checked",!0):$("#fixed-header-toggle").prop("checked",!1),1==store.get("fixed-left-sidebar")?$("#fixed-left-sidebar").prop("checked",!0):$("#fixed-left-sidebar").prop("checked",!1),1==store.get("fixed-right-sidebar")?$("#fixed-right-sidebar").prop("checked",!0):$("#fixed-right-sidebar").prop("checked",!1),$("#fixed-header-toggle").on("change",function(){a.fixedHeader(this.checked?!0:!1)}),$("#fixed-left-sidebar").on("change",function(){this.checked?a.fixedSidebar("left"):a.removeFixedSidebar("left")}),$("#fixed-right-sidebar").on("change",function(){this.checked?a.fixedSidebar("right"):a.removeFixedSidebar("right")})}),$(document).ready(function(){$("#uploader").pluploadQueue({runtimes:"html5,flash,silverlight,html4",url:"uploads",chunk_size:"1mb",rename:!0,dragdrop:!0,filters:{max_file_size:"10mb",mime_types:[{title:"Image files",extensions:"jpg,gif,png"}]},resize:{width:200,height:200,quality:90,crop:!0},flash_swf_url:"plugins/files/plupload/Moxie.swf",silverlight_xap_url:"plugins/files/plupload/Moxie.xap"})});var positive=[1,5,3,7,8,6,10],negative=[10,6,8,7,3,5,1],negative1=[7,6,8,7,6,5,4];$("#stat1").sparkline(positive,{height:15,spotRadius:0,barColor:"#9FC569",type:"bar"}),$("#stat2").sparkline(negative,{height:15,spotRadius:0,barColor:"#ED7A53",type:"bar"}),$("#stat3").sparkline(negative1,{height:15,spotRadius:0,barColor:"#ED7A53",type:"bar"}),$("#stat4").sparkline(positive,{height:15,spotRadius:0,barColor:"#9FC569",type:"bar"}),$("#stat5").sparkline(positive,{height:15,spotRadius:0,barColor:"#9FC569",type:"bar"}),$("#stat6").sparkline(positive,{width:70,height:20,lineColor:"#88bbc8",fillColor:"#f2f7f9",spotColor:"#e72828",maxSpotColor:"#005e20",minSpotColor:"#f7941d",spotRadius:3,lineWidth:2});