/*! * jquery tools v1.2.6 - the missing ui library for the web * * overlay/overlay.js * scrollable/scrollable.js * scrollable/scrollable.autoscroll.js * scrollable/scrollable.navigator.js * tabs/tabs.js * tooltip/tooltip.js * * no copyrights or licenses. do what you like. * * http://flowplayer.org/tools/ * */ (function(a){a.tools=a.tools||{version:"v1.2.6"},a.tools.overlay={addeffect:function(a,b,d){c[a]=[b,d]},conf:{close:null,closeonclick:!0,closeonesc:!0,closespeed:"fast",effect:"default",fixed:!a.browser.msie||a.browser.version>6,left:"center",load:!1,mask:null,oneinstance:!0,speed:"normal",target:null,top:"10%"}};var b=[],c={};a.tools.overlay.addeffect("default",function(b,c){var d=this.getconf(),e=a(window);d.fixed||(b.top+=e.scrolltop(),b.left+=e.scrollleft()),b.position=d.fixed?"fixed":"absolute",this.getoverlay().css(b).fadein(d.speed,c)},function(a){this.getoverlay().fadeout(this.getconf().closespeed,a)});function d(d,e){var f=this,g=d.add(f),h=a(window),i,j,k,l=a.tools.expose&&(e.mask||e.expose),m=math.random().tostring().slice(10);l&&(typeof l=="string"&&(l={color:l}),l.closeonclick=l.closeonesc=!1);var n=e.target||d.attr("rel");j=n?a(n):null||d;if(!j.length)throw"could not find overlay: "+n;d&&d.index(j)==-1&&d.click(function(a){f.load(a);return a.preventdefault()}),a.extend(f,{load:function(d){if(f.isopened())return f;var i=c[e.effect];if(!i)throw"overlay: cannot find effect : \""+e.effect+"\"";e.oneinstance&&a.each(b,function(){this.close(d)}),d=d||a.event(),d.type="onbeforeload",g.trigger(d);if(d.isdefaultprevented())return f;k=!0,l&&a(j).expose(l);var n=e.top,o=e.left,p=j.outerwidth({margin:!0}),q=j.outerheight({margin:!0});typeof n=="string"&&(n=n=="center"?math.max((h.height()-q)/2,0):parseint(n,10)/100*h.height()),o=="center"&&(o=math.max((h.width()-p)/2,0)),i[0].call(f,{top:n,left:o},function(){k&&(d.type="onload",g.trigger(d))}),l&&e.closeonclick&&a.mask.getmask().one("click",f.close),e.closeonclick&&a(document).bind("click."+m,function(b){a(b.target).parents(j).length||f.close(b)}),e.closeonesc&&a(document).bind("keydown."+m,function(a){a.keycode==27&&f.close(a)});return f},close:function(b){if(!f.isopened())return f;b=b||a.event(),b.type="onbeforeclose",g.trigger(b);if(!b.isdefaultprevented()){k=!1,c[e.effect][1].call(f,function(){b.type="onclose",g.trigger(b)}),a(document).unbind("click."+m).unbind("keydown."+m),l&&a.mask.close();return f}},getoverlay:function(){return j},gettrigger:function(){return d},getclosers:function(){return i},isopened:function(){return k},getconf:function(){return e}}),a.each("onbeforeload,onstart,onload,onbeforeclose,onclose".split(","),function(b,c){a.isfunction(e[c])&&a(f).bind(c,e[c]),f[c]=function(b){b&&a(f).bind(c,b);return f}}),i=j.find(e.close||".close"),!i.length&&!e.close&&(i=a(""),j.prepend(i)),i.click(function(a){f.close(a)}),e.load&&f.load()}a.fn.overlay=function(c){var e=this.data("overlay");if(e)return e;a.isfunction(c)&&(c={onbeforeload:c}),c=a.extend(!0,{},a.tools.overlay.conf,c),this.each(function(){e=new d(a(this),c),b.push(e),a(this).data("overlay",e)});return c.api?e:this}})(jquery); (function(a){a.tools=a.tools||{version:"v1.2.6"},a.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 b(a,b){var c=parseint(a.css(b),10);if(c)return c;var d=a[0].currentstyle;return d&&d.width&&parseint(d.width,10)}function c(b,c){var d=a(c);return d.length<2?d:b.parent().find(c)}var d;function e(b,e){var f=this,g=b.add(f),h=b.children(),i=0,j=e.vertical;d||(d=f),h.length>1&&(h=a(e.items,b)),e.size>1&&(e.circular=!1),a.extend(f,{getconf:function(){return e},getindex:function(){return i},getsize:function(){return f.getitems().size()},getnavibuttons:function(){return n.add(o)},getroot:function(){return b},getitemwrap:function(){return h},getitems:function(){return h.find(e.item).not("."+e.clonedclass)},move:function(a,b){return f.seekto(i+a,b)},next:function(a){return f.move(e.size,a)},prev:function(a){return f.move(-e.size,a)},begin:function(a){return f.seekto(0,a)},end:function(a){return f.seekto(f.getsize()-1,a)},focus:function(){d=f;return f},additem:function(b){b=a(b),e.circular?(h.children().last().before(b),h.children().first().replacewith(b.clone().addclass(e.clonedclass))):(h.append(b),o.removeclass("disabled")),g.trigger("onadditem",[b]);return f},seekto:function(b,c,k){b.jquery||(b*=1);if(e.circular&&b===0&&i==-1&&c!==0)return f;if(!e.circular&&b<0||b>f.getsize()||b<-1)return f;var l=b;b.jquery?b=f.getitems().index(b):l=f.getitems().eq(b);var m=a.event("onbeforeseek");if(!k){g.trigger(m,[b,c]);if(m.isdefaultprevented()||!l.length)return f}var n=j?{top:-l.position().top}:{left:-l.position().left};i=b,d=f,c===undefined&&(c=e.speed),h.animate(n,c,e.easing,k||function(){g.trigger("onseek",[b])});return f}}),a.each(["onbeforeseek","onseek","onadditem"],function(b,c){a.isfunction(e[c])&&a(f).bind(c,e[c]),f[c]=function(b){b&&a(f).bind(c,b);return f}});if(e.circular){var k=f.getitems().slice(-1).clone().prependto(h),l=f.getitems().eq(1).clone().appendto(h);k.add(l).addclass(e.clonedclass),f.onbeforeseek(function(a,b,c){if(!a.isdefaultprevented()){if(b==-1){f.seekto(k,c,function(){f.end(0)});return a.preventdefault()}b==f.getsize()&&f.seekto(l,c,function(){f.begin(0)})}});var m=b.parents().add(b).filter(function(){if(a(this).css("display")==="none")return!0});m.length?(m.show(),f.seekto(0,0,function(){}),m.hide()):f.seekto(0,0,function(){})}var n=c(b,e.prev).click(function(a){a.stoppropagation(),f.prev()}),o=c(b,e.next).click(function(a){a.stoppropagation(),f.next()});e.circular||(f.onbeforeseek(function(a,b){settimeout(function(){a.isdefaultprevented()||(n.toggleclass(e.disabledclass,b<=0),o.toggleclass(e.disabledclass,b>=f.getsize()-1))},1)}),e.initialindex||n.addclass(e.disabledclass)),f.getsize()<2&&n.add(o).addclass(e.disabledclass),e.mousewheel&&a.fn.mousewheel&&b.mousewheel(function(a,b){if(e.mousewheel){f.move(b<0?1:-1,e.wheelspeed||50);return!1}});if(e.touch){var p={};h[0].ontouchstart=function(a){var b=a.touches[0];p.x=b.clientx,p.y=b.clienty},h[0].ontouchmove=function(a){if(a.touches.length==1&&!h.is(":animated")){var b=a.touches[0],c=p.x-b.clientx,d=p.y-b.clienty;f[j&&d>0||!j&&c>0?"next":"prev"](),a.preventdefault()}}}e.keyboard&&a(document).bind("keydown.scrollable",function(b){if(!(!e.keyboard||b.altkey||b.ctrlkey||b.metakey||a(b.target).is(":input"))){if(e.keyboard!="static"&&d!=f)return;var c=b.keycode;if(j&&(c==38||c==40)){f.move(c==38?-1:1);return b.preventdefault()}if(!j&&(c==37||c==39)){f.move(c==37?-1:1);return b.preventdefault()}}}),e.initialindex&&f.seekto(e.initialindex,0,function(){})}a.fn.scrollable=function(b){var c=this.data("scrollable");if(c)return c;b=a.extend({},a.tools.scrollable.conf,b),this.each(function(){c=new e(a(this),b),a(this).data("scrollable",c)});return b.api?c:this}})(jquery); (function(a){var b=a.tools.scrollable;b.autoscroll={conf:{autoplay:!0,interval:3e3,autopause:!0}},a.fn.autoscroll=function(c){typeof c=="number"&&(c={interval:c});var d=a.extend({},b.autoscroll.conf,c),e;this.each(function(){var b=a(this).data("scrollable"),c=b.getroot(),f,g=!1;function h(){f=settimeout(function(){b.next()},d.interval)}b&&(e=b),b.play=function(){f||(g=!1,c.bind("onseek",h),h())},b.pause=function(){f=cleartimeout(f),c.unbind("onseek",h)},b.resume=function(){g||b.play()},b.stop=function(){g=!0,b.pause()},d.autopause&&c.add(b.getnavibuttons()).hover(b.pause,b.resume),d.autoplay&&b.play()});return d.api?e:this}})(jquery); (function(a){var b=a.tools.scrollable;b.navigator={conf:{navi:".navi",naviitem:null,activeclass:"active",indexed:!1,idprefix:null,history:!1}};function c(b,c){var d=a(c);return d.length<2?d:b.parent().find(c)}a.fn.navigator=function(d){typeof d=="string"&&(d={navi:d}),d=a.extend({},b.navigator.conf,d);var e;this.each(function(){var b=a(this).data("scrollable"),f=d.navi.jquery?d.navi:c(b.getroot(),d.navi),g=b.getnavibuttons(),h=d.activeclass,i=d.history&&history.pushstate,j=b.getconf().size;b&&(e=b),b.getnavibuttons=function(){return g.add(f)},i&&(history.pushstate({i:0}),a(window).bind("popstate",function(a){var c=a.originalevent.state;c&&b.seekto(c.i)}));function k(a,c,d){b.seekto(c),d.preventdefault(),i&&history.pushstate({i:c})}function l(){return f.find(d.naviitem||"> *")}function m(b){var c=a("<"+(d.naviitem||"a")+"/>").click(function(c){k(a(this),b,c)});b===0&&c.addclass(h),d.indexed&&c.text(b+1),d.idprefix&&c.attr("id",d.idprefix+b);return c.appendto(f)}l().length?l().each(function(b){a(this).click(function(c){k(a(this),b,c)})}):a.each(b.getitems(),function(a){a%j==0&&m(a)}),b.onbeforeseek(function(a,b){settimeout(function(){if(!a.isdefaultprevented()){var c=b/j,d=l().eq(c);d.length&&l().removeclass(h).eq(c).addclass(h)}},1)}),b.onadditem(function(a,c){var d=b.getitems().index(c);d%j==0&&m(d)})});return d.api?e:this}})(jquery); (function(a){a.tools=a.tools||{version:"v1.2.6"},a.tools.tabs={conf:{tabs:"a",current:"current",onbeforeclick:null,onclick:null,effect:"default",initialindex:0,event:"click",rotate:!1,slideupspeed:400,slidedownspeed:400,history:!1},addeffect:function(a,c){b[a]=c}};var b={"default":function(a,b){this.getpanes().hide().eq(a).show(),b.call()},fade:function(a,b){var c=this.getconf(),d=c.fadeoutspeed,e=this.getpanes();d?e.fadeout(d):e.hide(),e.eq(a).fadein(c.fadeinspeed,b)},slide:function(a,b){var c=this.getconf();this.getpanes().slideup(c.slideupspeed),this.getpanes().eq(a).slidedown(c.slidedownspeed,b)},ajax:function(a,b){this.getpanes().eq(0).load(this.gettabs().eq(a).attr("href"),b)}},c,d;a.tools.tabs.addeffect("horizontal",function(b,e){if(!c){var f=this.getpanes().eq(b),g=this.getcurrentpane();d||(d=this.getpanes().eq(0).width()),c=!0,f.show(),g.animate({width:0},{step:function(a){f.css("width",d-a)},complete:function(){a(this).hide(),e.call(),c=!1}}),g.length||(e.call(),c=!1)}});function e(c,d,e){var f=this,g=c.add(this),h=c.find(e.tabs),i=d.jquery?d:c.children(d),j;h.length||(h=c.children()),i.length||(i=c.parent().find(d)),i.length||(i=a(d)),a.extend(this,{click:function(c,d){var i=h.eq(c);typeof c=="string"&&c.replace("#","")&&(i=h.filter("[href*="+c.replace("#","")+"]"),c=math.max(h.index(i),0));if(e.rotate){var k=h.length-1;if(c<0)return f.click(k,d);if(c>k)return f.click(0,d)}if(!i.length){if(j>=0)return f;c=e.initialindex,i=h.eq(c)}if(c===j)return f;d=d||a.event(),d.type="onbeforeclick",g.trigger(d,[c]);if(!d.isdefaultprevented()){b[e.effect].call(f,c,function(){j=c,d.type="onclick",g.trigger(d,[c])}),h.removeclass(e.current),i.addclass(e.current);return f}},getconf:function(){return e},gettabs:function(){return h},getpanes:function(){return i},getcurrentpane:function(){return i.eq(j)},getcurrenttab:function(){return h.eq(j)},getindex:function(){return j},next:function(){return f.click(j+1)},prev:function(){return f.click(j-1)},destroy:function(){h.unbind(e.event).removeclass(e.current),i.find("a[href^=#]").unbind("click.t");return f}}),a.each("onbeforeclick,onclick".split(","),function(b,c){a.isfunction(e[c])&&a(f).bind(c,e[c]),f[c]=function(b){b&&a(f).bind(c,b);return f}}),e.history&&a.fn.history&&(a.tools.history.init(h),e.event="history"),h.each(function(b){a(this).bind(e.event,function(a){f.click(b,a);return a.preventdefault()})}),i.find("a[href^=#]").bind("click.t",function(b){f.click(a(this).attr("href"),b)}),location.hash&&e.tabs=="a"&&c.find("[href="+location.hash+"]").length?f.click(location.hash):(e.initialindex===0||e.initialindex>0)&&f.click(e.initialindex)}a.fn.tabs=function(b,c){var d=this.data("tabs");d&&(d.destroy(),this.removedata("tabs")),a.isfunction(c)&&(c={onbeforeclick:c}),c=a.extend({},a.tools.tabs.conf,c),this.each(function(){d=new e(a(this),b,c),a(this).data("tabs",d)});return c.api?d:this}})(jquery); (function(a){a.tools=a.tools||{version:"v1.2.6"},a.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:"
",tipclass:"tooltip"},addeffect:function(a,c,d){b[a]=[c,d]}};var b={toggle:[function(a){var b=this.getconf(),c=this.gettip(),d=b.opacity;d<1&&c.css({opacity:d}),c.show(),a.call()},function(a){this.gettip().hide(),a.call()}],fade:[function(b){var c=this.getconf();!a.browser.msie||c.fadeie?this.gettip().fadeto(c.fadeinspeed,c.opacity,b):(this.gettip().show(),b())},function(b){var c=this.getconf();!a.browser.msie||c.fadeie?this.gettip().fadeout(c.fadeoutspeed,b):(this.gettip().hide(),b())}]};function c(b,c,d){var e=d.relative?b.position().top:b.offset().top,f=d.relative?b.position().left:b.offset().left,g=d.position[0];e-=c.outerheight()-d.offset[0],f+=b.outerwidth()+d.offset[1],/ipad/i.test(navigator.useragent)&&(e-=a(window).scrolltop());var h=c.outerheight()+b.outerheight();g=="center"&&(e+=h/2),g=="bottom"&&(e+=h),g=d.position[1];var i=c.outerwidth()+b.outerwidth();g=="center"&&(f-=i/2),g=="left"&&(f-=i);return{top:e,left:f}}function d(d,e){var f=this,g=d.add(f),h,i=0,j=0,k=d.attr("title"),l=d.attr("data-tooltip"),m=b[e.effect],n,o=d.is(":input"),p=o&&d.is(":checkbox, :radio, select, :button, :submit"),q=d.attr("type"),r=e.events[q]||e.events[o?p?"widget":"input":"def"];if(!m)throw"nonexistent effect \""+e.effect+"\"";r=r.split(/,\s*/);if(r.length!=2)throw"tooltip: bad events configuration for "+q;d.bind(r[0],function(a){cleartimeout(i),e.predelay?j=settimeout(function(){f.show(a)},e.predelay):f.show(a)}).bind(r[1],function(a){cleartimeout(j),e.delay?i=settimeout(function(){f.hide(a)},e.delay):f.hide(a)}),k&&e.canceldefault&&(d.removeattr("title"),d.data("title",k)),a.extend(f,{show:function(b){if(!h){l?h=a(l):e.tip?h=a(e.tip).eq(0):k?h=a(e.layout).addclass(e.tipclass).appendto(document.body).hide().append(k):(h=d.next(),h.length||(h=d.parent().next()));if(!h.length)throw"cannot find tooltip for "+d}if(f.isshown())return f;h.stop(!0,!0);var o=c(d,h,e);e.tip&&h.html(d.data("title")),b=a.event(),b.type="onbeforeshow",g.trigger(b,[o]);if(b.isdefaultprevented())return f;o=c(d,h,e),h.css({position:"absolute",top:o.top,left:o.left}),n=!0,m[0].call(f,function(){b.type="onshow",n="full",g.trigger(b)});var p=e.events.tooltip.split(/,\s*/);h.data("__set")||(h.unbind(p[0]).bind(p[0],function(){cleartimeout(i),cleartimeout(j)}),p[1]&&!d.is("input:not(:checkbox, :radio), textarea")&&h.unbind(p[1]).bind(p[1],function(a){a.relatedtarget!=d[0]&&d.trigger(r[1].split(" ")[0])}),e.tip||h.data("__set",!0));return f},hide:function(c){if(!h||!f.isshown())return f;c=a.event(),c.type="onbeforehide",g.trigger(c);if(!c.isdefaultprevented()){n=!1,b[e.effect][1].call(f,function(){c.type="onhide",g.trigger(c)});return f}},isshown:function(a){return a?n=="full":n},getconf:function(){return e},gettip:function(){return h},gettrigger:function(){return d}}),a.each("onhide,onbeforeshow,onshow,onbeforehide".split(","),function(b,c){a.isfunction(e[c])&&a(f).bind(c,e[c]),f[c]=function(b){b&&a(f).bind(c,b);return f}})}a.fn.tooltip=function(b){var c=this.data("tooltip");if(c)return c;b=a.extend(!0,{},a.tools.tooltip.conf,b),typeof b.position=="string"&&(b.position=b.position.split(/,?\s/)),this.each(function(){c=new d(a(this),b),a(this).data("tooltip",c)});return b.api?c:this}})(jquery);