(function(c){function d(a,b){return parseInt(c.css(a[0],b))||0}c.fn.jCarouselLite=function(a){a=c.extend({carouselClass:"ul",indicatorClass:null,btnPrev:null,btnNext:null,btnGo:null,btnGoSelectClass:"active",mouseWheel:!1,auto:null,speed:200,easing:null,vertical:!1,circular:!0,visible:3,start:0,scroll:1,beforeStart:null,afterEnd:null},a||{});return this.each(function(){function b(b){if(!i){c.each(a.btnGo,function(b,e){c(e).removeClass(a.btnGoSelectClass)});a.beforeStart&&a.beforeStart.call(this,m.slice(f).slice(0,
k));if(a.circular)b<=a.start-k-1?(l.css(e,-((o-k*2)*p)+"px"),f=b==a.start-k-1?o-k*2-1:o-k*2-a.scroll,a.btnGo!=null&&(c(a.btnGo[f-1]).addClass(a.btnGoSelectClass),end=!1)):b>=o-k+1?(l.css(e,-(k*p)+"px"),f=b==o-k+1?k+1:k+a.scroll,a.btnGo!=null&&(c(a.btnGo[f-1]).addClass(a.btnGoSelectClass),end=!1)):(f=b,a.btnGo!=null&&(f==0?(c(a.btnGo[o-3]).addClass(a.btnGoSelectClass),c(a.btnGo[0]).removeClass(a.btnGoSelectClass),end=!1):f+1==o?(c(a.btnGo[0]).addClass(a.btnGoSelectClass),c(a.btnGo[o-3]).removeClass(a.btnGoSelectClass),
end=!0):(c(a.btnGo[f-1]).addClass(a.btnGoSelectClass),end=!1)));else if(b<0||b>o-k)return;else f=b;i=!0;l.animate(e=="left"?{left:-(f*p)}:{top:-(f*p)},a.speed,a.easing,function(){a.afterEnd&&a.afterEnd.call(this,m.slice(f).slice(0,k));i=!1});a.circular||(c(a.btnPrev+","+a.btnNext).removeClass("disabled"),c(f-a.scroll<0&&a.btnPrev||f+a.scroll>o-k&&a.btnNext||[]).addClass("disabled"))}return!1}var i=!1,e=a.vertical?"top":"left",j=a.vertical?"height":"width",n=c(this),l=c(a.carouselClass,n),g=c("li",
l),h=g.size(),k=a.visible;a.circular&&(l.prepend(g.slice(h-k-1+1).clone()).append(g.slice(0,k).clone()),a.start+=k);var m=c("li",l),o=m.size(),f=a.start;n.css("visibility","visible");var p=a.vertical?m[0].offsetHeight+d(m,"marginTop")+d(m,"marginBottom"):m[0].offsetWidth+d(m,"marginLeft")+d(m,"marginRight"),g=p*o,h=p*k;m.css({overflow:"hidden","float":a.vertical?"none":"left"});l.css({margin:"0",padding:"0",position:"relative","list-style-type":"none","z-index":"1"});n.css({overflow:"hidden",position:"absolute",
"z-index":"2",left:"0px"});m.css({width:m.width(),height:m.height()});l.css(j,g+"px").css(e,-(f*p));n.css(j,h+"px");a.btnPrev&&c(a.btnPrev).click(function(){clearInterval(a.carouselInterval);return b(f-a.scroll)});a.btnNext&&c(a.btnNext).click(function(){clearInterval(a.carouselInterval);return b(f+a.scroll)});c(document).keydown(function(e){if(a.circular){if(e.keyCode==a.keyNext)return clearInterval(a.carouselInterval),b(f+a.scroll);if(e.keyCode==a.keyPrev)return clearInterval(a.carouselInterval),
b(f-a.scroll)}else{if(e.keyCode==a.keyNext&&c(m[f+a.scroll]).size()>0)return clearInterval(a.carouselInterval),b(f+a.scroll);if(e.keyCode==a.keyPrev&&c(m[f-a.scroll]).size()>0)return clearInterval(a.carouselInterval),b(f-a.scroll)}});a.btnGo&&c.each(a.btnGo,function(e,d){c(d).click(function(){clearInterval(a.carouselInterval);return b(a.circular?a.visible+e:e)})});a.mouseWheel&&n.mousewheel&&n.mousewheel(function(c,e){clearInterval(a.carouselInterval);return e>0?b(f-a.scroll):b(f+a.scroll)});if(a.auto)a.carouselInterval=
setInterval(function(){b(f+a.scroll)},a.auto+a.speed)})}})(jQuery);
(function(c){c.fn.slideshow=function(d){var a={display_marker:!0};return this.each(function(){d&&c.extend(a,d);var b=c(this),i=b.find(".slideshow-slides li");if(i.size()>1){b.find(".next").append('<img src="/wp-content/themes/boyds/images/icons/next.png" />');b.find(".prev").append('<img src="/wp-content/themes/boyds/images/icons/previous.png" />');b.hover(function(){b.find(".control").animate({opacity:1})}).mouseleave(function(){b.find(".control").animate({opacity:0.3})});var e=c('<div class="indicators" style="width:'+b.find(".slideshow-slides li").size()*18+'px;"></div>');i.each(function(a){a==0?e.append(c('<div class="indicator active">&nbsp;</div>')):e.append(c('<div class="indicator">&nbsp;</div>'))});b.append(e);b.find(".slideshow-slides").jCarouselLite({indicatorClass:".indicators",circular:!0,btnNext:".next",btnPrev:".prev",btnGo:b.find(".indicators div.indicator"),speed:500,visible:1,auto:1E4})}i=b.find(".slideshow-slides li[data-url]");i.click(function(){document.location=c(this).attr("data-url")});i.addClass("pointer")})}})(jQuery);


//(function(c){c.fn.slideshow=function(d){var a={display_marker:!0};return this.each(function(){d&&c.extend(a,d);var b=c(this),i=b.find(".slideshow-slides li");if(i.size()>1){b.find(".control").show();b.hover(function(){b.find(".control").animate({opacity:1})}).mouseleave(function(){b.find(".control").animate({opacity:0.3})});var e=c('<div class="indicators" style="width:'+b.find(".slideshow-slides li").size()*18+'px;"></div>');i.each(function(a){a==0?e.append(c('<div class="indicator active">&nbsp;</div>')):e.append(c('<div class="indicator">&nbsp;</div>'))});b.append(e);b.find(".slideshow-slides").jCarouselLite({indicatorClass:".indicators",circular:!0,btnNext:".next",btnPrev:".prev",btnGo:b.find(".indicators div.indicator"),speed:500,visible:1,auto:1E4})}i=b.find(".slideshow-slides li[data-url]");i.find(".block-link").height()<i.height()/2&&i.click(function(){event.preventDefault();document.location=c(this).attr("data-url")});i.addClass("pointer")})}})(jQuery);
