(function(g){g.tools=g.tools||{};g.tools.tabs={version:"1.0.2",conf:{tabs:"a",current:"current",onBeforeClick:null,onClick:null,effect:"default",initialIndex:0,event:"click",api:false,rotate:false},addEffect:function(b,a){h[b]=a}};var h={"default":function(a,b){this.getPanes().hide().eq(a).show();b.call()},fade:function(c,i){var d=this.getConf(),b=d.fadeOutSpeed,a=this.getCurrentPane();if(b){a.fadeOut(b)}else{a.hide()}this.getPanes().eq(c).fadeIn(d.fadeInSpeed,i)},slide:function(a,b){this.getCurrentPane().slideUp(200);this.getPanes().eq(a).slideDown(400,b)},ajax:function(a,b){this.getPanes().eq(0).load(this.getTabs().eq(a).attr("href"),b)}};var e;g.tools.tabs.addEffect("horizontal",function(a,b){if(!e){e=this.getPanes().eq(0).width()}this.getCurrentPane().animate({width:0},function(){g(this).hide()});this.getPanes().eq(a).animate({width:e},function(){g(this).show();b.call()})});function f(k,d,c){var l=this,b;function a(j,i){g(l).bind(j,function(p,o){if(i&&i.call(this,o.index)===false&&o){o.proceed=false}});return l}g.each(c,function(j,i){if(g.isFunction(i)){a(j,i)}});g.extend(this,{click:function(j){var q=l.getCurrentPane();var i=k.eq(j);if(typeof j=="string"&&j.replace("#","")){i=k.filter("[href*="+j.replace("#","")+"]");j=Math.max(k.index(i),0)}if(c.rotate){var r=k.length-1;if(j<0){return l.click(r)}if(j>r){return l.click(0)}}if(!i.length){if(b>=0){return l}j=c.initialIndex;i=k.eq(j)}var p={index:j,proceed:true};g(l).triggerHandler("onBeforeClick",p);if(!p.proceed){return l}if(j===b){return l}i.addClass(c.current);h[c.effect].call(l,j,function(){g(l).triggerHandler("onClick",p)});k.removeClass(c.current);i.addClass(c.current);b=j;return l},getConf:function(){return c},getTabs:function(){return k},getPanes:function(){return d},getCurrentPane:function(){return d.eq(b)},getCurrentTab:function(){return k.eq(b)},getIndex:function(){return b},next:function(){return l.click(b+1)},prev:function(){return l.click(b-1)},onBeforeClick:function(i){return a("onBeforeClick",i)},onClick:function(i){return a("onClick",i)}});k.each(function(i){g(this).bind(c.event,function(j){l.click(i);return j.preventDefault()})});if(location.hash){l.click(location.hash)}else{l.click(c.initialIndex)}d.find("a[href^=#]").click(function(){l.click(g(this).attr("href"))})}g.fn.tabs=function(a,d){var c=this.eq(typeof d=="number"?d:0).data("tabs");if(c){return c}var b=g.extend({},g.tools.tabs.conf),j=this.length;g.extend(b,d);if(g.isFunction(d)){d={onBeforeClick:d}}g.extend(b,d);this.each(function(n){var p=g(this);var o=p.find(b.tabs);if(!o.length){o=p.children()}var i=p.children(a);if(!i.length){i=j==1?g(a):p.parent().find(a)}c=new f(o,i,b);p.data("tabs",c)});return b.api?c:this}})(jQuery);(function(h){h.tools=h.tools||{};h.tools.tooltip={version:"1.1.0",conf:{effect:"slide",direction:"up",bounce:false,slideOffset:10,slideInSpeed:200,slideOutSpeed:200,slideFade:!h.browser.msie,fadeOutSpeed:"fast",tip:null,predelay:0,delay:30,opacity:1,lazy:undefined,position:["top","center"],cancelDefault:true,offset:[0,0],api:false,events:{def:"mouseover,mouseout",input:"focus,blur",widget:"focus mouseover,blur mouseout"}},addEffect:function(c,a,b){e[c]=[a,b]}};var e={toggle:[function(b){var a=this.getConf();this.getTip().css({opacity:a.opacity}).show();b.call()},function(a){this.getTip().hide();a.call()}],fade:[function(a){this.getTip().fadeIn(this.getConf().fadeInSpeed,a)},function(a){this.getTip().fadeOut(this.getConf().fadeOutSpeed,a)}]};var g={up:["-","top"],down:["+","top"],left:["-","left"],right:["+","left"]};h.tools.tooltip.addEffect("slide",function(j){var c=this.getConf(),b=this.getTip(),a=c.slideFade?{opacity:c.opacity}:{},d=g[c.direction]||g.up;a[d[1]]=d[0]+"="+c.slideOffset;if(c.slideFade){b.css({opacity:0})}b.show().animate(a,c.slideInSpeed,j)},function(k){var c=this.getConf(),a=c.slideOffset,b=c.slideFade?{opacity:0}:{},d=g[c.direction]||g.up;var l=""+d[0];if(c.bounce){l=l=="+"?"-":"+"}b[d[1]]=l+"="+a;this.getTip().animate(b,c.slideOutSpeed,function(){h(this).hide();k.call()})});function f(w,v){var a=this;w.data("tooltip",a);var q=w.next();if(v.tip){q=h(v.tip);if(q.length>1){q=w.nextAll(v.tip).eq(0);if(!q.length){q=w.parent().nextAll(v.tip).eq(0)}}}function u(j,i){h(a).bind(j,function(k,l){if(i&&i.call(this,l?l.position:undefined)===false&&l){l.proceed=false}});return a}function b(){var j=w.position().top-q.outerHeight();var m=q.outerHeight()+w.outerHeight();var i=v.position[0];if(i=="center"){j+=m/2}if(i=="bottom"){j+=m}var l=w.outerWidth()+q.outerWidth();var k=w.position().left+w.outerWidth();i=v.position[1];if(i=="center"){k-=l/2}if(i=="left"){k-=l}j+=v.offset[0];k+=v.offset[1];return{top:j,left:k}}h.each(v,function(j,i){if(h.isFunction(i)){u(j,i)}});var s=w.is(":input"),x=s&&w.is(":checkbox, :radio, select, :button"),t=w.attr("type"),c=v.events[t]||v.events[s?(x?"widget":"input"):"def"];c=c.split(/,\s*/);w.bind(c[0],function(i){var j=q.data("trigger");if(j&&j[0]!=this){q.hide()}i.target=this;a.show(i);q.hover(a.show,function(k){a.hide()})});w.bind(c[1],function(){a.hide()});if(!h.browser.msie&&!s){w.mousemove(function(){if(!a.isShown()){w.triggerHandler("mouseover")}})}if(v.opacity<1){q.css("opacity",v.opacity)}var d=0,r=w.attr("title");if(r&&v.cancelDefault){w.removeAttr("title");w.data("title",r)}h.extend(a,{show:function(i){if(i){w=h(i.target)}clearTimeout(q.data("timer"));if(q.is(":animated")||q.is(":visible")){return a}function j(){q.data("trigger",w);var k=b();if(v.tip&&r){q.html(r)}var l={proceed:true,position:k};h(a).trigger("onBeforeShow",l);if(l.proceed===false){return a}k=b();q.css({position:"absolute",top:k.top,left:k.left});e[v.effect][0].call(a,function(){h(a).trigger("onShow")})}if(v.predelay){clearTimeout(d);d=setTimeout(j,v.predelay)}else{j()}return a},hide:function(){clearTimeout(q.data("timer"));clearTimeout(d);if(!q.is(":visible")){return}function i(){var j={proceed:true};h(a).trigger("onBeforeHide",j);if(j.proceed===false){return}e[v.effect][1].call(a,function(){h(a).trigger("onHide")})}if(v.delay){q.data("timer",setTimeout(i,v.delay))}else{i()}return a},isShown:function(){return q.is(":visible, :animated")},getConf:function(){return v},getTip:function(){return q},getTrigger:function(){return w},onBeforeShow:function(i){return u("onBeforeShow",i)},onShow:function(i){return u("onShow",i)},onBeforeHide:function(i){return u("onBeforeHide",i)},onHide:function(i){return u("onHide",i)}})}h.prototype.tooltip=function(c){var b=this.eq(typeof c=="number"?c:0).data("tooltip");if(b){return b}var a=h.extend(true,{},h.tools.tooltip.conf);if(h.isFunction(c)){c={onBeforeShow:c}}else{if(typeof c=="string"){c={tip:c}}}h.extend(true,a,c);if(typeof a.position=="string"){a.position=a.position.split(/,?\s/)}if(a.lazy!==false&&(a.lazy===true||this.length>20)){this.one("mouseover",function(){b=new f(h(this),a);b.show()})}else{this.each(function(){b=new f(h(this),a)})}return a.api?b:this}})(jQuery);(function(h){h.tools=h.tools||{};h.tools.scrollable={version:"1.1.0",conf:{size:5,vertical:false,speed:400,keyboard:true,keyboardSteps:null,disabledClass:"disabled",hoverClass:null,clickable:true,activeClass:"active",easing:"swing",items:".items",item:null,prev:".prev",next:".next",prevPage:".prevPage",nextPage:".nextPage",api:false}};var g,f=0;function e(a,d,v){var E=this,D=!d.vertical,C=a.children(),w=0,y;if(!g){g=E}function c(j,i){h(E).bind(j,function(k,l){if(i&&i.call(this,l.index)===false&&l){l.proceed=false}});return E}h.each(d,function(j,i){if(h.isFunction(i)){c(j,i)}});if(C.length>1){C=h(d.items,a)}function u(i){var j=h(i);return v==1||j.length==1||d.globalNav?j:a.parent().find(i)}a.data("finder",u);var B=u(d.prev),z=u(d.next),A=u(d.prevPage),b=u(d.nextPage);h.extend(E,{getIndex:function(){return w},getConf:function(){return d},getSize:function(){return E.getItems().size()},getPageAmount:function(){return Math.ceil(this.getSize()/d.size)},getPageIndex:function(){return Math.ceil(w/d.size)},getNaviButtons:function(){return B.add(z).add(A).add(b)},getRoot:function(){return a},getItemWrap:function(){return C},getItems:function(){return C.children(d.item)},getVisibleItems:function(){return E.getItems().slice(w,w+d.size)},seekTo:function(l,n,k){if(n===undefined){n=d.speed}if(h.isFunction(n)){k=n;n=d.speed}if(l<0){l=0}if(l>E.getSize()-d.size){return this.end()}var j=E.getItems().eq(l);if(!j.length){return E}var i={index:l,proceed:true};h(E).trigger("onBeforeSeek",i);if(!i.proceed){return E}function m(){if(k){k.call(E)}h(E).trigger("onSeek",i)}if(D){C.animate({left:-j.position().left},n,d.easing,m)}else{C.animate({top:-j.position().top},n,d.easing,m)}g=E;w=l;return E},move:function(i,j,k){y=i>0;return this.seekTo(w+i,j,k)},next:function(i,j){return this.move(1,i,j)},prev:function(i,j){return this.move(-1,i,j)},movePage:function(m,i,j){y=m>0;var l=d.size*m;var k=w%d.size;if(k>0){l+=(m>0?-k:d.size-k)}return this.move(l,i,j)},prevPage:function(i,j){return this.movePage(-1,i,j)},nextPage:function(i,j){return this.movePage(1,i,j)},setPage:function(j,i,k){return this.seekTo(j*d.size,i,k)},begin:function(i,j){return this.seekTo(0,i,j)},end:function(j,k){var i=this.getSize()-d.size;return i>0?this.seekTo(i,j,k):E},reload:function(){h(E).trigger("onReload",{});return E},onBeforeSeek:function(i){return c("onBeforeSeek",i)},onSeek:function(i){return c("onSeek",i)},onReload:function(i){return c("onReload",i)},focus:function(){g=E;return E},click:function(j){var i=E.getItems().eq(j),l=d.activeClass,k=d.size;if(j<0||j>=E.getSize()){return E}if(k==1){if(j===0||j==E.getSize()-1){y=(y===undefined)?true:!y}return y===false?E.prev():E.next()}if(k==2){if(j==w){j--}E.getItems().removeClass(l);i.addClass(l);return E.seekTo(j,time,fn)}if(!i.hasClass(l)){E.getItems().removeClass(l);i.addClass(l);var m=Math.floor(k/2);var n=j-m;if(n>E.getSize()-k){n=E.getSize()-k}if(n!==j){return E.seekTo(n)}}return E}});B.addClass(d.disabledClass).click(function(){E.prev()});z.click(function(){E.next()});b.click(function(){E.nextPage()});A.addClass(d.disabledClass).click(function(){E.prevPage()});E.onSeek(function(i){if(i===0){B.add(A).addClass(d.disabledClass)}else{B.add(A).removeClass(d.disabledClass)}if(i>=E.getSize()-d.size){z.add(b).addClass(d.disabledClass)}else{z.add(b).removeClass(d.disabledClass)}});var x=d.hoverClass,F="keydown."+Math.random().toString().substring(10);E.onReload(function(){if(x){E.getItems().hover(function(){h(this).addClass(x)},function(){h(this).removeClass(x)})}if(d.clickable){E.getItems().each(function(i){h(this).unbind("click.scrollable").bind("click.scrollable",function(j){if(h(j.target).is("a")){return}return E.click(i)})})}if(d.keyboard){h(document).bind(F,function(j){if(j.altKey||j.ctrlKey){return}if(d.keyboard!="static"&&g!=E){return}var i=d.keyboardSteps;if(D&&(j.keyCode==37||j.keyCode==39)){E.move(j.keyCode==37?-i:i);return j.preventDefault()}if(!D&&(j.keyCode==38||j.keyCode==40)){E.move(j.keyCode==38?-i:i);return j.preventDefault()}return true})}else{h(document).unbind(F)}});E.reload()}h.fn.scrollable=function(c){var b=this.eq(typeof c=="number"?c:0).data("scrollable");if(b){return b}var a=h.extend({},h.tools.scrollable.conf);h.extend(a,c);a.keyboardSteps=a.keyboardSteps||a.size;f+=this.length;this.each(function(){b=new e(h(this),a);h(this).data("scrollable",b)});return a.api?b:this}})(jQuery);(function(h){h.tools=h.tools||{};h.tools.overlay={version:"1.1.0",addEffect:function(c,b,a){e[c]=[b,a]},conf:{top:"10%",left:"center",absolute:false,speed:"normal",closeSpeed:"fast",effect:"default",close:null,oneInstance:true,closeOnClick:true,closeOnEsc:true,api:false,expose:null,target:null}};var e={};h.tools.overlay.addEffect("default",function(a){this.getOverlay().fadeIn(this.getConf().speed,a)},function(a){this.getOverlay().fadeOut(this.getConf().closeSpeed,a)});var g=[];function f(t,w){var a=this,b=h(window),q,r,s,v=w.expose&&h.tools.expose.version;var u=w.target||t.attr("rel");r=u?h(u):null||t;if(t){t.click(function(i){a.load();return i.preventDefault()})}function c(j,i){h(a).bind(j,function(k,l){if(i&&i.call(this)===false&&l){l.proceed=false}});return a}h.each(w,function(j,i){if(h.isFunction(i)){c(j,i)}});h.extend(a,{load:function(){if(a.isOpened()){return a}if(w.oneInstance){h.each(g,function(){this.close()})}var i={proceed:true};h(a).trigger("onBeforeLoad",i);if(!i.proceed){return a}if(v){r.expose().load()}var j=w.top;if(typeof j=="string"){j=parseInt(j,10)/100*b.height()}var k=w.left;var m=r.outerWidth({margin:true});var l=r.outerHeight({margin:true});if(j=="center"){j=Math.max((b.height()-l)/2,0)}if(k=="center"){k=Math.max((b.width()-m)/2,0)}if(!w.absolute){j+=b.scrollTop();k+=b.scrollLeft()}r.css({top:j,left:k,position:"absolute"});e[w.effect][0].call(a,function(){h(a).trigger("onLoad");s=true});if(w.closeOnClick){h(document).bind("click.overlay",function(o){if(!a.isOpened()){return}var n=h(o.target);if(n.parents(r).length>1){return}h.each(g,function(){this.close()})})}if(w.closeOnEsc){h(document).unbind("keydown.overlay").bind("keydown.overlay",function(n){if(n.keyCode==27){h.each(g,function(){this.close()})}})}return a},close:function(){if(!a.isOpened()){return a}var i={proceed:true};h(a).trigger("onBeforeClose",i);if(!i.proceed){return a}e[w.effect][1].call(a,function(){s=false;h(a).trigger("onClose")});var j=true;h.each(g,function(){if(this.isOpened()){j=false}});if(j){h(document).unbind("click.overlay").unbind("keydown.overlay")}return a},getContent:function(){return r},getOverlay:function(){return r},getTrigger:function(){return t},getClosers:function(){return q},isOpened:function(){return s},getConf:function(){return w},onBeforeLoad:function(i){return c("onBeforeLoad",i)},onLoad:function(i){return c("onLoad",i)},onBeforeClose:function(i){return c("onBeforeClose",i)},onClose:function(i){return c("onClose",i)}});if(v){if(typeof w.expose=="string"){w.expose={color:w.expose}}h.extend(w.expose,{api:true,closeOnClick:w.closeOnClick,closeOnEsc:false});var d=r.expose(w.expose);d.onBeforeClose(function(){a.close()});a.onClose(function(){d.close()})}q=r.find(w.close||".close");if(!q.length&&!w.close){q=h('<div class="close"></div>');r.prepend(q)}q.click(function(){a.close()})}h.fn.overlay=function(c){var b=this.eq(typeof c=="number"?c:0).data("overlay");if(b){return b}if(h.isFunction(c)){c={onBeforeLoad:c}}var a=h.extend({},h.tools.overlay.conf);h.extend(true,a,c);this.each(function(){b=new f(h(this),a);g.push(b);h(this).data("overlay",b)});return a.api?b:this}})(jQuery);