(function($){var trailing_whitespace=true;$.fn.truncate=function(options){var opts=$.extend({},$.fn.truncate.defaults,options);$(this).each(function(){var content_length=$.trim(squeeze($(this).text())).length;if(content_length<=opts.max_length)
return;var actual_max_length=opts.max_length-opts.more.length-4;var truncated_node=recursivelyTruncate(this,actual_max_length);var full_node=$(this).hide();truncated_node.insertAfter(full_node);findNodeForMore(truncated_node).append('...');findNodeForLess(full_node).append('');});}
$.fn.truncate.defaults={max_length:100,more:'…',less:''};function recursivelyTruncate(node,max_length){return(node.nodeType==3)?truncateText(node,max_length):truncateNode(node,max_length);}
function truncateNode(node,max_length){var node=$(node);var new_node=node.clone().empty();var truncatedChild;node.contents().each(function(){var remaining_length=max_length-new_node.text().length;if(remaining_length==0)return;truncatedChild=recursivelyTruncate(this,remaining_length);if(truncatedChild)new_node.append(truncatedChild);});return new_node;}
function truncateText(node,max_length){var text=squeeze(node.data);var text=$.trim(text.slice(0,max_length).replace(/\w+$/,''));text=$('<div/>').text(text).html();return text;}
function squeeze(string){return string.replace(/\s+/g,' ');}
function findNodeForMore(node){var $node=$(node);var last_child=$node.children(":last");if(!last_child)return node;var display=last_child.css('display');if(!display||display=='inline')return $node;return findNodeForMore(last_child);};function findNodeForLess(node){var $node=$(node);var last_child=$node.children(":last");if(last_child&&last_child.is('p'))return last_child;return node;};})(jQuery);;jQuery.easing['jswing']=jQuery.easing['swing'];jQuery.extend(jQuery.easing,{def:'easeOutQuad',swing:function(x,t,b,c,d){return jQuery.easing[jQuery.easing.def](x,t,b,c,d);},easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b;},easeOutQuad:function(x,t,b,c,d){return-c*(t/=d)*(t-2)+b;},easeInOutQuad:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*((--t)*(t-2)-1)+b;},easeInCubic:function(x,t,b,c,d){return c*(t/=d)*t*t+b;},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b;},easeInOutCubic:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t+b;return c/2*((t-=2)*t*t+2)+b;},easeInQuart:function(x,t,b,c,d){return c*(t/=d)*t*t*t+b;},easeOutQuart:function(x,t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b;},easeInOutQuart:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t+b;return-c/2*((t-=2)*t*t*t-2)+b;},easeInQuint:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b;},easeOutQuint:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b;},easeInOutQuint:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t*t+b;return c/2*((t-=2)*t*t*t*t+2)+b;},easeInSine:function(x,t,b,c,d){return-c*Math.cos(t/d*(Math.PI/2))+c+b;},easeOutSine:function(x,t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b;},easeInOutSine:function(x,t,b,c,d){return-c/2*(Math.cos(Math.PI*t/d)-1)+b;},easeInExpo:function(x,t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b;},easeOutExpo:function(x,t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b;},easeInOutExpo:function(x,t,b,c,d){if(t==0)return b;if(t==d)return b+c;if((t/=d/2)<1)return c/2*Math.pow(2,10*(t-1))+b;return c/2*(-Math.pow(2,-10*--t)+2)+b;},easeInCirc:function(x,t,b,c,d){return-c*(Math.sqrt(1-(t/=d)*t)-1)+b;},easeOutCirc:function(x,t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b;},easeInOutCirc:function(x,t,b,c,d){if((t/=d/2)<1)return-c/2*(Math.sqrt(1-t*t)-1)+b;return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b;},easeInElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;},easeOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b;},easeInOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d/2)==2)return b+c;if(!p)p=d*(.3*1.5);if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);if(t<1)return-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*.5+c+b;},easeInBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*(t/=d)*t*((s+1)*t-s)+b;},easeOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b;},easeInOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;if((t/=d/2)<1)return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b;},easeInBounce:function(x,t,b,c,d){return c-jQuery.easing.easeOutBounce(x,d-t,0,c,d)+b;},easeOutBounce:function(x,t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b;}else if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+.75)+b;}else if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b;}else{return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b;}},easeInOutBounce:function(x,t,b,c,d){if(t<d/2)return jQuery.easing.easeInBounce(x,t*2,0,c,d)*.5+b;return jQuery.easing.easeOutBounce(x,t*2-d,0,c,d)*.5+c*.5+b;}});;
/*
 * jQuery Tools v1.2.5 - The missing UI library for the Web
 * 
 * tabs/tabs.js
 * tabs/tabs.slideshow.js
 * toolbox/toolbox.history.js
 * 
 * NO COPYRIGHTS OR LICENSES. DO WHAT YOU LIKE.
 * 
 * http://flowplayer.org/tools/
 * 
 */
