/** * This file contains the functionality for the image fader on the home page. * * Author: Pexeto * http://pexeto.com/ */ var divArray = new Array(); var navArray = new Array(); var divNumber=0; var currentImage=0; var selectedImage=0; var waitInterval=4200; //this is the interval between each fade var fadeSpeed=2000; //this is the speed of the fade action var selectFadeSpeed=1000; var timer=-1; $(function(){ getAllDivs(); setFader(); setClickHandlers(); setArrowClickHandlers(); timer = window.setInterval("fade()", waitInterval); setLinks(); }); function setLinks(){ $(".fadeWrapper").click(function(){ var link=$(".fadeHolder").eq(currentImage).find("a").attr("href"); if(link!=null){ location.href=link; } }); $(".fadeWrapper").mouseover(function(){ $(".fadeWrapper").css({cursor:"pointer"}); }); } /** * Gets all the divs that have to be shown in the slider and fills them in an array. */ function getAllDivs(){ $("#sliderNavigation").append("