$(document).ready(function(){
	$('div.tooltip').hide();
	$('#tribute_interior_wrapper > #main ul#options > li > input[type=checkbox]').prettyCheckboxes({
		checkboxWidth: 128, // The width of your custom checkbox
		checkboxHeight: 29 // The height of your custom checkbox
	});
	$('#tribute_interior_wrapper > #main ul#options > li > a > img.recap').hover(
		function(e) {
			$(this).parent().parent().find('div.tooltip').show().css({
				position:"absolute",
				left:e.pageX - ($(this).parent().parent().find('div.tooltip').outerWidth() / 2) - (($(document).width() - $("#tribute_interior_wrapper").width()) / 2),
				top:e.pageY - ($(this).parent().parent().find('div.tooltip').outerHeight()) - 10
			});
		},
		function() {
			$(this).parent().parent().find('div.tooltip').hide();
		}
	);
	$('#tribute_wrapper #main #leftcol #photo_gallery ul li').hide();
	$('#tribute_wrapper #main #leftcol #photo_gallery ul li:first').show();
	$('#tribute_wrapper #main #leftcol #photo_gallery').hide();
	$('#tribute_wrapper #main #leftcol #tabs a').click(
		function() {
			$('#tribute_wrapper #main #leftcol #tabs a').removeClass('active_tab').addClass('inactive_tab');
			$(this).removeClass('inactive_tab').addClass('active_tab');
			$('#tribute_wrapper #main #leftcol div.tab').hide();
			$('#tribute_wrapper #main #leftcol div#' + this.getAttribute("rel")).show();
			return false;
		}
	);
	$('#tribute_wrapper #main #leftcol #photo_gallery a.prev').click(function(){
		if($('#tribute_wrapper #main #leftcol #photo_gallery ul li:visible').prev().length > 0) {
			$('#tribute_wrapper #main #leftcol #photo_gallery ul li:visible').hide().prev().show();
		}
		else {
			$('#tribute_wrapper #main #leftcol #photo_gallery ul li:visible').hide()
			$('#tribute_wrapper #main #leftcol #photo_gallery ul li:last').show();
		}
	});
	$('#tribute_wrapper #main #leftcol #photo_gallery a.next').click(function(){
		if($('#tribute_wrapper #main #leftcol #photo_gallery ul li:visible').next().length > 0) {
			$('#tribute_wrapper #main #leftcol #photo_gallery ul li:visible').hide().next().show();
		}
		else {
			$('#tribute_wrapper #main #leftcol #photo_gallery ul li:visible').hide()
			$('#tribute_wrapper #main #leftcol #photo_gallery ul li:first').show();
		}
	});

});
