/*
 * jQuery Tools v1.2.6 - The missing UI library for the Web
 * 
 * overlay/overlay.js
 * overlay/overlay.apple.js
 * scrollable/scrollable.js
 * scrollable/scrollable.autoscroll.js
 * scrollable/scrollable.navigator.js
 * toolbox/toolbox.expose.js
 * tooltip/tooltip.js
 * tooltip/tooltip.dynamic.js
 * tooltip/tooltip.slide.js
 * 
 * NO COPYRIGHTS OR LICENSES. DO WHAT YOU LIKE.
 * 
 * http://flowplayer.org/tools/
 * 
 */
(function(f){f.tools=f.tools||{version:"v1.2.6"},f.tools.overlay={addEffect:function(i,c,j){h[i]=[c,j]},conf:{close:null,closeOnClick:!0,closeOnEsc:!0,closeSpeed:"fast",effect:"default",fixed:!f.browser.msie||f.browser.version>6,left:"center",load:!1,mask:null,oneInstance:!0,speed:"normal",target:null,top:"10%"}};var e=[],h={};f.tools.overlay.addEffect("default",function(a,k){var j=this.getConf(),i=f(window);j.fixed||(a.top+=i.scrollTop(),a.left+=i.scrollLeft()),a.position=j.fixed?"fixed":"absolute",this.getOverlay().css(a).fadeIn(j.speed,k)},function(b){this.getOverlay().fadeOut(this.getConf().closeSpeed,b)});function g(v,u){var t=this,s=v.add(t),r=f(window),q,p,o,c=f.tools.expose&&(u.mask||u.expose),b=Math.random().toString().slice(10);c&&(typeof c=="string"&&(c={color:c}),c.closeOnClick=c.closeOnEsc=!1);var a=u.target||v.attr("rel");p=a?f(a):null||v;if(!p.length){throw"Could not find Overlay: "+a}v&&v.index(p)==-1&&v.click(function(d){t.load(d);return d.preventDefault()}),f.extend(t,{load:function(w){if(t.isOpened()){return t}var j=h[u.effect];if(!j){throw'Overlay: cannot find effect : "'+u.effect+'"'}u.oneInstance&&f.each(e,function(){this.close(w)}),w=w||f.Event(),w.type="onBeforeLoad",s.trigger(w);if(w.isDefaultPrevented()){return t}o=!0,c&&f(p).expose(c);var x=u.top,m=u.left,l=p.outerWidth({margin:!0}),k=p.outerHeight({margin:!0});typeof x=="string"&&(x=x=="center"?Math.max((r.height()-k)/2,0):parseInt(x,10)/100*r.height()),m=="center"&&(m=Math.max((r.width()-l)/2,0)),j[0].call(t,{top:x,left:m},function(){o&&(w.type="onLoad",s.trigger(w))}),c&&u.closeOnClick&&f.mask.getMask().one("click",t.close),u.closeOnClick&&f(document).bind("click."+b,function(d){f(d.target).parents(p).length||t.close(d)}),u.closeOnEsc&&f(document).bind("keydown."+b,function(d){d.keyCode==27&&t.close(d)});return t},close:function(d){if(!t.isOpened()){return t}d=d||f.Event(),d.type="onBeforeClose",s.trigger(d);if(!d.isDefaultPrevented()){o=!1,h[u.effect][1].call(t,function(){d.type="onClose",s.trigger(d)}),f(document).unbind("click."+b).unbind("keydown."+b),c&&f.mask.close();return t}},getOverlay:function(){return p},getTrigger:function(){return v},getClosers:function(){return q},isOpened:function(){return o},getConf:function(){return u}}),f.each("onBeforeLoad,onStart,onLoad,onBeforeClose,onClose".split(","),function(d,i){f.isFunction(u[i])&&f(t).bind(i,u[i]),t[i]=function(j){j&&f(t).bind(i,j);return t}}),q=p.find(u.close||".close"),!q.length&&!u.close&&(q=f('<a class="close"></a>'),p.prepend(q)),q.click(function(d){t.close(d)}),u.load&&t.load()}f.fn.overlay=function(b){var a=this.data("overlay");if(a){return a}f.isFunction(b)&&(b={onBeforeLoad:b}),b=f.extend(!0,{},f.tools.overlay.conf,b),this.each(function(){a=new g(f(this),b),e.push(a),f(this).data("overlay",a)});return b.api?a:this}})(jQuery);(function(h){var g=h.tools.overlay,l=h(window);h.extend(g.conf,{start:{top:null,left:null},fadeInSpeed:"fast",zIndex:9999});function k(d){var c=d.offset();return{top:c.top+d.height()/2,left:c.left+d.width()/2}}var j=function(z,y){var x=this.getOverlay(),w=this.getConf(),v=this.getTrigger(),u=this,t=x.outerWidth({margin:!0}),s=x.data("img"),r=w.fixed?"fixed":"absolute";if(!s){var q=x.css("backgroundImage");if(!q){throw"background-image CSS property not set for overlay"}q=q.slice(q.indexOf("(")+1,q.indexOf(")")).replace(/\"/g,""),x.css("backgroundImage","none"),s=h('<img src="'+q+'"/>'),s.css({border:0,display:"none"}).width(t),h("body").append(s),x.data("img",s)}var d=w.start.top||Math.round(l.height()/2),c=w.start.left||Math.round(l.width()/2);if(v){var a=k(v);d=a.top,c=a.left}w.fixed?(d-=l.scrollTop(),c-=l.scrollLeft()):(z.top+=l.scrollTop(),z.left+=l.scrollLeft()),s.css({position:"absolute",top:d,left:c,width:0,zIndex:w.zIndex}).show(),z.position=r,x.css(z),s.animate({top:x.css("top"),left:x.css("left"),width:t},w.speed,function(){x.css("zIndex",w.zIndex+1).fadeIn(w.fadeInSpeed,function(){u.isOpened()&&!h(this).index(x)?y.call():x.hide()})}).css("position",r)},i=function(a){var o=this.getOverlay().hide(),n=this.getConf(),m=this.getTrigger(),d=o.data("img"),c={top:n.start.top,left:n.start.left,width:0};m&&h.extend(c,k(m)),n.fixed&&d.css({position:"absolute"}).animate({top:"+="+l.scrollTop(),left:"+="+l.scrollLeft()},0),d.animate(c,n.closeSpeed,a)};g.addEffect("apple",j,i)})(jQuery);(function(g){g.tools=g.tools||{version:"v1.2.6"},g.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}};function f(k,e){var m=parseInt(k.css(e),10);if(m){return m}var l=k[0].currentStyle;return l&&l.width&&parseInt(l.width,10)}function j(a,k){var e=g(k);return e.length<2?e:a.parent().find(k)}var i;function h(z,y){var x=this,w=z.add(x),v=z.children(),u=0,t=y.vertical;i||(i=x),v.length>1&&(v=g(y.items,z)),y.size>1&&(y.circular=!1),g.extend(x,{getConf:function(){return y},getIndex:function(){return u},getSize:function(){return x.getItems().size()},getNaviButtons:function(){return d.add(c)},getRoot:function(){return z},getItemWrap:function(){return v},getItems:function(){return v.find(y.item).not("."+y.clonedClass)},move:function(k,e){return x.seekTo(u+k,e)},next:function(b){return x.move(y.size,b)},prev:function(b){return x.move(-y.size,b)},begin:function(b){return x.seekTo(0,b)},end:function(b){return x.seekTo(x.getSize()-1,b)},focus:function(){i=x;return x},addItem:function(e){e=g(e),y.circular?(v.children().last().before(e),v.children().first().replaceWith(e.clone().addClass(y.clonedClass))):(v.append(e),c.removeClass("disabled")),w.trigger("onAddItem",[e]);return x},seekTo:function(o,C,A){o.jquery||(o*=1);if(y.circular&&o===0&&u==-1&&C!==0){return x}if(!y.circular&&o<0||o>x.getSize()||o<-1){return x}var p=o;o.jquery?o=x.getItems().index(o):p=x.getItems().eq(o);var e=g.Event("onBeforeSeek");if(!A){w.trigger(e,[o,C]);if(e.isDefaultPrevented()||!p.length){return x}}var B=t?{top:-p.position().top}:{left:-p.position().left};u=o,i=x,C===undefined&&(C=y.speed),v.animate(B,C,y.easing,A||function(){w.trigger("onSeek",[o])});return x}}),g.each(["onBeforeSeek","onSeek","onAddItem"],function(e,k){g.isFunction(y[k])&&g(x).bind(k,y[k]),x[k]=function(l){l&&g(x).bind(k,l);return x}});if(y.circular){var s=x.getItems().slice(-1).clone().prependTo(v),r=x.getItems().eq(1).clone().appendTo(v);s.add(r).addClass(y.clonedClass),x.onBeforeSeek(function(k,e,l){if(!k.isDefaultPrevented()){if(e==-1){x.seekTo(s,l,function(){x.end(0)});return k.preventDefault()}e==x.getSize()&&x.seekTo(r,l,function(){x.begin(0)})}});var q=z.parents().add(z).filter(function(){if(g(this).css("display")==="none"){return !0}});q.length?(q.show(),x.seekTo(0,0,function(){}),q.hide()):x.seekTo(0,0,function(){})}var d=j(z,y.prev).click(function(b){b.stopPropagation(),x.prev()}),c=j(z,y.next).click(function(b){b.stopPropagation(),x.next()});y.circular||(x.onBeforeSeek(function(k,e){setTimeout(function(){k.isDefaultPrevented()||(d.toggleClass(y.disabledClass,e<=0),c.toggleClass(y.disabledClass,e>=x.getSize()-1))},1)}),y.initialIndex||d.addClass(y.disabledClass)),x.getSize()<2&&d.add(c).addClass(y.disabledClass),y.mousewheel&&g.fn.mousewheel&&z.mousewheel(function(k,e){if(y.mousewheel){x.move(e<0?1:-1,y.wheelSpeed||50);return !1}});if(y.touch){var a={};v[0].ontouchstart=function(k){var e=k.touches[0];a.x=e.clientX,a.y=e.clientY},v[0].ontouchmove=function(k){if(k.touches.length==1&&!v.is(":animated")){var e=k.touches[0],m=a.x-e.clientX,l=a.y-e.clientY;x[t&&l>0||!t&&m>0?"next":"prev"](),k.preventDefault()}}}y.keyboard&&g(document).bind("keydown.scrollable",function(e){if(!(!y.keyboard||e.altKey||e.ctrlKey||e.metaKey||g(e.target).is(":input"))){if(y.keyboard!="static"&&i!=x){return}var k=e.keyCode;if(t&&(k==38||k==40)){x.move(k==38?-1:1);return e.preventDefault()}if(!t&&(k==37||k==39)){x.move(k==37?-1:1);return e.preventDefault()}}}),y.initialIndex&&x.seekTo(y.initialIndex,0,function(){})}g.fn.scrollable=function(a){var d=this.data("scrollable");if(d){return d}a=g.extend({},g.tools.scrollable.conf,a),this.each(function(){d=new h(g(this),a),g(this).data("scrollable",d)});return a.api?d:this}})(jQuery);(function(d){var c=d.tools.scrollable;c.autoscroll={conf:{autoplay:!0,interval:3000,autopause:!0}},d.fn.autoscroll=function(f){typeof f=="number"&&(f={interval:f});var b=d.extend({},c.autoscroll.conf,f),a;this.each(function(){var e=d(this).data("scrollable"),l=e.getRoot(),k,j=!1;function i(){k=setTimeout(function(){e.next()},b.interval)}e&&(a=e),e.play=function(){k||(j=!1,l.bind("onSeek",i),i())},e.pause=function(){k=clearTimeout(k),l.unbind("onSeek",i)},e.resume=function(){j||e.play()},e.stop=function(){j=!0,e.pause()},b.autopause&&l.add(e.getNaviButtons()).hover(e.pause,e.resume),b.autoplay&&e.play()});return b.api?a:this}})(jQuery);(function(e){var d=e.tools.scrollable;d.navigator={conf:{navi:".navi",naviItem:null,activeClass:"active",indexed:!1,idPrefix:null,history:!1}};function f(a,h){var g=e(h);return g.length<2?g:a.parent().find(h)}e.fn.navigator=function(b){typeof b=="string"&&(b={navi:b}),b=e.extend({},d.navigator.conf,b);var a;this.each(function(){var u=e(this).data("scrollable"),t=b.navi.jquery?b.navi:f(u.getRoot(),b.navi),s=u.getNaviButtons(),r=b.activeClass,q=b.history&&history.pushState,p=u.getConf().size;u&&(a=u),u.getNaviButtons=function(){return s.add(t)},q&&(history.pushState({i:0}),e(window).bind("popstate",function(g){var h=g.originalEvent.state;h&&u.seekTo(h.i)}));function o(g,i,h){u.seekTo(i),h.preventDefault(),q&&history.pushState({i:i})}function n(){return t.find(b.naviItem||"> *")}function c(g){var h=e("<"+(b.naviItem||"a")+"/>").click(function(i){o(e(this),g,i)});g===0&&h.addClass(r),b.indexed&&h.text(g+1),b.idPrefix&&h.attr("id",b.idPrefix+g);return h.appendTo(t)}n().length?n().each(function(g){e(this).click(function(h){o(e(this),g,h)})}):e.each(u.getItems(),function(g){g%p==0&&c(g)}),u.onBeforeSeek(function(h,g){setTimeout(function(){if(!h.isDefaultPrevented()){var j=g/p,i=n().eq(j);i.length&&n().removeClass(r).eq(j).addClass(r)}},1)}),u.onAddItem(function(g,i){var h=u.getItems().index(i);h%p==0&&c(h)})});return b.api?a:this}})(jQuery);(function(r){r.tools=r.tools||{version:"v1.2.6"};var q;q=r.tools.expose={conf:{maskId:"exposeMask",loadSpeed:"slow",closeSpeed:"fast",closeOnClick:!0,closeOnEsc:!0,zIndex:9998,opacity:0.8,startOpacity:0,color:"#fff",onLoad:null,onClose:null}};function p(){if(r.browser.msie){var a=r(document).height(),d=r(window).height();return[window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,a-d<20?d:a]}return[r(document).width(),r(document).height()]}function o(a){if(a){return a.call(r.mask)}}var n,m,l,k,j;r.mask={load:function(c,b){if(l){return this}typeof c=="string"&&(c={color:c}),c=c||k,k=c=r.extend(r.extend({},q.conf),c),n=r("#"+c.maskId),n.length||(n=r("<div/>").attr("id",c.maskId),r("body").append(n));var a=p();n.css({position:"absolute",top:0,left:0,width:a[0],height:a[1],display:"none",opacity:c.startOpacity,zIndex:c.zIndex}),c.color&&n.css("backgroundColor",c.color);if(o(c.onBeforeLoad)===!1){return this}c.closeOnEsc&&r(document).bind("keydown.mask",function(d){d.keyCode==27&&r.mask.close(d)}),c.closeOnClick&&n.bind("click.mask",function(d){r.mask.close(d)}),r(window).bind("resize.mask",function(){r.mask.fit()}),b&&b.length&&(j=b.eq(0).css("zIndex"),r.each(b,function(){var d=r(this);/relative|absolute|fixed/i.test(d.css("position"))||d.css("position","relative")}),m=b.css({zIndex:Math.max(c.zIndex+1,j=="auto"?0:j)})),n.css({display:"block"}).fadeTo(c.loadSpeed,c.opacity,function(){r.mask.fit(),o(c.onLoad),l="full"}),l=!0;return this},close:function(){if(l){if(o(k.onBeforeClose)===!1){return this}n.fadeOut(k.closeSpeed,function(){o(k.onClose),m&&m.css({zIndex:j}),l=!1}),r(document).unbind("keydown.mask"),n.unbind("click.mask"),r(window).unbind("resize.mask")}return this},fit:function(){if(l){var b=p();n.css({width:b[0],height:b[1]})}},getMask:function(){return n},isLoaded:function(b){return b?l=="full":l},getConf:function(){return k},getExposed:function(){return m}},r.fn.mask=function(a){r.mask.load(a);return this},r.fn.expose=function(a){r.mask.load(a,this);return this}})(jQuery);(function(f){f.tools=f.tools||{version:"v1.2.6"},f.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(b,j,i){e[b]=[j,i]}};var e={toggle:[function(j){var i=this.getConf(),l=this.getTip(),k=i.opacity;k<1&&l.css({opacity:k}),l.show(),j.call()},function(b){this.getTip().hide(),b.call()}],fade:[function(a){var d=this.getConf();!f.browser.msie||d.fadeIE?this.getTip().fadeTo(d.fadeInSpeed,d.opacity,a):(this.getTip().show(),a())},function(a){var d=this.getConf();!f.browser.msie||d.fadeIE?this.getTip().fadeOut(d.fadeOutSpeed,a):(this.getTip().hide(),a())}]};function h(a,p,o){var n=o.relative?a.position().top:a.offset().top,m=o.relative?a.position().left:a.offset().left,l=o.position[0];n-=p.outerHeight()-o.offset[0],m+=a.outerWidth()+o.offset[1],/iPad/i.test(navigator.userAgent)&&(n-=f(window).scrollTop());var k=p.outerHeight()+a.outerHeight();l=="center"&&(n+=k/2),l=="bottom"&&(n+=k),l=o.position[1];var j=p.outerWidth()+a.outerWidth();l=="center"&&(m-=j/2),l=="left"&&(m-=j);return{top:n,left:m}}function g(D,C){var B=this,A=D.add(B),z,y=0,x=0,w=D.attr("title"),v=D.attr("data-tooltip"),u=e[C.effect],t,s=D.is(":input"),c=s&&D.is(":checkbox, :radio, select, :button, :submit"),b=D.attr("type"),a=C.events[b]||C.events[s?c?"widget":"input":"def"];if(!u){throw'Nonexistent effect "'+C.effect+'"'}a=a.split(/,\s*/);if(a.length!=2){throw"Tooltip: bad events configuration for "+b}D.bind(a[0],function(d){clearTimeout(y),C.predelay?x=setTimeout(function(){B.show(d)},C.predelay):B.show(d)}).bind(a[1],function(d){clearTimeout(x),C.delay?y=setTimeout(function(){B.hide(d)},C.delay):B.hide(d)}),w&&C.cancelDefault&&(D.removeAttr("title"),D.data("title",w)),f.extend(B,{show:function(d){if(!z){v?z=f(v):C.tip?z=f(C.tip).eq(0):w?z=f(C.layout).addClass(C.tipClass).appendTo(document.body).hide().append(w):(z=D.next(),z.length||(z=D.parent().next()));if(!z.length){throw"Cannot find tooltip for "+D}}if(B.isShown()){return B}z.stop(!0,!0);var j=h(D,z,C);C.tip&&z.html(D.data("title")),d=f.Event(),d.type="onBeforeShow",A.trigger(d,[j]);if(d.isDefaultPrevented()){return B}j=h(D,z,C),z.css({position:"absolute",top:j.top,left:j.left}),t=!0,u[0].call(B,function(){d.type="onShow",t="full",A.trigger(d)});var i=C.events.tooltip.split(/,\s*/);z.data("__set")||(z.unbind(i[0]).bind(i[0],function(){clearTimeout(y),clearTimeout(x)}),i[1]&&!D.is("input:not(:checkbox, :radio), textarea")&&z.unbind(i[1]).bind(i[1],function(k){k.relatedTarget!=D[0]&&D.trigger(a[1].split(" ")[0])}),C.tip||z.data("__set",!0));return B},hide:function(d){if(!z||!B.isShown()){return B}d=f.Event(),d.type="onBeforeHide",A.trigger(d);if(!d.isDefaultPrevented()){t=!1,e[C.effect][1].call(B,function(){d.type="onHide",A.trigger(d)});return B}},isShown:function(d){return d?t=="full":t},getConf:function(){return C},getTip:function(){return z},getTrigger:function(){return D}}),f.each("onHide,onBeforeShow,onShow,onBeforeHide".split(","),function(d,i){f.isFunction(C[i])&&f(B).bind(i,C[i]),B[i]=function(j){j&&f(B).bind(i,j);return B}})}f.fn.tooltip=function(a){var d=this.data("tooltip");if(d){return d}a=f.extend(!0,{},f.tools.tooltip.conf,a),typeof a.position=="string"&&(a.position=a.position.split(/,?\s/)),this.each(function(){d=new g(f(this),a),f(this).data("tooltip",d)});return a.api?d:this}})(jQuery);(function(f){var e=f.tools.tooltip;e.dynamic={conf:{classNames:"top right bottom left"}};function h(a){var k=f(window),j=k.width()+k.scrollLeft(),i=k.height()+k.scrollTop();return[a.offset().top<=k.scrollTop(),j<=a.offset().left+a.width(),i<=a.offset().top+a.height(),k.scrollLeft()>=a.offset().left]}function g(d){var c=d.length;while(c--){if(d[c]){return !1}}return !0}f.fn.dynamic=function(d){typeof d=="number"&&(d={speed:d}),d=f.extend({},e.dynamic.conf,d);var c=f.extend(!0,{},d),b=d.classNames.split(/\s/),a;this.each(function(){var i=f(this).tooltip().onBeforeShow(function(m,r){var q=this.getTip(),p=this.getConf();a||(a=[p.position[0],p.position[1],p.offset[0],p.offset[1],f.extend({},p)]),f.extend(p,a[4]),p.position=[a[0],a[1]],p.offset=[a[2],a[3]],q.css({visibility:"hidden",position:"absolute",top:r.top,left:r.left}).show();var o=f.extend(!0,{},c),n=h(q);if(!g(n)){n[2]&&(f.extend(p,o.top),p.position[0]="top",q.addClass(b[0])),n[3]&&(f.extend(p,o.right),p.position[1]="right",q.addClass(b[1])),n[0]&&(f.extend(p,o.bottom),p.position[0]="bottom",q.addClass(b[2])),n[1]&&(f.extend(p,o.left),p.position[1]="left",q.addClass(b[3]));if(n[0]||n[2]){p.offset[0]*=-1}if(n[1]||n[3]){p.offset[1]*=-1}}q.css({visibility:"visible"}).hide()});i.onBeforeShow(function(){var k=this.getConf(),j=this.getTip();setTimeout(function(){k.position=[a[0],a[1]],k.offset=[a[2],a[3]]},0)}),i.onHide(function(){var j=this.getTip();j.removeClass(d.classNames)}),ret=i});return d.api?ret:this}})(jQuery);(function(e){var d=e.tools.tooltip;e.extend(d.conf,{direction:"up",bounce:!1,slideOffset:10,slideInSpeed:200,slideOutSpeed:200,slideFade:!e.browser.msie});var f={up:["-","top"],down:["+","top"],left:["-","left"],right:["+","left"]};d.addEffect("slide",function(g){var c=this.getConf(),j=this.getTip(),i=c.slideFade?{opacity:c.opacity}:{},h=f[c.direction]||f.up;i[h[1]]=h[0]+"="+c.slideOffset,c.slideFade&&j.css({opacity:0}),j.show().animate(i,c.slideInSpeed,g)},function(a){var l=this.getConf(),k=l.slideOffset,j=l.slideFade?{opacity:0}:{},i=f[l.direction]||f.up,c=""+i[0];l.bounce&&(c=c=="+"?"-":"+"),j[i[1]]=c+"="+k,this.getTip().animate(j,l.slideOutSpeed,function(){e(this).hide(),a.call()})})})(jQuery);
