var rotateLength = 8000;
var rotateTimeout;

var leftArrow = new Image(61, 250);
var rightArrow = new Image(61, 250);
leftArrow.src = "/wp-content/themes/sixcrayons/images/left-arrow-hi.png";
rightArrow.src = "/wp-content/themes/sixcrayons/images/right-arrow-hi.png";

function rotateSlider() {
	jQuery('ul.juice-slideshow-menu li.juice-slideshow-next').mousedown();
	rotateTimeout = setTimeout("rotateSlider()", rotateLength);
}


jQuery(document).ready(function($){
	$('a[rel="lightbox"]').hover(function() {
		$(this).prepend('<div class="m-glass"></div>');
	}, function() {
		$('div.m-glass').remove();
	});
	$('div#slideshow').slideshow({
		paging: false,
		prevText: '&raquo;',
		nextText: '&laquo;',
		onChange: function() {
			rotateTimeout = clearTimeout(rotateTimeout);
			rotateTimeout = setTimeout("rotateSlider()", rotateLength);
		}
	});
	rotateTimeout = setTimeout("rotateSlider()", rotateLength);
});