function clickLeft(){
	slideshow.stop();
	slideshow.start();
	if (currentphoto>1){
		currentphoto-=1;
		$("#splash").animate({"left": "-" + 670*(currentphoto-1) + "px"}, "fast");
	} else {
		$("#splash").animate({"left": "-" + 670*(showphotos-1) + "px"}, "fast");
		currentphoto=showphotos;
	}
}
	
function clickRight(){
	slideshow.stop();
	slideshow.start();
	//alert (currentphoto);
	if (currentphoto<=showphotos-1){
		$("#splash").animate({"left": "-" + 670*currentphoto + "px"}, "fast");
		currentphoto+=1;
	} else {
		$("#splash").animate({"left": "0px"}, "fast");
		currentphoto=1;
	}
}

Array.prototype.shuffle = function(b)
{
	var i = this.length, j, t;
	while( i ) {
		j = Math.floor( ( i-- ) * Math.random() );
		t = b && typeof this[i].shuffle!=='undefined' ? this[i].shuffle() : this[i];
		this[i] = this[j];
		this[j] = t;
	}
	return this;
};

var Timer = function(){  
	Timer.prototype.init = function(interValSeconds){
		this.intervalPointer = null;
		this.interValSeconds = interValSeconds*1000;
	};
	Timer.prototype.start = function(){
		this.intervalPointer  = setInterval(this.timerEvent, this.interValSeconds );
	};
	Timer.prototype.timerEvent = function(){
		clickRight();
	};
	Timer.prototype.stop = function(){
		clearInterval(this.intervalPointer);
	};
};
var slideshow = new Timer();

function getrandom(min_random, max_random) {
    var range = max_random - min_random + 1;
    return Math.floor(Math.random()*range) + min_random;
}

function hover(id) {
	document.getElementById(id).style.color="#39ccff";
	document.getElementById(id).style.borderBottom="none";
}
function hout(id) {
	document.getElementById(id).style.color="#14b1e7";
	document.getElementById(id).style.borderBottom="1px dashed #14b1e7";
}

function prodhover(id) {
	document.getElementById(id).style.display="block";
}
function prodhout(id) {
	document.getElementById(id).style.display="none";
}
