/**
 * jQuery Lightbox
 * Version 0.5 - 11/29/2007
 * @author Warren Krewenki
 *
 * This package is distributed under the BSD license.
 * For full license information, see LICENSE.TXT
 *
 * Changes by:
 * @author Krzysztof Kotowicz <koto at webworkers dot pl>:
 *  - bugfix: multiple instances of Lightbox galleries allowed
 *    (using opts variable instead of $.fn.lightbox.defaults)
 *  - bugfix: use var for local variables in a few functions
 *  - added support for navbarOnTop setting
 *  - added support for displayTitle setting
 *  - added support for slideNavBar setting (with slideNavBarSpeed)
 *  - added support for displayHelp setting
 *  - added support for fitToScreen setting (ported Lightbox VinDSL hack)
 *    (see http://www.huddletogether.com/forum/comments.php?DiscussionID=307)
 *  - plugin now uses jQuery.width() and jQuery.height()
 *  - removed eval() calls
 *  - removed destroyElement - uses jQuery.remove()
 *  - use of prevLinkText, nextLinkText and help
 *  - all strings are now placed in opts.strings to allow for customization/translation
 *
 * Based on Lightbox 2 by Lokesh Dhakar (http://www.huddletogether.com/projects/lightbox2/)
 * Originally written to make use of the Prototype framework, and Script.acalo.us, now altered to use jQuery.
 *
 *
 **/
