$(document).ready(function() {
	$('#slideshow') 
	.before('<div id="slideshow-pager">') 
	.cycle({ 
		fx:     'fade', 
		speed: 300,
		timeout: 5000,
		pager:  '#slideshow-pager' 
	});

	$('.tile:not(:has(.marks))').children('.customise').css({'top':'110px'});
	
	$('.tile').hover(function() {
		$('.customise', this).stop(true, true).fadeIn(300); 
	}, function() {
		$('.customise', this).stop(true, true).fadeOut(300);
	});
	
	$('marquee').marquee('pointer').mouseover(function () {
	$(this).trigger('stop');
	}).mouseout(function () {
		$(this).trigger('start');
	});
});

/*
function nextImage() {
	var g = document.getElementById('gallery');
	if (gallery_current_index == gallery_images.length - 1) {
		gallery_current_index = 0;
	} else {
		gallery_current_index = gallery_current_index + 1;
	}
	
	g.src = "gallery/images_thumbnails/" + gallery_images[gallery_current_index];
}

function prevImage() {
	var g = document.getElementById('gallery');
	
	if (gallery_current_index==0) {
		gallery_current_index = gallery_images.length - 1;
	} else {
		gallery_current_index = gallery_current_index - 1;
	}
	
	g.src = "gallery/images_thumbnails/" + gallery_images[gallery_current_index];
}
*/
