(function(g){g.tools=g.tools||{};g.tools.tabs={version:"1.0.4",conf:{tabs:"a",current:"current",onBeforeClick:null,onClick:null,effect:"default",initialIndex:0,event:"click",api:false,rotate:false},addEffect:function(b,a){h[b]=a}};var h={"default":function(a,b){this.getPanes().hide().eq(a).show();b.call()},fade:function(c,k){var d=this.getConf(),a=d.fadeOutSpeed,b=this.getPanes();if(a){b.fadeOut(a)}else{b.hide()}b.eq(c).fadeIn(d.fadeInSpeed,k)},slide:function(a,b){this.getPanes().slideUp(200);this.getPanes().eq(a).slideDown(400,b)},ajax:function(a,b){this.getPanes().eq(0).load(this.getTabs().eq(a).attr("href"),b)}};var e;g.tools.tabs.addEffect("horizontal",function(a,b){if(!e){e=this.getPanes().eq(0).width()}this.getCurrentPane().animate({width:0},function(){g(this).hide()});this.getPanes().eq(a).animate({width:e},function(){g(this).show();b.call()})});function f(d,c,k){var l=this,a=g(this),b;g.each(k,function(m,j){if(g.isFunction(j)){a.bind(m,j)}});g.extend(this,{click:function(q,s){var r=l.getCurrentPane();var p=d.eq(q);if(typeof q=="string"&&q.replace("#","")){p=d.filter("[href*="+q.replace("#","")+"]");q=Math.max(d.index(p),0)}if(k.rotate){var j=d.length-1;if(q<0){return l.click(j,s)}if(q>j){return l.click(0,s)}}if(!p.length){if(b>=0){return l}q=k.initialIndex;p=d.eq(q)}if(q===b){return l}s=s||g.Event();s.type="onBeforeClick";a.trigger(s,[q]);if(s.isDefaultPrevented()){return}h[k.effect].call(l,q,function(){s.type="onClick";a.trigger(s,[q])});s.type="onStart";a.trigger(s,[q]);if(s.isDefaultPrevented()){return}b=q;d.removeClass(k.current);p.addClass(k.current);return l},getConf:function(){return k},getTabs:function(){return d},getPanes:function(){return c},getCurrentPane:function(){return c.eq(b)},getCurrentTab:function(){return d.eq(b)},getIndex:function(){return b},next:function(){return l.click(b+1)},prev:function(){return l.click(b-1)},bind:function(m,j){a.bind(m,j);return l},onBeforeClick:function(j){return this.bind("onBeforeClick",j)},onClick:function(j){return this.bind("onClick",j)},unbind:function(j){a.unbind(j);return l}});d.each(function(j){g(this).bind(k.event,function(m){l.click(j,m);return false})});if(location.hash){l.click(location.hash)}else{if(k.initialIndex===0||k.initialIndex>0){l.click(k.initialIndex)}}c.find("a[href^=#]").click(function(j){l.click(g(this).attr("href"),j)})}g.fn.tabs=function(a,d){var c=this.eq(typeof d=="number"?d:0).data("tabs");if(c){return c}if(g.isFunction(d)){d={onBeforeClick:d}}var b=g.extend({},g.tools.tabs.conf),j=this.length;d=g.extend(b,d);this.each(function(o){var q=g(this);var p=q.find(d.tabs);if(!p.length){p=q.children()}var n=a.jquery?a:q.children(a);if(!n.length){n=j==1?g(a):q.parent().find(a)}c=new f(p,n,d);q.data("tabs",c)});return d.api?c:this}})(jQuery);(function(c){var d=c.tools.tabs;d.plugins=d.plugins||{};d.plugins.slideshow={version:"1.0.2",conf:{next:".forward",prev:".backward",disabledClass:"disabled",autoplay:false,autopause:true,interval:3000,clickable:true,api:false}};c.prototype.slideshow=function(b){var a=c.extend({},d.plugins.slideshow.conf),h=this.length,g;b=c.extend(a,b);this.each(function(){var t=c(this),w=t.tabs(),A=c(w),u=w;c.each(b,function(k,j){if(c.isFunction(j)){w.bind(k,j)}});function v(j){return h==1?c(j):t.parent().find(j)}var D=v(b.next).click(function(){w.next()});var f=v(b.prev).click(function(){w.prev()});var B,z,x,C=false;c.extend(w,{play:function(){if(B){return}var j=c.Event("onBeforePlay");A.trigger(j);if(j.isDefaultPrevented()){return w}C=false;B=setInterval(w.next,b.interval);A.trigger("onPlay");w.next()},pause:function(){if(!B){return w}var j=c.Event("onBeforePause");A.trigger(j);if(j.isDefaultPrevented()){return w}B=clearInterval(B);x=clearInterval(x);A.trigger("onPause")},stop:function(){w.pause();C=true},onBeforePlay:function(j){return w.bind("onBeforePlay",j)},onPlay:function(j){return w.bind("onPlay",j)},onBeforePause:function(j){return w.bind("onBeforePause",j)},onPause:function(j){return w.bind("onPause",j)}});if(b.autopause){var y=w.getTabs().add(D).add(f).add(w.getPanes());y.hover(function(){w.pause();z=clearInterval(z)},function(){if(!C){z=setTimeout(w.play,b.interval)}})}if(b.autoplay){x=setTimeout(w.play,b.interval)}else{w.stop()}if(b.clickable){w.getPanes().click(function(){w.next()})}if(!w.getConf().rotate){var e=b.disabledClass;if(!w.getIndex()){f.addClass(e)}w.onBeforeClick(function(j,k){if(!k){f.addClass(e)}else{f.removeClass(e);if(k==w.getTabs().length-1){D.addClass(e)}else{D.removeClass(e)}}})}});return b.api?g:this}})(jQuery);(function(j){var g=j.tools.tabs;g.plugins=g.plugins||{};g.plugins.history={version:"1.0.2",conf:{api:false}};var h,f;function k(b){if(b){var a=f.contentWindow.document;a.open().close();a.location.hash=b}}j.fn.onHash=function(a){var b=this;if(j.browser.msie&&j.browser.version<"8"){if(!f){f=j("<iframe/>").attr("src","javascript:false;").hide().get(0);j("body").append(f);setInterval(function(){var d=f.contentWindow.document,c=d.location.hash;if(h!==c){j.event.trigger("hash",c);h=c}},100);k(location.hash||"#")}b.bind("click.hash",function(c){k(j(this).attr("href"))})}else{setInterval(function(){var c=location.hash;var d=b.filter("[href$="+c+"]");if(!d.length){c=c.replace("#","");d=b.filter("[href$="+c+"]")}if(d.length&&c!==h){h=c;j.event.trigger("hash",c)}},100)}j(window).bind("hash",a);return this};j.fn.history=function(b){var a=j.extend({},g.plugins.history.conf),c;b=j.extend(a,b);this.each(function(){var d=j(this).tabs(),e=d.getTabs();if(d){c=d}e.onHash(function(n,m){if(!m||m=="#"){m=d.getConf().initialIndex}d.click(m)});e.click(function(l){location.hash=j(this).attr("href").replace("#","")})});return b.api?c:this}})(jQuery);(function(h){var g=[];h.tools=h.tools||{};h.tools.tooltip={version:"1.1.2",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,oneInstance:true,events:{def:"mouseover,mouseout",input:"focus,blur",widget:"focus mouseover,blur mouseout",tooltip:"mouseover,mouseout"},api:false},addEffect:function(c,a,b){e[c]=[a,b]}};var e={toggle:[function(d){var c=this.getConf(),b=this.getTip(),a=c.opacity;if(a<1){b.css({opacity:a})}b.show();d.call()},function(a){this.getTip().hide();a.call()}],fade:[function(a){this.getTip().fadeIn(this.getConf().fadeInSpeed,a)},function(a){this.getTip().fadeOut(this.getConf().fadeOutSpeed,a)}]};function f(w,v){var a=this,r=h(this);w.data("tooltip",a);var q=w.next();if(v.tip){q=h(v.tip);if(q.length>1){q=w.nextAll(v.tip).eq(0);if(!q.length){q=w.parent().nextAll(v.tip).eq(0)}}}function b(k){var l=v.relative?w.position().top:w.offset().top,m=v.relative?w.position().left:w.offset().left,j=v.position[0];l-=q.outerHeight()-v.offset[0];m+=w.outerWidth()+v.offset[1];var o=q.outerHeight()+w.outerHeight();if(j=="center"){l+=o/2}if(j=="bottom"){l+=o}j=v.position[1];var n=q.outerWidth()+w.outerWidth();if(j=="center"){m-=n/2}if(j=="left"){m-=n}return{top:l,left:m}}var t=w.is(":input"),x=t&&w.is(":checkbox, :radio, select, :button"),u=w.attr("type"),c=v.events[u]||v.events[t?(x?"widget":"input"):"def"];c=c.split(/,\s*/);if(c.length!=2){throw"Tooltip: bad events configuration for "+u}w.bind(c[0],function(j){if(v.oneInstance){h.each(g,function(){this.hide()})}var k=q.data("trigger");if(k&&k[0]!=this){q.hide().stop(true,true)}j.target=this;a.show(j);c=v.events.tooltip.split(/,\s*/);q.bind(c[0],function(){a.show(j)});if(c[1]){q.bind(c[1],function(){a.hide(j)})}});w.bind(c[1],function(j){a.hide(j)});if(!h.browser.msie&&!t&&!v.predelay){w.mousemove(function(){if(!a.isShown()){w.triggerHandler("mouseover")}})}if(v.opacity<1){q.css("opacity",v.opacity)}var d=0,s=w.attr("title");if(s&&v.cancelDefault){w.removeAttr("title");w.data("title",s)}h.extend(a,{show:function(j){if(j){w=h(j.target)}clearTimeout(q.data("timer"));if(q.is(":animated")||q.is(":visible")){return a}function k(){q.data("trigger",w);var l=b(j);if(v.tip&&s){q.html(w.data("title"))}j=j||h.Event();j.type="onBeforeShow";r.trigger(j,[l]);if(j.isDefaultPrevented()){return a}l=b(j);q.css({position:"absolute",top:l.top,left:l.left});var m=e[v.effect];if(!m){throw'Nonexistent effect "'+v.effect+'"'}m[0].call(a,function(){j.type="onShow";r.trigger(j)})}if(v.predelay){clearTimeout(d);d=setTimeout(k,v.predelay)}else{k()}return a},hide:function(j){clearTimeout(q.data("timer"));clearTimeout(d);if(!q.is(":visible")){return}function k(){j=j||h.Event();j.type="onBeforeHide";r.trigger(j);if(j.isDefaultPrevented()){return}e[v.effect][1].call(a,function(){j.type="onHide";r.trigger(j)})}if(v.delay&&j){q.data("timer",setTimeout(k,v.delay))}else{k()}return a},isShown:function(){return q.is(":visible, :animated")},getConf:function(){return v},getTip:function(){return q},getTrigger:function(){return w},bind:function(k,j){r.bind(k,j);return a},onHide:function(j){return this.bind("onHide",j)},onBeforeShow:function(j){return this.bind("onBeforeShow",j)},onShow:function(j){return this.bind("onShow",j)},onBeforeHide:function(j){return this.bind("onBeforeHide",j)},unbind:function(j){r.unbind(j);return a}});h.each(v,function(k,j){if(h.isFunction(j)){a.bind(k,j)}})}h.prototype.tooltip=function(c){var b=this.eq(typeof c=="number"?c:0).data("tooltip");if(b){return b}var a=h.extend(true,{},h.tools.tooltip.conf);if(h.isFunction(c)){c={onBeforeShow:c}}else{if(typeof c=="string"){c={tip:c}}}c=h.extend(true,a,c);if(typeof c.position=="string"){c.position=c.position.split(/,?\s/)}if(c.lazy!==false&&(c.lazy===true||this.length>20)){this.one("mouseover",function(d){b=new f(h(this),c);b.show(d);g.push(b)})}else{this.each(function(){b=new f(h(this),c);g.push(b)})}return c.api?b:this}})(jQuery);(function(d){var e=d.tools.tooltip;e.effects=e.effects||{};e.effects.slide={version:"1.0.0"};d.extend(e.conf,{direction:"up",bounce:false,slideOffset:10,slideInSpeed:200,slideOutSpeed:200,slideFade:!d.browser.msie});var f={up:["-","top"],down:["+","top"],left:["-","left"],right:["+","left"]};d.tools.tooltip.addEffect("slide",function(k){var c=this.getConf(),b=this.getTip(),a=c.slideFade?{opacity:c.opacity}:{},j=f[c.direction]||f.up;a[j[1]]=j[0]+"="+c.slideOffset;if(c.slideFade){b.css({opacity:0})}b.show().animate(a,c.slideInSpeed,k)},function(k){var c=this.getConf(),a=c.slideOffset,b=c.slideFade?{opacity:0}:{},j=f[c.direction]||f.up;var l=""+j[0];if(c.bounce){l=l=="+"?"-":"+"}b[j[1]]=l+"="+a;this.getTip().animate(b,c.slideOutSpeed,function(){d(this).hide();k.call()})})})(jQuery);(function(g){var h=g.tools.tooltip;h.plugins=h.plugins||{};h.plugins.dynamic={version:"1.0.1",conf:{api:false,classNames:"top right bottom left"}};function e(a){var d=g(window);var b=d.width()+d.scrollLeft();var c=d.height()+d.scrollTop();return[a.offset().top<=d.scrollTop(),b<=a.offset().left+a.width(),c<=a.offset().top+a.height(),d.scrollLeft()>=a.offset().left]}function f(a){var b=a.length;while(b--){if(a[b]){return false}}return true}g.fn.dynamic=function(c){var b=g.extend({},h.plugins.dynamic.conf),d;if(typeof c=="number"){c={speed:c}}c=g.extend(b,c);var j=c.classNames.split(/\s/),a;this.each(function(){if(g(this).tooltip().jquery){throw"Lazy feature not supported by dynamic plugin. set lazy: false for tooltip"}var k=g(this).tooltip().onBeforeShow(function(t,s){var p=this.getTip(),q=this.getConf();if(!a){a=[q.position[0],q.position[1],q.offset[0],q.offset[1],g.extend({},q)]}g.extend(q,a[4]);q.position=[a[0],a[1]];q.offset=[a[2],a[3]];p.css({visibility:"hidden",position:"absolute",top:s.top,left:s.left}).show();var r=e(p);if(!f(r)){if(r[2]){g.extend(q,c.top);q.position[0]="top";p.addClass(j[0])}if(r[3]){g.extend(q,c.right);q.position[1]="right";p.addClass(j[1])}if(r[0]){g.extend(q,c.bottom);q.position[0]="bottom";p.addClass(j[2])}if(r[1]){g.extend(q,c.left);q.position[1]="left";p.addClass(j[3])}if(r[0]||r[2]){q.offset[0]*=-1}if(r[1]||r[3]){q.offset[1]*=-1}}p.css({visibility:"visible"}).hide()});k.onShow(function(){var m=this.getConf(),n=this.getTip();m.position=[a[0],a[1]];m.offset=[a[2],a[3]]});k.onHide(function(){var l=this.getTip();l.removeClass(c.classNames)});d=k});return c.api?d:this}})(jQuery);(function(d){d.tools=d.tools||{};d.tools.scrollable={version:"1.1.2",conf:{size:5,vertical:false,speed:400,keyboard:true,keyboardSteps:null,disabledClass:"disabled",hoverClass:null,clickable:true,activeClass:"active",easing:"swing",loop:false,items:".items",item:null,prev:".prev",next:".next",prevPage:".prevPage",nextPage:".nextPage",api:false}};var f;function e(s,u){var a=this,c=d(this),D=!u.vertical,C=s.children(),w=0,y;if(!f){f=a}d.each(u,function(h,g){if(d.isFunction(g)){c.bind(h,g)}});if(C.length>1){C=d(u.items,s)}function v(g){var h=d(g);return u.globalNav?h:s.parent().find(g)}s.data("finder",v);var B=v(u.prev),z=v(u.next),A=v(u.prevPage),t=v(u.nextPage);d.extend(a,{getIndex:function(){return w},getClickIndex:function(){var g=a.getItems();return g.index(g.filter("."+u.activeClass))},getConf:function(){return u},getSize:function(){return a.getItems().size()},getPageAmount:function(){return Math.ceil(this.getSize()/u.size)},getPageIndex:function(){return Math.ceil(w/u.size)},getNaviButtons:function(){return B.add(z).add(A).add(t)},getRoot:function(){return s},getItemWrap:function(){return C},getItems:function(){return C.children(u.item)},getVisibleItems:function(){return a.getItems().slice(w,w+u.size)},seekTo:function(m,h,l){if(m<0){m=0}if(w===m){return a}if(d.isFunction(h)){l=h}if(m>a.getSize()-u.size){return u.loop?a.begin():this.end()}var k=a.getItems().eq(m);if(!k.length){return a}var j=d.Event("onBeforeSeek");c.trigger(j,[m]);if(j.isDefaultPrevented()){return a}if(h===undefined||d.isFunction(h)){h=u.speed}function g(){if(l){l.call(a,m)}c.trigger("onSeek",[m])}if(D){C.animate({left:-k.position().left},h,u.easing,g)}else{C.animate({top:-k.position().top},h,u.easing,g)}f=a;w=m;j=d.Event("onStart");c.trigger(j,[m]);if(j.isDefaultPrevented()){return a}B.add(A).toggleClass(u.disabledClass,m===0);z.add(t).toggleClass(u.disabledClass,m>=a.getSize()-u.size);return a},move:function(g,h,j){y=g>0;return this.seekTo(w+g,h,j)},next:function(g,h){return this.move(1,g,h)},prev:function(g,h){return this.move(-1,g,h)},movePage:function(g,h,j){y=g>0;var l=u.size*g;var k=w%u.size;if(k>0){l+=(g>0?-k:u.size-k)}return this.move(l,h,j)},prevPage:function(g,h){return this.movePage(-1,g,h)},nextPage:function(g,h){return this.movePage(1,g,h)},setPage:function(h,g,j){return this.seekTo(h*u.size,g,j)},begin:function(g,h){y=false;return this.seekTo(0,g,h)},end:function(h,j){y=true;var g=this.getSize()-u.size;return g>0?this.seekTo(g,h,j):a},reload:function(){c.trigger("onReload");return a},focus:function(){f=a;return a},click:function(k){var j=a.getItems().eq(k),m=u.activeClass,l=u.size;if(k<0||k>=a.getSize()){return a}if(l==1){if(u.loop){return a.next()}if(k===0||k==a.getSize()-1){y=(y===undefined)?true:!y}return y===false?a.prev():a.next()}if(l==2){if(k==w){k--}a.getItems().removeClass(m);j.addClass(m);return a.seekTo(k,time,fn)}if(!j.hasClass(m)){a.getItems().removeClass(m);j.addClass(m);var g=Math.floor(l/2);var h=k-g;if(h>a.getSize()-l){h=a.getSize()-l}if(h!==k){return a.seekTo(h)}}return a},bind:function(h,g){c.bind(h,g);return a},unbind:function(g){c.unbind(g);return a}});d.each("onBeforeSeek,onStart,onSeek,onReload".split(","),function(h,g){a[g]=function(j){return a.bind(g,j)}});B.addClass(u.disabledClass).click(function(){a.prev()});z.click(function(){a.next()});t.click(function(){a.nextPage()});if(a.getSize()<u.size){z.add(t).addClass(u.disabledClass)}A.addClass(u.disabledClass).click(function(){a.prevPage()});var x=u.hoverClass,b="keydown."+Math.random().toString().substring(10);a.onReload(function(){if(x){a.getItems().hover(function(){d(this).addClass(x)},function(){d(this).removeClass(x)})}if(u.clickable){a.getItems().each(function(g){d(this).unbind("click.scrollable").bind("click.scrollable",function(h){if(d(h.target).is("a")){return}return a.click(g)})})}if(u.keyboard){d(document).unbind(b).bind(b,function(h){if(h.altKey||h.ctrlKey){return}if(u.keyboard!="static"&&f!=a){return}var g=u.keyboardSteps;if(D&&(h.keyCode==37||h.keyCode==39)){a.move(h.keyCode==37?-g:g);return h.preventDefault()}if(!D&&(h.keyCode==38||h.keyCode==40)){a.move(h.keyCode==38?-g:g);return h.preventDefault()}return true})}else{d(document).unbind(b)}});a.reload()}d.fn.scrollable=function(c){var b=this.eq(typeof c=="number"?c:0).data("scrollable");if(b){return b}var a=d.extend({},d.tools.scrollable.conf);c=d.extend(a,c);c.keyboardSteps=c.keyboardSteps||c.size;this.each(function(){b=new e(d(this),c);d(this).data("scrollable",b)});return c.api?b:this}})(jQuery);(function(c){var d=c.tools.scrollable;d.plugins=d.plugins||{};d.plugins.circular={version:"0.5.1",conf:{api:false,clonedClass:"cloned"}};c.fn.circular=function(a){var b=c.extend({},d.plugins.circular.conf),f;c.extend(b,a);this.each(function(){var s=c(this).scrollable(),e=s.getItems(),q=s.getConf(),v=s.getItemWrap(),r=0;if(s){f=s}if(e.length<q.size){return false}e.slice(0,q.size).each(function(g){c(this).clone().appendTo(v).click(function(){s.click(e.length+g)}).addClass(b.clonedClass)});var p=c.makeArray(e.slice(-q.size)).reverse();c(p).each(function(g){c(this).clone().prependTo(v).click(function(){s.click(-g-1)}).addClass(b.clonedClass)});var o=v.children(q.item);var t=q.hoverClass;if(t){o.hover(function(){c(this).addClass(t)},function(){c(this).removeClass(t)})}function u(h){var g=o.eq(h);if(q.vertical){v.css({top:-g.position().top})}else{v.css({left:-g.position().left})}}u(q.size);c.extend(s,{move:function(j,k,m,l){var g=r+j+q.size;var h=g>s.getSize()-q.size;if(g<=0||h){var n=r+q.size+(h?-e.length:e.length);u(n);g=n+j}if(l){o.removeClass(q.activeClass).eq(g+Math.floor(q.size/2)).addClass(q.activeClass)}if(g===r+q.size){return self}return s.seekTo(g,k,m)},begin:function(g,h){return this.seekTo(q.size,g,h)},end:function(g,h){return this.seekTo(e.length,g,h)},click:function(k,h,j){if(!q.clickable){return self}if(q.size==1){return this.next()}var g=k-r,l=q.activeClass;g-=Math.floor(q.size/2);return this.move(g,h,j,true)},getIndex:function(){return r},setPage:function(h,g,j){return this.seekTo(h*q.size+q.size,g,j)},getPageAmount:function(){return Math.ceil(e.length/q.size)},getPageIndex:function(){if(r<0){return this.getPageAmount()-1}if(r>=e.length){return 0}var g=(r+q.size)/q.size-1;return g},getVisibleItems:function(){var g=r+q.size;return o.slice(g,g+q.size)}});s.onStart(function(g,h){r=h-q.size;return false});s.getNaviButtons().removeClass(q.disabledClass)});return b.api?f:this}})(jQuery);(function(c){var d=c.tools.scrollable;d.plugins=d.plugins||{};d.plugins.autoscroll={version:"1.0.1",conf:{autoplay:true,interval:3000,autopause:true,steps:1,api:false}};c.fn.autoscroll=function(b){if(typeof b=="number"){b={interval:b}}var a=c.extend({},d.plugins.autoscroll.conf),f;c.extend(a,b);this.each(function(){var k=c(this).scrollable();if(k){f=k}var e,l,j=true;k.play=function(){if(e){return}j=false;e=setInterval(function(){k.move(a.steps)},a.interval);k.move(a.steps)};k.pause=function(){e=clearInterval(e)};k.stop=function(){k.pause();j=true};if(a.autopause){k.getRoot().add(k.getNaviButtons()).hover(function(){k.pause();clearInterval(l)},function(){if(!j){l=setTimeout(k.play,a.interval)}})}if(a.autoplay){setTimeout(k.play,a.interval)}});return a.api?f:this}})(jQuery);(function(c){var d=c.tools.scrollable;d.plugins=d.plugins||{};d.plugins.navigator={version:"1.0.2",conf:{navi:".navi",naviItem:null,activeClass:"active",indexed:false,api:false,idPrefix:null}};c.fn.navigator=function(b){var a=c.extend({},d.plugins.navigator.conf),f;if(typeof b=="string"){b={navi:b}}b=c.extend(a,b);this.each(function(){var o=c(this).scrollable(),r=o.getRoot(),e=r.data("finder").call(null,b.navi),q=null,m=o.getNaviButtons();if(o){f=o}o.getNaviButtons=function(){return m.add(e)};function n(){if(!e.children().length||e.data("navi")==o){e.empty();e.data("navi",o);for(var g=0;g<o.getPageAmount();g++){e.append(c("<"+(b.naviItem||"a")+"/>"))}q=e.children().each(function(j){var h=c(this);h.click(function(k){o.setPage(j);return k.preventDefault()});if(b.indexed){h.text(j)}if(b.idPrefix){h.attr("id",b.idPrefix+j)}})}else{q=b.naviItem?e.find(b.naviItem):e.children();q.each(function(j){var h=c(this);h.click(function(k){o.setPage(j);return k.preventDefault()})})}q.eq(0).addClass(b.activeClass)}o.onStart(function(h,j){var g=b.activeClass;q.removeClass(g).eq(o.getPageIndex()).addClass(g)});o.onReload(function(){n()});n();var p=q.filter("[href="+location.hash+"]");if(p.length){o.move(q.index(p))}});return b.api?f:this}})(jQuery);(function(e){e.fn.wheel=function(a){return this[a?"bind":"trigger"]("wheel",a)};e.event.special.wheel={setup:function(){e.event.add(this,g,h,{})},teardown:function(){e.event.remove(this,g,h)}};var g=!e.browser.mozilla?"mousewheel":"DOMMouseScroll"+(e.browser.version<"1.9"?" mousemove":"");function h(a){switch(a.type){case"mousemove":return e.extend(a.data,{clientX:a.clientX,clientY:a.clientY,pageX:a.pageX,pageY:a.pageY});case"DOMMouseScroll":e.extend(a,a.data);a.delta=-a.detail/3;break;case"mousewheel":a.delta=a.wheelDelta/120;break}a.type="wheel";return e.event.handle.call(this,a,a.delta)}var f=e.tools.scrollable;f.plugins=f.plugins||{};f.plugins.mousewheel={version:"1.0.1",conf:{api:false,speed:50}};e.fn.mousewheel=function(b){var a=e.extend({},f.plugins.mousewheel.conf),c;if(typeof b=="number"){b={speed:b}}b=e.extend(a,b);this.each(function(){var d=e(this).scrollable();if(d){c=d}d.getRoot().wheel(function(l,k){d.move(k<0?1:-1,b.speed||50);return false})});return b.api?c:this}})(jQuery);(function(h){h.tools=h.tools||{};h.tools.overlay={version:"1.1.2",addEffect:function(c,b,a){e[c]=[b,a]},conf:{top:"10%",left:"center",absolute:false,speed:"normal",closeSpeed:"fast",effect:"default",close:null,oneInstance:true,closeOnClick:true,closeOnEsc:true,api:false,expose:null,target:null}};var e={};h.tools.overlay.addEffect("default",function(a){this.getOverlay().fadeIn(this.getConf().speed,a)},function(a){this.getOverlay().fadeOut(this.getConf().closeSpeed,a)});var g=[];function f(t,p){var a=this,c=h(this),b=h(window),q,r,s,v=p.expose&&h.tools.expose.version;var u=p.target||t.attr("rel");r=u?h(u):null||t;if(!r.length){throw"Could not find Overlay: "+u}if(t&&t.index(r)==-1){t.click(function(j){a.load(j);return j.preventDefault()})}h.each(p,function(k,j){if(h.isFunction(j)){c.bind(k,j)}});h.extend(a,{load:function(j){if(a.isOpened()){return a}var m=e[p.effect];if(!m){throw'Overlay: cannot find effect : "'+p.effect+'"'}if(p.oneInstance){h.each(g,function(){this.close(j)})}j=j||h.Event();j.type="onBeforeLoad";c.trigger(j);if(j.isDefaultPrevented()){return a}s=true;if(v){r.expose().load(j)}var k=p.top;var l=p.left;var o=r.outerWidth({margin:true});var n=r.outerHeight({margin:true});if(typeof k=="string"){k=k=="center"?Math.max((b.height()-n)/2,0):parseInt(k,10)/100*b.height()}if(l=="center"){l=Math.max((b.width()-o)/2,0)}if(!p.absolute){k+=b.scrollTop();l+=b.scrollLeft()}r.css({top:k,left:l,position:"absolute"});j.type="onStart";c.trigger(j);m[0].call(a,function(){if(s){j.type="onLoad";c.trigger(j)}});if(p.closeOnClick){h(document).bind("click.overlay",function(x){if(!a.isOpened()){return}var y=h(x.target);if(y.parents(r).length>1){return}h.each(g,function(){this.close(x)})})}if(p.closeOnEsc){h(document).unbind("keydown.overlay").bind("keydown.overlay",function(w){if(w.keyCode==27){h.each(g,function(){this.close(w)})}})}return a},close:function(j){if(!a.isOpened()){return a}j=j||h.Event();j.type="onBeforeClose";c.trigger(j);if(j.isDefaultPrevented()){return}s=false;e[p.effect][1].call(a,function(){j.type="onClose";c.trigger(j)});var k=true;h.each(g,function(){if(this.isOpened()){k=false}});if(k){h(document).unbind("click.overlay").unbind("keydown.overlay")}return a},getContent:function(){return r},getOverlay:function(){return r},getTrigger:function(){return t},getClosers:function(){return q},isOpened:function(){return s},getConf:function(){return p},bind:function(k,j){c.bind(k,j);return a},unbind:function(j){c.unbind(j);return a}});h.each("onBeforeLoad,onStart,onLoad,onBeforeClose,onClose".split(","),function(k,j){a[j]=function(l){return a.bind(j,l)}});if(v){if(typeof p.expose=="string"){p.expose={color:p.expose}}h.extend(p.expose,{api:true,closeOnClick:p.closeOnClick,closeOnEsc:false});var d=r.expose(p.expose);d.onBeforeClose(function(j){a.close(j)});a.onClose(function(j){d.close(j)})}q=r.find(p.close||".close");if(!q.length&&!p.close){q=h('<div class="close"></div>');r.prepend(q)}q.click(function(j){a.close(j)})}h.fn.overlay=function(c){var b=this.eq(typeof c=="number"?c:0).data("overlay");if(b){return b}if(h.isFunction(c)){c={onBeforeLoad:c}}var a=h.extend({},h.tools.overlay.conf);c=h.extend(true,a,c);this.each(function(){b=new f(h(this),c);g.push(b);h(this).data("overlay",b)});return c.api?b:this}})(jQuery);(function(c){var d=c.tools.overlay;d.plugins=d.plugins||{};d.plugins.gallery={version:"1.0.0",conf:{imgId:"img",next:".next",prev:".prev",info:".info",progress:".progress",disabledClass:"disabled",activeClass:"active",opacity:0.8,speed:"slow",template:"<strong>${title}</strong> <span>Image ${index} of ${total}</span>",autohide:true,preload:true,api:false}};c.fn.gallery=function(E){var u=c.extend({},d.plugins.gallery.conf),w;c.extend(u,E);w=this.overlay();var a=this,z=w.getOverlay(),y=z.find(u.next),B=z.find(u.prev),D=z.find(u.info),F=z.find(u.progress),A=B.add(y).add(D).css({opacity:u.opacity}),G=w.getClosers(),x;function t(f){F.fadeIn();A.hide();G.hide();var g=f.attr("href");var e=new Image();e.onload=function(){F.fadeOut();var n=c("#"+u.imgId,z);if(!n.length){n=c("<img/>").attr("id",u.imgId).css("visibility","hidden");z.prepend(n)}n.attr("src",g).css("visibility","hidden");var l=e.width;var j=(c(window).width()-l)/2;x=a.index(a.filter("[href="+g+"]"));a.removeClass(u.activeClass).eq(x).addClass(u.activeClass);var k=u.disabledClass;A.removeClass(k);if(x===0){B.addClass(k)}if(x==a.length-1){y.addClass(k)}var m=u.template.replace("${title}",f.attr("title")||f.data("title")).replace("${index}",x+1).replace("${total}",a.length);var h=parseInt(D.css("paddingLeft"),10)+parseInt(D.css("paddingRight"),10);D.html(m).css({width:l-h});z.animate({width:l,height:e.height,left:j},u.speed,function(){n.hide().css("visibility","visible").fadeIn(function(){if(!u.autohide){A.fadeIn();G.show()}})})};e.onerror=function(){z.fadeIn().html("Cannot find image "+g)};e.src=g;if(u.preload){a.filter(":eq("+(x-1)+"), :eq("+(x+1)+")").each(function(){var h=new Image();h.src=c(this).attr("href")})}}function C(f,e){f.click(function(){if(f.hasClass(u.disabledClass)){return}var g=a.eq(i=x+(e?1:-1));if(g.length){t(g)}})}C(y,true);C(B);c(document).keydown(function(f){if(!z.is(":visible")||f.altKey||f.ctrlKey){return}if(f.keyCode==37||f.keyCode==39){var e=f.keyCode==37?B:y;e.click();return f.preventDefault()}return true});function b(){if(!z.is(":animated")){A.show();G.show()}}if(u.autohide){z.hover(b,function(){A.fadeOut();G.hide()}).mousemove(b)}var v;this.each(function(){var e=c(this),f=c(this).overlay(),g=f;f.onBeforeLoad(function(){t(e)});f.onClose(function(){a.removeClass(u.activeClass)})});return u.api?v:this}})(jQuery);(function(j){var f=j.tools.overlay;f.effects=f.effects||{};f.effects.apple={version:"1.0.1"};j.extend(f.conf,{start:{absolute:true,top:null,left:null},fadeInSpeed:"fast",zIndex:9999});function k(b){var a=b.offset();return[a.top+b.height()/2,a.left+b.width()/2]}var h=function(d){var s=this.getOverlay(),x=this.getConf(),u=this.getTrigger(),b=this,a=s.outerWidth({margin:true}),e=s.data("img");if(!e){var p=s.css("backgroundImage");if(!p){throw"background-image CSS property not set for overlay"}p=p.substring(p.indexOf("(")+1,p.indexOf(")")).replace(/\"/g,"");s.css("backgroundImage","none");e=j('<img src="'+p+'"/>');e.css({border:0,position:"absolute",display:"none"}).width(a);j("body").append(e);s.data("img",e)}var c=j(window),t=x.start.top||Math.round(c.height()/2),v=x.start.left||Math.round(c.width()/2);if(u){var w=k(u);t=w[0];v=w[1]}if(!x.start.absolute){t+=c.scrollTop();v+=c.scrollLeft()}e.css({top:t,left:v,width:0,zIndex:x.zIndex}).show();e.animate({top:s.css("top"),left:s.css("left"),width:a},x.speed,function(){s.css("zIndex",x.zIndex+1).fadeIn(x.fadeInSpeed,function(){if(b.isOpened()&&!j(this).index(s)){d.call()}else{s.hide()}})})};var g=function(n){var e=this.getOverlay(),d=this.getConf(),m=this.getTrigger(),a=d.start.top,b=d.start.left;e.hide();if(m){var c=k(m);a=c[0];b=c[1]}e.data("img").animate({top:a,left:b,width:0},d.closeSpeed,n)};f.addEffect("apple",h,g)})(jQuery);(function(d){d.tools=d.tools||{};d.tools.expose={version:"1.0.5",conf:{maskId:null,loadSpeed:"slow",closeSpeed:"fast",closeOnClick:true,closeOnEsc:true,zIndex:9998,opacity:0.8,color:"#456",api:false}};function e(){if(d.browser.msie){var a=d(document).height(),b=d(window).height();return[window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,a-b<20?b:a]}return[d(window).width(),d(document).height()]}function f(c,k){var m=this,a=d(this),n=null,l=false,b=0;d.each(k,function(h,g){if(d.isFunction(g)){a.bind(h,g)}});d(window).resize(function(){m.fit()});d.extend(this,{getMask:function(){return n},getExposed:function(){return c},getConf:function(){return k},isLoaded:function(){return l},load:function(o){if(l){return m}b=c.eq(0).css("zIndex");if(k.maskId){n=d("#"+k.maskId)}if(!n||!n.length){var h=e();n=d("<div/>").css({position:"absolute",top:0,left:0,width:h[0],height:h[1],display:"none",opacity:0,zIndex:k.zIndex});if(k.maskId){n.attr("id",k.maskId)}d("body").append(n);var j=n.css("backgroundColor");if(!j||j=="transparent"||j=="rgba(0, 0, 0, 0)"){n.css("backgroundColor",k.color)}if(k.closeOnEsc){d(document).bind("keydown.unexpose",function(p){if(p.keyCode==27){m.close()}})}if(k.closeOnClick){n.bind("click.unexpose",function(p){m.close(p)})}}o=o||d.Event();o.type="onBeforeLoad";a.trigger(o);if(o.isDefaultPrevented()){return m}d.each(c,function(){var p=d(this);if(!/relative|absolute|fixed/i.test(p.css("position"))){p.css("position","relative")}});c.css({zIndex:Math.max(k.zIndex+1,b=="auto"?0:b)});var g=n.height();if(!this.isLoaded()){n.css({opacity:0,display:"block"}).fadeTo(k.loadSpeed,k.opacity,function(){if(n.height()!=g){n.css("height",g)}o.type="onLoad";a.trigger(o)})}l=true;return m},close:function(g){if(!l){return m}g=g||d.Event();g.type="onBeforeClose";a.trigger(g);if(g.isDefaultPrevented()){return m}n.fadeOut(k.closeSpeed,function(){g.type="onClose";a.trigger(g);c.css({zIndex:d.browser.msie?b:null})});l=false;return m},fit:function(){if(n){var g=e();n.css({width:g[0],height:g[1]})}},bind:function(h,g){a.bind(h,g);return m},unbind:function(g){a.unbind(g);return m}});d.each("onBeforeLoad,onLoad,onBeforeClose,onClose".split(","),function(h,g){m[g]=function(j){return m.bind(g,j)}})}d.fn.expose=function(c){var b=this.eq(typeof c=="number"?c:0).data("expose");if(b){return b}if(typeof c=="string"){c={color:c}}var a=d.extend({},d.tools.expose.conf);c=d.extend(a,c);this.each(function(){b=new f(d(this),c);d(this).data("expose",b)});return c.api?b:this}})(jQuery);(function(){function v(a){console.log("$f.fireEvent",[].slice.call(a))}function r(a){if(!a||typeof a!="object"){return a}var c=new a.constructor();for(var b in a){if(a.hasOwnProperty(b)){c[b]=r(a[b])}}return c}function p(a,d){if(!a){return}var f,e=0,c=a.length;if(c===undefined){for(f in a){if(d.call(a[f],f,a[f])===false){break}}}else{for(var b=a[0];e<c&&d.call(b,e,b)!==false;b=a[++e]){}}return a}function z(a){return document.getElementById(a)}function t(a,b,c){if(typeof b!="object"){return a}if(a&&b){p(b,function(e,d){if(!c||typeof d!="function"){a[e]=d}})}return a}function o(a){var c=a.indexOf(".");if(c!=-1){var d=a.substring(0,c)||"*";var e=a.substring(c+1,a.length);var b=[];p(document.getElementsByTagName(d),function(){if(this.className&&this.className.indexOf(e)!=-1){b.push(this)}});return b}}function w(a){a=a||window.event;if(a.preventDefault){a.stopPropagation();a.preventDefault()}else{a.returnValue=false;a.cancelBubble=true}return false}function s(a,c,b){a[c]=a[c]||[];a[c].push(b)}function x(){return"_"+(""+Math.random()).substring(2,10)}var u=function(b,d,c){var e=this;var f={};var a={};e.index=d;if(typeof b=="string"){b={url:b}}t(this,b,true);p(("Begin*,Start,Pause*,Resume*,Seek*,Stop*,Finish*,LastSecond,Update,BufferFull,BufferEmpty,BufferStop").split(","),function(){var j="on"+this;if(j.indexOf("*")!=-1){j=j.substring(0,j.length-1);var h="onBefore"+j.substring(2);e[h]=function(k){s(a,h,k);return e}}e[j]=function(k){s(a,j,k);return e};if(d==-1){if(e[h]){c[h]=e[h]}if(e[j]){c[j]=e[j]}}});t(this,{onCuepoint:function(h,j){if(arguments.length==1){f.embedded=[null,h];return e}if(typeof h=="number"){h=[h]}var k=x();f[k]=[h,j];if(c.isLoaded()){c._api().fp_addCuepoints(h,d,k)}return e},update:function(j){t(e,j);if(c.isLoaded()){c._api().fp_updateClip(j,d)}var k=c.getConfig();var h=(d==-1)?k.clip:k.playlist[d];t(h,j,true)},_fireEvent:function(l,n,k,j){if(l=="onLoad"){p(f,function(E,D){if(D[0]){c._api().fp_addCuepoints(D[0],d,E)}});return false}j=j||e;if(l=="onCuepoint"){var m=f[n];if(m){return m[1].call(c,j,k)}}if(n&&"onBeforeBegin,onMetaData,onStart,onUpdate,onResume".indexOf(l)!=-1){t(j,n);if(n.metaData){if(!j.duration){j.duration=n.metaData.duration}else{j.fullDuration=n.metaData.duration}}}var h=true;p(a[l],function(){h=this.call(c,j,n,k)});return h}});if(b.onCuepoint){var g=b.onCuepoint;e.onCuepoint.apply(e,typeof g=="function"?[g]:g);delete b.onCuepoint}p(b,function(j,h){if(typeof h=="function"){s(a,j,h);delete b[j]}});if(d==-1){c.onCuepoint=this.onCuepoint}};var q=function(f,d,e,b){var c={};var g=this;var a=false;if(b){t(c,b)}p(d,function(j,h){if(typeof h=="function"){c[j]=h;delete d[j]}});t(this,{animate:function(m,l,h){if(!m){return g}if(typeof l=="function"){h=l;l=500}if(typeof m=="string"){var j=m;m={};m[j]=l;l=500}if(h){var k=x();c[k]=h}if(l===undefined){l=500}d=e._api().fp_animate(f,m,l,k);return g},css:function(j,h){if(h!==undefined){var k={};k[j]=h;j=k}d=e._api().fp_css(f,j);t(g,d);return g},show:function(){this.display="block";e._api().fp_showPlugin(f);return g},hide:function(){this.display="none";e._api().fp_hidePlugin(f);return g},toggle:function(){this.display=e._api().fp_togglePlugin(f);return g},fadeTo:function(l,h,j){if(typeof h=="function"){j=h;h=500}if(j){var k=x();c[k]=j}this.display=e._api().fp_fadeTo(f,l,h,k);this.opacity=l;return g},fadeIn:function(h,j){return g.fadeTo(1,h,j)},fadeOut:function(h,j){return g.fadeTo(0,h,j)},getName:function(){return f},getPlayer:function(){return e},_fireEvent:function(j,k,h){if(j=="onUpdate"){var m=e._api().fp_getPlugin(f);if(!m){return}t(g,m);delete g.methods;if(!a){p(m.methods,function(){var n=""+this;g[n]=function(){var E=[].slice.call(arguments);var D=e._api().fp_invoke(f,n,E);return D==="undefined"||D===undefined?g:D}});a=true}}var l=c[j];if(l){l.apply(g,k);if(j.substring(0,1)=="_"){delete c[j]}}}})};function A(h,G,j){var I=this,k=null,l,F,f=[],H={},e={},b,n,m,a,g,d;t(I,{id:function(){return b},isLoaded:function(){return(k!==null)},getParent:function(){return h},hide:function(C){if(C){h.style.height="0px"}if(k){k.style.height="0px"}return I},show:function(){h.style.height=d+"px";if(k){k.style.height=g+"px"}return I},isHidden:function(){return k&&parseInt(k.style.height,10)===0},load:function(C){if(!k&&I._fireEvent("onBeforeLoad")!==false){p(B,function(){this.unload()});l=h.innerHTML;if(l&&!flashembed.isSupported(G.version)){h.innerHTML=""}flashembed(h,G,{config:j});if(C){C.cached=true;s(e,"onLoad",C)}}return I},unload:function(){if(l.replace(/\s/g,"")!==""){if(I._fireEvent("onBeforeUnload")===false){return I}try{if(k){k.fp_close()}}catch(C){}k=null;h.innerHTML=l;I._fireEvent("onUnload")}return I},getClip:function(C){if(C===undefined){C=a}return f[C]},getCommonClip:function(){return F},getPlaylist:function(){return f},getPlugin:function(E){var C=H[E];if(!C&&I.isLoaded()){var D=I._api().fp_getPlugin(E);if(D){C=new q(E,D,I);H[E]=C}}return C},getScreen:function(){return I.getPlugin("screen")},getControls:function(){return I.getPlugin("controls")},getConfig:function(C){return C?r(j):j},getFlashParams:function(){return G},loadPlugin:function(M,N,D,E){if(typeof D=="function"){E=D;D={}}var O=E?x():"_";I._api().fp_loadPlugin(M,N,D,O);var P={};P[O]=E;var C=new q(M,null,I,P);H[M]=C;return C},getState:function(){return k?k.fp_getState():-1},play:function(D,E){function C(){if(D!==undefined){I._api().fp_play(D,E)}else{I._api().fp_play()}}if(k){C()}else{I.load(function(){C()})}return I},getVersion:function(){var C="flowplayer.js 3.1.4";if(k){var D=k.fp_getVersion();D.push(C);return D}return C},_api:function(){if(!k){throw"Flowplayer "+I.id()+" not loaded when calling an API method"}return k},setClip:function(C){I.setPlaylist([C]);return I},getIndex:function(){return m}});p(("Click*,Load*,Unload*,Keypress*,Volume*,Mute*,Unmute*,PlaylistReplace,ClipAdd,Fullscreen*,FullscreenExit,Error,MouseOver,MouseOut").split(","),function(){var D="on"+this;if(D.indexOf("*")!=-1){D=D.substring(0,D.length-1);var C="onBefore"+D.substring(2);I[C]=function(E){s(e,C,E);return I}}I[D]=function(E){s(e,D,E);return I}});p(("pause,resume,mute,unmute,stop,toggle,seek,getStatus,getVolume,setVolume,getTime,isPaused,isPlaying,startBuffering,stopBuffering,isFullscreen,toggleFullscreen,reset,close,setPlaylist,addClip,playFeed").split(","),function(){var C=this;I[C]=function(E,J){if(!k){return I}var D=null;if(E!==undefined&&J!==undefined){D=k["fp_"+C](E,J)}else{D=(E===undefined)?k["fp_"+C]():k["fp_"+C](E)}return D==="undefined"||D===undefined?I:D}});I._fireEvent=function(D){if(typeof D=="string"){D=[D]}var C=D[0],Q=D[1],S=D[2],T=D[3],U=0;if(j.debug){v(D)}if(!k&&C=="onLoad"&&Q=="player"){k=k||z(n);g=k.clientHeight;p(f,function(){this._fireEvent("onLoad")});p(H,function(K,J){J._fireEvent("onUpdate")});F._fireEvent("onLoad")}if(C=="onLoad"&&Q!="player"){return}if(C=="onError"){if(typeof Q=="string"||(typeof Q=="number"&&typeof S=="number")){Q=S;S=T}}if(C=="onContextMenu"){p(j.contextMenu[Q],function(K,J){J.call(I)});return}if(C=="onPluginEvent"){var X=Q.name||Q;var W=H[X];if(W){W._fireEvent("onUpdate",Q);W._fireEvent(S,D.slice(3))}return}if(C=="onPlaylistReplace"){f=[];var R=0;p(Q,function(){f.push(new u(this,R++,I))})}if(C=="onClipAdd"){if(Q.isInStream){return}Q=new u(Q,S,I);f.splice(S,0,Q);for(U=S+1;U<f.length;U++){f[U].index++}}var E=true;if(typeof Q=="number"&&Q<f.length){a=Q;var V=f[Q];if(V){E=V._fireEvent(C,S,T)}if(!V||E!==false){E=F._fireEvent(C,S,T,V)}}p(e[C],function(){E=this.call(I,Q,S);if(this.cached){e[C].splice(U,1)}if(E===false){return false}U++});return E};function c(){if($f(h)){$f(h).getParent().innerHTML="";m=$f(h).getIndex();B[m]=I}else{B.push(I);m=B.length-1}d=parseInt(h.style.height,10)||h.clientHeight;if(typeof G=="string"){G={src:G}}b=h.id||"fp"+x();n=G.id||b+"_api";G.id=n;G.cachebusting=true;j.playerId=b;if(typeof j=="string"){j={clip:{url:j}}}if(typeof j.clip=="string"){j.clip={url:j.clip}}j.clip=j.clip||{};if(h.getAttribute("href",2)&&!j.clip.url){j.clip.url=h.getAttribute("href",2)}F=new u(j.clip,-1,I);j.playlist=j.playlist||[j.clip];var D=0;p(j.playlist,function(){var E=this;if(typeof E=="object"&&E.length){E={url:""+E}}p(j.clip,function(L,K){if(K!==undefined&&E[L]===undefined&&typeof K!="function"){E[L]=K}});j.playlist[D]=E;E=new u(E,D,I);f.push(E);D++});p(j,function(J,E){if(typeof E=="function"){if(F[J]){F[J](E)}else{s(e,J,E)}delete j[J]}});p(j.plugins,function(J,E){if(E){H[J]=new q(J,E,I)}});if(!j.plugins||j.plugins.controls===undefined){H.controls=new q("controls",null,I)}H.canvas=new q("canvas",null,I);G.bgcolor=G.bgcolor||"#000000";G.version=G.version||[9,0];G.expressInstall="http://www.flowplayer.org/swf/expressinstall.swf";function C(E){if(!I.isLoaded()&&I._fireEvent("onBeforeClick")!==false){I.load()}return w(E)}l=h.innerHTML;if(l.replace(/\s/g,"")!==""){if(h.addEventListener){h.addEventListener("click",C,false)}else{if(h.attachEvent){h.attachEvent("onclick",C)}}}else{if(h.addEventListener){h.addEventListener("click",w,false)}I.load()}}if(typeof h=="string"){flashembed.domReady(function(){var C=z(h);if(!C){throw"Flowplayer cannot access element: "+h}else{h=C;c()}})}else{c()}}var B=[];function y(a){this.length=a.length;this.each=function(b){p(a,b)};this.size=function(){return a.length}}window.flowplayer=window.$f=function(){var e=null;var f=arguments[0];if(!arguments.length){p(B,function(){if(this.isLoaded()){e=this;return false}});return e||B[0]}if(arguments.length==1){if(typeof f=="number"){return B[f]}else{if(f=="*"){return new y(B)}p(B,function(){if(this.id()==f.id||this.id()==f||this.getParent()==f){e=this;return false}});return e}}if(arguments.length>1){var c=arguments[1];var d=(arguments.length==3)?arguments[2]:{};if(typeof f=="string"){if(f.indexOf(".")!=-1){var a=[];p(o(f),function(){a.push(new A(this,r(c),r(d)))});return new y(a)}else{var b=z(f);return new A(b!==null?b:f,c,d)}}else{if(f){return new A(f,c,d)}}}return null};t(window.$f,{fireEvent:function(){var b=[].slice.call(arguments);var a=$f(b[0]);return a?a._fireEvent(b.slice(1)):null},addPlugin:function(b,a){A.prototype[b]=a;return $f},each:p,extend:t});if(typeof jQuery=="function"){jQuery.prototype.flowplayer=function(a,b){if(!arguments.length||typeof arguments[0]=="number"){var c=[];this.each(function(){var d=$f(this);if(d){c.push(d)}});return arguments.length?c[arguments[0]]:new y(c)}return this.each(function(){$f(this,r(a),b?r(b):{})})}}})();(function(){var p=typeof jQuery=="function";var l={width:"100%",height:"100%",allowfullscreen:true,allowscriptaccess:"always",quality:"high",version:null,onFail:null,expressInstall:null,w3c:false,cachebusting:false};if(p){jQuery.tools=jQuery.tools||{};jQuery.tools.flashembed={version:"1.0.4",conf:l}}function k(){if(r.done){return false}var a=document;if(a&&a.getElementsByTagName&&a.getElementById&&a.body){clearInterval(r.timer);r.timer=null;for(var b=0;b<r.ready.length;b++){r.ready[b].call()}r.ready=null;r.done=true}}var r=p?jQuery:function(a){if(r.done){return a()}if(r.timer){r.ready.push(a)}else{r.ready=[a];r.timer=setInterval(k,13)}};function o(a,b){if(b){for(key in b){if(b.hasOwnProperty(key)){a[key]=b[key]}}}return a}function n(c){switch(m(c)){case"string":c=c.replace(new RegExp('(["\\\\])',"g"),"\\$1");c=c.replace(/^\s?(\d+)%/,"$1pct");return'"'+c+'"';case"array":return"["+s(c,function(d){return n(d)}).join(",")+"]";case"function":return'"function()"';case"object":var b=[];for(var a in c){if(c.hasOwnProperty(a)){b.push('"'+a+'":'+n(c[a]))}}return"{"+b.join(",")+"}"}return String(c).replace(/\s/g," ").replace(/\'/g,'"')}function m(a){if(a===null||a===undefined){return false}var b=typeof a;return(b=="object"&&a.push)?"array":b}if(window.attachEvent){window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){}})}function s(c,d){var a=[];for(var b in c){if(c.hasOwnProperty(b)){a[b]=d(c[b])}}return a}function t(e,c){var f=o({},e);var d=document.all;var h='<object width="'+f.width+'" height="'+f.height+'"';if(d&&!f.id){f.id="_"+(""+Math.random()).substring(9)}if(f.id){h+=' id="'+f.id+'"'}if(f.cachebusting){f.src+=((f.src.indexOf("?")!=-1?"&":"?")+Math.random())}if(f.w3c||!d){h+=' data="'+f.src+'" type="application/x-shockwave-flash"'}else{h+=' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'}h+=">";if(f.w3c||d){h+='<param name="movie" value="'+f.src+'" />'}f.width=f.height=f.id=f.w3c=f.src=null;for(var b in f){if(f[b]!==null){h+='<param name="'+b+'" value="'+f[b]+'" />'}}var g="";if(c){for(var a in c){if(c[a]!==null){g+=a+"="+(typeof c[a]=="object"?n(c[a]):c[a])+"&"}}g=g.substring(0,g.length-1);h+='<param name="flashvars" value=\''+g+"' />"}h+="</object>";return h}function q(a,f,b){var c=flashembed.getVersion();o(this,{getContainer:function(){return a},getConf:function(){return f},getVersion:function(){return c},getFlashvars:function(){return b},getApi:function(){return a.firstChild},getHTML:function(){return t(f,b)}});var e=f.version;var d=f.expressInstall;var g=!e||flashembed.isSupported(e);if(g){f.onFail=f.version=f.expressInstall=null;a.innerHTML=t(f,b)}else{if(e&&d&&flashembed.isSupported([6,65])){o(f,{src:d});b={MMredirectURL:location.href,MMplayerType:"PlugIn",MMdoctitle:document.title};a.innerHTML=t(f,b)}else{if(a.innerHTML.replace(/\s/g,"")!==""){}else{a.innerHTML="<h2>Flash version "+e+" or greater is required</h2><h3>"+(c[0]>0?"Your version is "+c:"You have no flash plugin installed")+"</h3>"+(a.tagName=="A"?"<p>Click here to download latest version</p>":"<p>Download latest version from <a href='http://www.adobe.com/go/getflashplayer'>here</a></p>");if(a.tagName=="A"){a.onclick=function(){location.href="http://www.adobe.com/go/getflashplayer"}}}}}if(!g&&f.onFail){var h=f.onFail.call(this);if(typeof h=="string"){a.innerHTML=h}}if(document.all){window[f.id]=document.getElementById(f.id)}}window.flashembed=function(b,a,c){if(typeof b=="string"){var e=document.getElementById(b);if(e){b=e}else{r(function(){flashembed(b,a,c)});return}}if(!b){return}if(typeof a=="string"){a={src:a}}var d=o({},l);o(d,a);return new q(b,d,c)};o(window.flashembed,{getVersion:function(){var a=[0,0];if(navigator.plugins&&typeof navigator.plugins["Shockwave Flash"]=="object"){var b=navigator.plugins["Shockwave Flash"].description;if(typeof b!="undefined"){b=b.replace(/^.*\s+(\S+\s+\S+$)/,"$1");var h=parseInt(b.replace(/^(.*)\..*$/,"$1"),10);var d=/r/.test(b)?parseInt(b.replace(/^.*r(.*)$/,"$1"),10):0;a=[h,d]}}else{if(window.ActiveXObject){try{var f=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(e){try{f=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");a=[6,0];f.AllowScriptAccess="always"}catch(c){if(a[0]==6){return a}}try{f=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(g){}}if(typeof f=="object"){b=f.GetVariable("$version");if(typeof b!="undefined"){b=b.replace(/^\S+\s+(.*)$/,"$1").split(",");a=[parseInt(b[0],10),parseInt(b[2],10)]}}}}return a},isSupported:function(c){var a=flashembed.getVersion();var b=(a[0]>c[0])||(a[0]==c[0]&&a[1]>=c[1]);return b},domReady:r,asString:n,getHTML:t});if(p){jQuery.fn.flashembed=function(b,c){var a=null;this.each(function(){a=flashembed(this,b,c)});return b.api===false?this:a}}})();$f.addPlugin("controls",function(k,a){function r(w){if(typeof w=="undefined"){w=window.event}if(typeof w.layerX=="undefined"){w.layerX=w.offsetX}if(typeof w.layerY=="undefined"){w.layerY=w.offsetY}return w}function m(w){return w.clientWidth}function d(w){return w.offsetLeft}function h(w,E,H,D){var I=false;function G(){}w.onDragStart=w.onDragStart||G;w.onDragEnd=w.onDragEnd||G;w.onDrag=w.onDrag||G;function B(J){if(J>H){return false}if(J<E){return false}w.style.left=J+"px";return true}function C(){document.onmousemove=null;document.onmouseup=null;w.onDragEnd(parseInt(w.style.left,10));I=false}function F(K){K=r(K);var J=K.clientX-D;if(B(J)){I=true;w.onDrag(J)}return false}w.onmousedown=function(J){J=r(J);w.onDragStart(parseInt(w.style.left,10));document.onmousemove=F;document.onmouseup=C;return false};this.dragTo=function(J){if(B(J)){w.onDragEnd(J)}};this.setMax=function(J){H=J};this.isDragging=function(){return I};return this}function x(B,w){if(w){for(key in w){if(key){B[key]=w[key]}}}}function u(w){var C=k.getElementsByTagName("*");var D=new RegExp("(^|\\s)"+w+"(\\s|$)");for(var B=0;B<C.length;B++){if(D.test(C[B].className)){return C[B]}}}function y(w){w=parseInt(w,10);return w>=10?w:"0"+w}function f(C){var B=Math.floor(C/3600);var w=Math.floor(C/60);C=C-(w*60);if(B>=1){w-=B*60;return y(B)+":"+y(w)+":"+y(C)}return y(w)+":"+y(C)}function z(B,w){return"<span>"+f(B)+"</span> <strong>"+f(w)+"</strong>"}var o=this;var n={playHeadClass:"playhead",trackClass:"track",playClass:"play",pauseClass:"pause",bufferClass:"buffer",progressClass:"progress",timeClass:"time",muteClass:"mute",unmuteClass:"unmute",duration:0,template:'<a class="play">play</a><div class="track"><div class="buffer"></div><div class="progress"></div><div class="playhead"></div></div><div class="time"></div><a class="mute">mute</a>'};x(n,a);if(typeof k=="string"){k=document.getElementById(k)}if(!k){return}if(!k.innerHTML.replace(/\s/g,"")){k.innerHTML=n.template}var s=u(n.playHeadClass);var v=u(n.bufferClass);var p=u(n.progressClass);var q=u(n.trackClass);var g=u(n.timeClass);var e=u(n.muteClass);g.innerHTML=z(0,n.duration);var j=m(q);var t=m(s);var c=new h(s,0,0,d(k)+d(q)+(t/2));q.onclick=function(w){w=r(w);if(w.target==s){return false}c.dragTo(w.layerX-t/2)};var A=u(n.playClass);A.onclick=function(){if(o.isLoaded()){o.toggle()}else{o.play()}};e.onclick=function(){if(o.getStatus().muted){o.unmute()}else{o.mute()}};var l=null;function b(w,B){return parseInt(Math.min(w/B*j,j-t/2),10)}o.onStart(function(w){var B=w.duration||0;clearInterval(l);l=setInterval(function(){var D=o.getStatus();if(D.time){g.innerHTML=z(D.time,w.duration)}if(D.time===undefined){clearInterval(l);return}var C=b(D.bufferEnd,B);v.style.width=C+"px";c.setMax(C);if(!o.isPaused()&&!c.isDragging()){C=b(D.time,B);p.style.width=C+"px";s.style.left=(C-t/2)+"px"}},500)});o.onBegin(function(){A.className=n.pauseClass});o.onPause(function(){A.className=n.playClass});o.onResume(function(){A.className=n.pauseClass});o.onMute(function(){e.className=n.unmuteClass});o.onUnmute(function(){e.className=n.muteClass});o.onFinish(function(w){clearInterval(l)});o.onUnload(function(){g.innerHTML=z(0,n.duration)});s.onDragEnd=function(w){var B=parseInt(w/j*100,10)+"%";p.style.width=w+"px";if(o.isLoaded()){o.seek(B)}};s.onDrag=function(w){p.style.width=w+"px"};return o});(function(b){$f.addPlugin("playlist",function(z,a){var p=this;var B={playingClass:"playing",pausedClass:"paused",progressClass:"progress",template:'<a href="${url}">${title}</a>',loop:false,playOnClick:true,manual:false};b.extend(B,a);z=b(z);var t=p.getPlaylist().length<=1||B.manual;var s=null;function y(c){var d=q;b.each(c,function(f,e){if(!b.isFunction(e)){d=d.replace("${"+f+"}",e).replace("$%7B"+f+"%7D",e)}});return d}function u(){s=z.children().unbind("click.playlist").bind("click.playlist",function(){return v(b(this),s.index(this))})}function A(){z.empty();b.each(p.getPlaylist(),function(){z.append(y(this))});u()}function v(d,c){if(d.hasClass(B.playingClass)||d.hasClass(B.pausedClass)){p.toggle()}else{d.addClass(B.progressClass);p.play(c)}return false}function r(){if(t){s=z.children()}s.removeClass(B.playingClass);s.removeClass(B.pausedClass);s.removeClass(B.progressClass)}function x(c){return(t)?s.filter("[href="+c.originalUrl+"]"):s.eq(c.index)}if(!t){var q=z.is(":empty")?B.template:z.html();A()}else{s=z.children();if(b.isFunction(s.live)){b(z.selector+"> *").live("click",function(){var c=b(this);return v(c,c.attr("href"))})}else{s.click(function(){var c=b(this);return v(c,c.attr("href"))})}var w=p.getClip(0);if(!w.url&&B.playOnClick){w.update({url:s.eq(0).attr("href")})}}p.onBegin(function(c){r();x(c).addClass(B.playingClass)});p.onPause(function(c){x(c).removeClass(B.playingClass).addClass(B.pausedClass)});p.onResume(function(c){x(c).removeClass(B.pausedClass).addClass(B.playingClass)});if(!B.loop&&!t){p.onBeforeFinish(function(c){if(!c.isInStream&&c.index<s.length-1){return false}})}if(t&&B.loop){p.onBeforeFinish(function(c){var d=x(c);if(d.next().length){d.next().click()}else{s.eq(0).click()}return false})}p.onUnload(function(){r()});if(!t){p.onPlaylistReplace(function(){A()})}p.onClipAdd(function(c,d){s.eq(d).before(y(c));u()});return p})})(jQuery);(function(){function a(b,c){if(b.substring(0,4)=="http"){return b}if(c){return c+(c.substring(c.length-1)!="/"?"/":"")+b}c=location.protocol+"//"+location.host;if(b.substring(0,1)=="/"){return c+b}var d=location.pathname;d=d.substring(0,d.lastIndexOf("/"));return c+d+"/"+b}$f.addPlugin("embed",function(d){var b=this;var c=b.getConfig(true);var e={width:b.getParent().clientWidth||"100%",height:b.getParent().clientHeight||"100%",url:a(b.getFlashParams().src),index:-1,allowfullscreen:true,allowscriptaccess:"always"};$f.extend(e,d);e.src=e.url;e.w3c=true;delete c.playerId;delete e.url;delete e.index;this.getEmbedCode=function(h,f){f=typeof f=="number"?f:e.index;if(f>=0){c.playlist=[b.getPlaylist()[f]]}f=0;$f.each(c.playlist,function(){c.playlist[f++].url=a(this.url,this.baseUrl)});var g=flashembed.getHTML(e,{config:c});if(!h){g=g.replace(/\</g,"&lt;").replace(/\>/g,"&gt;")}return g};return b})})();
