/*
 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
 *
 * Open source under the BSD License. 
 * 
 * Copyright c 2008 George McGinley Smith
 * All rights reserved.
 */
jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(e,d,a,b,c){return jQuery.easing[jQuery.easing.def](e,d,a,b,c)},easeInQuad:function(e,a,b,c,d){return c*(a/=d)*a+b},easeOutQuad:function(e,a,b,c,d){return-c*(a/=d)*(a-2)+b},easeInOutQuad:function(e,a,b,c,d){return(a/=d/2)<1?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b},easeInCubic:function(e,a,b,c,d){return c*(a/=d)*a*a+b},easeOutCubic:function(e,a,b,c,d){return c*((a=a/d-1)*a*a+1)+b},easeInOutCubic:function(e,a,b,c,d){return(a/=d/2)<1?c/2*a*a*a+b:c/2*((a-=2)*a*a+2)+b},easeInQuart:function(e,a,b,c,d){return c*(a/=d)*a*a*a+b},easeOutQuart:function(e,a,b,c,d){return-c*((a=a/d-1)*a*a*a-1)+b},easeInOutQuart:function(e,a,b,c,d){return(a/=d/2)<1?c/2*a*a*a*a+b:-c/2*((a-=2)*a*a*a-2)+b},easeInQuint:function(e,a,b,c,d){return c*(a/=d)*a*a*a*a+b},easeOutQuint:function(e,a,b,c,d){return c*((a=a/d-1)*a*a*a*a+1)+b},easeInOutQuint:function(e,a,b,c,d){return(a/=d/2)<1?c/2*a*a*a*a*a+b:c/2*((a-=2)*a*a*a*a+2)+b},easeInSine:function(e,d,b,a,c){return-a*Math.cos(d/c*(Math.PI/2))+a+b},easeOutSine:function(e,d,a,b,c){return b*Math.sin(d/c*(Math.PI/2))+a},easeInOutSine:function(e,d,a,b,c){return-b/2*(Math.cos(Math.PI*d/c)-1)+a},easeInExpo:function(e,b,a,c,d){return b==0?a:c*Math.pow(2,10*(b/d-1))+a},easeOutExpo:function(e,d,a,b,c){return d==c?a+b:b*(-Math.pow(2,-10*d/c)+1)+a},easeInOutExpo:function(e,a,b,c,d){return a==0?b:a==d?b+c:(a/=d/2)<1?c/2*Math.pow(2,10*(a-1))+b:c/2*(-Math.pow(2,-10*--a)+2)+b},easeInCirc:function(e,a,b,c,d){return-c*(Math.sqrt(1-(a/=d)*a)-1)+b},easeOutCirc:function(e,a,b,c,d){return c*Math.sqrt(1-(a=a/d-1)*a)+b},easeInOutCirc:function(e,a,b,c,d){return(a/=d/2)<1?-c/2*(Math.sqrt(1-a*a)-1)+b:c/2*(Math.sqrt(1-(a-=2)*a)+1)+b},easeInElastic:function(h,d,e,a,f){var g=1.70158,b=0,c=a;if(d==0)return e;if((d/=f)==1)return e+a;if(!b)b=f*.3;if(c<Math.abs(a)){c=a;var g=b/4}else var g=b/(2*Math.PI)*Math.asin(a/c);return-(c*Math.pow(2,10*(d-=1))*Math.sin((d*f-g)*(2*Math.PI)/b))+e},easeOutElastic:function(h,d,e,a,f){var g=1.70158,b=0,c=a;if(d==0)return e;if((d/=f)==1)return e+a;if(!b)b=f*.3;if(c<Math.abs(a)){c=a;var g=b/4}else var g=b/(2*Math.PI)*Math.asin(a/c);return c*Math.pow(2,-10*d)*Math.sin((d*f-g)*(2*Math.PI)/b)+a+e},easeInOutElastic:function(h,a,e,b,f){var g=1.70158,c=0,d=b;if(a==0)return e;if((a/=f/2)==2)return e+b;if(!c)c=f*(.3*1.5);if(d<Math.abs(b)){d=b;var g=c/4}else var g=c/(2*Math.PI)*Math.asin(b/d);return a<1?-.5*(d*Math.pow(2,10*(a-=1))*Math.sin((a*f-g)*(2*Math.PI)/c))+e:d*Math.pow(2,-10*(a-=1))*Math.sin((a*f-g)*(2*Math.PI)/c)*.5+b+e},easeInBack:function(f,b,c,d,e,a){if(a==undefined)a=1.70158;return d*(b/=e)*b*((a+1)*b-a)+c},easeOutBack:function(f,b,c,d,e,a){if(a==undefined)a=1.70158;return d*((b=b/e-1)*b*((a+1)*b+a)+1)+c},easeInOutBack:function(f,a,c,d,e,b){if(b==undefined)b=1.70158;return(a/=e/2)<1?d/2*(a*a*(((b*=1.525)+1)*a-b))+c:d/2*((a-=2)*a*(((b*=1.525)+1)*a+b)+2)+c},easeInBounce:function(e,d,c,a,b){return a-jQuery.easing.easeOutBounce(e,b-d,0,a,b)+c},easeOutBounce:function(e,a,b,c,d){return(a/=d)<1/2.75?c*(7.5625*a*a)+b:a<2/2.75?c*(7.5625*(a-=1.5/2.75)*a+.75)+b:a<2.5/2.75?c*(7.5625*(a-=2.25/2.75)*a+.9375)+b:c*(7.5625*(a-=2.625/2.75)*a+.984375)+b},easeInOutBounce:function(e,c,d,b,a){return c<a/2?jQuery.easing.easeInBounce(e,c*2,0,b,a)*.5+d:jQuery.easing.easeOutBounce(e,c*2-a,0,b,a)*.5+b*.5+d}})
/**
 * Copyright (c) 2009 Anders Ekdahl (http://coffeescripter.com/)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 */
