/* * jquery tools 1.2.2 - the missing ui library for the web * * [tabs, tabs.slideshow, tooltip, tooltip.slide, tooltip.dynamic, scrollable, scrollable.autoscroll, scrollable.navigator, overlay, overlay.apple] * * no copyrights or licenses. do what you like. * * http://flowplayer.org/tools/ * * file generated: sun jun 06 15:28:56 gmt 2010 */ (function(c){function p(d,a,b){var e=this,l=d.add(this),h=d.find(b.tabs),j=a.jquery?a:d.children(a),i;h.length||(h=d.children());j.length||(j=d.parent().find(a));j.length||(j=c(a));c.extend(this,{click:function(f,g){var k=h.eq(f);if(typeof f=="string"&&f.replace("#","")){k=h.filter("[href*="+f.replace("#","")+"]");f=math.max(h.index(k),0)}if(b.rotate){var n=h.length-1;if(f<0)return e.click(n,g);if(f>n)return e.click(0,g)}if(!k.length){if(i>=0)return e;f=b.initialindex;k=h.eq(f)}if(f===i)return e; g=g||c.event();g.type="onbeforeclick";l.trigger(g,[f]);if(!g.isdefaultprevented()){o[b.effect].call(e,f,function(){g.type="onclick";l.trigger(g,[f])});i=f;h.removeclass(b.current);k.addclass(b.current);return e}},getconf:function(){return b},gettabs:function(){return h},getpanes:function(){return j},getcurrentpane:function(){return j.eq(i)},getcurrenttab:function(){return h.eq(i)},getindex:function(){return i},next:function(){return e.click(i+1)},prev:function(){return e.click(i-1)}});c.each("onbeforeclick,onclick".split(","), function(f,g){c.isfunction(b[g])&&c(e).bind(g,b[g]);e[g]=function(k){c(e).bind(g,k);return e}});if(b.history&&c.fn.history){c.tools.history.init(h);b.event="history"}h.each(function(f){c(this).bind(b.event,function(g){e.click(f,g);return g.preventdefault()})});j.find("a[href^=#]").click(function(f){e.click(c(this).attr("href"),f)});if(location.hash)e.click(location.hash);else if(b.initialindex===0||b.initialindex>0)e.click(b.initialindex)}c.tools=c.tools||{version:"1.2.2"};c.tools.tabs={conf:{tabs:"a", current:"current",onbeforeclick:null,onclick:null,effect:"default",initialindex:0,event:"click",rotate:false,history:false},addeffect:function(d,a){o[d]=a}};var o={"default":function(d,a){this.getpanes().hide().eq(d).show();a.call()},fade:function(d,a){var b=this.getconf(),e=b.fadeoutspeed,l=this.getpanes();e?l.fadeout(e):l.hide();l.eq(d).fadein(b.fadeinspeed,a)},slide:function(d,a){this.getpanes().slideup(200);this.getpanes().eq(d).slidedown(400,a)},ajax:function(d,a){this.getpanes().eq(0).load(this.gettabs().eq(d).attr("href"), a)}},m;c.tools.tabs.addeffect("horizontal",function(d,a){m||(m=this.getpanes().eq(0).width());this.getcurrentpane().animate({width:0},function(){c(this).hide()});this.getpanes().eq(d).animate({width:m},function(){c(this).show();a.call()})});c.fn.tabs=function(d,a){var b=this.data("tabs");if(b)return b;if(c.isfunction(a))a={onbeforeclick:a};a=c.extend({},c.tools.tabs.conf,a);this.each(function(){b=new p(c(this),d,a);c(this).data("tabs",b)});return a.api?b:this}})(jquery); (function(d){function r(g,a){function p(f){var e=d(f);return e.length<2?e:g.parent().find(f)}var c=this,j=g.add(this),b=g.data("tabs"),h,l,m,n=false,o=p(a.next).click(function(){b.next()}),k=p(a.prev).click(function(){b.prev()});d.extend(c,{gettabs:function(){return b},getconf:function(){return a},play:function(){if(!h){var f=d.event("onbeforeplay");j.trigger(f);if(f.isdefaultprevented())return c;n=false;h=setinterval(b.next,a.interval);j.trigger("onplay");b.next()}},pause:function(){if(!h)return c; var f=d.event("onbeforepause");j.trigger(f);if(f.isdefaultprevented())return c;h=clearinterval(h);m=clearinterval(m);j.trigger("onpause")},stop:function(){c.pause();n=true}});d.each("onbeforeplay,onplay,onbeforepause,onpause".split(","),function(f,e){d.isfunction(a[e])&&c.bind(e,a[e]);c[e]=function(s){return c.bind(e,s)}});if(a.autopause){var t=b.gettabs().add(o).add(k).add(b.getpanes());t.hover(function(){c.pause();l=clearinterval(l)},function(){n||(l=settimeout(c.play,a.interval))})}if(a.autoplay)m= settimeout(c.play,a.interval);else c.stop();a.clickable&&b.getpanes().click(function(){b.next()});if(!b.getconf().rotate){var i=a.disabledclass;b.getindex()||k.addclass(i);b.onbeforeclick(function(f,e){if(e){k.removeclass(i);e==b.gettabs().length-1?o.addclass(i):o.removeclass(i)}else k.addclass(i)})}}var q;q=d.tools.tabs.slideshow={conf:{next:".forward",prev:".backward",disabledclass:"disabled",autoplay:false,autopause:true,interval:3e3,clickable:true,api:false}};d.fn.slideshow=function(g){var a= this.data("slideshow");if(a)return a;g=d.extend({},q.conf,g);this.each(function(){a=new r(d(this),g);d(this).data("slideshow",a)});return g.api?a:this}})(jquery); (function(f){function p(a,b,c){var h=c.relative?a.position().top:a.offset().top,e=c.relative?a.position().left:a.offset().left,i=c.position[0];h-=b.outerheight()-c.offset[0];e+=a.outerwidth()+c.offset[1];var j=b.outerheight()+a.outerheight();if(i=="center")h+=j/2;if(i=="bottom")h+=j;i=c.position[1];a=b.outerwidth()+a.outerwidth();if(i=="center")e-=a/2;if(i=="left")e-=a;return{top:h,left:e}}function t(a,b){var c=this,h=a.add(c),e,i=0,j=0,m=a.attr("title"),q=n[b.effect],k,r=a.is(":input"),u=r&&a.is(":checkbox, :radio, select, :button"), s=a.attr("type"),l=b.events[s]||b.events[r?u?"widget":"input":"def"];if(!q)throw'nonexistent effect "'+b.effect+'"';l=l.split(/,\s*/);if(l.length!=2)throw"tooltip: bad events configuration for "+s;a.bind(l[0],function(d){if(b.predelay){cleartimeout(i);j=settimeout(function(){c.show(d)},b.predelay)}else c.show(d)}).bind(l[1],function(d){if(b.delay){cleartimeout(j);i=settimeout(function(){c.hide(d)},b.delay)}else c.hide(d)});if(m&&b.canceldefault){a.removeattr("title");a.data("title",m)}f.extend(c, {show:function(d){if(!e){if(m)e=f(b.layout).addclass(b.tipclass).appendto(document.body).hide().append(m);else if(b.tip)e=f(b.tip).eq(0);else{e=a.next();e.length||(e=a.parent().next())}if(!e.length)throw"cannot find tooltip for "+a;}if(c.isshown())return c;e.stop(true,true);var g=p(a,e,b);d=d||f.event();d.type="onbeforeshow";h.trigger(d,[g]);if(d.isdefaultprevented())return c;g=p(a,e,b);e.css({position:"absolute",top:g.top,left:g.left});k=true;q[0].call(c,function(){d.type="onshow";k="full";h.trigger(d)}); g=b.events.tooltip.split(/,\s*/);e.bind(g[0],function(){cleartimeout(i);cleartimeout(j)});g[1]&&!a.is("input:not(:checkbox, :radio), textarea")&&e.bind(g[1],function(o){o.relatedtarget!=a[0]&&a.trigger(l[1].split(" ")[0])});return c},hide:function(d){if(!e||!c.isshown())return c;d=d||f.event();d.type="onbeforehide";h.trigger(d);if(!d.isdefaultprevented()){k=false;n[b.effect][1].call(c,function(){d.type="onhide";k=false;h.trigger(d)});return c}},isshown:function(d){return d?k=="full":k},getconf:function(){return b}, gettip:function(){return e},gettrigger:function(){return a}});f.each("onhide,onbeforeshow,onshow,onbeforehide".split(","),function(d,g){f.isfunction(b[g])&&f(c).bind(g,b[g]);c[g]=function(o){f(c).bind(g,o);return c}})}f.tools=f.tools||{version:"1.2.2"};f.tools.tooltip={conf:{effect:"toggle",fadeoutspeed:"fast",predelay:0,delay:30,opacity:1,tip:0,position:["top","center"],offset:[0,0],relative:false,canceldefault:true,events:{def:"mouseenter,mouseleave",input:"focus,blur",widget:"focus mouseenter,blur mouseleave", tooltip:"mouseenter,mouseleave"},layout:"
",tipclass:"tooltip"},addeffect:function(a,b,c){n[a]=[b,c]}};var n={toggle:[function(a){var b=this.getconf(),c=this.gettip();b=b.opacity;b<1&&c.css({opacity:b});c.show();a.call()},function(a){this.gettip().hide();a.call()}],fade:[function(a){var b=this.getconf();this.gettip().fadeto(b.fadeinspeed,b.opacity,a)},function(a){this.gettip().fadeout(this.getconf().fadeoutspeed,a)}]};f.fn.tooltip=function(a){var b=this.data("tooltip");if(b)return b;a=f.extend(true, {},f.tools.tooltip.conf,a);if(typeof a.position=="string")a.position=a.position.split(/,?\s/);this.each(function(){b=new t(f(this),a);f(this).data("tooltip",b)});return a.api?b:this}})(jquery); (function(d){var i=d.tools.tooltip;d.extend(i.conf,{direction:"up",bounce:false,slideoffset:10,slideinspeed:200,slideoutspeed:200,slidefade:!d.browser.msie});var e={up:["-","top"],down:["+","top"],left:["-","left"],right:["+","left"]};i.addeffect("slide",function(g){var a=this.getconf(),f=this.gettip(),b=a.slidefade?{opacity:a.opacity}:{},c=e[a.direction]||e.up;b[c[1]]=c[0]+"="+a.slideoffset;a.slidefade&&f.css({opacity:0});f.show().animate(b,a.slideinspeed,g)},function(g){var a=this.getconf(),f=a.slideoffset, b=a.slidefade?{opacity:0}:{},c=e[a.direction]||e.up,h=""+c[0];if(a.bounce)h=h=="+"?"-":"+";b[c[1]]=h+"="+f;this.gettip().animate(b,a.slideoutspeed,function(){d(this).hide();g.call()})})})(jquery); (function(g){function j(a){var c=g(window),d=c.width()+c.scrollleft(),h=c.height()+c.scrolltop();return[a.offset().top<=c.scrolltop(),d<=a.offset().left+a.width(),h<=a.offset().top+a.height(),c.scrollleft()>=a.offset().left]}function k(a){for(var c=a.length;c--;)if(a[c])return false;return true}var i=g.tools.tooltip;i.dynamic={conf:{classnames:"top right bottom left"}};g.fn.dynamic=function(a){if(typeof a=="number")a={speed:a};a=g.extend({},i.dynamic.conf,a);var c=a.classnames.split(/\s/),d;this.each(function(){var h= g(this).tooltip().onbeforeshow(function(e,f){e=this.gettip();var b=this.getconf();d||(d=[b.position[0],b.position[1],b.offset[0],b.offset[1],g.extend({},b)]);g.extend(b,d[4]);b.position=[d[0],d[1]];b.offset=[d[2],d[3]];e.css({visibility:"hidden",position:"absolute",top:f.top,left:f.left}).show();f=j(e);if(!k(f)){if(f[2]){g.extend(b,a.top);b.position[0]="top";e.addclass(c[0])}if(f[3]){g.extend(b,a.right);b.position[1]="right";e.addclass(c[1])}if(f[0]){g.extend(b,a.bottom);b.position[0]="bottom";e.addclass(c[2])}if(f[1]){g.extend(b, a.left);b.position[1]="left";e.addclass(c[3])}if(f[0]||f[2])b.offset[0]*=-1;if(f[1]||f[3])b.offset[1]*=-1}e.css({visibility:"visible"}).hide()});h.onbeforeshow(function(){var e=this.getconf();this.gettip();settimeout(function(){e.position=[d[0],d[1]];e.offset=[d[2],d[3]]},0)});h.onhide(function(){var e=this.gettip();e.removeclass(a.classnames)});ret=h});return a.api?ret:this}})(jquery); (function(e){function n(f,c){var a=e(c);return a.length<2?a:f.parent().find(c)}function t(f,c){var a=this,l=f.add(a),g=f.children(),k=0,m=c.vertical;j||(j=a);if(g.length>1)g=e(c.items,f);e.extend(a,{getconf:function(){return c},getindex:function(){return k},getsize:function(){return a.getitems().size()},getnavibuttons:function(){return o.add(p)},getroot:function(){return f},getitemwrap:function(){return g},getitems:function(){return g.children(c.item).not("."+c.clonedclass)},move:function(b,d){return a.seekto(k+ b,d)},next:function(b){return a.move(1,b)},prev:function(b){return a.move(-1,b)},begin:function(b){return a.seekto(0,b)},end:function(b){return a.seekto(a.getsize()-1,b)},focus:function(){return j=a},additem:function(b){b=e(b);if(c.circular){e(".cloned:last").before(b);e(".cloned:first").replacewith(b.clone().addclass(c.clonedclass))}else g.append(b);l.trigger("onadditem",[b]);return a},seekto:function(b,d,h){if(c.circular&&b===0&&k==-1&&d!==0)return a;if(!c.circular&&b<0||b>a.getsize()||b<-1)return a; var i=b;if(b.jquery)b=a.getitems().index(b);else i=a.getitems().eq(b);var q=e.event("onbeforeseek");if(!h){l.trigger(q,[b,d]);if(q.isdefaultprevented()||!i.length)return a}i=m?{top:-i.position().top}:{left:-i.position().left};k=b;j=a;if(d===undefined)d=c.speed;g.animate(i,d,c.easing,h||function(){l.trigger("onseek",[b])});return a}});e.each(["onbeforeseek","onseek","onadditem"],function(b,d){e.isfunction(c[d])&&e(a).bind(d,c[d]);a[d]=function(h){e(a).bind(d,h);return a}});if(c.circular){var r=a.getitems().slice(-1).clone().prependto(g), s=a.getitems().eq(1).clone().appendto(g);r.add(s).addclass(c.clonedclass);a.onbeforeseek(function(b,d,h){if(!b.isdefaultprevented())if(d==-1){a.seekto(r,h,function(){a.end(0)});return b.preventdefault()}else d==a.getsize()&&a.seekto(s,h,function(){a.begin(0)})});a.seekto(0,0)}var o=n(f,c.prev).click(function(){a.prev()}),p=n(f,c.next).click(function(){a.next()});!c.circular&&a.getsize()>1&&a.onbeforeseek(function(b,d){o.toggleclass(c.disabledclass,d<=0);p.toggleclass(c.disabledclass,d>=a.getsize()- 1)});c.mousewheel&&e.fn.mousewheel&&f.mousewheel(function(b,d){if(c.mousewheel){a.move(d<0?1:-1,c.wheelspeed||50);return false}});c.keyboard&&e(document).bind("keydown.scrollable",function(b){if(!(!c.keyboard||b.altkey||b.ctrlkey||e(b.target).is(":input")))if(!(c.keyboard!="static"&&j!=a)){var d=b.keycode;if(m&&(d==38||d==40)){a.move(d==38?-1:1);return b.preventdefault()}if(!m&&(d==37||d==39)){a.move(d==37?-1:1);return b.preventdefault()}}});e(a).trigger("onbeforeseek",[c.initialindex])}e.tools=e.tools|| {version:"1.2.2"};e.tools.scrollable={conf:{activeclass:"active",circular:false,clonedclass:"cloned",disabledclass:"disabled",easing:"swing",initialindex:0,item:null,items:".items",keyboard:true,mousewheel:false,next:".next",prev:".prev",speed:400,vertical:false,wheelspeed:0}};var j;e.fn.scrollable=function(f){var c=this.data("scrollable");if(c)return c;f=e.extend({},e.tools.scrollable.conf,f);this.each(function(){c=new t(e(this),f);e(this).data("scrollable",c)});return f.api?c:this}})(jquery); (function(c){var g=c.tools.scrollable;g.autoscroll={conf:{autoplay:true,interval:3e3,autopause:true}};c.fn.autoscroll=function(d){if(typeof d=="number")d={interval:d};var b=c.extend({},g.autoscroll.conf,d),h;this.each(function(){var a=c(this).data("scrollable");if(a)h=a;var e,i,f=true;a.play=function(){if(!e){f=false;e=setinterval(function(){a.next()},b.interval);a.next()}};a.pause=function(){e=clearinterval(e)};a.stop=function(){a.pause();f=true};b.autopause&&a.getroot().add(a.getnavibuttons()).hover(function(){a.pause(); clearinterval(i)},function(){f||(i=settimeout(a.play,b.interval))});b.autoplay&&settimeout(a.play,b.interval)});return b.api?h:this}})(jquery); (function(d){function p(c,g){var h=d(g);return h.length<2?h:c.parent().find(g)}var m=d.tools.scrollable;m.navigator={conf:{navi:".navi",naviitem:null,activeclass:"active",indexed:false,idprefix:null,history:false}};d.fn.navigator=function(c){if(typeof c=="string")c={navi:c};c=d.extend({},m.navigator.conf,c);var g;this.each(function(){function h(a,b,i){e.seekto(b);if(j){if(location.hash)location.hash=a.attr("href").replace("#","")}else return i.preventdefault()}function f(){return k.find(c.naviitem|| "> *")}function n(a){var b=d("<"+(c.naviitem||"a")+"/>").click(function(i){h(d(this),a,i)}).attr("href","#"+a);a===0&&b.addclass(l);c.indexed&&b.text(a+1);c.idprefix&&b.attr("id",c.idprefix+a);return b.appendto(k)}function o(a,b){a=f().eq(b.replace("#",""));a.length||(a=f().filter("[href="+b+"]"));a.click()}var e=d(this).data("scrollable"),k=p(e.getroot(),c.navi),q=e.getnavibuttons(),l=c.activeclass,j=c.history&&d.fn.history;if(e)g=e;e.getnavibuttons=function(){return q.add(k)};f().length?f().each(function(a){d(this).click(function(b){h(d(this), a,b)})}):d.each(e.getitems(),function(a){n(a)});e.onbeforeseek(function(a,b){var i=f().eq(b);!a.isdefaultprevented()&&i.length&&f().removeclass(l).eq(b).addclass(l)});e.onadditem(function(a,b){b=n(e.getitems().index(b));j&&b.history(o)});j&&f().history(o)});return c.api?g:this}})(jquery); (function(a){function t(d,b){var c=this,i=d.add(c),o=a(window),k,f,m,g=a.tools.expose&&(b.mask||b.expose),n=math.random().tostring().slice(10);if(g){if(typeof g=="string")g={color:g};g.closeonclick=g.closeonesc=false}var p=b.target||d.attr("rel");f=p?a(p):d;if(!f.length)throw"could not find overlay: "+p;d&&d.index(f)==-1&&d.click(function(e){c.load(e);return e.preventdefault()});a.extend(c,{load:function(e){if(c.isopened())return c;var h=q[b.effect];if(!h)throw'overlay: cannot find effect : "'+b.effect+ '"';b.oneinstance&&a.each(s,function(){this.close(e)});e=e||a.event();e.type="onbeforeload";i.trigger(e);if(e.isdefaultprevented())return c;m=true;g&&a(f).expose(g);var j=b.top,r=b.left,u=f.outerwidth({margin:true}),v=f.outerheight({margin:true});if(typeof j=="string")j=j=="center"?math.max((o.height()-v)/2,0):parseint(j,10)/100*o.height();if(r=="center")r=math.max((o.width()-u)/2,0);h[0].call(c,{top:j,left:r},function(){if(m){e.type="onload";i.trigger(e)}});g&&b.closeonclick&&a.mask.getmask().one("click", c.close);b.closeonclick&&a(document).bind("click."+n,function(l){a(l.target).parents(f).length||c.close(l)});b.closeonesc&&a(document).bind("keydown."+n,function(l){l.keycode==27&&c.close(l)});return c},close:function(e){if(!c.isopened())return c;e=e||a.event();e.type="onbeforeclose";i.trigger(e);if(!e.isdefaultprevented()){m=false;q[b.effect][1].call(c,function(){e.type="onclose";i.trigger(e)});a(document).unbind("click."+n).unbind("keydown."+n);g&&a.mask.close();return c}},getoverlay:function(){return f}, gettrigger:function(){return d},getclosers:function(){return k},isopened:function(){return m},getconf:function(){return b}});a.each("onbeforeload,onstart,onload,onbeforeclose,onclose".split(","),function(e,h){a.isfunction(b[h])&&a(c).bind(h,b[h]);c[h]=function(j){a(c).bind(h,j);return c}});k=f.find(b.close||".close");if(!k.length&&!b.close){k=a('');f.prepend(k)}k.click(function(e){c.close(e)});b.load&&c.load()}a.tools=a.tools||{version:"1.2.2"};a.tools.overlay={addeffect:function(d, b,c){q[d]=[b,c]},conf:{close:null,closeonclick:true,closeonesc:true,closespeed:"fast",effect:"default",fixed:!a.browser.msie||a.browser.version>6,left:"center",load:false,mask:null,oneinstance:true,speed:"normal",target:null,top:"10%"}};var s=[],q={};a.tools.overlay.addeffect("default",function(d,b){var c=this.getconf(),i=a(window);if(!c.fixed){d.top+=i.scrolltop();d.left+=i.scrollleft()}d.position=c.fixed?"fixed":"absolute";this.getoverlay().css(d).fadein(c.speed,b)},function(d){this.getoverlay().fadeout(this.getconf().closespeed, d)});a.fn.overlay=function(d){var b=this.data("overlay");if(b)return b;if(a.isfunction(d))d={onbeforeload:d};d=a.extend(true,{},a.tools.overlay.conf,d);this.each(function(){b=new t(a(this),d);s.push(b);a(this).data("overlay",b)});return d.api?b:this}})(jquery); (function(i){function j(b){var d=b.offset();return{top:d.top+b.height()/2,left:d.left+b.width()/2}}var k=i.tools.overlay,f=i(window);i.extend(k.conf,{start:{top:null,left:null},fadeinspeed:"fast",zindex:9999});function n(b,d){var a=this.getoverlay(),c=this.getconf(),g=this.gettrigger(),o=this,l=a.outerwidth({margin:true}),h=a.data("img");if(!h){var e=a.css("backgroundimage");if(!e)throw"background-image css property not set for overlay";e=e.slice(e.indexof("(")+1,e.indexof(")")).replace(/\"/g,""); a.css("backgroundimage","none");h=i('');h.css({border:0,display:"none"}).width(l);i("body").append(h);a.data("img",h)}e=c.start.top||math.round(f.height()/2);var m=c.start.left||math.round(f.width()/2);if(g){g=j(g);e=g.top;m=g.left}h.css({position:"absolute",top:e,left:m,width:0,zindex:c.zindex}).show();b.top+=f.scrolltop();b.left+=f.scrollleft();b.position="absolute";a.css(b);h.animate({top:a.css("top"),left:a.css("left"),width:l},c.speed,function(){if(c.fixed){b.top-=f.scrolltop(); b.left-=f.scrollleft();b.position="fixed";h.add(a).css(b)}a.css("zindex",c.zindex+1).fadein(c.fadeinspeed,function(){o.isopened()&&!i(this).index(a)?d.call():a.hide()})})}function p(b){var d=this.getoverlay().hide(),a=this.getconf(),c=this.gettrigger();d=d.data("img");var g={top:a.start.top,left:a.start.left,width:0};c&&i.extend(g,j(c));a.fixed&&d.css({position:"absolute"}).animate({top:"+="+f.scrolltop(),left:"+="+f.scrollleft()},0);d.animate(g,a.closespeed,b)}k.addeffect("apple",n,p)})(jquery);