(function(n){var i,t;n.uaMatch=function(n){n=n.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(n)||/(webkit)[ \/]([\w.]+)/.exec(n)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(n)||/(msie) ([\w.]+)/.exec(n)||n.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(n)||[];return{browser:t[1]||"",version:t[2]||"0"}};n.browser||(i=n.uaMatch(navigator.userAgent),t={},i.browser&&(t[i.browser]=!0,t.version=i.version),t.chrome?t.webkit=!0:t.webkit&&(t.safari=!0),n.browser=t)})(jQuery),function(n){function r(r,u){var f=this,h=r.add(f),v=n(window),s,e,c,o=n.tools.expose&&(u.mask||u.expose),l=Math.random().toString().slice(10),a;if(o&&(typeof o=="string"&&(o={color:o}),o.closeOnClick=o.closeOnEsc=!1),a=u.target||r.attr("rel"),e=a?n(a):null||r,!e.length)throw"Could not find Overlay: "+a;r&&r.index(e)==-1&&r.click(function(n){return f.load(n),n.preventDefault()});n.extend(f,{load:function(r){var a;if(f.isOpened())return f;if(a=t[u.effect],!a)throw'Overlay: cannot find effect : "'+u.effect+'"';if(u.oneInstance&&n.each(i,function(){this.close(r)}),r=r||n.Event(),r.type="onBeforeLoad",h.trigger(r),r.isDefaultPrevented())return f;c=!0;o&&n(e).expose(o);var s=u.top,y=u.left,p=e.outerWidth(!0),w=e.outerHeight(!0);if(typeof s=="string"&&(s=s=="center"?Math.max((v.height()-w)/2,0):parseInt(s,10)/100*v.height()),y=="center"&&(y=Math.max((v.width()-p)/2,0)),a[0].call(f,{top:s,left:y},function(){c&&(r.type="onLoad",h.trigger(r))}),o&&u.closeOnClick)n.mask.getMask().one("click",f.close);if(u.closeOnClick)n(document).on("click."+l,function(t){n(t.target).parents(e).length||f.close(t)});if(u.closeOnEsc)n(document).on("keydown."+l,function(n){n.keyCode==27&&f.close(n)});return f},close:function(i){return f.isOpened()?(i=i||n.Event(),i.type="onBeforeClose",h.trigger(i),i.isDefaultPrevented())?void 0:(c=!1,t[u.effect][1].call(f,function(){i.type="onClose";h.trigger(i)}),n(document).off("click."+l+" keydown."+l),o&&n.mask.close(),f):f},getOverlay:function(){return e},getTrigger:function(){return r},getClosers:function(){return s},isOpened:function(){return c},getConf:function(){return u}});n.each("onBeforeLoad,onStart,onLoad,onBeforeClose,onClose".split(","),function(t,i){if(n.isFunction(u[i]))n(f).on(i,u[i]);f[i]=function(t){if(t)n(f).on(i,t);return f}});s=e.find(u.close||".close");s.length||u.close||(s=n('<a class="close"><\/a>'),e.prepend(s));s.click(function(n){f.close(n)});u.load&&f.load()}n.tools=n.tools||{version:"1.2.7"};n.tools.overlay={addEffect:function(n,i,r){t[n]=[i,r]},conf:{close:null,closeOnClick:!0,closeOnEsc:!0,closeSpeed:"fast",effect:"default",fixed:!n.browser.msie||n.browser.version>6,left:"center",load:!1,mask:null,oneInstance:!0,speed:"normal",target:null,top:"10%"}};var i=[],t={};n.tools.overlay.addEffect("default",function(t,i){var r=this.getConf(),u=n(window);r.fixed||(t.top+=u.scrollTop(),t.left+=u.scrollLeft());t.position=r.fixed?"fixed":"absolute";this.getOverlay().css(t).fadeIn(r.speed,i)},function(n){this.getOverlay().fadeOut(this.getConf().closeSpeed,n)});n.fn.overlay=function(t){var u=this.data("overlay");return u?u:(n.isFunction(t)&&(t={onBeforeLoad:t}),t=n.extend(!0,{},n.tools.overlay.conf,t),this.each(function(){u=new r(n(this),t);i.push(u);n(this).data("overlay",u)}),t.api?u:this)}}(jQuery),function(n){function r(n){var t=n.offset();return{top:t.top+n.height()/2,left:t.left+n.width()/2}}var i=n.tools.overlay,t=n(window),u,f;n.extend(i.conf,{start:{top:null,left:null},fadeInSpeed:"fast",zIndex:9999});u=function(i,u){var f=this.getOverlay(),e=this.getConf(),a=this.getTrigger(),p=this,v=f.outerWidth(!0),o=f.data("img"),y=e.fixed?"fixed":"absolute",s,h,c,l;if(!o){if(s=f.css("backgroundImage"),!s)throw"background-image CSS property not set for overlay";s=s.slice(s.indexOf("(")+1,s.indexOf(")")).replace(/\"/g,"");f.css("backgroundImage","none");o=n('<img src="'+s+'"/>');o.css({border:0,display:"none"}).width(v);n("body").append(o);f.data("img",o)}h=e.start.top||Math.round(t.height()/2);c=e.start.left||Math.round(t.width()/2);a&&(l=r(a),h=l.top,c=l.left);e.fixed?(h-=t.scrollTop(),c-=t.scrollLeft()):(i.top+=t.scrollTop(),i.left+=t.scrollLeft());o.css({position:"absolute",top:h,left:c,width:0,zIndex:e.zIndex}).show();i.position=y;f.css(i);o.animate({top:i.top,left:i.left,width:v},e.speed,function(){f.css("zIndex",e.zIndex+1).fadeIn(e.fadeInSpeed,function(){p.isOpened()&&!n(this).index(f)?u.call():f.hide()})}).css("position",y)};f=function(i){var s=this.getOverlay().hide(),u=this.getConf(),f=this.getTrigger(),e=s.data("img"),o={top:u.start.top,left:u.start.left,width:0};f&&n.extend(o,r(f));u.fixed&&e.css({position:"absolute"}).animate({top:"+="+t.scrollTop(),left:"+="+t.scrollLeft()},0);e.animate(o,u.closeSpeed,i)};i.addEffect("apple",u,f)}(jQuery),function(n){function i(t,i){var r=n(i);return r.length<2?r:t.parent().find(i)}function r(r,u){var f=this,v=r.add(f),e=r.children(),l=0,o=u.vertical,y,p,a,s,h,c;if(t||(t=f),e.length>1&&(e=n(u.items,r)),u.size>1&&(u.circular=!1),n.extend(f,{getConf:function(){return u},getIndex:function(){return l},getSize:function(){return f.getItems().size()},getNaviButtons:function(){return s.add(h)},getRoot:function(){return r},getItemWrap:function(){return e},getItems:function(){return e.find(u.item).not("."+u.clonedClass)},move:function(n,t){return f.seekTo(l+n,t)},next:function(n){return f.move(u.size,n)},prev:function(n){return f.move(-u.size,n)},begin:function(n){return f.seekTo(0,n)},end:function(n){return f.seekTo(f.getSize()-1,n)},focus:function(){return t=f,f},addItem:function(t){return t=n(t),u.circular?(e.children().last().before(t),e.children().first().replaceWith(t.clone().addClass(u.clonedClass))):(e.append(t),h.removeClass("disabled")),v.trigger("onAddItem",[t]),f},seekTo:function(i,r,s){var h,c,a;return(i.jquery||(i*=1),u.circular&&i===0&&l==-1&&r!==0)?f:!u.circular&&i<0||i>f.getSize()||i<-1?f:(h=i,i.jquery?i=f.getItems().index(i):h=f.getItems().eq(i),c=n.Event("onBeforeSeek"),!s&&(v.trigger(c,[i,r]),c.isDefaultPrevented()||!h.length))?f:(a=o?{top:-h.position().top}:{left:-h.position().left},l=i,t=f,r===undefined&&(r=u.speed),e.animate(a,r,u.easing,s||function(){v.trigger("onSeek",[i])}),f)}}),n.each(["onBeforeSeek","onSeek","onAddItem"],function(t,i){if(n.isFunction(u[i]))n(f).on(i,u[i]);f[i]=function(t){if(t)n(f).on(i,t);return f}}),u.circular){y=f.getItems().slice(-1).clone().prependTo(e);p=f.getItems().eq(1).clone().appendTo(e);y.add(p).addClass(u.clonedClass);f.onBeforeSeek(function(n,t,i){if(!n.isDefaultPrevented()){if(t==-1)return f.seekTo(y,i,function(){f.end(0)}),n.preventDefault();t==f.getSize()&&f.seekTo(p,i,function(){f.begin(0)})}});a=r.parents().add(r).filter(function(){if(n(this).css("display")==="none")return!0});a.length?(a.show(),f.seekTo(0,0,function(){}),a.hide()):f.seekTo(0,0,function(){})}if(s=i(r,u.prev).click(function(n){n.stopPropagation();f.prev()}),h=i(r,u.next).click(function(n){n.stopPropagation();f.next()}),!u.circular){f.onBeforeSeek(function(n,t){setTimeout(function(){n.isDefaultPrevented()||(s.toggleClass(u.disabledClass,t<=0),h.toggleClass(u.disabledClass,t>=f.getSize()-1))},1)});u.initialIndex||s.addClass(u.disabledClass)}if(f.getSize()<2&&s.add(h).addClass(u.disabledClass),u.mousewheel&&n.fn.mousewheel&&r.mousewheel(function(n,t){if(u.mousewheel)return f.move(t<0?1:-1,u.wheelSpeed||50),!1}),u.touch&&(c={},e[0].ontouchstart=function(n){var t=n.touches[0];c.x=t.clientX;c.y=t.clientY},e[0].ontouchmove=function(n){if(n.touches.length==1&&!e.is(":animated")){var t=n.touches[0],i=c.x-t.clientX,r=c.y-t.clientY;f[o&&r>0||!o&&i>0?"next":"prev"]();n.preventDefault()}}),u.keyboard)n(document).on("keydown.scrollable",function(i){if(u.keyboard&&!i.altKey&&!i.ctrlKey&&!i.metaKey&&!n(i.target).is(":input")&&(u.keyboard=="static"||t==f)){var r=i.keyCode;return o&&(r==38||r==40)?(f.move(r==38?-1:1),i.preventDefault()):!o&&(r==37||r==39)?(f.move(r==37?-1:1),i.preventDefault()):void 0}});u.initialIndex&&f.seekTo(u.initialIndex,0,function(){})}n.tools=n.tools||{version:"1.2.7"};n.tools.scrollable={conf:{activeClass:"active",circular:!1,clonedClass:"cloned",disabledClass:"disabled",easing:"swing",initialIndex:0,item:"> *",items:".items",keyboard:!0,mousewheel:!1,next:".next",prev:".prev",size:1,speed:400,vertical:!1,touch:!0,wheelSpeed:0}};var t;n.fn.scrollable=function(t){var i=this.data("scrollable");return i?i:(t=n.extend({},n.tools.scrollable.conf,t),this.each(function(){i=new r(n(this),t);n(this).data("scrollable",i)}),t.api?i:this)}}(jQuery),function(n){var t=n.tools.scrollable;t.autoscroll={conf:{autoplay:!0,interval:3e3,autopause:!0}};n.fn.autoscroll=function(i){typeof i=="number"&&(i={interval:i});var r=n.extend({},t.autoscroll.conf,i),u;return this.each(function(){function o(){i&&clearTimeout(i);i=setTimeout(function(){t.next()},r.interval)}var t=n(this).data("scrollable"),f=t.getRoot(),i,e=!1;t&&(u=t);t.play=function(){if(!i){e=!1;f.on("onSeek",o);o()}};t.pause=function(){i=clearTimeout(i);f.off("onSeek",o)};t.resume=function(){e||t.play()};t.stop=function(){e=!0;t.pause()};r.autopause&&f.add(t.getNaviButtons()).hover(t.pause,t.resume);r.autoplay&&t.play()}),r.api?u:this}}(jQuery),function(n){function i(t,i){var r=n(i);return r.length<2?r:t.parent().find(i)}var t=n.tools.scrollable;t.navigator={conf:{navi:".navi",naviItem:null,activeClass:"active",indexed:!1,idPrefix:null,history:!1}};n.fn.navigator=function(r){typeof r=="string"&&(r={navi:r});r=n.extend({},t.navigator.conf,r);var u;return this.each(function(){function c(n,i,r){t.seekTo(i);r.preventDefault();h&&history.pushState({i:i},"")}function f(){return e.find(r.naviItem||"> *")}function l(t){var i=n("<"+(r.naviItem||"a")+"/>").click(function(i){c(n(this),t,i)});return t===0&&i.addClass(o),r.indexed&&i.text(t+1),r.idPrefix&&i.attr("id",r.idPrefix+t),i.appendTo(e)}var t=n(this).data("scrollable"),e=r.navi.jquery?r.navi:i(t.getRoot(),r.navi),a=t.getNaviButtons(),o=r.activeClass,h=r.history&&!!history.pushState,s=t.getConf().size;if(t&&(u=t),t.getNaviButtons=function(){return a.add(e)},h){history.pushState({i:0},"");n(window).on("popstate",function(n){var i=n.originalEvent.state;i&&t.seekTo(i.i)})}f().length?f().each(function(t){n(this).click(function(i){c(n(this),t,i)})}):n.each(t.getItems(),function(n){n%s==0&&l(n)});t.onBeforeSeek(function(n,t){setTimeout(function(){if(!n.isDefaultPrevented()){var i=t/s,r=f().eq(i);r.length&&f().removeClass(o).eq(i).addClass(o)}},1)});t.onAddItem(function(n,i){var r=t.getItems().index(i);r%s==0&&l(r)})}),r.api?u:this}}(jQuery),function(n){function u(t,i,u){var f=this,h=t.add(this),e=t.find(u.tabs),o=i.jquery?i:t.children(i),s;e.length||(e=t.children());o.length||(o=t.parent().find(i));o.length||(o=n(i));n.extend(this,{click:function(i,o){var c=e.eq(i),v=!t.data("tabs"),l,a;if(typeof i=="string"&&i.replace("#","")&&(c=e.filter('[href*="'+i.replace("#","")+'"]'),i=Math.max(e.index(c),0)),u.rotate){if(l=e.length-1,i<0)return f.click(l,o);if(i>l)return f.click(0,o)}if(!c.length){if(s>=0)return f;i=u.initialIndex;c=e.eq(i)}return i===s?f:(o=o||n.Event(),o.type="onBeforeClick",h.trigger(o,[i]),o.isDefaultPrevented())?void 0:(a=v?u.initialEffect&&u.effect||"default":u.effect,r[a].call(f,i,function(){s=i;o.type="onClick";h.trigger(o,[i])}),e.removeClass(u.current),c.addClass(u.current),f)},getConf:function(){return u},getTabs:function(){return e},getPanes:function(){return o},getCurrentPane:function(){return o.eq(s)},getCurrentTab:function(){return e.eq(s)},getIndex:function(){return s},next:function(){return f.click(s+1)},prev:function(){return f.click(s-1)},destroy:function(){return e.off(u.event).removeClass(u.current),o.find('a[href^="#"]').off("click.T"),f}});n.each("onBeforeClick,onClick".split(","),function(t,i){if(n.isFunction(u[i]))n(f).on(i,u[i]);f[i]=function(t){if(t)n(f).on(i,t);return f}});u.history&&n.fn.history&&(n.tools.history.init(e),u.event="history");e.each(function(t){n(this).on(u.event,function(n){return f.click(t,n),n.preventDefault()})});o.find('a[href^="#"]').on("click.T",function(t){f.click(n(this).attr("href"),t)});location.hash&&u.tabs=="a"&&t.find('[href="'+location.hash+'"]').length?f.click(location.hash):(u.initialIndex===0||u.initialIndex>0)&&f.click(u.initialIndex)}n.tools=n.tools||{version:"1.2.7"};n.tools.tabs={conf:{tabs:"a",current:"current",onBeforeClick:null,onClick:null,effect:"default",initialEffect:!1,initialIndex:0,event:"click",rotate:!1,slideUpSpeed:400,slideDownSpeed:400,history:!1},addEffect:function(n,t){r[n]=t}};var r={"default":function(n,t){this.getPanes().hide().eq(n).show();t.call()},fade:function(n,t){var r=this.getConf(),u=r.fadeOutSpeed,i=this.getPanes();u?i.fadeOut(u):i.hide();i.eq(n).fadeIn(r.fadeInSpeed,t)},slide:function(n,t){var i=this.getConf();this.getPanes().slideUp(i.slideUpSpeed);this.getPanes().eq(n).slideDown(i.slideDownSpeed,t)},ajax:function(n,t){this.getPanes().eq(0).load(this.getTabs().eq(n).attr("href"),t)}},t,i;n.tools.tabs.addEffect("horizontal",function(r,u){if(!t){var f=this.getPanes().eq(r),e=this.getCurrentPane();i||(i=this.getPanes().eq(0).width());t=!0;f.show();e.animate({width:0},{step:function(n){f.css("width",i-n)},complete:function(){n(this).hide();u.call();t=!1}});e.length||(u.call(),t=!1)}});n.fn.tabs=function(t,i){var r=this.data("tabs");return r&&(r.destroy(),this.removeData("tabs")),n.isFunction(i)&&(i={onBeforeClick:i}),i=n.extend({},n.tools.tabs.conf,i),this.each(function(){r=new u(n(this),t,i);n(this).data("tabs",r)}),i.api?r:this}}(jQuery),function(n){function i(t,i){function l(i){var r=n(i);return r.length<2?r:t.parent().find(i)}function c(){e=setTimeout(function(){u.next()},i.interval)}var r=this,f=t.add(this),u=t.data("tabs"),e,s=!0,a=l(i.next).click(function(){u.next()}),h=l(i.prev).click(function(){u.prev()}),o;if(n.extend(r,{getTabs:function(){return u},getConf:function(){return i},play:function(){if(e)return r;var t=n.Event("onBeforePlay");if(f.trigger(t),t.isDefaultPrevented())return r;s=!1;f.trigger("onPlay");f.on("onClick",c);return c(),r},pause:function(){if(!e)return r;var t=n.Event("onBeforePause");return(f.trigger(t),t.isDefaultPrevented())?r:(e=clearTimeout(e),f.trigger("onPause"),f.off("onClick",c),r)},resume:function(){s||r.play()},stop:function(){r.pause();s=!0}}),n.each("onBeforePlay,onPlay,onBeforePause,onPause".split(","),function(t,u){if(n.isFunction(i[u]))n(r).on(u,i[u]);r[u]=function(t){return n(r).on(u,t)}}),i.autopause&&u.getTabs().add(a).add(h).add(u.getPanes()).hover(r.pause,r.resume),i.autoplay&&r.play(),i.clickable&&u.getPanes().click(function(){u.next()}),!u.getConf().rotate){o=i.disabledClass;u.getIndex()||h.addClass(o);u.onBeforeClick(function(n,t){h.toggleClass(o,!t);a.toggleClass(o,t==u.getTabs().length-1)})}}var t;t=n.tools.tabs.slideshow={conf:{next:".forward",prev:".backward",disabledClass:"disabled",autoplay:!1,autopause:!0,interval:3e3,clickable:!0,api:!1}};n.fn.slideshow=function(r){var u=this.data("slideshow");return u?u:(r=n.extend({},t.conf,r),this.each(function(){u=new i(n(this),r);n(this).data("slideshow",u)}),r.api?u:this)}}(jQuery),function(n){function s(){if(n.browser.msie){var t=n(document).height(),i=n(window).height();return[window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,t-i<20?i:t]}return[n(document).width(),n(document).height()]}function u(t){if(t)return t.call(n.mask)}var o,t,f,i,r,e;n.tools=n.tools||{version:"1.2.7"};o=n.tools.expose={conf:{maskId:"exposeMask",loadSpeed:"slow",closeSpeed:"fast",closeOnClick:!0,closeOnEsc:!0,zIndex:9998,opacity:.8,startOpacity:0,color:"#fff",onLoad:null,onClose:null}};n.mask={load:function(h,c){if(i)return this;typeof h=="string"&&(h={color:h});h=h||r;r=h=n.extend(n.extend({},o.conf),h);t=n("#"+h.maskId);t.length||(t=n("<div/>").attr("id",h.maskId),n("body").append(t));var l=s();if(t.css({position:"absolute",top:0,left:0,width:l[0],height:l[1],display:"none",opacity:h.startOpacity,zIndex:h.zIndex}),h.color&&t.css("backgroundColor",h.color),u(h.onBeforeLoad)===!1)return this;if(h.closeOnEsc)n(document).on("keydown.mask",function(t){t.keyCode==27&&n.mask.close(t)});if(h.closeOnClick)t.on("click.mask",function(t){n.mask.close(t)});n(window).on("resize.mask",function(){n.mask.fit()});return c&&c.length&&(e=c.eq(0).css("zIndex"),n.each(c,function(){var t=n(this);/relative|absolute|fixed/i.test(t.css("position"))||t.css("position","relative")}),f=c.css({zIndex:Math.max(h.zIndex+1,e=="auto"?0:e)})),t.css({display:"block"}).fadeTo(h.loadSpeed,h.opacity,function(){n.mask.fit();u(h.onLoad);i="full"}),i=!0,this},close:function(){if(i){if(u(r.onBeforeClose)===!1)return this;t.fadeOut(r.closeSpeed,function(){u(r.onClose);f&&f.css({zIndex:e});i=!1});n(document).off("keydown.mask");t.off("click.mask");n(window).off("resize.mask")}return this},fit:function(){if(i){var n=s();t.css({width:n[0],height:n[1]})}},getMask:function(){return t},isLoaded:function(n){return n?i=="full":i},getConf:function(){return r},getExposed:function(){return f}};n.fn.mask=function(t){return n.mask.load(t),this};n.fn.expose=function(t){return n.mask.load(t,this),this}}(jQuery),function(n){function i(t){switch(t.type){case"mousemove":return n.extend(t.data,{clientX:t.clientX,clientY:t.clientY,pageX:t.pageX,pageY:t.pageY});case"DOMMouseScroll":n.extend(t,t.data);t.delta=-t.detail/3;break;case"mousewheel":t.delta=t.wheelDelta/120}return t.type="wheel",n.event.handle.call(this,t,t.delta)}n.fn.mousewheel=function(n){return this[n?"on":"trigger"]("wheel",n)};n.event.special.wheel={setup:function(){n.event.add(this,t,i,{})},teardown:function(){n.event.remove(this,t,i)}};var t=n.browser.mozilla?"DOMMouseScroll"+(n.browser.version<"1.9"?" mousemove":""):"mousewheel"}(jQuery),function(n){function i(t,i,r){var u=r.relative?t.position().top:t.offset().top,e=r.relative?t.position().left:t.offset().left,f=r.position[0],o,s;return u-=i.outerHeight()-r.offset[0],e+=t.outerWidth()+r.offset[1],/iPad/i.test(navigator.userAgent)&&(u-=n(window).scrollTop()),o=i.outerHeight()+t.outerHeight(),f=="center"&&(u+=o/2),f=="bottom"&&(u+=o),f=r.position[1],s=i.outerWidth()+t.outerWidth(),f=="center"&&(e-=s/2),f=="left"&&(e-=s),{top:u,left:e}}function r(r,u){var f=this,h=r.add(f),e,l=0,a=0,c=r.attr("title"),v=r.attr("data-tooltip"),y=t[u.effect],s,p=r.is(":input"),b=p&&r.is(":checkbox, :radio, select, :button, :submit"),w=r.attr("type"),o=u.events[w]||u.events[p?b?"widget":"input":"def"];if(!y)throw'Nonexistent effect "'+u.effect+'"';if(o=o.split(/,\s*/),o.length!=2)throw"Tooltip: bad events configuration for "+w;r.on(o[0],function(n){clearTimeout(l);u.predelay?a=setTimeout(function(){f.show(n)},u.predelay):f.show(n)}).on(o[1],function(n){clearTimeout(a);u.delay?l=setTimeout(function(){f.hide(n)},u.delay):f.hide(n)});c&&u.cancelDefault&&(r.removeAttr("title"),r.data("title",c));n.extend(f,{show:function(t){var w,p;if(!e&&(v?e=n(v):u.tip?e=n(u.tip).eq(0):c?e=n(u.layout).addClass(u.tipClass).appendTo(document.body).hide().append(c):(e=r.next(),e.length||(e=r.parent().next())),!e.length))throw"Cannot find tooltip for "+r;if(f.isShown()||(e.stop(!0,!0),w=i(r,e,u),u.tip&&e.html(r.data("title")),t=n.Event(),t.type="onBeforeShow",h.trigger(t,[w]),t.isDefaultPrevented()))return f;if(w=i(r,e,u),e.css({position:"absolute",top:w.top,left:w.left}),s=!0,y[0].call(f,function(){t.type="onShow";s="full";h.trigger(t)}),p=u.events.tooltip.split(/,\s*/),!e.data("__set")){e.off(p[0]).on(p[0],function(){clearTimeout(l);clearTimeout(a)});if(p[1]&&!r.is("input:not(:checkbox, :radio), textarea"))e.off(p[1]).on(p[1],function(n){n.relatedTarget!=r[0]&&r.trigger(o[1].split(" ")[0])});u.tip||e.data("__set",!0)}return f},hide:function(i){return!e||!f.isShown()?f:(i=n.Event(),i.type="onBeforeHide",h.trigger(i),i.isDefaultPrevented())?void 0:(s=!1,t[u.effect][1].call(f,function(){i.type="onHide";h.trigger(i)}),f)},isShown:function(n){return n?s=="full":s},getConf:function(){return u},getTip:function(){return e},getTrigger:function(){return r}});n.each("onHide,onBeforeShow,onShow,onBeforeHide".split(","),function(t,i){if(n.isFunction(u[i]))n(f).on(i,u[i]);f[i]=function(t){if(t)n(f).on(i,t);return f}})}n.tools=n.tools||{version:"1.2.7"};n.tools.tooltip={conf:{effect:"toggle",fadeOutSpeed:"fast",predelay:0,delay:30,opacity:1,tip:0,fadeIE:!1,position:["top","center"],offset:[0,0],relative:!1,cancelDefault:!0,events:{def:"mouseenter,mouseleave",input:"focus,blur",widget:"focus mouseenter,blur mouseleave",tooltip:"mouseenter,mouseleave"},layout:"<div/>",tipClass:"tooltip"},addEffect:function(n,i,r){t[n]=[i,r]}};var t={toggle:[function(n){var r=this.getConf(),t=this.getTip(),i=r.opacity;i<1&&t.css({opacity:i});t.show();n.call()},function(n){this.getTip().hide();n.call()}],fade:[function(t){var i=this.getConf();!n.browser.msie||i.fadeIE?this.getTip().fadeTo(i.fadeInSpeed,i.opacity,t):(this.getTip().show(),t())},function(t){var i=this.getConf();!n.browser.msie||i.fadeIE?this.getTip().fadeOut(i.fadeOutSpeed,t):(this.getTip().hide(),t())}]};n.fn.tooltip=function(t){var i=this.data("tooltip");return i?i:(t=n.extend(!0,{},n.tools.tooltip.conf,t),typeof t.position=="string"&&(t.position=t.position.split(/,?\s/)),this.each(function(){i=new r(n(this),t);n(this).data("tooltip",i)}),t.api?i:this)}}(jQuery),function(n){function i(t){var i=n(window),r=i.width()+i.scrollLeft(),u=i.height()+i.scrollTop();return[t.offset().top<=i.scrollTop(),r<=t.offset().left+t.width(),u<=t.offset().top+t.height(),i.scrollLeft()>=t.offset().left]}function r(n){for(var t=n.length;t--;)if(n[t])return!1;return!0}var t=n.tools.tooltip;t.dynamic={conf:{classNames:"top right bottom left"}};n.fn.dynamic=function(u){typeof u=="number"&&(u={speed:u});u=n.extend({},t.dynamic.conf,u);var o=n.extend(!0,{},u),e=u.classNames.split(/\s/),f;return this.each(function(){var t=n(this).tooltip().onBeforeShow(function(t,u){var c=this.getTip(),s=this.getConf(),l,h;f||(f=[s.position[0],s.position[1],s.offset[0],s.offset[1],n.extend({},s)]);n.extend(s,f[4]);s.position=[f[0],f[1]];s.offset=[f[2],f[3]];c.css({visibility:"hidden",position:"absolute",top:u.top,left:u.left}).show();l=n.extend(!0,{},o);h=i(c);r(h)||(h[2]&&(n.extend(s,l.top),s.position[0]="top",c.addClass(e[0])),h[3]&&(n.extend(s,l.right),s.position[1]="right",c.addClass(e[1])),h[0]&&(n.extend(s,l.bottom),s.position[0]="bottom",c.addClass(e[2])),h[1]&&(n.extend(s,l.left),s.position[1]="left",c.addClass(e[3])),(h[0]||h[2])&&(s.offset[0]*=-1),(h[1]||h[3])&&(s.offset[1]*=-1));c.css({visibility:"visible"}).hide()});t.onBeforeShow(function(){var n=this.getConf(),t=this.getTip();setTimeout(function(){n.position=[f[0],f[1]];n.offset=[f[2],f[3]]},0)});t.onHide(function(){var n=this.getTip();n.removeClass(u.classNames)});ret=t}),u.api?ret:this}}(jQuery),function(n){var i=n.tools.tooltip,t;n.extend(i.conf,{direction:"up",bounce:!1,slideOffset:10,slideInSpeed:200,slideOutSpeed:200,slideFade:!n.browser.msie});t={up:["-","top"],down:["+","top"],left:["-","left"],right:["+","left"]};i.addEffect("slide",function(n){var i=this.getConf(),r=this.getTip(),u=i.slideFade?{opacity:i.opacity}:{},f=t[i.direction]||t.up;u[f[1]]=f[0]+"="+i.slideOffset;i.slideFade&&r.css({opacity:0});r.show().animate(u,i.slideInSpeed,n)},function(i){var r=this.getConf(),o=r.slideOffset,f=r.slideFade?{opacity:0}:{},e=t[r.direction]||t.up,u=""+e[0];r.bounce&&(u=u=="+"?"-":"+");f[e[1]]=u+"="+o;this.getTip().animate(f,r.slideOutSpeed,function(){n(this).hide();i.call()})})}(jQuery),function(n){n.fn.addOption=function(){var u=function(n,t,i,r){var f=document.createElement("option"),e,o,u;if(f.value=t,f.text=i,e=n.options,o=e.length,!n.cache)for(n.cache={},u=0;u<o;u++)n.cache[e[u].value]=u;typeof n.cache[t]=="undefined"&&(n.cache[t]=o);n.options[n.cache[t]]=f;r&&(f.selected=!0)},n=arguments,t,i,r,f,e;return n.length==0?this:(t=!0,i=!1,typeof n[0]=="object"&&(i=!0,r=n[0]),n.length>=2&&(typeof n[1]=="boolean"?t=n[1]:typeof n[2]=="boolean"&&(t=n[2]),i||(f=n[0],e=n[1])),this.each(function(){if(this.nodeName.toLowerCase()=="select")if(i)for(var n in r)u(this,n,r[n],t);else u(this,f,e,t)}),this)};n.fn.ajaxAddOption=function(t,i,r,u,f){return typeof t!="string"?this:(typeof i!="object"&&(i={}),typeof r!="boolean"&&(r=!0),this.each(function(){var e=this;n.getJSON(t,i,function(t){n(e).addOption(t,r);typeof u=="function"&&(typeof f=="object"?u.apply(e,f):u.call(e))})}),this)};n.fn.removeOption=function(){var t=arguments,i,n,u,f,r;if(t.length==0)return this;if(i=typeof t[0],i=="string"||i=="object"||i=="function"){if(n=t[0],n.constructor==Array){for(f=n.length,r=0;r<f;r++)this.removeOption(n[r],t[1]);return this}}else if(i=="number")u=t[0];else return this;return this.each(function(){var i,r,e,f;if(this.nodeName.toLowerCase()=="select")if(this.cache&&(this.cache=null),i=!1,r=this.options,n)for(e=r.length,f=e-1;f>=0;f--)n.constructor==RegExp?r[f].value.match(n)&&(i=!0):r[f].value==n&&(i=!0),i&&t[1]===!0&&(i=r[f].selected),i&&(r[f]=null),i=!1;else i=t[1]===!0?r[u].selected:!0,i&&this.remove(u)}),this};n.fn.sortOptions=function(t){var i=n(this).selectedValues(),r=typeof t=="undefined"?!0:!!t;return this.each(function(){var n;if(this.nodeName.toLowerCase()=="select"){var t=this.options,u=t.length,i=[];for(n=0;n<u;n++)i[n]={v:t[n].value,t:t[n].text};for(i.sort(function(n,t){return(o1t=n.t.toLowerCase(),o2t=t.t.toLowerCase(),o1t==o2t)?0:r?o1t<o2t?-1:1:o1t>o2t?-1:1}),n=0;n<u;n++)t[n].text=i[n].t,t[n].value=i[n].v}}).selectOptions(i,!0),this};n.fn.selectOptions=function(t,i){var r=t,u=typeof t,e,f;return(u=="object"&&r.constructor==Array&&(e=this,n.each(r,function(){e.selectOptions(this,i)})),f=i||!1,u!="string"&&u!="function"&&u!="object")?this:(this.each(function(){var t,i,n;if(this.nodeName.toLowerCase()!="select")return this;for(t=this.options,i=t.length,n=0;n<i;n++)r.constructor==RegExp?t[n].value.match(r)?t[n].selected=!0:f&&(t[n].selected=!1):t[n].value==r?t[n].selected=!0:f&&(t[n].selected=!1)}),this)};n.fn.copyOptions=function(t,i){var r=i||"selected";return n(t).size()==0?this:(this.each(function(){var u,f,i;if(this.nodeName.toLowerCase()!="select")return this;for(u=this.options,f=u.length,i=0;i<f;i++)(r=="all"||r=="selected"&&u[i].selected)&&n(t).addOption(u[i].value,u[i].text)}),this)};n.fn.containsOption=function(n,t){var i=!1,u=n,f=typeof u,r=typeof t;return f!="string"&&f!="function"&&f!="object"?r=="function"?this:i:(this.each(function(){var f,e,n;if(this.nodeName.toLowerCase()!="select")return this;if(i&&r!="function")return!1;for(f=this.options,e=f.length,n=0;n<e;n++)u.constructor==RegExp?f[n].value.match(u)&&(i=!0,r=="function"&&t.call(f[n],n)):f[n].value==u&&(i=!0,r=="function"&&t.call(f[n],n))}),r=="function"?this:i)};n.fn.selectedValues=function(){var n=[];return this.selectedOptions().each(function(){n[n.length]=this.value}),n};n.fn.selectedTexts=function(){var n=[];return this.selectedOptions().each(function(){n[n.length]=this.text}),n};n.fn.selectedOptions=function(){return this.find("option:selected")}}(jQuery),function(n){var i=[].slice,t={},r=n.amplify={publish:function(n){if(typeof n!="string")throw new Error("You must provide a valid topic to publish.");var s=i.call(arguments,1),r,u,o,f=0,e;if(!t[n])return!0;for(r=t[n].slice(),o=r.length;f<o;f++)if(u=r[f],e=u.callback.apply(u.context,s),e===!1)break;return e!==!1},subscribe:function(n,i,r,u){var f,s;if(typeof n!="string")throw new Error("You must provide a valid topic to create a subscription.");arguments.length===3&&typeof r=="number"&&(u=r,r=i,i=null);arguments.length===2&&(r=i,i=null);u=u||10;for(var e=0,h=n.split(/\s/),c=h.length,o;e<c;e++){for(n=h[e],o=!1,t[n]||(t[n]=[]),f=t[n].length-1,s={callback:r,context:i,priority:u};f>=0;f--)if(t[n][f].priority<=u){t[n].splice(f+1,0,s);o=!0;break}o||t[n].unshift(s)}return r},unsubscribe:function(n,i,r){if(typeof n!="string")throw new Error("You must provide a valid topic to remove a subscription.");if(arguments.length===2&&(r=i,i=null),t[n])for(var f=t[n].length,u=0;u<f;u++)t[n][u].callback!==r||i&&t[n][u].context!==i||(t[n].splice(u,1),u--,f--)}}}(this);jQuery.cookie=function(n,t,i){var u,r,f,e;return arguments.length>1&&String(t)!=="[object Object]"?(i=jQuery.extend({},i),(t===null||t===undefined)&&(i.expires=-1),typeof i.expires=="number"&&(u=i.expires,r=i.expires=new Date,r.setDate(r.getDate()+u)),t=String(t),document.cookie=[encodeURIComponent(n),"=",i.raw?t:encodeURIComponent(t),i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")):(i=t||{},e=i.raw?function(n){return n}:decodeURIComponent,(f=new RegExp("(?:^|; )"+encodeURIComponent(n)+"=([^;]*)").exec(document.cookie))?e(f[1]):null)}