/*
 * jquery.tools 1.1.1 - The missing UI library for the Web
 * 
 * [tools.tabs-1.0.3, tools.tabs.slideshow-1.0.1, tools.tabs.history-1.0.1, tools.tooltip-1.1.1, tools.tooltip.slide-1.0.0]
 * 
 * Copyright (c) 2009 Tero Piirainen
 * http://flowplayer.org/tools/
 *
 * Dual licensed under MIT and GPL 2+ licenses
 * http://www.opensource.org/licenses
 * 
 * -----
 * 
 * File generated: Tue Sep 29 11:20:28 GMT+00:00 2009
 */
(function(d){d.tools=d.tools||{};d.tools.tabs={version:"1.0.3",conf:{tabs:"a",current:"current",onBeforeClick:null,onClick:null,effect:"default",initialIndex:0,event:"click",api:false,rotate:false},addEffect:function(e,f){c[e]=f}};var c={"default":function(f,e){this.getPanes().hide().eq(f).show();e.call()},fade:function(g,e){var f=this.getConf(),h=f.fadeOutSpeed,j=this.getCurrentPane();if(h){j.fadeOut(h)}else{j.hide()}this.getPanes().eq(g).fadeIn(f.fadeInSpeed,e)},slide:function(f,e){this.getCurrentPane().slideUp(200);this.getPanes().eq(f).slideDown(400,e)},ajax:function(f,e){this.getPanes().eq(0).load(this.getTabs().eq(f).attr("href"),e)}};var b;d.tools.tabs.addEffect("horizontal",function(f,e){if(!b){b=this.getPanes().eq(0).width()}this.getCurrentPane().animate({width:0},function(){d(this).hide()});this.getPanes().eq(f).animate({width:b},function(){d(this).show();e.call()})});function a(g,h,f){var e=this,j=d(this),i;d.each(f,function(k,l){if(d.isFunction(l)){j.bind(k,l)}});d.extend(this,{click:function(k){var o=e.getCurrentPane();var l=g.eq(k);if(typeof k=="string"&&k.replace("#","")){l=g.filter("[href*="+k.replace("#","")+"]");k=Math.max(g.index(l),0)}if(f.rotate){var m=g.length-1;if(k<0){return e.click(m)}if(k>m){return e.click(0)}}if(!l.length){if(i>=0){return e}k=f.initialIndex;l=g.eq(k)}var n=d.Event("onBeforeClick");j.trigger(n,[k]);if(n.isDefaultPrevented()){return}if(k===i){return e}l.addClass(f.current);c[f.effect].call(e,k,function(){j.trigger("onClick",[k])});g.removeClass(f.current);l.addClass(f.current);i=k;return e},getConf:function(){return f},getTabs:function(){return g},getPanes:function(){return h},getCurrentPane:function(){return h.eq(i)},getCurrentTab:function(){return g.eq(i)},getIndex:function(){return i},next:function(){return e.click(i+1)},prev:function(){return e.click(i-1)},bind:function(k,l){j.bind(k,l);return e},onBeforeClick:function(k){return this.bind("onBeforeClick",k)},onClick:function(k){return this.bind("onClick",k)},unbind:function(k){j.unbind(k);return e}});g.each(function(k){d(this).bind(f.event,function(l){e.click(k);return l.preventDefault()})});if(location.hash){e.click(location.hash)}else{e.click(f.initialIndex)}h.find("a[href^=#]").click(function(){e.click(d(this).attr("href"))})}d.fn.tabs=function(i,f){var g=this.eq(typeof f=="number"?f:0).data("tabs");if(g){return g}if(d.isFunction(f)){f={onBeforeClick:f}}var h=d.extend({},d.tools.tabs.conf),e=this.length;f=d.extend(h,f);this.each(function(l){var j=d(this);var k=j.find(f.tabs);if(!k.length){k=j.children()}var m=i.jquery?i:j.children(i);if(!m.length){m=e==1?d(i):j.parent().find(i)}g=new a(k,m,f);j.data("tabs",g)});return f.api?g:this}})(jQuery);
(function(b){var a=b.tools.tabs;a.plugins=a.plugins||{};a.plugins.slideshow={version:"1.0.1",conf:{next:".forward",prev:".backward",disabledClass:"disabled",autoplay:false,autopause:true,interval:3000,clickable:true,api:false}};b.prototype.slideshow=function(e){var f=b.extend({},a.plugins.slideshow.conf),c=this.length,d;e=b.extend(f,e);this.each(function(){var p=b(this),m=p.tabs(),i=b(m),o=m;b.each(e,function(t,u){if(b.isFunction(u)){m.bind(t,u)}});function n(t){return c==1?b(t):p.parent().find(t)}var s=n(e.next).click(function(){m.next()});var q=n(e.prev).click(function(){m.prev()});var h,j,l,g=false;b.extend(m,{play:function(){if(h){return}var t=b.Event("onBeforePlay");i.trigger(t);if(t.isDefaultPrevented()){return m}g=false;h=setInterval(m.next,e.interval);i.trigger("onPlay");m.next()},pause:function(){if(!h){return m}var t=b.Event("onBeforePause");i.trigger(t);if(t.isDefaultPrevented()){return m}h=clearInterval(h);l=clearInterval(l);i.trigger("onPause")},stop:function(){m.pause();g=true},onBeforePlay:function(t){return m.bind("onBeforePlay",t)},onPlay:function(t){return m.bind("onPlay",t)},onBeforePause:function(t){return m.bind("onBeforePause",t)},onPause:function(t){return m.bind("onPause",t)}});if(e.autopause){var k=m.getTabs().add(s).add(q).add(m.getPanes());k.hover(function(){m.pause();j=clearInterval(j)},function(){if(!g){j=setTimeout(m.play,e.interval)}})}if(e.autoplay){l=setTimeout(m.play,e.interval)}else{m.stop()}if(e.clickable){m.getPanes().click(function(){m.next()})}if(!m.getConf().rotate){var r=e.disabledClass;if(!m.getIndex()){q.addClass(r)}m.onBeforeClick(function(t){if(!t){q.addClass(r)}else{q.removeClass(r);if(t==m.getTabs().length-1){s.addClass(r)}else{s.removeClass(r)}}})}});return e.api?d:this}})(jQuery);
(function(d){var a=d.tools.tabs;a.plugins=a.plugins||{};a.plugins.history={version:"1.0.1",conf:{api:false}};var e,b;function c(f){if(f){var g=b.contentWindow.document;g.open().close();g.location.hash=f}}d.fn.onHash=function(g){var f=this;if(d.browser.msie&&d.browser.version<"8"){if(!b){b=d("<iframe/>").attr("src","javascript:false;").hide().get(0);d("body").append(b);setInterval(function(){var i=b.contentWindow.document,j=i.location.hash;if(e!==j){d.event.trigger("hash",j);e=j}},100);c(location.hash||"#")}f.bind("click.hash",function(h){c(d(this).attr("href"))})}else{setInterval(function(){var j=location.hash;var i=f.filter("[href$="+j+"]");if(!i.length){j=j.replace("#","");i=f.filter("[href$="+j+"]")}if(i.length&&j!==e){e=j;d.event.trigger("hash",j)}},100)}d(window).bind("hash",g);return this};d.fn.history=function(g){var h=d.extend({},a.plugins.history.conf),f;g=d.extend(h,g);this.each(function(){var k=d(this).tabs(),j=k.getTabs(),i=k;j.onHash(function(l,m){if(!m||m=="#"){m=k.getConf().initialIndex}k.click(m)});j.click(function(l){location.hash=d(this).attr("href").replace("#","")})});return g.api?f:this}})(jQuery);
(function(c){c.tools=c.tools||{};c.tools.tooltip={version:"1.1.1",conf:{effect:"toggle",fadeOutSpeed:"fast",tip:null,predelay:0,delay:30,opacity:1,lazy:undefined,position:["top","center"],offset:[0,0],cancelDefault:true,relative:false,events:{def:"mouseover,mouseout",input:"focus,blur",widget:"focus mouseover,blur mouseout"},api:false},addEffect:function(d,f,e){b[d]=[f,e]}};var b={toggle:[function(d){var e=this.getConf();this.getTip().css({opacity:e.opacity}).show();d.call()},function(d){this.getTip().hide();d.call()}],fade:[function(d){this.getTip().fadeIn(this.getConf().fadeInSpeed,d)},function(d){this.getTip().fadeOut(this.getConf().fadeOutSpeed,d)}]};function a(e,f){var o=this,j=c(this);e.data("tooltip",o);var k=e.next();if(f.tip){k=c(f.tip);if(k.length>1){k=e.nextAll(f.tip).eq(0);if(!k.length){k=e.parent().nextAll(f.tip).eq(0)}}}function n(t){var s=f.relative?e.position().top:e.offset().top,r=f.relative?e.position().left:e.offset().left,u=f.position[0];s-=k.outerHeight()-f.offset[0];r+=e.outerWidth()+f.offset[1];var p=k.outerHeight()+e.outerHeight();if(u=="center"){s+=p/2}if(u=="bottom"){s+=p}u=f.position[1];var q=k.outerWidth()+e.outerWidth();if(u=="center"){r-=q/2}if(u=="left"){r-=q}return{top:s,left:r}}var h=e.is(":input"),d=h&&e.is(":checkbox, :radio, select, :button"),g=e.attr("type"),m=f.events[g]||f.events[h?(d?"widget":"input"):"def"];m=m.split(/,\s*/);e.bind(m[0],function(q){var p=k.data("trigger");if(p&&p[0]!=this){k.hide()}q.target=this;o.show(q);k.hover(o.show,function(){o.hide(q)})});e.bind(m[1],function(p){o.hide(p)});if(!c.browser.msie&&!h){e.mousemove(function(){if(!o.isShown()){e.triggerHandler("mouseover")}})}if(f.opacity<1){k.css("opacity",f.opacity)}var l=0,i=e.attr("title");if(i&&f.cancelDefault){e.removeAttr("title");e.data("title",i)}c.extend(o,{show:function(q){if(q){e=c(q.target)}clearTimeout(k.data("timer"));if(k.is(":animated")||k.is(":visible")){return o}function p(){k.data("trigger",e);var s=n(q);if(f.tip&&i){k.html(e.data("title"))}var r=c.Event("onBeforeShow");j.trigger(r,[s]);if(r.isDefaultPrevented()){return o}s=n(q);k.css({position:"absolute",top:s.top,left:s.left});b[f.effect][0].call(o,function(){j.trigger("onShow")})}if(f.predelay){clearTimeout(l);l=setTimeout(p,f.predelay)}else{p()}return o},hide:function(q){clearTimeout(k.data("timer"));clearTimeout(l);if(!k.is(":visible")){return}function p(){var r=c.Event("onBeforeHide");j.trigger(r);if(r.isDefaultPrevented()){return}b[f.effect][1].call(o,function(){j.trigger("onHide")})}if(f.delay&&q){k.data("timer",setTimeout(p,f.delay))}else{p()}return o},isShown:function(){return k.is(":visible, :animated")},getConf:function(){return f},getTip:function(){return k},getTrigger:function(){return e},bind:function(p,q){j.bind(p,q);return o},onHide:function(p){return this.bind("onHide",p)},onBeforeShow:function(p){return this.bind("onBeforeShow",p)},onShow:function(p){return this.bind("onShow",p)},onBeforeHide:function(p){return this.bind("onBeforeHide",p)},unbind:function(p){j.unbind(p);return o}});c.each(f,function(p,q){if(c.isFunction(q)){o.bind(p,q)}})}c.prototype.tooltip=function(d){var e=this.eq(typeof d=="number"?d:0).data("tooltip");if(e){return e}var f=c.extend(true,{},c.tools.tooltip.conf);if(c.isFunction(d)){d={onBeforeShow:d}}else{if(typeof d=="string"){d={tip:d}}}d=c.extend(true,f,d);if(typeof d.position=="string"){d.position=d.position.split(/,?\s/)}if(d.lazy!==false&&(d.lazy===true||this.length>20)){this.one("mouseover",function(g){e=new a(c(this),d);e.show(g)})}else{this.each(function(){e=new a(c(this),d)})}return d.api?e:this}})(jQuery);
(function(b){var a=b.tools.tooltip;a.effects=a.effects||{};a.effects.slide={version:"1.0.0"};b.extend(a.conf,{direction:"up",bounce:false,slideOffset:10,slideInSpeed:200,slideOutSpeed:200,slideFade:!b.browser.msie});var c={up:["-","top"],down:["+","top"],left:["-","left"],right:["+","left"]};b.tools.tooltip.addEffect("slide",function(d){var f=this.getConf(),g=this.getTip(),h=f.slideFade?{opacity:f.opacity}:{},e=c[f.direction]||c.up;h[e[1]]=e[0]+"="+f.slideOffset;if(f.slideFade){g.css({opacity:0})}g.show().animate(h,f.slideInSpeed,d)},function(e){var g=this.getConf(),i=g.slideOffset,h=g.slideFade?{opacity:0}:{},f=c[g.direction]||c.up;var d=""+f[0];if(g.bounce){d=d=="+"?"-":"+"}h[f[1]]=d+"="+i;this.getTip().animate(h,g.slideOutSpeed,function(){b(this).hide();e.call()})})})(jQuery);