(function($){var opts;$.fn.lightbox=function(options){opts=$.extend({},$.fn.lightbox.defaults,options);$.fn.lightbox.initialize();return this.each(function(){$(this).click(function(){$(this).lightbox.start(this);return false;});});};$.fn.lightbox.initialize=function(){$('#overlay').remove();$('#lightbox').remove();opts.inprogress=false;var outerImage='<div id="outerImageContainer"><div id="imageContainer"><img id="lightboxImage"><div id="hoverNav"><a href="javascript://" title="'+opts.strings.prevLinkTitle+'" id="prevLink"></a><a href="javascript://" id="nextLink" title="'+opts.strings.nextLinkTitle+'"></a></div><div id="loading"><a href="javascript://" id="loadingLink"><img src="'+opts.fileLoadingImage+'"></a></div></div></div>';var imageData='<div id="imageDataContainer" class="clearfix"><div id="imageData"><div id="imageDetails"><span id="caption"></span><span id="numberDisplay"></span></div><div id="bottomNav">'
if(opts.displayHelp)
imageData+='<span id="helpDisplay">'+opts.strings.help+'</span>';imageData+='<a href="javascript://" id="bottomNavClose" title="'+opts.strings.closeTitle+'"><img src="'+opts.fileBottomNavCloseImage+'"></a></div></div></div>';var string;if(opts.navbarOnTop){string='<div id="overlay"></div><div id="lightbox">'+imageData+outerImage+'</div>';$("body").append(string);$("#imageDataContainer").addClass('ontop');}else{string='<div id="overlay"></div><div id="lightbox">'+outerImage+imageData+'</div>';$("body").append(string);}
$("#overlay").click(function(){$.fn.lightbox.end();}).hide();$("#lightbox").click(function(){$.fn.lightbox.end();}).hide();$("#loadingLink").click(function(){$.fn.lightbox.end();return false;});$("#bottomNavClose").click(function(){$.fn.lightbox.end();return false;});$('#outerImageContainer').width(opts.widthCurrent).height(opts.heightCurrent);$('#imageDataContainer').width(opts.widthCurrent);};$.fn.lightbox.getPageSize=function(){var xScroll,yScroll;if(window.innerHeight&&window.scrollMaxY){xScroll=window.innerWidth+window.scrollMaxX;yScroll=window.innerHeight+window.scrollMaxY;}else if(document.body.scrollHeight>document.body.offsetHeight){xScroll=document.body.scrollWidth;yScroll=document.body.scrollHeight;}else{xScroll=document.body.offsetWidth;yScroll=document.body.offsetHeight;}
var windowWidth,windowHeight;if(self.innerHeight){if(document.documentElement.clientWidth){windowWidth=document.documentElement.clientWidth;}else{windowWidth=self.innerWidth;}
windowHeight=self.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){windowWidth=document.documentElement.clientWidth;windowHeight=document.documentElement.clientHeight;}else if(document.body){windowWidth=document.body.clientWidth;windowHeight=document.body.clientHeight;}
if(yScroll<windowHeight){pageHeight=windowHeight;}else{pageHeight=yScroll;}
if(xScroll<windowWidth){pageWidth=xScroll;}else{pageWidth=windowWidth;}
var arrayPageSize=new Array(pageWidth,pageHeight,windowWidth,windowHeight);return arrayPageSize;};$.fn.lightbox.getPageScroll=function(){var xScroll,yScroll;if(self.pageYOffset){yScroll=self.pageYOffset;xScroll=self.pageXOffset;}else if(document.documentElement&&document.documentElement.scrollTop){yScroll=document.documentElement.scrollTop;xScroll=document.documentElement.scrollLeft;}else if(document.body){yScroll=document.body.scrollTop;xScroll=document.body.scrollLeft;}
var arrayPageScroll=new Array(xScroll,yScroll);return arrayPageScroll;};$.fn.lightbox.pause=function(ms){var date=new Date();var curDate=null;do{curDate=new Date();}
while(curDate-date<ms);};$.fn.lightbox.start=function(imageLink){$("select, embed, object").hide();var arrayPageSize=$.fn.lightbox.getPageSize();$("#overlay").hide().css({width:'100%',height:arrayPageSize[1]+'px',opacity:opts.overlayOpacity}).fadeIn();opts.imageArray=[];imageNum=0;var anchors=document.getElementsByTagName(imageLink.tagName);if(!imageLink.rel||(imageLink.rel=='')){opts.imageArray.push(new Array(imageLink.href,opts.displayTitle?imageLink.title:''));}else{$("a").each(function(){if(this.href&&(this.rel==imageLink.rel)){opts.imageArray.push(new Array(this.href,opts.displayTitle?this.title:''));}})
for(i=0;i<opts.imageArray.length;i++){for(j=opts.imageArray.length-1;j>i;j--){if(opts.imageArray[i][0]==opts.imageArray[j][0]){opts.imageArray.splice(j,1);}}}
while(opts.imageArray[imageNum][0]!=imageLink.href){imageNum++;}}
var arrayPageScroll=$.fn.lightbox.getPageScroll();var lightboxTop=arrayPageScroll[1]+(arrayPageSize[3]/10);var lightboxLeft=arrayPageScroll[0];$('#lightbox').css({top:lightboxTop+'px',left:lightboxLeft+'px'}).show();if(!opts.slideNavBar)
$('#imageData').hide();$.fn.lightbox.changeImage(imageNum);};$.fn.lightbox.changeImage=function(imageNum){if(opts.inprogress==false){opts.inprogress=true;opts.activeImage=imageNum;$('#loading').show();$('#lightboxImage').hide();$('#hoverNav').hide();$('#prevLink').hide();$('#nextLink').hide();if(opts.slideNavBar){$('#imageDataContainer').hide();$('#imageData').hide();$.fn.doChangeImage();}else{$.fn.doChangeImage();}}};$.fn.doChangeImage=function(){imgPreloader=new Image();imgPreloader.onload=function(){var newWidth=imgPreloader.width;var newHeight=imgPreloader.height;if(opts.fitToScreen){var arrayPageSize=$.fn.lightbox.getPageSize();var ratio;var initialPageWidth=arrayPageSize[2]-2*opts.borderSize;var initialPageHeight=arrayPageSize[3]-200;if(imgPreloader.height>initialPageHeight)
{newWidth=parseInt((initialPageHeight/imgPreloader.height)*imgPreloader.width);newHeight=initialPageHeight;}
else if(imgPreloader.width>initialPageWidth)
{newHeight=parseInt((initialPageWidth/imgPreloader.width)*imgPreloader.height);newWidth=initialPageWidth;}}
$('#lightboxImage').attr('src',opts.imageArray[opts.activeImage][0]).width(newWidth).height(newHeight);$.fn.lightbox.resizeImageContainer(newWidth,newHeight);}
imgPreloader.src=opts.imageArray[opts.activeImage][0];}
$.fn.lightbox.end=function(){$.fn.lightbox.disableKeyboardNav();$('#lightbox').hide();$('#overlay').fadeOut();$('select, object, embed').show();};$.fn.lightbox.preloadNeighborImages=function(){if((opts.imageArray.length-1)>opts.activeImage){preloadNextImage=new Image();preloadNextImage.src=opts.imageArray[opts.activeImage+1][0];}
if(opts.activeImage>0){preloadPrevImage=new Image();preloadPrevImage.src=opts.imageArray[opts.activeImage-1][0];}};$.fn.lightbox.keyboardAction=function(e){if(e==null){var keycode=event.keyCode;var escapeKey=27;}else{var keycode=e.keyCode;var escapeKey=e.DOM_VK_ESCAPE;}
var key=String.fromCharCode(keycode).toLowerCase();if((key=='x')||(key=='o')||(key=='c')||(keycode==escapeKey)){$.fn.lightbox.end();}else if((key=='p')||(keycode==37)){if(opts.activeImage!=0){$.fn.lightbox.disableKeyboardNav();$.fn.lightbox.changeImage(opts.activeImage-1);}}else if((key=='n')||(keycode==39)){if(opts.activeImage!=(opts.imageArray.length-1)){$.fn.lightbox.disableKeyboardNav();$.fn.lightbox.changeImage(opts.activeImage+1);}}};$.fn.lightbox.resizeImageContainer=function(imgWidth,imgHeight){opts.widthCurrent=document.getElementById('outerImageContainer').offsetWidth;opts.heightCurrent=document.getElementById('outerImageContainer').offsetHeight;var widthNew=(imgWidth+(opts.borderSize*2));var heightNew=(imgHeight+(opts.borderSize*2));opts.xScale=(widthNew/opts.widthCurrent)*100;opts.yScale=(heightNew/opts.heightCurrent)*100;wDiff=opts.widthCurrent-widthNew;hDiff=opts.heightCurrent-heightNew;$('#imageDataContainer').animate({width:widthNew},opts.resizeSpeed,'linear');$('#outerImageContainer').animate({width:widthNew},opts.resizeSpeed,'linear',function(){$('#outerImageContainer').animate({height:heightNew},opts.resizeSpeed,'linear',function(){$.fn.lightbox.showImage();});});if((hDiff==0)&&(wDiff==0)){if(jQuery.browser.msie){$.fn.lightbox.pause(250);}else{$.fn.lightbox.pause(100);}}
$('#prevLink').height(imgHeight);$('#nextLink').height(imgHeight);};$.fn.lightbox.showImage=function(){$('#loading').hide();$('#lightboxImage').fadeIn("fast");$.fn.lightbox.updateDetails();$.fn.lightbox.preloadNeighborImages();opts.inprogress=false;};$.fn.lightbox.updateDetails=function(){if(opts.imageArray[opts.activeImage][1]){$('#caption').html(opts.imageArray[opts.activeImage][1]).show();}
if(opts.imageArray.length>1){var nav_html;nav_html=opts.strings.image+(opts.activeImage+1)+opts.strings.of+opts.imageArray.length;if((opts.activeImage)>0){nav_html='<a title="'+opts.strings.prevLinkTitle+'" href="#" id="prevLinkText">'+opts.strings.prevLinkText+"</a>"+nav_html;}
if((opts.activeImage+1)<opts.imageArray.length){nav_html+='<a title="'+opts.strings.nextLinkTitle+'" href="#" id="nextLinkText">'+opts.strings.nextLinkText+"</a>";}
$('#numberDisplay').html(nav_html).show();}
if(opts.slideNavBar){$("#imageData").slideDown(opts.navBarSlideSpeed);}else{$("#imageData").show();}
var arrayPageSize=$.fn.lightbox.getPageSize();$('#overlay').height(arrayPageSize[1]);$.fn.lightbox.updateNav();};$.fn.lightbox.updateNav=function(){$('#hoverNav').show();if(opts.activeImage!=0){$('#prevLink,#prevLinkText').show().click(function(){$.fn.lightbox.changeImage(opts.activeImage-1);return false;});}
if(opts.activeImage!=(opts.imageArray.length-1)){$('#nextLink,#nextLinkText').show().click(function(){$.fn.lightbox.changeImage(opts.activeImage+1);return false;});}
$.fn.lightbox.enableKeyboardNav();};$.fn.lightbox.enableKeyboardNav=function(){document.onkeydown=$.fn.lightbox.keyboardAction;};$.fn.lightbox.disableKeyboardNav=function(){document.onkeydown='';};$.fn.lightbox.defaults={fileLoadingImage:'images/loading.gif',fileBottomNavCloseImage:'images/closelabel.gif',overlayOpacity:0.8,borderSize:10,imageArray:new Array,activeImage:null,inprogress:false,resizeSpeed:350,widthCurrent:250,heightCurrent:250,xScale:1,yScale:1,displayTitle:true,navbarOnTop:false,slideNavBar:false,navBarSlideSpeed:350,displayHelp:false,strings:{help:' \u2190 / P - previous image\u00a0\u00a0\u00a0\u00a0\u2192 / N - next image\u00a0\u00a0\u00a0\u00a0ESC / X - close image gallery',prevLinkTitle:'previous image',nextLinkTitle:'next image',prevLinkText:'&laquo; Previous',nextLinkText:'Next &raquo;',closeTitle:'close image gallery',image:'Image ',of:' of '},fitToScreen:false};})(jQuery);