(function($){$.tools=$.tools||{version:'@VERSION'};$.tools.tabs={conf:{tabs:'a',current:'current',onBeforeClick:null,onClick:null,effect:'default',initialIndex:0,event:'click',rotate:false,history:false},addEffect:function(name,fn){effects[name]=fn}};var effects={'default':function(i,done){this.getPanes().hide().eq(i).show();done.call()},fade:function(i,done){var conf=this.getConf(),speed=conf.fadeOutSpeed,panes=this.getPanes();if(speed){panes.fadeOut(speed)}else{panes.hide()}panes.eq(i).fadeIn(conf.fadeInSpeed,done)},slide:function(i,done){this.getPanes().slideUp(200);this.getPanes().eq(i).slideDown(400,done)},ajax:function(i,done){this.getPanes().eq(0).load(this.getTabs().eq(i).attr("href"),done)}};var w;$.tools.tabs.addEffect("horizontal",function(i,done){if(!w){w=this.getPanes().eq(0).width()}this.getCurrentPane().animate({width:0},function(){$(this).hide()});this.getPanes().eq(i).animate({width:w},function(){$(this).show();done.call()})});function Tabs(root,paneSelector,conf){var self=this,trigger=root.add(this),tabs=root.find(conf.tabs),panes=paneSelector.jquery?paneSelector:root.children(paneSelector),current;if(!tabs.length){tabs=root.children()}if(!panes.length){panes=root.parent().find(paneSelector)}if(!panes.length){panes=$(paneSelector)}$.extend(this,{click:function(i,e){var tab=tabs.eq(i);if(typeof i=='string'&&i.replace("#","")){tab=tabs.filter("[href*="+i.replace("#","")+"]");i=Math.max(tabs.index(tab),0)}if(conf.rotate){var last=tabs.length-1;if(i<0){return self.click(last,e)}if(i>last){return self.click(0,e)}}if(!tab.length){if(current>=0){return self}i=conf.initialIndex;tab=tabs.eq(i)}if(i===current){return self}e=e||$.Event();e.type="onBeforeClick";trigger.trigger(e,[i]);if(e.isDefaultPrevented()){return}effects[conf.effect].call(self,i,function(){e.type="onClick";trigger.trigger(e,[i])});current=i;tabs.removeClass(conf.current);tab.addClass(conf.current);return self},getConf:function(){return conf},getTabs:function(){return tabs},getPanes:function(){return panes},getCurrentPane:function(){return panes.eq(current)},getCurrentTab:function(){return tabs.eq(current)},getIndex:function(){return current},next:function(){return self.click(current+1)},prev:function(){return self.click(current-1)},destroy:function(){tabs.unbind(conf.event).removeClass(conf.current);panes.find("a[href^=#]").unbind("click.T");return self}});$.each("onBeforeClick,onClick".split(","),function(i,name){if($.isFunction(conf[name])){$(self).bind(name,conf[name])}self[name]=function(fn){if(fn){$(self).bind(name,fn)}return self}});if(conf.history&&$.fn.history){$.tools.history.init(tabs);conf.event='history'}tabs.each(function(i){$(this).bind(conf.event,function(e){self.click(i,e);return e.preventDefault()})});panes.find("a[href^=#]").bind("click.T",function(e){self.click($(this).attr("href"),e)});if(location.hash&&conf.tabs=="a"&&root.find("[href="+location.hash+"]").length){self.click(location.hash)}else{if(conf.initialIndex===0||conf.initialIndex>0){self.click(conf.initialIndex)}}}$.fn.tabs=function(paneSelector,conf){var el=this.data("tabs");if(el){el.destroy();this.removeData("tabs")}if($.isFunction(conf)){conf={onBeforeClick:conf}}conf=$.extend({},$.tools.tabs.conf,conf);this.each(function(){el=new Tabs($(this),paneSelector,conf);$(this).data("tabs",el)});return conf.api?el:this}})(jQuery);(function($){var tool;tool=$.tools.tabs.slideshow={conf:{next:'.forward',prev:'.backward',disabledClass:'disabled',autoplay:false,autopause:true,interval:3000,clickable:true,api:false}};function Slideshow(root,conf){var self=this,fire=root.add(this),tabs=root.data("tabs"),timer,stopped=true;function find(query){var el=$(query);return el.length<2?el:root.parent().find(query)}var nextButton=find(conf.next).click(function(){tabs.next()});var prevButton=find(conf.prev).click(function(){tabs.prev()});$.extend(self,{getTabs:function(){return tabs},getConf:function(){return conf},play:function(){if(timer){return self}var e=$.Event("onBeforePlay");fire.trigger(e);if(e.isDefaultPrevented()){return self}timer=setInterval(tabs.next,conf.interval);stopped=false;fire.trigger("onPlay");return self},pause:function(){if(!timer){return self}var e=$.Event("onBeforePause");fire.trigger(e);if(e.isDefaultPrevented()){return self}timer=clearInterval(timer);fire.trigger("onPause");return self},stop:function(){self.pause();stopped=true}});$.each("onBeforePlay,onPlay,onBeforePause,onPause".split(","),function(i,name){if($.isFunction(conf[name])){$(self).bind(name,conf[name])}self[name]=function(fn){return $(self).bind(name,fn)}});if(conf.autopause){tabs.getTabs().add(nextButton).add(prevButton).add(tabs.getPanes()).hover(self.pause,function(){if(!stopped){self.play()}})}if(conf.autoplay){self.play()}if(conf.clickable){tabs.getPanes().click(function(){tabs.next()})}if(!tabs.getConf().rotate){var disabled=conf.disabledClass;if(!tabs.getIndex()){prevButton.addClass(disabled)}tabs.onBeforeClick(function(e,i){prevButton.toggleClass(disabled,!i);nextButton.toggleClass(disabled,i==tabs.getTabs().length-1)})}}$.fn.slideshow=function(conf){var el=this.data("slideshow");if(el){return el}conf=$.extend({},tool.conf,conf);this.each(function(){el=new Slideshow($(this),conf);$(this).data("slideshow",el)});return conf.api?el:this}})(jQuery);;(function($){$.tools=$.tools||{};$.tools.scrollable={version:'1.1.2',conf:{size:4,vertical:false,speed:400,keyboard:true,keyboardSteps:null,disabledClass:'disabled',hoverClass:null,clickable:false,activeClass:'active',easing:'swing',loop:false,items:'.items',item:null,prev:'.prev',next:'.next',prevPage:'.prevPage',nextPage:'.nextPage',api:false}};var current;function Scrollable(root,conf){var self=this,$self=$(this),horizontal=!conf.vertical,wrap=root.children(),index=0,forward;if(!current){current=self}$.each(conf,function(name,fn){if($.isFunction(fn)){$self.bind(name,fn)}});if(wrap.length>1){wrap=$(conf.items,root)}function find(query){var els=$(query);return conf.globalNav?els:root.parent().find(query)}root.data("finder",find);var prev=find(conf.prev),next=find(conf.next),prevPage=find(conf.prevPage),nextPage=find(conf.nextPage);$.extend(self,{getIndex:function(){return index},getClickIndex:function(){var items=self.getItems();return items.index(items.filter("."+conf.activeClass))},getConf:function(){return conf},getSize:function(){return self.getItems().size()},getPageAmount:function(){return Math.ceil(this.getSize()/conf.size)},getPageIndex:function(){return Math.ceil(index/conf.size)},getNaviButtons:function(){return prev.add(next).add(prevPage).add(nextPage)},getRoot:function(){return root},getItemWrap:function(){return wrap},getItems:function(){return wrap.children(conf.item)},getVisibleItems:function(){return self.getItems().slice(index,index+conf.size)},seekTo:function(i,time,fn){if(i<0){i=0}if(index===i){return self}if($.isFunction(time)){fn=time}if(i>self.getSize()-conf.size){return conf.loop?self.begin():this.end()}var item=self.getItems().eq(i);if(!item.length){return self}var e=$.Event("onBeforeSeek");$self.trigger(e,[i]);if(e.isDefaultPrevented()){return self}if(time===undefined||$.isFunction(time)){time=conf.speed}function callback(){if(fn){fn.call(self,i)}$self.trigger("onSeek",[i])}if(horizontal){wrap.animate({left:-item.position().left},time,conf.easing,callback)}else{wrap.animate({top:-item.position().top},time,conf.easing,callback)}current=self;index=i;e=$.Event("onStart");$self.trigger(e,[i]);if(e.isDefaultPrevented()){return self}prev.add(prevPage).toggleClass(conf.disabledClass,i===0);next.add(nextPage).toggleClass(conf.disabledClass,i>=self.getSize()-conf.size);return self},move:function(offset,time,fn){forward=offset>0;return this.seekTo(index+offset,time,fn)},next:function(time,fn){return this.move(1,time,fn)},prev:function(time,fn){return this.move(-1,time,fn)},movePage:function(offset,time,fn){forward=offset>0;var steps=conf.size*offset;var i=index%conf.size;if(i>0){steps+=(offset>0?-i:conf.size-i)}return this.move(steps,time,fn)},prevPage:function(time,fn){return this.movePage(-1,time,fn)},nextPage:function(time,fn){return this.movePage(1,time,fn)},setPage:function(page,time,fn){return this.seekTo(page*conf.size,time,fn)},begin:function(time,fn){forward=false;return this.seekTo(0,time,fn)},end:function(time,fn){forward=true;var to=this.getSize()-conf.size;return to>0?this.seekTo(to,time,fn):self},reload:function(){$self.trigger("onReload");return self},focus:function(){current=self;return self},click:function(i){var item=self.getItems().eq(i),klass=conf.activeClass,size=conf.size;if(i<0||i>=self.getSize()){return self}if(size==1){if(conf.loop){return self.next()}if(i===0||i==self.getSize()-1){forward=(forward===undefined)?true:!forward}return forward===false?self.prev():self.next()}if(size==2){if(i==index){i--}self.getItems().removeClass(klass);item.addClass(klass);return self.seekTo(i,time,fn)}if(!item.hasClass(klass)){self.getItems().removeClass(klass);item.addClass(klass);var delta=Math.floor(size/2);var to=i-delta;if(to>self.getSize()-size){to=self.getSize()-size}if(to!==i){return self.seekTo(to)}}return self},bind:function(name,fn){$self.bind(name,fn);return self},unbind:function(name){$self.unbind(name);return self}});$.each("onBeforeSeek,onStart,onSeek,onReload".split(","),function(i,ev){self[ev]=function(fn){return self.bind(ev,fn)}});prev.addClass(conf.disabledClass).click(function(){self.prev()});next.click(function(){self.next()});nextPage.click(function(){self.nextPage()});if(self.getSize()<conf.size){next.add(nextPage).addClass(conf.disabledClass)}prevPage.addClass(conf.disabledClass).click(function(){self.prevPage()});var hc=conf.hoverClass,keyId="keydown."+Math.random().toString().substring(10);self.onReload(function(){if(hc){self.getItems().hover(function(){$(this).addClass(hc)},function(){$(this).removeClass(hc)})}if(conf.clickable){self.getItems().each(function(i){$(this).unbind("click.scrollable").bind("click.scrollable",function(e){if($(e.target).is("a")){return}return self.click(i)})})}if(conf.keyboard){$(document).unbind(keyId).bind(keyId,function(evt){if(evt.altKey||evt.ctrlKey){return}if(conf.keyboard!='static'&&current!=self){return}var s=conf.keyboardSteps;if(horizontal&&(evt.keyCode==37||evt.keyCode==39)){self.move(evt.keyCode==37?-s:s);return evt.preventDefault()}if(!horizontal&&(evt.keyCode==38||evt.keyCode==40)){self.move(evt.keyCode==38?-s:s);return evt.preventDefault()}return true})}else{$(document).unbind(keyId)}});self.reload()}$.fn.scrollable=function(conf){var el=this.eq(typeof conf=='number'?conf:0).data("scrollable");if(el){return el}var globals=$.extend({},$.tools.scrollable.conf);conf=$.extend(globals,conf);conf.keyboardSteps=conf.keyboardSteps||conf.size;this.each(function(){el=new Scrollable($(this),conf);$(this).data("scrollable",el)});return conf.api?el:this}})(jQuery);(function($){var t=$.tools.scrollable;t.plugins=t.plugins||{};t.plugins.circular={version:'0.5.1',conf:{api:false,clonedClass:'cloned'}};$.fn.circular=function(opts){var config=$.extend({},t.plugins.circular.conf),ret;$.extend(config,opts);this.each(function(){var api=$(this).scrollable(),items=api.getItems(),conf=api.getConf(),wrap=api.getItemWrap(),index=0;if(api){ret=api}if(items.length<conf.size){return false}items.slice(0,conf.size).each(function(i){$(this).clone().appendTo(wrap).click(function(){api.click(items.length+i)}).addClass(config.clonedClass)});var tail=$.makeArray(items.slice(-conf.size)).reverse();$(tail).each(function(i){$(this).clone().prependTo(wrap).click(function(){api.click(-i-1)}).addClass(config.clonedClass)});var allItems=wrap.children(conf.item);var hc=conf.hoverClass;if(hc){allItems.hover(function(){$(this).addClass(hc)},function(){$(this).removeClass(hc)})}function seek(i){var item=allItems.eq(i);if(conf.vertical){wrap.css({top:-item.position().top})}else{wrap.css({left:-item.position().left})}}seek(conf.size);$.extend(api,{move:function(offset,time,fn,click){var to=index+offset+conf.size;var exceed=to>api.getSize()-conf.size;if(to<=0||exceed){var fix=index+conf.size+(exceed?-items.length:items.length);seek(fix);to=fix+offset}if(click){allItems.removeClass(conf.activeClass).eq(to+Math.floor(conf.size/2)).addClass(conf.activeClass)}if(to===index+conf.size){return self}return api.seekTo(to,time,fn)},begin:function(time,fn){return this.seekTo(conf.size,time,fn)},end:function(time,fn){return this.seekTo(items.length,time,fn)},click:function(i,time,fn){if(!conf.clickable){return self}if(conf.size==1){return this.next()}var to=i-index,klass=conf.activeClass;to-=Math.floor(conf.size/2);return this.move(to,time,fn,true)},getIndex:function(){return index},setPage:function(page,time,fn){return this.seekTo(page*conf.size+conf.size,time,fn)},getPageAmount:function(){return Math.ceil(items.length/conf.size)},getPageIndex:function(){if(index<0){return this.getPageAmount()-1}if(index>=items.length){return 0}var i=(index+conf.size)/conf.size-1;return i},getVisibleItems:function(){var i=index+conf.size;return allItems.slice(i,i+conf.size)}});api.onStart(function(e,i){index=i-conf.size;return false});api.getNaviButtons().removeClass(conf.disabledClass)});return config.api?ret: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");b&&(e=b);var c,f=!0;b.play=function(){c||(f=!1,c=setInterval(function(){b.next()},d.interval))},b.pause=function(){c=clearInterval(c)},b.stop=function(){b.pause(),f=!0},d.autopause&&b.getRoot().add(b.getNaviButtons()).hover(b.pause,b.play),d.autoplay&&b.play()});return d.api?e:this}})(jQuery);;
/*
 * jQuery Tools v1.2.6 - The missing UI library for the Web
 * 
 * scrollable/scrollable.autoscroll.js
 * scrollable/scrollable.navigator.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(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.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(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);(function(a){var b=a.tools.tooltip;b.dynamic={conf:{classNames:"top right bottom left"}};function c(b){var c=a(window),d=c.width()+c.scrollLeft(),e=c.height()+c.scrollTop();return[b.offset().top<=c.scrollTop(),d<=b.offset().left+b.width(),e<=b.offset().top+b.height(),c.scrollLeft()>=b.offset().left]}function d(a){var b=a.length;while(b--)if(a[b])return!1;return!0}a.fn.dynamic=function(e){typeof e=="number"&&(e={speed:e}),e=a.extend({},b.dynamic.conf,e);var f=a.extend(!0,{},e),g=e.classNames.split(/\s/),h;this.each(function(){var b=a(this).tooltip().onBeforeShow(function(b,e){var i=this.getTip(),j=this.getConf();h||(h=[j.position[0],j.position[1],j.offset[0],j.offset[1],a.extend({},j)]),a.extend(j,h[4]),j.position=[h[0],h[1]],j.offset=[h[2],h[3]],i.css({visibility:"hidden",position:"absolute",top:e.top,left:e.left}).show();var k=a.extend(!0,{},f),l=c(i);if(!d(l)){l[2]&&(a.extend(j,k.top),j.position[0]="top",i.addClass(g[0])),l[3]&&(a.extend(j,k.right),j.position[1]="right",i.addClass(g[1])),l[0]&&(a.extend(j,k.bottom),j.position[0]="bottom",i.addClass(g[2])),l[1]&&(a.extend(j,k.left),j.position[1]="left",i.addClass(g[3]));if(l[0]||l[2])j.offset[0]*=-1;if(l[1]||l[3])j.offset[1]*=-1}i.css({visibility:"visible"}).hide()});b.onBeforeShow(function(){var a=this.getConf(),b=this.getTip();setTimeout(function(){a.position=[h[0],h[1]],a.offset=[h[2],h[3]]},0)}),b.onHide(function(){var a=this.getTip();a.removeClass(e.classNames)}),ret=b});return e.api?ret:this}})(jQuery);(function(a){var b=a.tools.tooltip;a.extend(b.conf,{direction:"up",bounce:!1,slideOffset:10,slideInSpeed:200,slideOutSpeed:200,slideFade:!a.browser.msie});var c={up:["-","top"],down:["+","top"],left:["-","left"],right:["+","left"]};b.addEffect("slide",function(a){var b=this.getConf(),d=this.getTip(),e=b.slideFade?{opacity:b.opacity}:{},f=c[b.direction]||c.up;e[f[1]]=f[0]+"="+b.slideOffset,b.slideFade&&d.css({opacity:0}),d.show().animate(e,b.slideInSpeed,a)},function(b){var d=this.getConf(),e=d.slideOffset,f=d.slideFade?{opacity:0}:{},g=c[d.direction]||c.up,h=""+g[0];d.bounce&&(h=h=="+"?"-":"+"),f[g[1]]=h+"="+e,this.getTip().animate(f,d.slideOutSpeed,function(){a(this).hide(),b.call()})})})(jQuery);
