/* Slider Functionality (located on index.html page) */
var divArray = new Array();
var divNumber=0;
var imagePadding=0;
var animationSpeed=800; //this is the speed of the animation
var waitInterval=16000;
var currentImage=1;
//*********Please change these settings if you have made some changes in the HTML or CSS files!************
var imageWidth=960; //this is the width of a single image
var timer=-1;
$(function(){
getAllDivs();
setDefaultWidth();
setSlider();
timer = window.setInterval("moveLeft()", waitInterval);
});
/**
* Gets all the divs that have to be shown in the slider and fills them in an array.
*/
function getAllDivs(){
//fill the divs in an array
$(".slide_set").each(function(i){
divArray[i]=$(this);
divNumber++;
});
}
/**
* Moves the image wrapper to the right.
*/
function moveRight(){
if(currentImage>1){
$(".wrapper ul").animate({marginLeft:"+="+animationLength}, animationSpeed);
currentImage--;
window.clearInterval(timer);
timer=window.setInterval("wait()", waitInterval);
}
}
function wait(){
window.clearInterval(timer);
timer=window.setInterval("moveLeft()", waitInterval);
}
/**
* Moves the image wrapper to the left.
*/
function moveLeft(){
if(currentImage