/*
 AnythingSlider v1.4.5 minified using Google Closure Compiler
 By Chris Coyier: http://css-tricks.com
 with major improvements by Doug Neiner: http://pixelgraphics.us/
 based on work by Remy Sharp: http://jqueryfordesigners.com/
*/
(function($){$.anythingSlider=function(f,g){var a=this;a.$el=$(f).addClass("anythingBase").wrap('<div class="anythingSlider"><div class="anythingWindow" /></div>');a.$el.data("AnythingSlider",a);a.init=function(){a.options=$.extend({},$.anythingSlider.defaults,g);a.$wrapper=a.$el.parent().closest("div.anythingSlider").addClass("anythingSlider-"+a.options.theme);a.$window=a.$el.closest("div.anythingWindow");a.$controls=$('<div class="anythingControls"></div>').appendTo(a.$wrapper);a.$items=a.$el.find("> li").addClass("panel");
a.pages=a.$items.length;a.timer=null;a.flag=false;a.playing=false;a.hovered=false;a.panelSize=[];a.currentPage=a.options.startPanel;a.hasEmb=!!a.$items.find("embed[src*=youtube]").length;a.hasSwfo=typeof swfobject!=="undefined"&&swfobject.hasOwnProperty("embedSWF")&&$.isFunction(swfobject.embedSWF)?true:false;a.runTimes=$("div.anythingSlider").index(a.$wrapper)+1;if(!$.isFunction($.easing[a.options.easing]))a.options.easing="swing";a.options.theme!="default"&&!$("link[href*="+a.options.theme+"]").length&&
$("body").append('<link rel="stylesheet" href="'+a.options.themeDirectory.replace(/\{themeName\}/g,a.options.theme)+'" type="text/css" />');a.hasEmb&&a.hasSwfo&&a.$items.find("embed[src*=youtube]").each(function(b){($(this).parent()[0].tagName=="OBJECT"?$(this).parent():$(this)).wrap('<div id="ytvideo'+b+'"></div>');swfobject.embedSWF($(this).attr("src")+"&enablejsapi=1&version=3&playerapiid=ytvideo"+b,"ytvideo"+b,"100%","100%","10",null,null,{allowScriptAccess:"always",wmode:a.options.addWmodeToObject},
{})});if(a.options.resizeContents){a.options.width&&a.$wrapper.add(a.$items).css("width",a.options.width);a.options.height&&a.$wrapper.add(a.$items).css("height",a.options.height);a.hasEmb&&a.$el.find("object, embed").css({width:"100%",height:"100%"})}if(a.pages===1){a.options.autoPlay=false;a.options.buildNavigation=false;a.options.buildArrows=false}if(a.options.autoPlay){a.playing=!a.options.startStopped;a.buildAutoPlay()}a.buildNavigation();a.$el.prepend(a.$items.filter(":last").clone().addClass("cloned").removeAttr("id"));
a.$el.append(a.$items.filter(":first").clone().addClass("cloned").removeAttr("id"));a.$items=a.$el.find("> li");a.setDimensions();a.options.resizeContents||$(window).load(function(){a.setDimensions()});a.options.buildArrows&&a.buildNextBackButtons();a.options.pauseOnHover&&a.$wrapper.hover(function(){if(a.playing){a.$el.trigger("slideshow_paused",a);$.isFunction(a.options.onShowPause)&&a.options.onShowPause(a);a.clearTimer(true)}},function(){if(a.playing){a.$el.trigger("slideshow_unpaused",a);$.isFunction(a.options.onShowUnpause)&&
a.options.onShowUnpause(a);a.startStop(a.playing,true)}});if(a.options.hashTags===true&&!a.gotoHash()||a.options.hashTags===false)a.setCurrentPage(a.options.startPanel,false);a.$items.find("a").focus(function(){a.$items.find(".focusedLink").removeClass("focusedLink");$(this).addClass("focusedLink");a.$items.each(function(b){if($(this).find("a.focusedLink").length){a.gotoPage(b);return false}})});a.slideControls(false);a.$wrapper.hover(function(b){a.hovered=b.type=="mouseenter"?true:false;a.slideControls(a.hovered,
false)});$(document).keyup(function(b){if(a.$wrapper.is(".activeSlider"))switch(b.which){case 39:a.goForward();break;case 37:a.goBack()}})};a.buildNavigation=function(){a.$nav=$('<ul class="thumbNav" />').appendTo(a.$controls);a.options.playRtl&&a.$wrapper.addClass("rtl");a.options.buildNavigation&&a.pages>1&&a.$items.each(function(b){var c=b+1;b=$("<a href='#'></a>").addClass("panel"+c).wrap("<li />");a.$nav.append(b.parent());if($.isFunction(a.options.navigationFormatter)){var d=a.options.navigationFormatter(c,
$(this));b.html(d);parseInt(b.css("text-indent"),10)<0&&b.addClass(a.options.tooltipClass).attr("title",d)}else b.text(c);b.bind(a.options.clickControls,function(e){if(!a.flag){a.flag=true;setTimeout(function(){a.flag=false},100);a.gotoPage(c);a.options.hashTags&&a.setHash("panel"+a.runTimes+"-"+c)}e.preventDefault()})})};a.buildNextBackButtons=function(){a.$forward=$('<span class="arrow forward"><a href="#">'+a.options.forwardText+"</a></span>");a.$back=$('<span class="arrow back"><a href="#">'+
a.options.backText+"</a></span>");a.$back.bind(a.options.clickArrows,function(b){a.goBack();b.preventDefault()});a.$forward.bind(a.options.clickArrows,function(b){a.goForward();b.preventDefault()});a.$back.add(a.$forward).find("a").bind("focusin focusout",function(){$(this).toggleClass("hover")});a.$wrapper.prepend(a.$forward).prepend(a.$back);a.$arrowWidth=a.$forward.width()};a.buildAutoPlay=function(){a.$startStop=$("<a href='#' class='start-stop'></a>").html(a.playing?a.options.stopText:a.options.startText);
a.$controls.append(a.$startStop);a.$startStop.bind(a.options.clickSlideshow,function(b){a.startStop(!a.playing);if(a.playing)a.options.playRtl?a.goBack(true):a.goForward(true);b.preventDefault()}).bind("focusin focusout",function(){$(this).toggleClass("hover")});a.startStop(a.playing)};a.setDimensions=function(){var b,c,d,e,i,h=0,j=a.$window.width(),k=$(window).width();a.$items.each(function(l){d=$(this).children("*");if(a.options.resizeContents){b=parseInt(a.options.width,10)||j;c=parseInt(a.options.height,
10)||a.$window.height();$(this).css({width:b,height:c});d.length==1&&d.css({width:"100%",height:"100%"})}else{b=$(this).width();i=b>=k?true:false;if(d.length==1&&i){e=d.width()>=k?j:d.width();$(this).css("width",e);d.css("max-width",e);b=e}b=i?a.options.width||j:b;$(this).css("width",b);c=$(this).outerHeight();$(this).css("height",c)}a.panelSize[l]=[b,c,h];h+=b});a.$el.css("width",h<a.options.maxOverallWidth?h:a.options.maxOverallWidth)};a.gotoPage=function(b,c){if(typeof b==="undefined"||b===null){b=
a.options.startPage;a.setCurrentPage(a.options.startPage)}if(!a.checkVideo(a.playing)){a.$el.trigger("slide_init",a);$.isFunction(a.options.onSlideInit)&&a.options.onSlideInit(a);a.slideControls(true,false);if(b>a.pages+1)b=a.pages;if(b<0)b=1;if(c!==true)c=false;if(!c||a.options.stopAtEnd&&b==a.pages)a.startStop(false);a.$el.trigger("slide_begin",a);$.isFunction(a.options.onSlideBegin)&&a.options.onSlideBegin(a);a.options.resizeContents||a.$wrapper.filter(":not(:animated)").animate({width:a.panelSize[b][0],
height:a.panelSize[b][1]},{queue:false,duration:a.options.animationTime,easing:a.options.easing});a.$window.filter(":not(:animated)").animate({scrollLeft:a.panelSize[b][2]},{queue:false,duration:a.options.animationTime,easing:a.options.easing,complete:function(){a.endAnimation(b)}})}};a.endAnimation=function(b){if(b===0){a.$window.scrollLeft(a.panelSize[a.pages][2]);b=a.pages}else if(b>a.pages){a.$window.scrollLeft(a.panelSize[1][2]);b=1}a.setCurrentPage(b,false);a.hovered||a.slideControls(false);
if(a.hasEmb){b=a.$items.eq(a.currentPage).find("object[id*=ytvideo], embed[id*=ytvideo]");b.length&&$.isFunction(b[0].getPlayerState)&&b[0].getPlayerState()>0&&b[0].getPlayerState()!=5&&b[0].playVideo()}a.$el.trigger("slide_complete",a);$.isFunction(a.options.onSlideComplete)&&setTimeout(function(){a.options.onSlideComplete(a)},0)};a.setCurrentPage=function(b,c){if(a.options.buildNavigation){a.$nav.find(".cur").removeClass("cur");a.$nav.find("a").eq(b-1).addClass("cur")}if(!c){a.$wrapper.css({width:a.panelSize[b][0],
height:a.panelSize[b][1]});a.$wrapper.scrollLeft(0);a.$window.scrollLeft(a.panelSize[b][2])}a.currentPage=b;if(!a.$wrapper.is(".activeSlider")){$(".activeSlider").removeClass("activeSlider");a.$wrapper.addClass("activeSlider")}};a.goForward=function(b){if(b!==true){b=false;a.startStop(false)}a.gotoPage(a.currentPage+1,b)};a.goBack=function(b){if(b!==true){b=false;a.startStop(false)}a.gotoPage(a.currentPage-1,b)};a.gotoHash=function(){var b=window.location.hash.match(/^#?panel(\d+)-(\d+)$/);if(b)if(parseInt(b[1],
10)==a.runTimes){b=parseInt(b[2],10);if(a.$items.filter(":eq("+b+")").length!==0){a.setCurrentPage(b,false);return true}}return false};a.setHash=function(b){if(typeof window.location.hash!=="undefined"){if(window.location.hash!==b)window.location.hash=b}else if(location.hash!==b)location.hash=b;return b};a.slideControls=function(b){var c=b?"slideDown":"slideUp",d=b?0:a.options.animationTime,e=b?a.options.animationTime:0;b=b?0:1;a.options.toggleControls&&a.$controls.stop(true,true).delay(d)[c](a.options.animationTime/
2).delay(e);if(a.options.toggleArrows){if(!a.hovered&&a.playing)b=1;a.$forward.stop(true,true).delay(d).animate({right:b*a.$arrowWidth,opacity:e},a.options.animationTime/2);a.$back.stop(true,true).delay(d).animate({left:b*a.$arrowWidth,opacity:e},a.options.animationTime/2)}};a.clearTimer=function(b){if(a.timer){window.clearInterval(a.timer);if(!b){a.$el.trigger("slideshow_stop",a);$.isFunction(a.options.onShowStop)&&a.options.onShowStop(a)}}};a.startStop=function(b,c){if(b!==true)b=false;if(b&&!c){a.$el.trigger("slideshow_start",
a);$.isFunction(a.options.onShowStart)&&a.options.onShowStart(a)}a.playing=b;if(a.options.autoPlay){a.$startStop.toggleClass("playing",b).html(b?a.options.stopText:a.options.startText);if(parseInt(a.$startStop.css("text-indent"),10)<0)a.$startStop.addClass(a.options.tooltipClass).attr("title",b?"Stop":"Start")}if(b){a.clearTimer(true);a.timer=window.setInterval(function(){a.checkVideo(b)||(a.options.playRtl?a.goBack(true):a.goForward(true))},a.options.delay)}else a.clearTimer()};a.checkVideo=function(b){var c,
d,e=false;a.hasEmb&&a.$items.find("object[id*=ytvideo], embed[id*=ytvideo]").each(function(){c=$(this);if(c.length&&$.isFunction(c[0].getPlayerState)){d=c[0].getPlayerState();if(b&&(d==1||d>2)&&a.$items.index(c.closest("li.panel"))==a.currentPage&&a.options.resumeOnVideoEnd)e=true;else d>0&&c[0].pauseVideo()}});return e};a.init()};$.anythingSlider.defaults={width:null,height:null,resizeContents:true,tooltipClass:"tooltip",theme:"default",themeDirectory:"css/theme-{themeName}.css",startPanel:1,hashTags:true,
buildArrows:true,toggleArrows:false,buildNavigation:true,toggleControls:false,navigationFormatter:null,forwardText:"&raquo;",backText:"&laquo;",autoPlay:true,startStopped:false,pauseOnHover:true,resumeOnVideoEnd:true,stopAtEnd:false,playRtl:false,startText:"Start",stopText:"Stop",delay:3E3,animationTime:600,easing:"swing",onShowStart:null,onShowStop:null,onShowPause:null,onShowUnpause:null,onSlideInit:null,onSlideBegin:null,onSlideComplete:null,clickArrows:"click",clickControls:"click focusin",clickSlideshow:"click",
addWmodeToObject:"opaque",maxOverallWidth:32766};$.fn.anythingSlider=function(f){if((typeof f).match("object|undefined"))return this.each(function(){$(this).is(".anythingBase")||new $.anythingSlider(this,f)});else if(/\d/.test(f)&&!isNaN(f))return this.each(function(){var g=$(this).data("AnythingSlider");if(g){var a=typeof f=="number"?f:parseInt($.trim(f),10);a<1||a>g.pages||g.gotoPage(a)}})}})(jQuery);


