/*
 * jquery.tools 1.0.1 - The missing UI library
 * 
 * [tools.tabs-1.0.0, tools.tooltip-1.0.1, tools.overlay-1.0.3]
 * 
 * Copyright (c) 2009 Tero Piirainen
 * http://flowplayer.org/tools/
 *
 * Dual licensed under MIT and GPL 2+ licenses
 * http://www.opensource.org/licenses
 * 
 * -----
 * 
 * Build: Mon Jun 08 13:01:39 GMT+00:00 2009
 */
(function(c){c.tools=c.tools||{version:{}};c.tools.version.tabs="1.0.0";c.tools.addTabEffect=function(d,e){b[d]=e};var b={"default":function(d){this.getPanes().hide().eq(d).show()},fade:function(d){this.getPanes().hide().eq(d).fadeIn()},slide:function(d){this.getCurrentPane().slideUp("fast");this.getPanes().eq(d).slideDown()},horizontal:function(d){if(!c._hW){c._hW=this.getPanes().eq(0).width()}this.getCurrentPane().animate({width:0},function(){c(this).hide()});this.getPanes().eq(d).animate({width:c._hW},function(){c(this).show()})}};function a(e,f,g){var d=this;var h;function i(j,k){c(d).bind(j,function(m,l){if(k&&k.call(this,l.index)===false&&l){l.proceed=false}});return d}c.each(g,function(j,k){if(c.isFunction(k)){i(j,k)}});c.extend(this,{click:function(k){if(k===h){return d}var m=d.getCurrentPane();var l=e.eq(k);if(typeof k=="string"){l=e.filter("[href="+k+"]");k=e.index(l)}if(!l.length){if(h>=0){return d}k=g.initialIndex;l=e.eq(k)}var j={index:k,proceed:true};c(d).triggerHandler("onBeforeClick",j);if(!j.proceed){return d}l.addClass(g.current);b[g.effect].call(d,k);c(d).triggerHandler("onClick",j);e.removeClass(g.current);l.addClass(g.current);h=k;return d},getTabs:function(){return e},getPanes:function(){return f},getCurrentPane:function(){return f.eq(h)},getCurrentTab:function(){return e.eq(h)},getIndex:function(){return h},next:function(){return d.click(h+1)},prev:function(){return d.click(h-1)},onBeforeClick:function(j){return i("onBeforeClick",j)},onClick:function(j){return i("onClick",j)}});e.each(function(j){c(this).bind(g.event,function(k){d.click(j);if(!g.history){return k.preventDefault()}})});if(g.history){e.history(function(j,k){d.click(k||0)})}if(location.hash){d.click(location.hash)}else{d.click(g.initialIndex)}f.find("a[href^=#]").click(function(){d.click(c(this).attr("href"))})}c.fn.tabs=function(g,d){var e=this.eq(typeof conf=="number"?conf:0).data("tabs");if(e){return e}var f={tabs:"a",current:"current",onBeforeClick:null,onClick:null,effect:"default",history:false,initialIndex:0,event:"click",api:false};if(c.isFunction(d)){d={onBeforeClick:d}}c.extend(f,d);this.each(function(){var h=c(this).find(f.tabs);if(!h.length){h=c(this).children()}var i=g.jquery?g:c(g);e=new a(h,i,f);c(this).data("tabs",e)});return f.api?e:this}})(jQuery);(function(b){var c,a;b.prototype.history=function(e){var d=this;if(b.browser.msie){if(!a){a=b("<iframe />").hide().get(0);b("body").append(a);setInterval(function(){var f=a.contentWindow.document;var g=f.location.hash;if(c!==g){b.event.trigger("hash",g);c=g}},100)}d.bind("click.hash",function(g){var f=a.contentWindow.document;f.open().close();f.location.hash=b(this).attr("href")});d.eq(0).triggerHandler("click.hash")}else{setInterval(function(){var f=location.hash;if(d.filter("[href*="+f+"]").length&&f!==c){c=f;b.event.trigger("hash",f)}},100)}b(window).bind("hash",e);return this}})(jQuery);
(function(c){c.tools=c.tools||{version:{}};c.tools.version.tooltip="1.0.1";var b={toggle:[function(){this.getTip().show()},function(){this.getTip().hide()}]};c.tools.addTipEffect=function(d,f,e){b[d]=[f,e]};c.tools.addTipEffect("slideup",function(){var d=this.getConf();var e=d.slideOffset||10;this.getTip().css({opacity:0}).animate({top:"-="+e,opacity:d.opacity},d.slideInSpeed||200).show()},function(){var d=this.getConf();var e=d.slideOffset||10;this.getTip().animate({top:"-="+e,opacity:0},d.slideOutSpeed||200,function(){c(this).hide().animate({top:"+="+(e*2)},0)})});function a(f,e){var d=this;var h=f.next();if(e.tip){if(e.tip.indexOf("#")!=-1){h=c(e.tip)}else{h=f.nextAll(e.tip).eq(0);if(!h.length){h=f.parent().nextAll(e.tip).eq(0)}}}function j(k,l){c(d).bind(k,function(n,m){if(l&&l.call(this)===false&&m){m.proceed=false}});return d}c.each(e,function(k,l){if(c.isFunction(l)){j(k,l)}});var g=f.is("input, textarea");f.bind(g?"focus":"mouseover",function(k){d.show(k);h.hover(function(){d.show()},function(){d.hide()})});f.bind(g?"blur":"mouseout",function(){d.hide()});h.css("opacity",e.opacity);var i=0;c.extend(d,{show:function(q){if(q){f=c(q.target)}clearTimeout(i);if(h.is(":animated")||h.is(":visible")){return d}var o={proceed:true};c(d).trigger("onBeforeShow",o);if(!o.proceed){return d}var n=f.position().top-h.outerHeight();var k=h.outerHeight()+f.outerHeight();var r=e.position[0];if(r=="center"){n+=k/2}if(r=="bottom"){n+=k}var l=f.outerWidth()+h.outerWidth();var m=f.position().left+f.outerWidth();r=e.position[1];if(r=="center"){m-=l/2}if(r=="left"){m-=l}n+=e.offset[0];m+=e.offset[1];h.css({position:"absolute",top:n,left:m});b[e.effect][0].call(d);c(d).trigger("onShow");return d},hide:function(){clearTimeout(i);i=setTimeout(function(){if(h.is(":animated")||!h.is(":visible")){return d}var k={proceed:true};c(d).trigger("onBeforeHide",k);if(!k.proceed){return d}b[e.effect][1].call(d);c(d).trigger("onHide")},e.delay||1);return d},isShown:function(){return h.is(":visible, :animated")},getConf:function(){return e},getTip:function(){return h},getTrigger:function(){return f},onBeforeShow:function(k){return j("onBeforeShow",k)},onShow:function(k){return j("onShow",k)},onBeforeHide:function(k){return j("onBeforeHide",k)},onHide:function(k){return j("onHide",k)}})}c.prototype.tooltip=function(d){var e=this.eq(typeof d=="number"?d:0).data("tooltip");if(e){return e}var f={tip:null,effect:"slideup",delay:30,opacity:1,position:["top","center"],offset:[0,0],api:false};if(c.isFunction(d)){d={onBeforeShow:d}}c.extend(f,d);this.each(function(){e=new a(c(this),f);c(this).data("tooltip",e)});return f.api?e:this}})(jQuery);
(function(b){b.tools=b.tools||{version:{}};b.tools.version.overlay="1.0.3";var c=[];function a(h,d){var q=this,p=b(window),f,m,r,i,k,l;var e=d.expose&&b.tools.version.expose;function n(o,s){b(q).bind(o,function(u,t){if(s&&s.call(this)===false&&t){t.proceed=false}});return q}b.each(d,function(o,s){if(b.isFunction(s)){n(o,s)}});var j=d.target||h.attr("rel");var g=j?b(j):null;if(!g){g=h}else{k=h}p.load(function(){l=g.attr("overlay");if(!l){l=g.css("backgroundImage");if(!l){throw"background-image CSS property not set for overlay element: "+j}l=l.substring(l.indexOf("(")+1,l.indexOf(")")).replace(/\"/g,"");g.css("backgroundImage","none");g.attr("overlay",l)}r=g.outerWidth({margin:true});i=g.outerHeight({margin:true});m=b('<img src="'+l+'"/>');m.css({border:0,position:"absolute",display:"none"}).width(r).attr("overlay",true);b("body").append(m);if(k){k.bind("click.overlay",function(o){q.load(o.pageY-p.scrollTop(),o.pageX-p.scrollLeft());return o.preventDefault()})}if(!d.close||!g.find(d.close).length){g.prepend('<div class="close"></div>');d.close="div.close"}f=g.find(d.close);f.bind("click.overlay",function(){q.close()});if(d.preload){setTimeout(function(){var o=new Image();o.src=l},2000)}});b.extend(q,{load:function(v,u){if(!m){p.load(function(){q.load(v,u)});return q}if(q.isOpened()){return q}if(d.oneInstance){b.each(c,function(){this.close()})}var t={proceed:true};b(q).trigger("onBeforeLoad",t);if(!t.proceed){return q}if(e){m.expose(d.expose);m.expose().load()}v=v||d.start.top;u=u||d.start.left;var o=d.finish.top;var s=d.finish.left;if(o=="center"){o=Math.max((p.height()-i)/2,0)}if(s=="center"){s=Math.max((p.width()-r)/2,0)}if(!d.start.absolute){v+=p.scrollTop();u+=p.scrollLeft()}if(!d.finish.absolute){o+=p.scrollTop();s+=p.scrollLeft()}m.css({top:v,left:u,width:d.start.width,zIndex:d.zIndex}).show();m.animate({top:o,left:s,width:r},d.speed,function(){g.css({position:"absolute",top:o,left:s});var w=m.css("zIndex");f.add(g).css("zIndex",++w);g.fadeIn(d.fadeInSpeed,function(){b(q).trigger("onLoad")})});return q},close:function(){if(!q.isOpened()){return q}var t={proceed:true};b(q).trigger("onBeforeClose",t);if(!t.proceed){return q}if(e){m.expose().close()}if(m.is(":visible")){g.hide();var s=d.start.top;var o=d.start.left;if(k){t=k.offset();s=t.top+k.height()/2;o=t.left+k.width()/2}m.animate({top:s,left:o,width:0},d.closeSpeed,function(){b(q).trigger("onClose",t)})}return q},getBackgroundImage:function(){return m},getContent:function(){return g},getTrigger:function(){return k},isOpened:function(){return g.is(":visible")},getConf:function(){return d},onBeforeLoad:function(o){return n("onBeforeLoad",o)},onLoad:function(o){return n("onLoad",o)},onBeforeClose:function(o){return n("onBeforeClose",o)},onClose:function(o){return n("onClose",o)}});b(document).keydown(function(o){if(o.keyCode==27){q.close()}});if(d.closeOnClick){b(document).bind("click.overlay",function(o){if(!g.is(":visible, :animated")){return}var s=b(o.target);if(s.attr("overlay")){return}if(s.parents("[overlay]").length){return}q.close()})}}b.fn.overlay=function(e){var f=this.eq(typeof e=="number"?e:0).data("overlay");if(f){return f}var d=b(window);var g={start:{top:Math.round(d.height()/2),left:Math.round(d.width()/2),width:0,absolute:false},finish:{top:80,left:"center",absolute:false},speed:"normal",fadeInSpeed:"fast",closeSpeed:"fast",close:null,oneInstance:true,closeOnClick:true,preload:true,zIndex:9999,api:false,expose:null,target:null};if(b.isFunction(e)){e={onBeforeLoad:e}}b.extend(true,g,e);this.each(function(){f=new a(b(this),g);c.push(f);b(this).data("overlay",f)});return g.api?f:this}})(jQuery);

