(function(a){a.mb_videoEmbedder={name:"jquery.mb.videoEmbedder",version:1,author:"Matteo Bicocchi",defaults:{width:450,height:false,youtube:{showTitle:false,autoPlay:false}},regEx:/\[(.*?)\]/g,mb_setMovie:function(e,c,d){function b(k,f,g){var j=0;if(f.indexOf("&AMP;")!=-1){f=f.replace(/&AMP;/g,"&")}if(k.nodeType==3){var n=k.data.toUpperCase().indexOf(f);if(n>=0){var m=a("<span/>").addClass("mb_video");var l=k.splitText(n);l.splitText(f.length);m.append(g);l.parentNode.replaceChild(m.get(0),l);j=1}}else{if(k.nodeType==1&&k.childNodes&&!/(script|style)/i.test(k.tagName)){for(var h=0;h<k.childNodes.length;++h){h+=b(k.childNodes[h],f.toUpperCase(),g)}}}return j}return e.each(function(){b(this,c.toUpperCase(),d)})},mb_embedMovies:function(d){var c=a(this);c.options={};a.extend(c.options,a.mb_videoEmbedder.defaults,d);var b=a(this).html().match(a.mb_videoEmbedder.regEx);if(!b){return}a(b).each(function(v){var g=b[v];var e=g.indexOf("youtube=http://")!=-1;var x=g.indexOf("vimeo=http://")!=-1;var t=g.indexOf("ustream=http://")!=-1;var w=g.indexOf("livestream=http://")!=-1;var A=g.indexOf("flickr=http://")!=-1;var y=e||x||t||w||A;if(!y){return}var o=g.replace(/\[/g,"").replace(/\]/g,"");var l=!c.options.youtube.showTitle?0:1;var u=!c.options.youtube.autoPlay?0:1;var p=e?(o.match(/[\\?&]v=([^&#]*)/))[1]:x?(o.match(/\d+/))[0]:t?(o.match(/\d+/))[0]:A?(o.match(/\d+/))[0]:w?(o.replace("livestream=http://www.livestream.com/","").toLowerCase()):null;var k=e?(l==1?80.5:68):x?57.5:65;var s=c.options.width;var q=0;if(s=="fluid"&&e){var z=a(window).width();var h=a(window).height();if(c.options.widthObj){z=c.options.widthObj.width();h=c.options.widthObj.height()}var m=z;var n=m*(9/16);if(n>h){n=h;m=n*(16/9)}var B=a(this);if(n>h){n=h;m=n*B.attr("data-aspectRatiob")}s=m;q=n}else{q=Math.ceil((s*k)/100)}if(c.options.height&&q>c.options.height){q=c.options.height}var r=e?"http://www.youtube.com/embed/":x?"http://vimeo.com/moogaloop.swf?clip_id=":t?"http://www.ustream.tv/flash/video/":w?"http://cdn.livestream.com/grid/LSPlayer.swf?channel=":A?"http://www.flickr.com/apps/video/stewart.swf?photo_id=":null;var j=e?"&wmode=transparent&fs=1&rel=0&hd=0&showsearch=0&showinfo="+l+"&autoplay="+u:x?"&amp;server=vimeo.com&amp;show_title="+l+"&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1":t?"?disabledComment=true&amp;autoplay=false":w?"&amp;color=0xe8e8e8&amp;autoPlay=false&amp;mute=false":"";var f="";if(e){f='<iframe style="z-index:0;" width="'+s+'" height="'+q+'" src="'+r+p+"?"+j+'" frameborder="0" wmode="transparent" allowfullscreen></iframe>'}else{f='<object width="'+s+'" height="'+q+'"><param name="movie" value="'+r+p+j+'"><param name="allowFullScreen" value="true"><param name="wmode" value="transparent"><param name="allowscriptaccess" value="always"><param name="flashvars" value="autoplay=false"><embed src="'+r+p+j+'" type="application/x-shockwave-flash" wmode="transparent" allowscriptaccess="always" flashvars="autoplay=false"allowfullscreen="true" width="'+s+'" height="'+q+'"></embed></object>'}if(y){a.mb_videoEmbedder.mb_setMovie(c,g,f)}})}};a.mb_audioEmbedder={name:"jquery.mb.videoEmbedder",version:1,author:"Matteo Bicocchi",playerPath:"media/player.swf",defaults:{width:300},regEx:/\[audio=(.*?)\]/g,mb_setAudio:function(d,c,b){function e(k,g,f){var j=0;if(g.indexOf("&AMP;")!=-1){g=g.replace(/&AMP;/g,"&")}if(k.nodeType==3){var n=k.data.toUpperCase().indexOf(g);if(n>=0){var m=a("<span/>").addClass("mb_audio");var l=k.splitText(n);l.splitText(g.length);m.append(f);l.parentNode.replaceChild(m.get(0),l);j=1}}else{if(k.nodeType==1&&k.childNodes&&!/(script|style)/i.test(k.tagName)){for(var h=0;h<k.childNodes.length;++h){h+=e(k.childNodes[h],g.toUpperCase(),f)}}}return j}return d.each(function(){e(this,c.toUpperCase(),b)})},mb_embedAudio:function(d){var c=a(this);c.options={};a.extend(c.options,a.mb_audioEmbedder.defaults,d);var b=a(this).html().match(a.mb_audioEmbedder.regEx);if(!b){return}a(b).each(function(g){var f=b[g];var j=f.indexOf("audio=http://")!=-1;var k=f.replace(/\[audio=/g,"").replace(/\]/g,"");var h=c.options.width;var e='<object width="'+h+'" height="24" type="application/x-shockwave-flash"style="outline: medium none; visibility: visible;" data="'+a.mb_audioEmbedder.playerPath+'" ><param name="menu" value="false"><param name="flashvars" value="soundFile='+k+'"><param name="wmode" value="transparent"><param name="allowscriptaccess" value="always"><embed src="'+a.mb_audioEmbedder.playerPath+'" type="application/x-shockwave-flash" wmode="transparent" allowscriptaccess="always" width="'+h+'" height="24"flashvars="soundFile='+k+'"></embed></object>';if(j){a.mb_audioEmbedder.mb_setAudio(c,f,e)}})}};a.fn.mb_embedMovies=a.mb_videoEmbedder.mb_embedMovies;a.fn.mb_embedAudio=a.mb_audioEmbedder.mb_embedAudio})(jQuery);(function(b){b.fn.superfish=function(k){var g=b.fn.superfish,j=g.c,f=b(['<span class="',j.arrowClass,'"> &#187;</span>'].join("")),i=function(){var c=b(this),l=d(c);clearTimeout(l.sfTimer);c.showSuperfishUl().siblings().hideSuperfishUl()},e=function(){var c=b(this),m=d(c),l=g.op;clearTimeout(m.sfTimer);m.sfTimer=setTimeout(function(){l.retainPath=(b.inArray(c[0],l.$path)>-1);c.hideSuperfishUl();if(l.$path.length&&c.parents(["li.",l.hoverClass].join("")).length<1){i.call(l.$path)}},l.delay)},d=function(c){var l=c.parents(["ul.",j.menuClass,":first"].join(""))[0];g.op=g.o[l.serial];return l},h=function(c){c.addClass(j.anchorClass).append(f.clone())};return this.each(function(){var c=this.serial=g.o.length;var m=b.extend({},g.defaults,k);m.$path=b("li."+m.pathClass,this).slice(0,m.pathLevels).each(function(){b(this).addClass([m.hoverClass,j.bcClass].join(" ")).filter("li:has(ul)").removeClass(m.pathClass)});g.o[c]=g.op=m;b("li:has(ul)",this)[(b.fn.hoverIntent&&!m.disableHI)?"hoverIntent":"hover"](i,e).each(function(){if(m.autoArrows){h(b(">a:first-child",this))}}).not("."+j.bcClass).hideSuperfishUl();var l=b("a",this);l.each(function(n){var o=l.eq(n).parents("li");l.eq(n).focus(function(){i.call(o)}).blur(function(){e.call(o)})});m.onInit.call(this)}).each(function(){var c=[j.menuClass];if(g.op.dropShadows&&!(b.browser.msie&&b.browser.version<7)){c.push(j.shadowClass)}b(this).addClass(c.join(" "))})};var a=b.fn.superfish;a.o=[];a.op={};a.IE7fix=function(){var c=a.op;if(b.browser.msie&&b.browser.version>6&&c.dropShadows&&c.animation.opacity!=undefined){this.toggleClass(a.c.shadowClass+"-off")}};a.c={bcClass:"sf-breadcrumb",menuClass:"sf-js-enabled",anchorClass:"sf-with-ul",arrowClass:"sf-sub-indicator",shadowClass:"sf-shadow"};a.defaults={hoverClass:"sfHover",pathClass:"overideThisToUse",pathLevels:1,delay:800,animation:{opacity:"show"},speed:"normal",autoArrows:true,dropShadows:true,disableHI:false,onInit:function(){},onBeforeShow:function(){},onShow:function(){},onHide:function(){}};b.fn.extend({hideSuperfishUl:function(){var e=a.op,d=(e.retainPath===true)?e.$path:"";e.retainPath=false;var c=b(["li.",e.hoverClass].join(""),this).add(this).not(d).removeClass(e.hoverClass).find(">ul").hide().css("visibility","hidden");e.onHide.call(c);return this},showSuperfishUl:function(){var e=a.op,d=a.c.shadowClass+"-off",c=this.addClass(e.hoverClass).find(">ul:hidden").css("visibility","visible");a.IE7fix.call(c);e.onBeforeShow.call(c);c.animate(e.animation,e.speed,function(){a.IE7fix.call(c);e.onShow.call(c)});return this}})})(jQuery);(function(a){a.fn.hoverIntent=function(k,j){var l={sensitivity:7,interval:100,timeout:0};l=a.extend(l,j?{over:k,out:j}:k);var n,m,h,d;var e=function(f){n=f.pageX;m=f.pageY};var c=function(g,f){f.hoverIntent_t=clearTimeout(f.hoverIntent_t);if((Math.abs(h-n)+Math.abs(d-m))<l.sensitivity){a(f).unbind("mousemove",e);f.hoverIntent_s=1;return l.over.apply(f,[g])}else{h=n;d=m;f.hoverIntent_t=setTimeout(function(){c(g,f)},l.interval)}};var i=function(g,f){f.hoverIntent_t=clearTimeout(f.hoverIntent_t);f.hoverIntent_s=0;return l.out.apply(f,[g])};var b=function(q){var o=(q.type=="mouseover"?q.fromElement:q.toElement)||q.relatedTarget;while(o&&o!=this){try{o=o.parentNode}catch(q){o=this}}if(o==this){return false}var g=jQuery.extend({},q);var f=this;if(f.hoverIntent_t){f.hoverIntent_t=clearTimeout(f.hoverIntent_t)}if(q.type=="mouseover"){h=g.pageX;d=g.pageY;a(f).bind("mousemove",e);if(f.hoverIntent_s!=1){f.hoverIntent_t=setTimeout(function(){c(g,f)},l.interval)}}else{a(f).unbind("mousemove",e);if(f.hoverIntent_s==1){f.hoverIntent_t=setTimeout(function(){i(g,f)},l.timeout)}}};return this.mouseover(b).mouseout(b)}})(jQuery);jQuery.fn.popupwindow=function(b){var a=b||{};return this.each(function(f){var h,j,d,c,e;d=(jQuery(this).attr("rel")||"").split(",");h={height:600,width:600,toolbar:0,scrollbars:0,status:0,resizable:1,left:0,top:0,center:0,createnew:1,location:0,menubar:0,fullscreen:0};if(d.length==1&&d[0].split(":").length==1){e=d[0];if(typeof a[e]!="undefined"){h=jQuery.extend(h,a[e])}}else{for(var g=0;g<d.length;g++){c=d[g].split(":");if(typeof h[c[0]]!="undefined"&&c.length==2){h[c[0]]=c[1]}}}if(h.center==1){h.top=(screen.height-(h.height+110))/2;h.left=(screen.width-h.width)/2}if(h.fullscreen==1){h.height=screen.height;h.width=screen.width}j="location="+h.location+",menubar="+h.menubar+",height="+h.height+",width="+h.width+",toolbar="+h.toolbar+",scrollbars="+h.scrollbars+",status="+h.status+",resizable="+h.resizable+",left="+h.left+",screenX="+h.left+",top="+h.top+",screenY="+h.top;jQuery(this).bind("click",function(){var i=h.createnew?"PopUpWindow"+f:"PopUpWindow";window.open(this.href,i,j).focus();return false})})};
/*!
 * jQuery Tools v1.2.6 - The missing UI library for the Web
 * 
 * overlay/overlay.js
 * overlay/overlay.apple.js
 * scrollable/scrollable.js
 * scrollable/scrollable.autoscroll.js
 * scrollable/scrollable.navigator.js
 * toolbox/toolbox.expose.js
 * toolbox/toolbox.mousewheel.js
 * 
 * NO COPYRIGHTS OR LICENSES. DO WHAT YOU LIKE.
 * 
 * http://flowplayer.org/tools/
 * 
 * jquery.event.wheel.js - rev 1 
 * Copyright (c) 2008, Three Dub Media (http://threedubmedia.com)
 * Liscensed under the MIT License (MIT-LICENSE.txt)
 * http://www.opensource.org/licenses/mit-license.php
 * Created: 2008-07-01 | Updated: 2008-07-14
 * 
 * -----
 * 
 */
(function(f){f.tools=f.tools||{version:"v1.2.6"},f.tools.overlay={addEffect:function(i,c,j){h[i]=[c,j]},conf:{close:null,closeOnClick:!0,closeOnEsc:!0,closeSpeed:"fast",effect:"default",fixed:!f.browser.msie||f.browser.version>6,left:"center",load:!1,mask:null,oneInstance:!0,speed:"normal",target:null,top:"10%"}};var e=[],h={};f.tools.overlay.addEffect("default",function(a,k){var j=this.getConf(),i=f(window);j.fixed||(a.top+=i.scrollTop(),a.left+=i.scrollLeft()),a.position=j.fixed?"fixed":"absolute",this.getOverlay().css(a).fadeIn(j.speed,k)},function(b){this.getOverlay().fadeOut(this.getConf().closeSpeed,b)});function g(v,u){var t=this,s=v.add(t),r=f(window),q,p,o,c=f.tools.expose&&(u.mask||u.expose),b=Math.random().toString().slice(10);c&&(typeof c=="string"&&(c={color:c}),c.closeOnClick=c.closeOnEsc=!1);var a=u.target||v.attr("rel");p=a?f(a):null||v;if(!p.length){throw"Could not find Overlay: "+a}v&&v.index(p)==-1&&v.click(function(d){t.load(d);return d.preventDefault()}),f.extend(t,{load:function(w){if(t.isOpened()){return t}var j=h[u.effect];if(!j){throw'Overlay: cannot find effect : "'+u.effect+'"'}u.oneInstance&&f.each(e,function(){this.close(w)}),w=w||f.Event(),w.type="onBeforeLoad",s.trigger(w);if(w.isDefaultPrevented()){return t}o=!0,c&&f(p).expose(c);var x=u.top,m=u.left,l=p.outerWidth({margin:!0}),k=p.outerHeight({margin:!0});typeof x=="string"&&(x=x=="center"?Math.max((r.height()-k)/2,0):parseInt(x,10)/100*r.height()),m=="center"&&(m=Math.max((r.width()-l)/2,0)),j[0].call(t,{top:x,left:m},function(){o&&(w.type="onLoad",s.trigger(w))}),c&&u.closeOnClick&&f.mask.getMask().one("click",t.close),u.closeOnClick&&f(document).bind("click."+b,function(d){f(d.target).parents(p).length||t.close(d)}),u.closeOnEsc&&f(document).bind("keydown."+b,function(d){d.keyCode==27&&t.close(d)});return t},close:function(d){if(!t.isOpened()){return t}d=d||f.Event(),d.type="onBeforeClose",s.trigger(d);if(!d.isDefaultPrevented()){o=!1,h[u.effect][1].call(t,function(){d.type="onClose",s.trigger(d)}),f(document).unbind("click."+b).unbind("keydown."+b),c&&f.mask.close();return t}},getOverlay:function(){return p},getTrigger:function(){return v},getClosers:function(){return q},isOpened:function(){return o},getConf:function(){return u}}),f.each("onBeforeLoad,onStart,onLoad,onBeforeClose,onClose".split(","),function(d,i){f.isFunction(u[i])&&f(t).bind(i,u[i]),t[i]=function(j){j&&f(t).bind(i,j);return t}}),q=p.find(u.close||".close"),!q.length&&!u.close&&(q=f('<a class="close"></a>'),p.prepend(q)),q.click(function(d){t.close(d)}),u.load&&t.load()}f.fn.overlay=function(b){var a=this.data("overlay");if(a){return a}f.isFunction(b)&&(b={onBeforeLoad:b}),b=f.extend(!0,{},f.tools.overlay.conf,b),this.each(function(){a=new g(f(this),b),e.push(a),f(this).data("overlay",a)});return b.api?a:this}})(jQuery);(function(h){var g=h.tools.overlay,l=h(window);h.extend(g.conf,{start:{top:null,left:null},fadeInSpeed:"fast",zIndex:9999});function k(d){var c=d.offset();return{top:c.top+d.height()/2,left:c.left+d.width()/2}}var j=function(z,y){var x=this.getOverlay(),w=this.getConf(),v=this.getTrigger(),u=this,t=x.outerWidth({margin:!0}),s=x.data("img"),r=w.fixed?"fixed":"absolute";if(!s){var q=x.css("backgroundImage");if(!q){throw"background-image CSS property not set for overlay"}q=q.slice(q.indexOf("(")+1,q.indexOf(")")).replace(/\"/g,""),x.css("backgroundImage","none"),s=h('<img src="'+q+'"/>'),s.css({border:0,display:"none"}).width(t),h("body").append(s),x.data("img",s)}var d=w.start.top||Math.round(l.height()/2),c=w.start.left||Math.round(l.width()/2);if(v){var a=k(v);d=a.top,c=a.left}w.fixed?(d-=l.scrollTop(),c-=l.scrollLeft()):(z.top+=l.scrollTop(),z.left+=l.scrollLeft()),s.css({position:"absolute",top:d,left:c,width:0,zIndex:w.zIndex}).show(),z.position=r,x.css(z),s.animate({top:x.css("top"),left:x.css("left"),width:t},w.speed,function(){x.css("zIndex",w.zIndex+1).fadeIn(w.fadeInSpeed,function(){u.isOpened()&&!h(this).index(x)?y.call():x.hide()})}).css("position",r)},i=function(a){var o=this.getOverlay().hide(),n=this.getConf(),m=this.getTrigger(),d=o.data("img"),c={top:n.start.top,left:n.start.left,width:0};m&&h.extend(c,k(m)),n.fixed&&d.css({position:"absolute"}).animate({top:"+="+l.scrollTop(),left:"+="+l.scrollLeft()},0),d.animate(c,n.closeSpeed,a)};g.addEffect("apple",j,i)})(jQuery);(function(g){g.tools=g.tools||{version:"v1.2.6"},g.tools.scrollable={conf:{activeClass:"active",circular:!1,clonedClass:"cloned",disabledClass:"disabled",easing:"swing",initialIndex:0,item:"> *",items:".items",keyboard:!0,mousewheel:!1,next:".next",prev:".prev",size:1,speed:400,vertical:!1,touch:!0,wheelSpeed:0}};function f(k,e){var m=parseInt(k.css(e),10);if(m){return m}var l=k[0].currentStyle;return l&&l.width&&parseInt(l.width,10)}function j(a,k){var e=g(k);return e.length<2?e:a.parent().find(k)}var i;function h(z,y){var x=this,w=z.add(x),v=z.children(),u=0,t=y.vertical;i||(i=x),v.length>1&&(v=g(y.items,z)),y.size>1&&(y.circular=!1),g.extend(x,{getConf:function(){return y},getIndex:function(){return u},getSize:function(){return x.getItems().size()},getNaviButtons:function(){return d.add(c)},getRoot:function(){return z},getItemWrap:function(){return v},getItems:function(){return v.find(y.item).not("."+y.clonedClass)},move:function(k,e){return x.seekTo(u+k,e)},next:function(b){return x.move(y.size,b)},prev:function(b){return x.move(-y.size,b)},begin:function(b){return x.seekTo(0,b)},end:function(b){return x.seekTo(x.getSize()-1,b)},focus:function(){i=x;return x},addItem:function(e){e=g(e),y.circular?(v.children().last().before(e),v.children().first().replaceWith(e.clone().addClass(y.clonedClass))):(v.append(e),c.removeClass("disabled")),w.trigger("onAddItem",[e]);return x},seekTo:function(o,C,A){o.jquery||(o*=1);if(y.circular&&o===0&&u==-1&&C!==0){return x}if(!y.circular&&o<0||o>x.getSize()||o<-1){return x}var p=o;o.jquery?o=x.getItems().index(o):p=x.getItems().eq(o);var e=g.Event("onBeforeSeek");if(!A){w.trigger(e,[o,C]);if(e.isDefaultPrevented()||!p.length){return x}}var B=t?{top:-p.position().top}:{left:-p.position().left};u=o,i=x,C===undefined&&(C=y.speed),v.animate(B,C,y.easing,A||function(){w.trigger("onSeek",[o])});return x}}),g.each(["onBeforeSeek","onSeek","onAddItem"],function(e,k){g.isFunction(y[k])&&g(x).bind(k,y[k]),x[k]=function(l){l&&g(x).bind(k,l);return x}});if(y.circular){var s=x.getItems().slice(-1).clone().prependTo(v),r=x.getItems().eq(1).clone().appendTo(v);s.add(r).addClass(y.clonedClass),x.onBeforeSeek(function(k,e,l){if(!k.isDefaultPrevented()){if(e==-1){x.seekTo(s,l,function(){x.end(0)});return k.preventDefault()}e==x.getSize()&&x.seekTo(r,l,function(){x.begin(0)})}});var q=z.parents().add(z).filter(function(){if(g(this).css("display")==="none"){return !0}});q.length?(q.show(),x.seekTo(0,0,function(){}),q.hide()):x.seekTo(0,0,function(){})}var d=j(z,y.prev).click(function(b){b.stopPropagation(),x.prev()}),c=j(z,y.next).click(function(b){b.stopPropagation(),x.next()});y.circular||(x.onBeforeSeek(function(k,e){setTimeout(function(){k.isDefaultPrevented()||(d.toggleClass(y.disabledClass,e<=0),c.toggleClass(y.disabledClass,e>=x.getSize()-1))},1)}),y.initialIndex||d.addClass(y.disabledClass)),x.getSize()<2&&d.add(c).addClass(y.disabledClass),y.mousewheel&&g.fn.mousewheel&&z.mousewheel(function(k,e){if(y.mousewheel){x.move(e<0?1:-1,y.wheelSpeed||50);return !1}});if(y.touch){var a={};v[0].ontouchstart=function(k){var e=k.touches[0];a.x=e.clientX,a.y=e.clientY},v[0].ontouchmove=function(k){if(k.touches.length==1&&!v.is(":animated")){var e=k.touches[0],m=a.x-e.clientX,l=a.y-e.clientY;x[t&&l>0||!t&&m>0?"next":"prev"](),k.preventDefault()}}}y.keyboard&&g(document).bind("keydown.scrollable",function(e){if(!(!y.keyboard||e.altKey||e.ctrlKey||e.metaKey||g(e.target).is(":input"))){if(y.keyboard!="static"&&i!=x){return}var k=e.keyCode;if(t&&(k==38||k==40)){x.move(k==38?-1:1);return e.preventDefault()}if(!t&&(k==37||k==39)){x.move(k==37?-1:1);return e.preventDefault()}}}),y.initialIndex&&x.seekTo(y.initialIndex,0,function(){})}g.fn.scrollable=function(a){var d=this.data("scrollable");if(d){return d}a=g.extend({},g.tools.scrollable.conf,a),this.each(function(){d=new h(g(this),a),g(this).data("scrollable",d)});return a.api?d:this}})(jQuery);(function(d){var c=d.tools.scrollable;c.autoscroll={conf:{autoplay:!0,interval:3000,autopause:!0}},d.fn.autoscroll=function(f){typeof f=="number"&&(f={interval:f});var b=d.extend({},c.autoscroll.conf,f),a;this.each(function(){var e=d(this).data("scrollable"),l=e.getRoot(),k,j=!1;function i(){k=setTimeout(function(){e.next()},b.interval)}e&&(a=e),e.play=function(){k||(j=!1,l.bind("onSeek",i),i())},e.pause=function(){k=clearTimeout(k),l.unbind("onSeek",i)},e.resume=function(){j||e.play()},e.stop=function(){j=!0,e.pause()},b.autopause&&l.add(e.getNaviButtons()).hover(e.pause,e.resume),b.autoplay&&e.play()});return b.api?a:this}})(jQuery);(function(e){var d=e.tools.scrollable;d.navigator={conf:{navi:".navi",naviItem:null,activeClass:"active",indexed:!1,idPrefix:null,history:!1}};function f(a,h){var g=e(h);return g.length<2?g:a.parent().find(h)}e.fn.navigator=function(b){typeof b=="string"&&(b={navi:b}),b=e.extend({},d.navigator.conf,b);var a;this.each(function(){var u=e(this).data("scrollable"),t=b.navi.jquery?b.navi:f(u.getRoot(),b.navi),s=u.getNaviButtons(),r=b.activeClass,q=b.history&&history.pushState,p=u.getConf().size;u&&(a=u),u.getNaviButtons=function(){return s.add(t)},q&&(history.pushState({i:0}),e(window).bind("popstate",function(g){var h=g.originalEvent.state;h&&u.seekTo(h.i)}));function o(g,i,h){u.seekTo(i),h.preventDefault(),q&&history.pushState({i:i})}function n(){return t.find(b.naviItem||"> *")}function c(g){var h=e("<"+(b.naviItem||"a")+"/>").click(function(i){o(e(this),g,i)});g===0&&h.addClass(r),b.indexed&&h.text(g+1),b.idPrefix&&h.attr("id",b.idPrefix+g);return h.appendTo(t)}n().length?n().each(function(g){e(this).click(function(h){o(e(this),g,h)})}):e.each(u.getItems(),function(g){g%p==0&&c(g)}),u.onBeforeSeek(function(h,g){setTimeout(function(){if(!h.isDefaultPrevented()){var j=g/p,i=n().eq(j);i.length&&n().removeClass(r).eq(j).addClass(r)}},1)}),u.onAddItem(function(g,i){var h=u.getItems().index(i);h%p==0&&c(h)})});return b.api?a:this}})(jQuery);(function(r){r.tools=r.tools||{version:"v1.2.6"};var q;q=r.tools.expose={conf:{maskId:"exposeMask",loadSpeed:"slow",closeSpeed:"fast",closeOnClick:!0,closeOnEsc:!0,zIndex:9998,opacity:0.8,startOpacity:0,color:"#fff",onLoad:null,onClose:null}};function p(){if(r.browser.msie){var a=r(document).height(),d=r(window).height();return[window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,a-d<20?d:a]}return[r(document).width(),r(document).height()]}function o(a){if(a){return a.call(r.mask)}}var n,m,l,k,j;r.mask={load:function(c,b){if(l){return this}typeof c=="string"&&(c={color:c}),c=c||k,k=c=r.extend(r.extend({},q.conf),c),n=r("#"+c.maskId),n.length||(n=r("<div/>").attr("id",c.maskId),r("body").append(n));var a=p();n.css({position:"absolute",top:0,left:0,width:a[0],height:a[1],display:"none",opacity:c.startOpacity,zIndex:c.zIndex}),c.color&&n.css("backgroundColor",c.color);if(o(c.onBeforeLoad)===!1){return this}c.closeOnEsc&&r(document).bind("keydown.mask",function(d){d.keyCode==27&&r.mask.close(d)}),c.closeOnClick&&n.bind("click.mask",function(d){r.mask.close(d)}),r(window).bind("resize.mask",function(){r.mask.fit()}),b&&b.length&&(j=b.eq(0).css("zIndex"),r.each(b,function(){var d=r(this);/relative|absolute|fixed/i.test(d.css("position"))||d.css("position","relative")}),m=b.css({zIndex:Math.max(c.zIndex+1,j=="auto"?0:j)})),n.css({display:"block"}).fadeTo(c.loadSpeed,c.opacity,function(){r.mask.fit(),o(c.onLoad),l="full"}),l=!0;return this},close:function(){if(l){if(o(k.onBeforeClose)===!1){return this}n.fadeOut(k.closeSpeed,function(){o(k.onClose),m&&m.css({zIndex:j}),l=!1}),r(document).unbind("keydown.mask"),n.unbind("click.mask"),r(window).unbind("resize.mask")}return this},fit:function(){if(l){var b=p();n.css({width:b[0],height:b[1]})}},getMask:function(){return n},isLoaded:function(b){return b?l=="full":l},getConf:function(){return k},getExposed:function(){return m}},r.fn.mask=function(a){r.mask.load(a);return this},r.fn.expose=function(a){r.mask.load(a,this);return this}})(jQuery);(function(e){e.fn.mousewheel=function(b){return this[b?"bind":"trigger"]("wheel",b)},e.event.special.wheel={setup:function(){e.event.add(this,d,f,{})},teardown:function(){e.event.remove(this,d,f)}};var d=e.browser.mozilla?"DOMMouseScroll"+(e.browser.version<"1.9"?" mousemove":""):"mousewheel";function f(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}a.type="wheel";return e.event.handle.call(this,a,a.delta)}})(jQuery);$j(document).ready(function(){$j("#tour-virtual-herd table caption").addClass("ui-corner-top");$j("#ft").addClass("ui-corner-bottom")});jQuery(document).ready(function(){jQuery(".orsd-ui-button").button();window.setTimeout(clearMessages,10000);jQuery(".popupwindow").popupwindow()});function clearMessages(){jQuery(".form-message").fadeOut()};