/**
 * jQuery bxSlider v3.0
 * http://bxslider.com
 *
 * Copyright 2010, Steven Wanderski
 * http://stevenwanderski.com
 *
 * Free to use and abuse under the MIT license.
 * http://www.opensource.org/licenses/mit-license.php
 * 
 */

(function($){$.fn.bxSlider=function(options){var defaults={mode:'horizontal',infiniteLoop:true,hideControlOnEnd:false,controls:true,speed:500,pager:false,pagerSelector:null,pagerType:'full',pagerLocation:'bottom',pagerShortSeparator:'/',pagerActiveClass:'pager-active',nextText:'next',nextImage:'',nextSelector:null,prevText:'prev',prevImage:'',prevSelector:null,captions:false,captionsSelector:null,auto:false,autoDirection:'next',autoControls:false,autoControlsSelector:null,autoStart:true,autoHover:false,pause:3000,startText:'start',startImage:'',stopText:'stop',stopImage:'',ticker:false,tickerSpeed:5000,tickerDirection:'next',tickerHover:false,wrapperClass:'bx-wrapper',startingSlide:0,displaySlideQty:1,moveSlideQty:1,randomStart:false,onBeforeSlide:function(){},onAfterSlide:function(){},onLastSlide:function(){},onFirstSlide:function(){},onNextSlide:function(){},onPrevSlide:function(){},buildPager:null}
var options=$.extend(defaults,options);var base=this;var $parent=$(this);var $children=$parent.children();var $outerWrapper='';var $firstChild=$parent.children(':first');var childrenWidth=$firstChild.width();var childrenMaxWidth=0;var childrenOuterWidth=$firstChild.outerWidth();var childrenMaxHeight=0;var wrapperWidth=getWrapperWidth();var wrapperHeight=getWrapperHeight();var isWorking=false;var $pager='';var currentSlide=0;var origLeft=0;var origTop=0;var interval='';var $autoControls='';var $stopHtml='';var $startContent='';var $stopContent='';var autoPlaying=true;var loaded=false;var origShowWidth=0;var origShowHeight=0;var tickerLeft=0;var tickerTop=0;$children.each(function(index){if($(this).outerHeight()>childrenMaxHeight){childrenMaxHeight=$(this).outerHeight();}
if($(this).outerWidth()>childrenMaxWidth){childrenMaxWidth=$(this).outerWidth();}});if(options.randomStart){var randomNumber=Math.floor(Math.random()*$children.length);currentSlide=randomNumber;origLeft=childrenOuterWidth*(options.moveSlideQty+randomNumber);origTop=childrenMaxHeight*(options.moveSlideQty+randomNumber);}else{currentSlide=options.startingSlide;origLeft=childrenOuterWidth*(options.moveSlideQty+options.startingSlide);origTop=childrenMaxHeight*(options.moveSlideQty+options.startingSlide);}
var firstSlide=0;var lastSlide=$children.length-1;this.goToSlide=function(number,stopAuto){if(!isWorking){isWorking=true;currentSlide=number;options.onBeforeSlide(currentSlide,$children.length,$children.eq(currentSlide));if(typeof(stopAuto)=='undefined'){var stopAuto=true;}
if(stopAuto){if(options.auto){base.stopShow(true);}}
if(!options.infiniteLoop){if(currentSlide>lastSlide-options.displaySlideQty){slide=(lastSlide-options.displaySlideQty)+1;}else{slide=number;}}else{slide=number;}
if(slide==firstSlide){options.onFirstSlide(currentSlide,$children.length,$children.eq(currentSlide));}
if(slide==lastSlide){options.onLastSlide(currentSlide,$children.length,$children.eq(currentSlide));}
if(options.mode=='horizontal'){$parent.animate({'left':'-'+getSlidePosition(slide,'left')+'px'},options.speed,function(){isWorking=false;options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='vertical'){$parent.animate({'top':'-'+getSlidePosition(slide,'top')+'px'},options.speed,function(){isWorking=false;options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='fade'){setChildrenFade();}
checkEndControls();makeSlideActive(number);showCaptions();}}
this.goToNextSlide=function(stopAuto){if(typeof(stopAuto)=='undefined'){var stopAuto=true;}
if(stopAuto){if(options.auto){base.stopShow(true);}}
if(!options.infiniteLoop){if(!isWorking){var slideLoop=false;currentSlide=(currentSlide+(options.moveSlideQty));if(currentSlide>=lastSlide){currentSlide=lastSlide;}
checkEndControls();options.onNextSlide(currentSlide,$children.length,$children.eq(currentSlide));base.goToSlide(currentSlide);}}else{if(!isWorking){isWorking=true;var slideLoop=false;currentSlide=(currentSlide+options.moveSlideQty);if(currentSlide>lastSlide){currentSlide=currentSlide%$children.length;slideLoop=true;}
options.onNextSlide(currentSlide,$children.length,$children.eq(currentSlide));options.onBeforeSlide(currentSlide,$children.length,$children.eq(currentSlide));if(options.mode=='horizontal'){var parentLeft=(options.moveSlideQty*childrenOuterWidth);$parent.animate({'left':'-='+parentLeft+'px'},options.speed,function(){isWorking=false;if(slideLoop){$parent.css('left','-'+getSlidePosition(currentSlide,'left')+'px');}
options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='vertical'){var parentTop=(options.moveSlideQty*childrenMaxHeight);$parent.animate({'top':'-='+parentTop+'px'},options.speed,function(){isWorking=false;if(slideLoop){$parent.css('top','-'+getSlidePosition(currentSlide,'top')+'px');}
options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='fade'){setChildrenFade();}
makeSlideActive(currentSlide);showCaptions();}}}
this.goToPreviousSlide=function(stopAuto){if(typeof(stopAuto)=='undefined'){var stopAuto=true;}
if(stopAuto){if(options.auto){base.stopShow(true);}}
if(!options.infiniteLoop){if(!isWorking){var slideLoop=false;currentSlide=currentSlide-options.moveSlideQty;if(currentSlide<0){currentSlide=0;if(options.hideControlOnEnd){$('.bx-prev',$outerWrapper).hide();}}
checkEndControls();options.onPrevSlide(currentSlide,$children.length,$children.eq(currentSlide));base.goToSlide(currentSlide);}}else{if(!isWorking){isWorking=true;var slideLoop=false;currentSlide=(currentSlide-(options.moveSlideQty));if(currentSlide<0){negativeOffset=(currentSlide%$children.length);if(negativeOffset==0){currentSlide=0;}else{currentSlide=($children.length)+negativeOffset;}
slideLoop=true;}
options.onPrevSlide(currentSlide,$children.length,$children.eq(currentSlide));options.onBeforeSlide(currentSlide,$children.length,$children.eq(currentSlide));if(options.mode=='horizontal'){var parentLeft=(options.moveSlideQty*childrenOuterWidth);$parent.animate({'left':'+='+parentLeft+'px'},options.speed,function(){isWorking=false;if(slideLoop){$parent.css('left','-'+getSlidePosition(currentSlide,'left')+'px');}
options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='vertical'){var parentTop=(options.moveSlideQty*childrenMaxHeight);$parent.animate({'top':'+='+parentTop+'px'},options.speed,function(){isWorking=false;if(slideLoop){$parent.css('top','-'+getSlidePosition(currentSlide,'top')+'px');}
options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='fade'){setChildrenFade();}
makeSlideActive(currentSlide);showCaptions();}}}
this.goToFirstSlide=function(stopAuto){if(typeof(stopAuto)=='undefined'){var stopAuto=true;}
base.goToSlide(firstSlide,stopAuto);}
this.goToLastSlide=function(){if(typeof(stopAuto)=='undefined'){var stopAuto=true;}
base.goToSlide(lastSlide,stopAuto);}
this.getCurrentSlide=function(){return currentSlide;}
this.getSlideCount=function(){return $children.length;}
this.stopShow=function(changeText){clearInterval(interval);if(typeof(changeText)=='undefined'){var changeText=true;}
if(changeText&&options.autoControls){$autoControls.html($startContent).removeClass('stop').addClass('start');autoPlaying=false;}}
this.startShow=function(changeText){if(typeof(changeText)=='undefined'){var changeText=true;}
setAutoInterval();if(changeText&&options.autoControls){$autoControls.html($stopContent).removeClass('start').addClass('stop');autoPlaying=true;}}
this.stopTicker=function(changeText){$parent.stop();if(typeof(changeText)=='undefined'){var changeText=true;}
if(changeText&&options.ticker){$autoControls.html($startContent).removeClass('stop').addClass('start');autoPlaying=false;}}
this.startTicker=function(changeText){if(options.mode=='horizontal'){if(options.tickerDirection=='next'){var stoppedLeft=parseInt($parent.css('left'));var remainingDistance=(origShowWidth+stoppedLeft)+$children.eq(0).width();}else if(options.tickerDirection=='prev'){var stoppedLeft=-parseInt($parent.css('left'));var remainingDistance=(stoppedLeft)-$children.eq(0).width();}
var finishingSpeed=(remainingDistance*options.tickerSpeed)/origShowWidth;moveTheShow(tickerLeft,remainingDistance,finishingSpeed);}else if(options.mode=='vertical'){if(options.tickerDirection=='next'){var stoppedTop=parseInt($parent.css('top'));var remainingDistance=(origShowHeight+stoppedTop)+$children.eq(0).height();}else if(options.tickerDirection=='prev'){var stoppedTop=-parseInt($parent.css('top'));var remainingDistance=(stoppedTop)-$children.eq(0).height();}
var finishingSpeed=(remainingDistance*options.tickerSpeed)/origShowHeight;moveTheShow(tickerTop,remainingDistance,finishingSpeed);if(typeof(changeText)=='undefined'){var changeText=true;}
if(changeText&&options.ticker){$autoControls.html($stopContent).removeClass('start').addClass('stop');autoPlaying=true;}}}
this.initShow=function(){initCss();if(options.pager&&!options.ticker){if(options.pagerType=='full'){showPager('full');}else if(options.pagerType=='short'){showPager('short');}}
if(options.controls&&!options.ticker){setControlsVars();}
if(options.auto||options.ticker){if(options.autoControls){setAutoControlsVars();}
if(options.autoStart){base.startShow(true);}else{base.stopShow(true);}
if(options.autoHover){setAutoHover();}}
makeSlideActive(currentSlide);checkEndControls();if(options.captions){showCaptions();}
options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));}
function initCss(){setChildrenLayout(options.startingSlide);if(options.mode=='horizontal'){$parent.wrap('<div class="'+options.wrapperClass+'" style="width:'+wrapperWidth+'px; position:relative;"></div>').wrap('<div class="bx-window" style="position:relative; overflow:hidden;"></div>').css({width:'99999px',position:'relative',left:'-'+(origLeft)+'px'});$parent.children().css({width:childrenWidth,float:'left',listStyle:'none'});$outerWrapper=$parent.parent().parent();$children.addClass('pager');}else if(options.mode=='vertical'){$parent.wrap('<div class="'+options.wrapperClass+'" style="width:'+childrenMaxWidth+'px; position:relative;"></div>').wrap('<div class="bx-window" style="width:'+childrenMaxWidth+'px; height:'+wrapperHeight+'px; position:relative; overflow:hidden;"></div>').css({height:'99999px',position:'relative',top:'-'+(origTop)+'px'});$parent.children().css({listStyle:'none',height:childrenMaxHeight});$outerWrapper=$parent.parent().parent();$children.addClass('pager');}else if(options.mode=='fade'){$parent.wrap('<div class="'+options.wrapperClass+'" style="width:'+childrenMaxWidth+'px; position:relative;"></div>').wrap('<div class="bx-window" style="height:'+childrenMaxHeight+'px; width:'+childrenMaxWidth+'px; position:relative; overflow:hidden;"></div>');$parent.children().css({listStyle:'none',position:'absolute',top:0,left:0,zIndex:98});$outerWrapper=$parent.parent().parent();$children.not(':eq('+currentSlide+')').fadeTo(0,0);$children.eq(currentSlide).css('zIndex',99);}
if(options.captions&&options.captionsSelector==null){$outerWrapper.append('<div class="bx-captions"></div>');}}
function setChildrenLayout(){if(options.mode=='horizontal'||options.mode=='vertical'){var $prependedChildren=getArraySample($children,0,options.moveSlideQty,'backward');$.each($prependedChildren,function(index){$parent.prepend($(this));});var totalNumberAfterWindow=($children.length+options.moveSlideQty)-1;var pagerExcess=$children.length-options.displaySlideQty;var numberToAppend=totalNumberAfterWindow-pagerExcess;var $appendedChildren=getArraySample($children,0,numberToAppend,'forward');$.each($appendedChildren,function(index){$parent.append($(this));});}}
function setControlsVars(){if(options.nextImage!=''){nextContent=options.nextImage;nextType='image';}else{nextContent=options.nextText;nextType='text';}
if(options.prevImage!=''){prevContent=options.prevImage;prevType='image';}else{prevContent=options.prevText;prevType='text';}
showControls(nextType,nextContent,prevType,prevContent);}
function setAutoInterval(){if(options.auto){if(!options.infiniteLoop){if(options.autoDirection=='next'){interval=setInterval(function(){currentSlide+=options.moveSlideQty;if(currentSlide>lastSlide){currentSlide=currentSlide%$children.length;}
base.goToSlide(currentSlide,false);},options.pause);}else if(options.autoDirection=='prev'){interval=setInterval(function(){currentSlide-=options.moveSlideQty;if(currentSlide<0){negativeOffset=(currentSlide%$children.length);if(negativeOffset==0){currentSlide=0;}else{currentSlide=($children.length)+negativeOffset;}}
base.goToSlide(currentSlide,false);},options.pause);}}else{if(options.autoDirection=='next'){interval=setInterval(function(){base.goToNextSlide(false);},options.pause);}else if(options.autoDirection=='prev'){interval=setInterval(function(){base.goToPreviousSlide(false);},options.pause);}}}else if(options.ticker){options.tickerSpeed*=100;$('.pager').each(function(index){origShowWidth+=$(this).width();origShowHeight+=$(this).height();});if(options.tickerDirection=='prev'&&options.mode=='horizontal'){$parent.css('left','-'+(origShowWidth+origLeft)+'px');}else if(options.tickerDirection=='prev'&&options.mode=='vertical'){$parent.css('top','-'+(origShowHeight+origTop)+'px');}
if(options.mode=='horizontal'){tickerLeft=parseInt($parent.css('left'));moveTheShow(tickerLeft,origShowWidth,options.tickerSpeed);}else if(options.mode=='vertical'){tickerTop=parseInt($parent.css('top'));moveTheShow(tickerTop,origShowHeight,options.tickerSpeed);}
if(options.tickerHover){setTickerHover();}}}
function moveTheShow(leftCss,distance,speed){if(options.mode=='horizontal'){if(options.tickerDirection=='next'){$parent.animate({'left':'-='+distance+'px'},speed,'linear',function(){$parent.css('left',leftCss);moveTheShow(leftCss,origShowWidth,options.tickerSpeed);});}else if(options.tickerDirection=='prev'){$parent.animate({'left':'+='+distance+'px'},speed,'linear',function(){$parent.css('left',leftCss);moveTheShow(leftCss,origShowWidth,options.tickerSpeed);});}}else if(options.mode=='vertical'){if(options.tickerDirection=='next'){$parent.animate({'top':'-='+distance+'px'},speed,'linear',function(){$parent.css('top',leftCss);moveTheShow(leftCss,origShowHeight,options.tickerSpeed);});}else if(options.tickerDirection=='prev'){$parent.animate({'top':'+='+distance+'px'},speed,'linear',function(){$parent.css('top',leftCss);moveTheShow(leftCss,origShowHeight,options.tickerSpeed);});}}}
function setAutoControlsVars(){if(options.startImage!=''){startContent=options.startImage;startType='image';}else{startContent=options.startText;startType='text';}
if(options.stopImage!=''){stopContent=options.stopImage;stopType='image';}else{stopContent=options.stopText;stopType='text';}
showAutoControls(startType,startContent,stopType,stopContent);}
function setAutoHover(){$outerWrapper.find('.bx-window').hover(function(){if(autoPlaying){base.stopShow(false);}},function(){if(autoPlaying){base.startShow(false);}});}
function setTickerHover(){$parent.hover(function(){if(autoPlaying){base.stopTicker(false);}},function(){if(autoPlaying){base.startTicker(false);}});}
function setChildrenFade(){$children.not(':eq('+currentSlide+')').fadeTo(options.speed,0).css('zIndex',98);$children.eq(currentSlide).css('zIndex',99).fadeTo(options.speed,1,function(){isWorking=false;options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});};function makeSlideActive(number){if(options.pagerType=='full'&&options.pager){$('a',$pager).removeClass(options.pagerActiveClass);$('a',$pager).eq(number).addClass(options.pagerActiveClass);}else if(options.pagerType=='short'&&options.pager){$('.bx-pager-current',$pager).html(currentSlide+1);}}
function showControls(nextType,nextContent,prevType,prevContent){var $nextHtml=$('<a href="" class="bx-next"></a>');var $prevHtml=$('<a href="" class="bx-prev"></a>');if(nextType=='text'){$nextHtml.html(nextContent);}else{$nextHtml.html('<img src="'+nextContent+'" />');}
if(prevType=='text'){$prevHtml.html(prevContent);}else{$prevHtml.html('<img src="'+prevContent+'" />');}
if(options.prevSelector){$(options.prevSelector).append($prevHtml);}else{$outerWrapper.append($prevHtml);}
if(options.nextSelector){$(options.nextSelector).append($nextHtml);}else{$outerWrapper.append($nextHtml);}
$nextHtml.click(function(){base.goToNextSlide();return false;});$prevHtml.click(function(){base.goToPreviousSlide();return false;});}
function showPager(type){var pagerString='';if(options.buildPager){$children.each(function(index,value){pagerString+=options.buildPager(index,value);});}else if(type=='full'){$children.each(function(index){pagerString+='<a href="" class="pager-link pager-'+(index+1)+'">'+(index+1)+'</a>';});}else if(type=='short'){pagerString='<span class="bx-pager-current">'+(options.startingSlide+1)+'</span> '+options.pagerShortSeparator+' <span class="bx-pager-total">'+$children.length+'<span>';}
if(options.pagerSelector){$(options.pagerSelector).append(pagerString);$pager=$(options.pagerSelector);}else{var $pagerContainer=$('<div class="bx-pager"></div>');$pagerContainer.append(pagerString);if(options.pagerLocation=='top'){$outerWrapper.prepend($pagerContainer);}else if(options.pagerLocation=='bottom'){$outerWrapper.append($pagerContainer);}
$pager=$('.bx-pager',$outerWrapper);}
$pager.children().click(function(){if(options.pagerType=='full'){var slideIndex=$pager.children().index(this);base.goToSlide(slideIndex);}
return false;});}
function showCaptions(){var caption=$('img',$children.eq(currentSlide)).attr('title');if(caption!=''){if(options.captionsSelector){$(options.captionsSelector).html(caption);}else{$('.bx-captions',$outerWrapper).html(caption);}}else{if(options.captionsSelector){$(options.captionsSelector).html(' ');}else{$('.bx-captions',$outerWrapper).html(' ');}}}
function showAutoControls(startType,startContent,stopType,stopContent){$autoControls=$('<a href="" class="bx-start"></a>');if(startType=='text'){$startContent=startContent;}else{$startContent='<img src="'+startContent+'" />';}
if(stopType=='text'){$stopContent=stopContent;}else{$stopContent='<img src="'+stopContent+'" />';}
if(options.startSelector){$(options.startSelector).append($autoControls);}else{$outerWrapper.append('<div class="bx-auto"></div>');$('.bx-auto',$outerWrapper).html($autoControls);}
$autoControls.click(function(){if(options.ticker){if($(this).hasClass('stop')){base.stopTicker();}else if($(this).hasClass('start')){base.startTicker();}}else{if($(this).hasClass('stop')){base.stopShow(true);}else if($(this).hasClass('start')){base.startShow(true);}}
return false;});}
function checkEndControls(){if(!options.infiniteLoop&&options.hideControlOnEnd){if(currentSlide==firstSlide){$('.bx-prev',$outerWrapper).hide();}else{$('.bx-prev',$outerWrapper).show();}
if(currentSlide==lastSlide){$('.bx-next',$outerWrapper).hide();}else{$('.bx-next',$outerWrapper).show();}}}
function getSlidePosition(number,side){if(side=='left'){var position=$('.pager',$outerWrapper).eq(number).position().left;}else if(side=='top'){var position=$('.pager',$outerWrapper).eq(number).position().top;}
return position;}
function getWrapperWidth(){var wrapperWidth=$firstChild.outerWidth()*options.displaySlideQty;return wrapperWidth;}
function getWrapperHeight(){var wrapperHeight=$firstChild.outerHeight()*options.displaySlideQty;return wrapperHeight;}
function getArraySample(array,start,length,direction){var sample=[];var loopLength=length;var startPopulatingArray=false;if(direction=='backward'){array=$.makeArray(array);array.reverse();}
while(loopLength>0){$.each(array,function(index,val){if(loopLength>0){if(!startPopulatingArray){if(index==start){startPopulatingArray=true;sample.push($(this).clone());loopLength--;}}else{sample.push($(this).clone());loopLength--;}}else{return false;}});}
return sample;}
this.each(function(){base.initShow();});return this;}})(jQuery);


/*
 * jQuery Orbit Plugin 1.1 
 * www.ZURB.com/playground
 * Copyright 2010, ZURB
 * Free to use under the MIT license.
 * http://www.opensource.org/licenses/mit-license.php
*/
(function(e){e.fn.orbit=function(a){a=e.extend({animation:"fade",animationSpeed:800,advanceSpeed:4E3,startClockOnMouseOut:true,startClockOnMouseOutAfter:3E3,directionalNav:true,captions:true,captionAnimationSpeed:800,timer:false,bullets:false},a);return this.each(function(){function m(c){function g(){f.eq(h).css({"z-index":1});s=false}var h=b,k=c;if(h==k)return false;if(!s){s=true;if(c=="next"){b++;if(b==n)b=0}else if(c=="prev"){b--;if(b<0)b=n-1}else{b=c;if(h<b)k="next";else if(h>b)k="prev"}a.bullets&&
x();if(a.animation=="fade"){f.eq(h).css({"z-index":2});f.eq(b).css({opacity:0,"z-index":3}).animate({opacity:1},a.animationSpeed,g);a.captions&&o()}if(a.animation=="horizontal-slide"){f.eq(h).css({"z-index":2});k=="next"&&f.eq(b).css({left:t,"z-index":3}).animate({left:0},a.animationSpeed,g);k=="prev"&&f.eq(b).css({left:-t,"z-index":3}).animate({left:0},a.animationSpeed,g);a.captions&&o()}if(a.animation=="vertical-slide"){f.eq(h).css({"z-index":2});k=="prev"&&f.eq(b).css({top:u,"z-index":3}).animate({top:0},
a.animationSpeed,g);k=="next"&&f.eq(b).css({top:-u,"z-index":3}).animate({top:0},a.animationSpeed,g);a.captions&&o()}}}var b=0,n=0,t,u,s,d=e(this).addClass("orbit"),f=d.find("img, a img");f.each(function(){var c=e(this),g=c.width();c=c.height();d.width(g);t=d.width();d.height(c);u=d.height();n++});f.eq(b).css({"z-index":3});if(a.timer){d.append('<div class="timer"><span class="mask"><span class="rotator"></span></span><span class="pause"></span></div>');var j=e("div.timer"),p;if(j.length!=0){var C=
a.advanceSpeed/180,v=e("div.timer span.rotator"),y=e("div.timer span.mask"),z=e("div.timer span.pause"),l=0,A,w=function(){p=true;z.removeClass("active");A=setInterval(function(){var c="rotate("+l+"deg)";l+=2;v.css({"-webkit-transform":c,"-moz-transform":c,"-o-transform":c});if(l>180){v.addClass("move");y.addClass("move")}if(l>360){v.removeClass("move");y.removeClass("move");l=0;m("next")}},C)},q=function(){p=false;clearInterval(A);z.addClass("active")};w();j.click(function(){p?q():w()});if(a.startClockOnMouseOut){var B;
d.mouseleave(function(){B=setTimeout(function(){p||w()},a.startClockOnMouseOutAfter)});d.mouseenter(function(){clearTimeout(B)})}}}if(a.captions){d.append('<div class="caption"><span class="orbit-caption"></span></div>');var r=d.children("div.caption").children("span").addClass("orbit-caption").show(),o=function(){var c=f.eq(b).attr("rel"),g=e("#"+c).html(),h=r.height()+20;r.attr("id","#"+c).html(g);g?r.parent().stop().animate({bottom:0},a.captionAnimationSpeed):r.parent().stop().animate({bottom:-h},
a.captionAnimationSpeed)};o()}if(a.directionalNav){d.append('<div class="slider-nav"><span class="right">Right</span><span class="left">Left</span></div>');j=d.children("div.slider-nav").children("span.left");var D=d.children("div.slider-nav").children("span.right");j.click(function(){a.timer&&q();m("prev")});D.click(function(){a.timer&&q();m("next")})}if(a.bullets){d.append('<ul class="orbit-bullets"></ul>');var E=e("ul.orbit-bullets");for(i=0;i<n;i++){j=e("<li>"+i+"</li>");e("ul.orbit-bullets").append(j);
j.data("index",i);j.click(function(){a.timer&&q();m(e(this).data("index"))})}var x=function(){E.children("li").removeClass("active").eq(b).addClass("active")};x()}})}})(jQuery);


// jQuery Captify Plugin
// Copyright (C) 2009 Brian Reavis
// Licenced under the MIT license
// $Date: 2009-11-30 [Mon, 30 Nov 2009] $
jQuery.fn.extend({captify:function(n){var a=$.extend({speedOver:"fast",speedOut:"normal",hideDelay:500,animation:"slide",prefix:"",opacity:"0.45",className:"caption-bottom",position:"bottom",spanWidth:"100%"},n);$(this).each(function(){var c=this;$(this).load(function(){if(c.hasInit)return false;c.hasInit=true;var i=false,k=false,e=$("#"+$(this).attr("rel")),g=!e.length?$(this).attr("alt"):e.html();e.remove();e=this.parent&&this.parent.tagName=="a"?this.parent:$(this);var h=e.wrap("<div></div>").parent().css({overflow:"hidden",
padding:0,fontSize:0.1}).addClass("caption-wrapper").width($(this).width()).height($(this).height());$.map(["top","right","bottom","left"],function(f){h.css("margin-"+f,$(c).css("margin-"+f));$.map(["style","width","color"],function(j){j="border-"+f+"-"+j;h.css(j,$(c).css(j))})});$(c).css({border:"0 none"});var b=$("div:last",h.append("<div></div>")).addClass(a.className),d=$("div:last",h.append("<div></div>")).addClass(a.className).append(a.prefix).append(g);$("*",h).css({margin:0}).show();g=jQuery.browser.msie?
"static":"relative";b.css({zIndex:1,position:g,opacity:a.animation=="fade"?0:a.opacity,width:a.spanWidth});if(a.position=="bottom"){e=parseInt(b.css("border-top-width").replace("px",""))+parseInt(d.css("padding-top").replace("px",""))-1;d.css("paddingTop",e)}d.css({position:g,zIndex:2,background:"none",border:"0 none",opacity:a.animation=="fade"?0:1,width:a.spanWidth});b.width(d.outerWidth());b.height(d.height());g=a.position=="bottom"&&jQuery.browser.msie?-4:0;var l=a.position=="top"?{hide:-$(c).height()-
b.outerHeight()-1,show:-$(c).height()}:{hide:0,show:-b.outerHeight()+g};d.css("marginTop",-b.outerHeight());b.css("marginTop",l[a.animation=="fade"||a.animation=="always-on"?"show":"hide"]);var m=function(){if(!i&&!k){var f=a.animation=="fade"?{opacity:0}:{marginTop:l.hide};b.animate(f,a.speedOut);a.animation=="fade"&&d.animate({opacity:0},a.speedOver)}};if(a.animation!="always-on"){$(this).hover(function(){k=true;if(!i){var f=a.animation=="fade"?{opacity:a.opacity}:{marginTop:l.show};b.animate(f,
a.speedOver);a.animation=="fade"&&d.animate({opacity:1},a.speedOver/2)}},function(){k=false;window.setTimeout(m,a.hideDelay)});$("div",h).hover(function(){i=true},function(){i=false;window.setTimeout(m,a.hideDelay)})}});if(this.complete||this.naturalWidth>0)$(c).trigger("load")})}});

// Blend 2.1 for jQuery 1.3+
// Copyright (c) 2010 Jack Moore - jack@colorpowered.com
// Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
(function(a,b){a.fn.blend=function(f,c){var e=this,d=["backgroundColor","backgroundImage","backgroundRepeat","backgroundAttachment","backgroundPosition","backgroundPositionX","backgroundPositionY","paddingTop","paddingLeft","paddingRight","paddingBottom","width","height"];f=parseInt(f,10)||a.fn.blend.speed;c=c||a.fn.blend.callback;e[0]&&!e.find(".jsblend")[0]&&!(a.browser.mozilla&&parseFloat(a.browser.version)<1.9)&&e.each(function(){var g='<span style="position:absolute;top:0;left:0;display:block"/>',h=this,e,k=h.currentStyle||b.getComputedStyle(h,null),i=a(g),j=a(g);if(h.style.position!=="absolute")h.style.position="relative";for(e=0;d[e];e+=1)if(k[d[e]])j[0].style[d[e]]=i[0].style[d[e]]=k[d[e]];i[0].style.backgroundImage=i[0].style.backgroundColor="";a(h).wrapInner(i).addClass("hover").prepend(j);a(h).bind("mouseenter mouseleave",function(a){a.type==="mouseenter"?j.stop().fadeTo(f,0,function(){c&&typeof c==="function"&&c()}):j.stop().fadeTo(f,1)})});return e};a.fn.blend.speed=400;a.fn.blend.callback=null})(jQuery,this)