;(function(a){a.fn.adGallery=function(d){var f={loader_image:"loader.gif",start_at_index:0,thumb_opacity:.7,animate_first_image:false,animation_speed:400,width:false,height:false,display_next_and_prev:true,display_back_and_forward:true,scroll_jump:0,slideshow:{enable:true,autostart:false,speed:5e3,start_label:"Start",stop_label:"Stop",stop_on_scroll:true,countdown_prefix:"(",countdown_sufix:")",onStart:false,onStop:false},effect:"slide-hori",enable_keyboard_move:true,cycle:true,callbacks:{init:false,afterImageVisible:false,beforeImageVisible:false}},b=a.extend(false,f,d);if(d&&d.slideshow)b.slideshow=a.extend(false,f.slideshow,d.slideshow);if(!b.slideshow.enable)b.slideshow.autostart=false;var e=[];a(this).each(function(){var a=new c(this,b);e[e.length]=a});return e};function e(b,e,a){var d=parseInt(b.css("top"),10);if(e=="left"){var c="-"+this.image_wrapper_height+"px";b.css("top",this.image_wrapper_height+"px")}else{var c=this.image_wrapper_height+"px";b.css("top","-"+this.image_wrapper_height+"px")}if(a){a.css("bottom","-"+a[0].offsetHeight+"px");a.animate({bottom:0},this.settings.animation_speed*2)}return{old_image:{top:c},new_image:{top:d}}}function d(b,e,a){var d=parseInt(b.css("left"),10);if(e=="left"){var c="-"+this.image_wrapper_width+"px";b.css("left",this.image_wrapper_width+"px")}else{var c=this.image_wrapper_width+"px";b.css("left","-"+this.image_wrapper_width+"px")}if(a){a.css("bottom","-"+a[0].offsetHeight+"px");a.animate({bottom:0},this.settings.animation_speed*2)}return{old_image:{left:c},new_image:{left:d}}}function f(a){var e=a.width(),c=a.height(),b=parseInt(a.css("left"),10),d=parseInt(a.css("top"),10);a.css({width:0,height:0,top:this.image_wrapper_height/2,left:this.image_wrapper_width/2});return{old_image:{width:0,height:0,top:this.image_wrapper_height/2,left:this.image_wrapper_width/2},new_image:{width:e,height:c,top:d,left:b}}}function g(a){a.css("opacity",0);return{old_image:{opacity:0},new_image:{opacity:1}}}function h(a){a.css("opacity",0);return{old_image:{opacity:0},new_image:{opacity:1},speed:0}}function c(b,a){this.init(b,a)}c.prototype={wrapper:false,image_wrapper:false,gallery_info:false,nav:false,loader:false,preloads:false,thumbs_wrapper:false,scroll_back:false,scroll_forward:false,next_link:false,prev_link:false,slideshow:false,image_wrapper_width:0,image_wrapper_height:0,current_index:0,current_image:false,nav_display_width:0,settings:false,images:false,in_transition:false,animations:false,init:function(g,f){var d=this;this.wrapper=a(g);this.settings=f;this.setupElements();this.setupAnimations();if(this.settings.width){this.image_wrapper_width=this.settings.width;this.image_wrapper.width(this.settings.width);this.wrapper.width(this.settings.width)}else this.image_wrapper_width=this.image_wrapper.width();if(this.settings.height){this.image_wrapper_height=this.settings.height;this.image_wrapper.height(this.settings.height)}else this.image_wrapper_height=this.image_wrapper.height();this.nav_display_width=this.nav.width();this.current_index=0;this.current_image=false;this.in_transition=false;this.findImages();this.settings.display_next_and_prev&&this.initNextAndPrev();var e=function(a){return d.nextImage(a)};this.slideshow=new b(e,this.settings.slideshow);this.controls.append(this.slideshow.create());if(this.settings.slideshow.enable)this.slideshow.enable();else this.slideshow.disable();this.settings.display_back_and_forward&&this.initBackAndForward();this.settings.enable_keyboard_move&&this.initKeyEvents();var c=this.settings.start_at_index;if(window.location.hash&&window.location.hash.indexOf("#ad-image")===0){c=window.location.hash.replace(/[^0-9]+/g,"");if(c*1!=c)c=this.settings.start_at_index}this.loading(true);this.showImage(c,function(){if(d.settings.slideshow.autostart){d.preloadImage(c+1);d.slideshow.start()}});this.fireCallback(this.settings.callbacks.init)},setupAnimations:function(){this.animations={"slide-vert":e,"slide-hori":d,resize:f,fade:g,none:h}},setupElements:function(){this.controls=this.wrapper.find(".ad-controls");this.gallery_info=a('<p class="ad-info"></p>');this.controls.append(this.gallery_info);this.image_wrapper=this.wrapper.find(".ad-image-wrapper");this.image_wrapper.empty();this.nav=this.wrapper.find(".ad-nav");this.thumbs_wrapper=this.nav.find(".ad-thumbs");this.preloads=a('<div class="ad-preloads"></div>');this.loader=a('<img class="ad-loader" src="'+this.settings.loader_image+'">');this.image_wrapper.append(this.loader);this.loader.hide();a(document.body).append(this.preloads)},loading:function(a){if(a)this.loader.show();else this.loader.hide()},addAnimation:function(c,b){if(a.isFunction(b))this.animations[c]=b},findImages:function(){var b=this;this.images=[];var c=0,d=0,e=this.thumbs_wrapper.find("a"),f=e.length;this.settings.thumb_opacity<1&&e.find("img").css("opacity",this.settings.thumb_opacity);e.each(function(g){var f=a(this),j=f.attr("href"),e=f.find("img");if(!b.isImageLoaded(e[0]))e.load(function(){c+=this.parentNode.parentNode.offsetWidth;d++});else{c+=e[0].parentNode.parentNode.offsetWidth;d++}f.addClass("ad-thumb"+g);f.click(function(){b.showImage(g);b.slideshow.stop();return false}).hover(function(){!a(this).is(".ad-active")&&b.settings.thumb_opacity<1&&a(this).find("img").fadeTo(300,1);b.preloadImage(g)},function(){!a(this).is(".ad-active")&&b.settings.thumb_opacity<1&&a(this).find("img").fadeTo(300,b.settings.thumb_opacity)});var i=false;if(e.data("ad-desc"))i=e.data("ad-desc");else if(e.attr("longdesc")&&e.attr("longdesc").length)i=e.attr("longdesc");var h=false;if(e.data("ad-title"))h=e.data("ad-title");else if(e.attr("title")&&e.attr("title").length)h=e.attr("title");b.images[g]={thumb:e.attr("src"),image:j,error:false,preloaded:false,desc:i,title:h,size:false}});var g=setInterval(function(){if(f==d){b.nav.find(".ad-thumb-list").css("width",c+10+"px");clearInterval(g)}},100)},initKeyEvents:function(){var b=this;a(document).keydown(function(a){if(a.keyCode==39){b.nextImage();b.slideshow.stop()}else if(a.keyCode==37){b.prevImage();b.slideshow.stop()}})},initNextAndPrev:function(){this.next_link=a('<div class="ad-next"><div class="ad-next-image"></div></div>');this.prev_link=a('<div class="ad-prev"><div class="ad-prev-image"></div></div>');this.image_wrapper.append(this.next_link);this.image_wrapper.append(this.prev_link);var b=this;this.prev_link.add(this.next_link).mouseover(function(){a(this).css("height",b.image_wrapper_height);a(this).find("div").show()}).mouseout(function(){a(this).find("div").hide()}).click(function(){if(a(this).is(".ad-next")){b.nextImage();b.slideshow.stop()}else{b.prevImage();b.slideshow.stop()}}).find("div").css("opacity",.7)},initBackAndForward:function(){var b=this;this.scroll_forward=a('<div class="ad-forward"></div>');this.scroll_back=a('<div class="ad-back"></div>');this.nav.append(this.scroll_forward);this.nav.prepend(this.scroll_back);var c=0,d=false;a(this.scroll_back).add(this.scroll_forward).click(function(){var c=b.nav_display_width-50;if(b.settings.scroll_jump>0)var c=b.settings.scroll_jump;if(a(this).is(".ad-forward"))var d=b.thumbs_wrapper.scrollLeft()+c;else var d=b.thumbs_wrapper.scrollLeft()-c;b.settings.slideshow.stop_on_scroll&&b.slideshow.stop();b.thumbs_wrapper.animate({scrollLeft:d+"px"});return false}).css("opacity",.6).hover(function(){var e="left";if(a(this).is(".ad-forward"))e="right";d=setInterval(function(){c++;c>30&&b.settings.slideshow.stop_on_scroll&&b.slideshow.stop();var a=b.thumbs_wrapper.scrollLeft()+1;if(e=="left")a=b.thumbs_wrapper.scrollLeft()-1;b.thumbs_wrapper.scrollLeft(a)},10);a(this).css("opacity",1)},function(){c=0;clearInterval(d);a(this).css("opacity",.6)})},_afterShow:function(){this.gallery_info.html(this.current_index+1+" / "+this.images.length);if(!this.settings.cycle){this.prev_link.show().css("height",this.image_wrapper_height);this.next_link.show().css("height",this.image_wrapper_height);this.current_index==this.images.length-1&&this.next_link.hide();this.current_index==0&&this.prev_link.hide()}this.fireCallback(this.settings.callbacks.afterImageVisible)},_getContainedImageSize:function(b,a){if(a>this.image_wrapper_height){var c=b/a;a=this.image_wrapper_height;b=this.image_wrapper_height*c}if(b>this.image_wrapper_width){var c=a/b;b=this.image_wrapper_width;a=this.image_wrapper_width*c}return{width:b,height:a}},_centerImage:function(a,c,b){a.css("top","0px");if(b<this.image_wrapper_height){var d=this.image_wrapper_height-b;a.css("top",d/2+"px")}a.css("left","0px");if(c<this.image_wrapper_width){var d=this.image_wrapper_width-c;a.css("left",d/2+"px")}},_getDescription:function(b){var c=false;if(b.desc.length||b.title.length){var d="";if(b.title.length)d='<strong class="ad-description-title">'+b.title+"</strong>";var c="";if(b.desc.length)c="<span>"+b.desc+"</span>";c=a('<p class="ad-image-description">'+d+c+"</p>")}return c},showImage:function(a,b){if(this.images[a]&&!this.in_transition){var c=this,d=this.images[a];this.in_transition=true;if(!d.preloaded){this.loading(true);this.preloadImage(a,function(){c.loading(false);c._showWhenLoaded(a,b)})}else this._showWhenLoaded(a,b)}},_showWhenLoaded:function(f,n){if(this.images[f]){var e=this,h=this.images[f],b=a(document.createElement("div")).addClass("ad-image"),k=a(new Image).attr("src",h.image);b.append(k);this.image_wrapper.prepend(b);var c=this._getContainedImageSize(h.size.width,h.size.height);k.attr("width",c.width);k.attr("height",c.height);b.css({width:c.width+"px",height:c.height+"px"});this._centerImage(b,c.width,c.height);var g=this._getDescription(h,b);if(g){b.append(g);var o=c.width-parseInt(g.css("padding-left"),10)-parseInt(g.css("padding-right"),10);g.css("width",o+"px")}this.highLightThumb(this.nav.find(".ad-thumb"+f));var l="right";if(this.current_index<f)l="left";this.fireCallback(this.settings.callbacks.beforeImageVisible);if(this.current_image||this.settings.animate_first_image){var i=this.settings.animation_speed,j="swing",d=this.animations[this.settings.effect].call(this,b,l,g);if(typeof d.speed!="undefined")i=d.speed;if(typeof d.easing!="undefined")j=d.easing;if(this.current_image){var m=this.current_image;m.animate(d.old_image,i,j,function(){m.remove()})}b.animate(d.new_image,i,j,function(){e.current_index=f;e.current_image=b;e.in_transition=false;e._afterShow();e.fireCallback(n)})}else{this.current_index=f;this.current_image=b;this.in_transition=false;e._afterShow();this.fireCallback(n)}}},nextIndex:function(){if(this.current_index==this.images.length-1){if(!this.settings.cycle)return false;var a=0}else var a=this.current_index+1;return a},nextImage:function(b){var a=this.nextIndex();if(a===false)return false;this.preloadImage(a+1);this.showImage(a,b);return true},prevIndex:function(){if(this.current_index==0){if(!this.settings.cycle)return false;var a=this.images.length-1}else var a=this.current_index-1;return a},prevImage:function(b){var a=this.prevIndex();if(a===false)return false;this.preloadImage(a-1);this.showImage(a,b);return true},preloadAll:function(){var b=this,a=0;function c(){if(a<b.images.length){a++;b.preloadImage(a,c)}}b.preloadImage(a,c)},preloadImage:function(e,d){if(this.images[e]){var b=this.images[e];if(!this.images[e].preloaded){var c=a(new Image);c.attr("src",b.image);if(!this.isImageLoaded(c[0])){this.preloads.append(c);var f=this;c.load(function(){b.preloaded=true;b.size={width:this.width,height:this.height};f.fireCallback(d)}).error(function(){b.error=true;b.preloaded=false;b.size=false})}else{b.preloaded=true;b.size={width:c[0].width,height:c[0].height};this.fireCallback(d)}}else this.fireCallback(d)}},isImageLoaded:function(a){return typeof a.complete!="undefined"&&!a.complete?false:typeof a.naturalWidth!="undefined"&&a.naturalWidth==0?false:true},highLightThumb:function(a){this.thumbs_wrapper.find(".ad-active").removeClass("ad-active");a.addClass("ad-active");if(this.settings.thumb_opacity<1){this.thumbs_wrapper.find("a:not(.ad-active) img").fadeTo(300,this.settings.thumb_opacity);a.find("img").fadeTo(300,1)}var b=a[0].parentNode.offsetLeft;b-=this.nav_display_width/2-a[0].offsetWidth/2;this.thumbs_wrapper.animate({scrollLeft:b+"px"})},fireCallback:function(b){a.isFunction(b)&&b.call(this)}};function b(a,b){this.init(a,b)}b.prototype={start_link:false,stop_link:false,countdown:false,controls:false,settings:false,nextimage_callback:false,enabled:false,running:false,countdown_interval:false,init:function(a,b){var c=this;this.nextimage_callback=a;this.settings=b},create:function(){this.start_link=a('<span class="ad-slideshow-start">'+this.settings.start_label+"</span>");this.stop_link=a('<span class="ad-slideshow-stop">'+this.settings.stop_label+"</span>");this.countdown=a('<span class="ad-slideshow-countdown"></span>');this.controls=a('<div class="ad-slideshow-controls"></div>');this.controls.append(this.start_link).append(this.stop_link).append(this.countdown);this.countdown.hide();var b=this;this.start_link.click(function(){b.start()});this.stop_link.click(function(){b.stop()});a(document).keydown(function(a){if(a.keyCode==83)if(b.running)b.stop();else b.start()});return this.controls},disable:function(){this.enabled=false;this.stop();this.controls.hide()},enable:function(){this.enabled=true;this.controls.show()},toggle:function(){if(this.enabled)this.disable();else this.enable()},start:function(){if(this.running||!this.enabled)return false;var a=this;this.running=true;this.controls.addClass("ad-slideshow-running");this._next();this.fireCallback(this.settings.onStart);return true},stop:function(){if(!this.running)return false;this.running=false;this.countdown.hide();this.controls.removeClass("ad-slideshow-running");clearInterval(this.countdown_interval);this.fireCallback(this.settings.onStop);return true},_next:function(){var a=this,c=this.settings.countdown_prefix,d=this.settings.countdown_sufix;clearInterval(a.countdown_interval);this.countdown.show().html(c+this.settings.speed/1e3+d);var b=0;this.countdown_interval=setInterval(function(){b+=1e3;if(b>=a.settings.speed){var f=function(){a.running&&a._next();b=0};!a.nextimage_callback(f)&&a.stop();b=0}var e=parseInt(a.countdown.text().replace(/[^0-9]/g,""),10);e--;e>0&&a.countdown.html(c+e+d)},1e3)},fireCallback:function(b){a.isFunction(b)&&b.call(this)}}})(jQuery)
/*
	jQuery Coda-Slider v2.0 - http://www.ndoherty.biz/coda-slider
	Copyright (c) 2009 Niall Doherty
	This plugin available for use in all personal or commercial projects under both MIT and GPL licenses.
*/
;var sliderCount=1;$.fn.codaSlider=function(a){a=$.extend({autoHeight:true,autoHeightEaseDuration:1e3,autoHeightEaseFunction:"easeInOutExpo",autoSlide:false,autoSlideInterval:7e3,autoSlideStopWhenClicked:true,crossLinking:true,dynamicArrows:true,dynamicArrowLeftText:"&#171; left",dynamicArrowRightText:"right &#187;",dynamicTabs:true,dynamicTabsAlign:"center",dynamicTabsPosition:"top",externalTriggerSelector:"a.xtrig",firstPanelToLoad:1,panelTitleSelector:"h2.title",slideEaseDuration:1e3,slideEaseFunction:"easeInOutExpo",onBeforeClick:function(){}},a);return this.each(function(){var b=$(this);if(a.dynamicArrows){b.parent().addClass("arrows");b.before('<div class="coda-nav-left" id="coda-nav-left-'+sliderCount+'"><a href="#">'+a.dynamicArrowLeftText+"</a></div>");b.after('<div class="coda-nav-right" id="coda-nav-right-'+sliderCount+'"><a href="#">'+a.dynamicArrowRightText+"</a></div>")}var f=b.find(".panel").width(),e=b.find(".panel").size(),k=f*e,h=0;$(".panel",b).wrapAll('<div class="panel-container"></div>');$(".panel-container",b).css({width:k});if(a.crossLinking&&location.hash&&parseInt(location.hash.slice(1))<=e){var c=parseInt(location.hash.slice(1)),d=-(f*(c-1));$(".panel-container",b).css({marginLeft:d})}else if(a.firstPanelToLoad!=1&&a.firstPanelToLoad<=e){var c=a.firstPanelToLoad,d=-(f*(c-1));$(".panel-container",b).css({marginLeft:d})}else var c=1;$("#coda-nav-left-"+sliderCount+" a").click(function(){h++;if(c==1){d=-(f*(e-1));g(e-1);c=e;b.siblings(".coda-nav").find("a.current").removeClass("current").parents("ul").find("li:last a").addClass("current")}else{c-=1;g(c-1);d=-(f*(c-1));b.siblings(".coda-nav").find("a.current").removeClass("current").parent().prev().find("a").addClass("current")}$(".panel-container",b).animate({marginLeft:d},a.slideEaseDuration,a.slideEaseFunction);if(a.crossLinking)location.hash=c;return false});$("#coda-nav-right-"+sliderCount+" a").click(function(){h++;if(c==e){d=0;c=1;g(0);b.siblings(".coda-nav").find("a.current").removeClass("current").parents("ul").find("a:eq(0)").addClass("current")}else{d=-(f*c);g(c);c+=1;b.siblings(".coda-nav").find("a.current").removeClass("current").parent().next().find("a").addClass("current")}$(".panel-container",b).animate({marginLeft:d},a.slideEaseDuration,a.slideEaseFunction);if(a.crossLinking)location.hash=c;return false});if(a.dynamicTabs){var i='<div class="coda-nav" id="coda-nav-'+sliderCount+'"><ul></ul></div>';switch(a.dynamicTabsPosition){case"bottom":b.parent().append(i);break;default:b.parent().prepend(i)}ul=$("#coda-nav-"+sliderCount+" ul");$(".panel",b).each(function(b){ul.append('<li class="tab'+(b+1)+'"><a href="#'+(b+1)+'">'+$(this).find(a.panelTitleSelector).html()+"</a></li>")});navContainerWidth=b.width()+b.siblings(".coda-nav-left").width()+b.siblings(".coda-nav-right").width();ul.parent().css({width:navContainerWidth});switch(a.dynamicTabsAlign){case"center":ul.css({width:($("li",ul).width()+2)*e});break;case"right":ul.css({"float":"right"})}}$("#coda-nav-"+sliderCount+" a").each(function(e){$(this).bind("click",function(){a.onBeforeClick(this);h++;$(this).addClass("current").parents("ul").find("a").not($(this)).removeClass("current");d=-(f*e);g(e);c=e+1;$(".panel-container",b).animate({marginLeft:d},a.slideEaseDuration,a.slideEaseFunction);if(!a.crossLinking)return false})});$(a.externalTriggerSelector).each(function(){sliderCount==parseInt($(this).attr("rel").slice(12))&&$(this).bind("click",function(){a.onBeforeClick(this);h++;targetPanel=parseInt($(this).attr("href").slice(1));d=-(f*(targetPanel-1));g(targetPanel-1);c=targetPanel;b.siblings(".coda-nav").find("a").removeClass("current").parents("ul").find("li:eq("+(targetPanel-1)+") a").addClass("current");$(".panel-container",b).animate({marginLeft:d},a.slideEaseDuration,a.slideEaseFunction);if(!a.crossLinking)return false})});if(a.crossLinking&&location.hash&&parseInt(location.hash.slice(1))<=e)$("#coda-nav-"+sliderCount+" a:eq("+(location.hash.slice(1)-1)+")").addClass("current");else if(a.firstPanelToLoad!=1&&a.firstPanelToLoad<=e)$("#coda-nav-"+sliderCount+" a:eq("+(a.firstPanelToLoad-1)+")").addClass("current");else $("#coda-nav-"+sliderCount+" a:eq(0)").addClass("current");if(a.autoHeight){panelHeight=$(".panel:eq("+(c-1)+")",b).height();b.css({height:panelHeight})}a.autoSlide&&b.ready(function(){setTimeout(j,a.autoSlideInterval)});function g(c){if(a.autoHeight){panelHeight=$(".panel:eq("+c+")",b).height();b.animate({height:panelHeight},a.autoHeightEaseDuration,a.autoHeightEaseFunction)}}function j(){if(h==0||!a.autoSlideStopWhenClicked){if(c==e){var d=0;c=1}else{var d=-(f*c);c+=1}g(c-1);b.siblings(".coda-nav").find("a").removeClass("current").parents("ul").find("li:eq("+(c-1)+") a").addClass("current");$(".panel-container",b).animate({marginLeft:d},a.slideEaseDuration,a.slideEaseFunction);setTimeout(j,a.autoSlideInterval)}}$(".panel",b).show().end().find("p.loading").remove();b.removeClass("preload");sliderCount++})}
/*
This file is part of VideoJS. Copyright 2010 Zencoder, Inc.

VideoJS is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
*/
;var videoJSPlayers=[];(function(){var a=false,b=/xyz/.test(function(){xyz})?/\b_super\b/:/.*/;this.Class=function(){};Class.extend=function(e){var g=this.prototype;a=true;var f=new this;a=false;for(var c in e)f[c]=typeof e[c]=="function"&&typeof g[c]=="function"&&b.test(e[c])?function(a,b){return function(){var d=this._super;this._super=g[a];var c=b.apply(this,arguments);this._super=d;return c}}(c,e[c]):e[c];function d(){!a&&this.init&&this.init.apply(this,arguments)}d.prototype=f;d.constructor=d;d.extend=arguments.callee;return d}})();var VideoJS=Class.extend({init:function(b,a){this.video=b;this.video.controls=false;this.options={num:0,controlsBelow:false,controlsHiding:true,defaultVolume:.85,flashVersion:9,linksHiding:true,autoBuffer:false};typeof a=="object"&&_V_.merge(this.options,a);this.box=this.video.parentNode;this.flashFallback=this.getFlashFallback();this.linksFallback=this.getLinksFallback();(VideoJS.browserSupportsVideo()||(this.flashFallback||VideoJS.isIE())&&this.flashVersionSupported())&&this.hideLinksFallback();if(VideoJS.browserSupportsVideo()){if(this.canPlaySource()==false){this.replaceWithFlash();return}}else return;if(VideoJS.isIpad()){this.options.controlsBelow=true;this.options.controlsHiding=false}this.options.controlsBelow&&_V_.addClass(this.box,"vjs-controls-below");this.percentLoaded=0;this.buildPoster();this.showPoster();this.buildController();this.showController();this.video.addEventListener("loadeddata",this.onLoadedData.context(this),false);this.video.addEventListener("play",this.onPlay.context(this),false);this.video.addEventListener("pause",this.onPause.context(this),false);this.video.addEventListener("ended",this.onEnded.context(this),false);this.video.addEventListener("volumechange",this.onVolumeChange.context(this),false);this.video.addEventListener("error",this.onError.context(this),false);this.video.addEventListener("progress",this.onProgress.context(this),false);this.watchBuffer=setInterval(this.updateBufferedTotal.context(this),33);this.playControl.addEventListener("click",this.onPlayControlClick.context(this),false);this.video.addEventListener("click",this.onPlayControlClick.context(this),false);this.poster&&this.poster.addEventListener("click",this.onPlayControlClick.context(this),false);this.progressHolder.addEventListener("mousedown",this.onProgressHolderMouseDown.context(this),false);this.progressHolder.addEventListener("mouseup",this.onProgressHolderMouseUp.context(this),false);this.setVolume(localStorage.volume||this.options.defaultVolume);this.volumeControl.addEventListener("mousedown",this.onVolumeControlMouseDown.context(this),false);this.volumeControl.addEventListener("mouseup",this.onVolumeControlMouseUp.context(this),false);this.updateVolumeDisplay();this.fullscreenControl.addEventListener("click",this.onFullscreenControlClick.context(this),false);this.video.addEventListener("mousemove",this.onVideoMouseMove.context(this),false);this.video.addEventListener("mouseout",this.onVideoMouseOut.context(this),false);this.poster&&this.poster.addEventListener("mousemove",this.onVideoMouseMove.context(this),false);this.poster&&this.poster.addEventListener("mouseout",this.onVideoMouseOut.context(this),false);this.controls.addEventListener("mouseout",this.onVideoMouseOut.context(this),false);this.onEscKey=function(a){a.keyCode==27&&this.fullscreenOff()}.context(this);this.onWindowResize=function(){this.positionController()}.context(this);this.fixPreloading()},fixPreloading:function(){if(typeof this.video.hasAttribute=="function"&&this.video.hasAttribute("preload"))this.video.autobuffer=false},buildController:function(){this.controls=_V_.createElement("ul",{className:"vjs-controls"});this.video.parentNode.appendChild(this.controls);this.playControl=_V_.createElement("li",{className:"vjs-play-control vjs-play",innerHTML:"<span></span>"});this.controls.appendChild(this.playControl);this.progressControl=_V_.createElement("li",{className:"vjs-progress-control"});this.controls.appendChild(this.progressControl);this.progressHolder=_V_.createElement("ul",{className:"vjs-progress-holder"});this.progressControl.appendChild(this.progressHolder);this.loadProgress=_V_.createElement("li",{className:"vjs-load-progress"});this.progressHolder.appendChild(this.loadProgress);this.playProgress=_V_.createElement("li",{className:"vjs-play-progress"});this.progressHolder.appendChild(this.playProgress);this.timeControl=_V_.createElement("li",{className:"vjs-time-control"});this.controls.appendChild(this.timeControl);this.currentTimeDisplay=_V_.createElement("span",{className:"vjs-current-time-display",innerHTML:"00:00"});this.timeControl.appendChild(this.currentTimeDisplay);this.timeSeparator=_V_.createElement("span",{innerHTML:" / "});this.timeControl.appendChild(this.timeSeparator);this.durationDisplay=_V_.createElement("span",{className:"vjs-duration-display",innerHTML:"00:00"});this.timeControl.appendChild(this.durationDisplay);this.volumeControl=_V_.createElement("li",{className:"vjs-volume-control",innerHTML:"<ul><li></li><li></li><li></li><li></li><li></li><li></li></ul>"});this.controls.appendChild(this.volumeControl);this.volumeDisplay=this.volumeControl.children[0];this.fullscreenControl=_V_.createElement("li",{className:"vjs-fullscreen-control",innerHTML:"<ul><li></li><li></li><li></li><li></li></ul>"});this.controls.appendChild(this.fullscreenControl)},getLinksFallback:function(){return this.box.getElementsByTagName("P")[0]},hideLinksFallback:function(){if(this.options.linksHiding&&this.linksFallback)this.linksFallback.style.display="none"},getFlashFallback:function(){if(VideoJS.isIE())return;for(var b=this.box.getElementsByClassName("vjs-flash-fallback"),a=0,c=b.length;a<c;a++)if(b[a].tagName.toUpperCase()=="OBJECT")return b[a]},replaceWithFlash:function(){if(this.flashFallback){this.box.insertBefore(this.flashFallback,this.video);this.video.style.display="none"}},showController:function(){this.controls.style.display="block";this.positionController()},positionController:function(){if(this.controls.style.display=="none")return;if(this.videoIsFullScreen)this.box.style.width="";else this.box.style.width=this.video.offsetWidth+"px";if(this.options.controlsBelow){if(this.videoIsFullScreen){this.box.style.height="";this.video.style.height=this.box.offsetHeight-this.controls.offsetHeight+"px"}else{this.video.style.height="";this.box.style.height=this.video.offsetHeight+this.controls.offsetHeight+"px"}this.controls.style.top=this.video.offsetHeight+"px"}else this.controls.style.top=this.video.offsetHeight-this.controls.offsetHeight+"px";this.sizeProgressBar()},hideController:function(){if(this.options.controlsHiding)this.controls.style.display="none"},updatePosterSource:function(){if(!this.video.poster){var a=this.video.getElementsByTagName("img");if(a.length>0)this.video.poster=a[0].src}},buildPoster:function(){this.updatePosterSource();if(this.video.poster){this.poster=document.createElement("img");this.video.parentNode.appendChild(this.poster);this.poster.src=this.video.poster;this.poster.className="vjs-poster"}else this.poster=false},showPoster:function(){if(!this.poster)return;this.poster.style.display="block";this.positionPoster()},positionPoster:function(){if(this.poster==false||this.poster.style.display=="none")return;this.poster.style.height=this.video.offsetHeight+"px";this.poster.style.width=this.video.offsetWidth+"px"},hidePoster:function(){if(!this.poster)return;this.poster.style.display="none"},canPlaySource:function(){for(var b=this.video.children,a=0,d=b.length;a<d;a++)if(b[a].tagName.toUpperCase()=="SOURCE"){var c=this.video.canPlayType(b[a].type);if(c=="probably"||c=="maybe")return true}return false},onPlay:function(){this.playControl.className="vjs-play-control vjs-pause";this.hidePoster();this.trackPlayProgress()},onPause:function(){this.playControl.className="vjs-play-control vjs-play";this.stopTrackingPlayProgress()},onEnded:function(){this.video.pause();this.onPause()},onVolumeChange:function(){this.updateVolumeDisplay()},onError:function(a){console.log(a);console.log(this.video.error)},onLoadedData:function(){this.showController()},onProgress:function(a){a.total>0&&this.setLoadProgress(a.loaded/a.total)},updateBufferedTotal:function(){if(this.video.buffered){if(this.video.buffered.length>=1){this.setLoadProgress(this.video.buffered.end(0)/this.video.duration);this.video.buffered.end(0)==this.video.duration&&clearInterval(this.watchBuffer)}}else clearInterval(this.watchBuffer)},setLoadProgress:function(a){if(a>this.percentLoaded){this.percentLoaded=a;this.updateLoadProgress()}},updateLoadProgress:function(){if(this.controls.style.display=="none")return;this.loadProgress.style.width=this.percentLoaded*_V_.getComputedStyleValue(this.progressHolder,"width").replace("px","")+"px"},onPlayControlClick:function(){if(this.video.paused)this.video.play();else this.video.pause()},onProgressHolderMouseDown:function(){this.stopTrackingPlayProgress();if(this.video.paused)this.videoWasPlaying=false;else{this.videoWasPlaying=true;this.video.pause()}_V_.blockTextSelection();document.onmousemove=function(a){this.setPlayProgressWithEvent(a)}.context(this);document.onmouseup=function(){_V_.unblockTextSelection();document.onmousemove=null;document.onmouseup=null;if(this.videoWasPlaying){this.video.play();this.trackPlayProgress()}}.context(this)},onProgressHolderMouseUp:function(a){this.setPlayProgressWithEvent(a)},onVolumeControlMouseDown:function(){_V_.blockTextSelection();document.onmousemove=function(a){this.setVolumeWithEvent(a)}.context(this);document.onmouseup=function(){_V_.unblockTextSelection();document.onmousemove=null;document.onmouseup=null}.context(this)},onVolumeControlMouseUp:function(a){this.setVolumeWithEvent(a)},onFullscreenControlClick:function(){if(!this.videoIsFullScreen)this.fullscreenOn();else this.fullscreenOff()},onVideoMouseMove:function(){this.showController();clearInterval(this.mouseMoveTimeout);this.mouseMoveTimeout=setTimeout(function(){this.hideController()}.context(this),4e3)},onVideoMouseOut:function(b){var a=b.relatedTarget;while(a&&a!==this.video&&a!==this.controls)a=a.parentNode;a!==this.video&&a!==this.controls&&this.hideController()},sizeProgressBar:function(){this.updatePlayProgress();this.updateLoadProgress()},getControlsPadding:function(){return _V_.findPosX(this.playControl)-_V_.findPosX(this.controls)},getControlBorderAdjustment:function(){var b=parseInt(_V_.getComputedStyleValue(this.playControl,"border-left-width").replace("px","")),a=parseInt(_V_.getComputedStyleValue(this.playControl,"border-right-width").replace("px",""));return b+a},trackPlayProgress:function(){this.playProgressInterval=setInterval(function(){this.updatePlayProgress()}.context(this),33)},stopTrackingPlayProgress:function(){clearInterval(this.playProgressInterval)},updatePlayProgress:function(){if(this.controls.style.display=="none")return;this.playProgress.style.width=this.video.currentTime/this.video.duration*_V_.getComputedStyleValue(this.progressHolder,"width").replace("px","")+"px";this.updateTimeDisplay()},setPlayProgress:function(a){this.video.currentTime=a*this.video.duration;this.playProgress.style.width=a*_V_.getComputedStyleValue(this.progressHolder,"width").replace("px","")+"px";this.updateTimeDisplay()},setPlayProgressWithEvent:function(b){var a=_V_.getRelativePosition(b.pageX,this.progressHolder);this.setPlayProgress(a)},updateTimeDisplay:function(){this.currentTimeDisplay.innerHTML=_V_.formatTime(this.video.currentTime);if(this.video.duration)this.durationDisplay.innerHTML=_V_.formatTime(this.video.duration)},setVolume:function(a){this.video.volume=parseFloat(a);localStorage.volume=this.video.volume},setVolumeWithEvent:function(b){var a=_V_.getRelativePosition(b.pageX,this.volumeControl.children[0]);this.setVolume(a)},updateVolumeDisplay:function(){for(var b=Math.ceil(this.video.volume*6),a=0;a<6;a++)if(a<b)_V_.addClass(this.volumeDisplay.children[a],"vjs-volume-level-on");else _V_.removeClass(this.volumeDisplay.children[a],"vjs-volume-level-on")},fullscreenOn:function(){if(!this.nativeFullscreenOn()){this.videoIsFullScreen=true;this.docOrigOverflow=document.documentElement.style.overflow;document.addEventListener("keydown",this.onEscKey,false);window.addEventListener("resize",this.onWindowResize,false);document.documentElement.style.overflow="hidden";_V_.addClass(this.box,"vjs-fullscreen");this.positionController();this.positionPoster()}},nativeFullscreenOn:function(){if(typeof this.video.webkitEnterFullScreen=="function"&&false)if(!navigator.userAgent.match("Chrome")){this.video.webkitEnterFullScreen();return true}},fullscreenOff:function(){this.videoIsFullScreen=false;document.removeEventListener("keydown",this.onEscKey,false);window.removeEventListener("resize",this.onWindowResize,false);document.documentElement.style.overflow=this.docOrigOverflow;_V_.removeClass(this.box,"vjs-fullscreen");this.positionController();this.positionPoster()},flashVersionSupported:function(){return VideoJS.getFlashVersion()>=this.options.flashVersion}}),_V_={addClass:function(a,b){if(a.className.split(/\s+/).lastIndexOf(b)==-1)a.className=a.className==""?b:a.className+" "+b},removeClass:function(b,c){if(b.className.indexOf(c)==-1)return;var a=b.className.split(/\s+/);a.splice(a.lastIndexOf(c),1);b.className=a.join(" ")},merge:function(a,b){for(attrname in b)a[attrname]=b[attrname];return a},createElement:function(b,a){return _V_.merge(document.createElement(b),a)},blockTextSelection:function(){document.body.focus();document.onselectstart=function(){return false}},unblockTextSelection:function(){document.onselectstart=function(){return true}},formatTime:function(a){a=Math.round(a);minutes=Math.floor(a/60);minutes=minutes>=10?minutes:"0"+minutes;a=Math.floor(a%60);a=a>=10?a:"0"+a;return minutes+":"+a},getRelativePosition:function(b,a){return Math.max(0,Math.min(1,(b-_V_.findPosX(a))/a.offsetWidth))},findPosX:function(a){var b=a.offsetLeft;while(a=a.offsetParent)b+=a.offsetLeft;return b},getComputedStyleValue:function(a,b){return window.getComputedStyle(a,null).getPropertyValue(b)}};VideoJS.setup=function(a,c){if(!c)c=document.getElementsByTagName("video");for(var b=0,d=c.length;b<d;b++){videoTag=c[b];if(videoTag.className.indexOf("video-js")!=-1){a=a?_V_.merge(a,{num:b}):a;videoJSPlayers[b]=new VideoJS(videoTag,a)}}};VideoJS.browserSupportsVideo=function(){return typeof VideoJS.videoSupport!="undefined"?VideoJS.videoSupport:(VideoJS.videoSupport=!!document.createElement("video").canPlayType)};VideoJS.getFlashVersion=function(){if(typeof VideoJS.flashVersion!="undefined")return VideoJS.flashVersion;var a=0;if(typeof navigator.plugins!="undefined"&&typeof navigator.plugins["Shockwave Flash"]=="object"){desc=navigator.plugins["Shockwave Flash"].description;if(desc&&!(typeof navigator.mimeTypes!="undefined"&&navigator.mimeTypes["application/x-shockwave-flash"]&&!navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin))a=parseInt(desc.match(/^.*\s+([^\s]+)\.[^\s]+\s+[^\s]+$/)[1])}else if(typeof window.ActiveXObject!="undefined")try{var b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");if(b)a=parseInt(b.GetVariable("$version").match(/^[^\s]+\s(\d+)/)[1])}catch(c){}return VideoJS.flashVersion=a};VideoJS.isIE=function(){return!+"\131"};VideoJS.isIpad=function(){return navigator.userAgent.match(/iPad/i)!=null};Function.prototype.context=function(b){var a=this;temp=function(){return a.apply(b,arguments)};return temp}
