var _gaq=_gaq||[];_gaq.push(["_setAccount","UA-20805790-3"]);_gaq.push(["_trackPageview"]);(function(){var b=document.createElement("script");b.type="text/javascript";b.async=true;b.src=("https:"==document.location.protocol?"https://ssl":"http://www")+".google-analytics.com/ga.js";var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(b,a)})();$(document).ready(function(){$("#whatisitTab").click(function(){window.location.href="website-portfolio.html"});$("#webTab").click(function(){window.location.href="equine-websites.html"});$("#mediaTab").click(function(){window.location.href="graphic-art-and-logos.html"});$("#busmodTab").click(function(){window.location.href="equine-business-planning.html"});if($("#h4s_slider").length>0){firstPass=0;var c=$("#h4s_slider").bxSlider({infiniteLoop:true,controls:false,stopImage:"assets/bxslider_stop.png",startImage:"assets/bxslider_start.png",pager:false,speed:1000,pause:5000,onAfterSlide:function(d){if(firstPass>0){lastThum=$(activeThum);$(lastThum).removeClass("bx-pager");lastChapter=$(activeChapter);$(lastChapter).removeClass("currentChapter")}activeME=d+1;activeThum=$(".thumb_"+activeME);$(activeThum).addClass("bx-pager");activeChapterNum=d;activeChapter=$(".chapter"+activeChapterNum);$(activeChapter).addClass("currentChapter");firstPass=1}});thumbWid=90;totSldies=c.getSlideCount();totThumW=totSldies*thumbWid;thumbDivW=$("#h4s_sliderControls_thumbs").width();fillerSpacing=Math.floor((thumbDivW-totThumW)/(totSldies+1));var b=1;thumSel=$(".thumb_"+b);for(b;b<=totSldies;b++){leftPos=(fillerSpacing*b)+(thumbWid*(b-1));thumSel=$(".thumb_"+b);thumImgSel=$("#h4s_slider li.h4s_items:eq("+b+") img");thumbIMGs=$(thumImgSel).attr("src");thumbCrop=$(thumImgSel).attr("thumbCrop");thumbURL="url("+thumbIMGs+") "+thumbCrop;$(thumSel).css("left",leftPos);$(thumSel).css("background",thumbURL);$(thumSel).show()}$("#h4s_sliderControls_start").hide();$("#h4s_sliderControls_stop").click(function(){c.stopShow();$("#h4s_sliderControls_stop").hide();$("#h4s_sliderControls_start").show();return false});$("#h4s_sliderControls_start").click(function(){$("#h4s_sliderControls_stop").show();$("#h4s_sliderControls_start").hide();c.goToNextSlide();c.startShow();return false});$("#h4s_sliderControls_prev").click(function(){c.goToPreviousSlide();c.stopShow();$("#h4s_sliderControls_stop").hide();$("#h4s_sliderControls_start").show();return false});$("#h4s_sliderControls_next").click(function(){fixGoToNext=c.getCurrentSlide()*1;fixGoToNext=fixGoToNext+1;c.goToSlide(fixGoToNext);return false});$("#educationWrap #h4s_sliderControls #h4s_sliderControls_all").click(function(){c.destroyShow();$("#educationWrap").addClass("view_all_chaps");return false});$("#educationWrap #h4s_sliderControls #h4s_sliderControls_chapter").click(function(){window.location.reload();return false});var a=0;totChapters=$("#h4s_slider li").length-3;$("#chaptersBD ul li").click(function(){chapteryClass=$(this).attr("class");chapteryClass=chapteryClass.substring(7);if(isNaN(chapteryClass)==false){if(chapteryClass>totChapters){alert("This is so embarrassing, but this chapter is not available at the moment");chapteryClass=totChapters}c.goToSlide(chapteryClass)}a=chapteryClass;return false})}});
