// F1 front-end/back-end toggle
	if (document.all) {
		document.onhelp = function() {
			location.href = '/admin/';
			return false;
		}
	} else {
		document.onkeydown = function (evt) {
			if (evt.keyCode == '112') {
				location.href = '/admin/';
				return false;
			}
		}
	}

// BANNER REMOVE:
// rimuovo il banner dal DOM al termine dell'animazione o al click su 'skip'
function removeBanner(){
	$('#banner').remove();
};

// jQuery
$(document).ready(function(){

	// EFFETTI IN HOME (3 tipi di matrimonio)
	$(".homeTrigger").click(function(){
		if ($(this).next().is(":hidden")){
			$(".homeTrigger").next().slideUp();
			$(this).next().slideToggle();
		}
	})
	$(".homeTrigger").css({ cursor: "pointer" });
	
	
	// CYCLE
	$('.cycleHoriz, .cycleVert').cycle({
		fx: "fade"
		, timeout: 3000
		, speed: 2000
	});
	
	
	// LOGHI DI SFONDO
	$('<img src="/images/img-sfondo.png"/>')
		.appendTo("body")
		.css({
			position: "absolute"
			, right: 0
			, bottom: -180
			, zIndex: -1
		})
	$('<img src="/images/img-sfondo.png"/>')
		.prependTo("body")
		.css({
			position: "absolute"
			, left: -15
			, top: -30
			, zIndex: 1
		})
		
	
	// ROLLOVER BARRANAV
	$("#barranav img:not([src*='selected'])").hover(
		function(){
			$(this).attr({ src: "/images/btn-" + $(this).parent().attr('rel') + "-selected.gif" });
		}
		, function(){
			$(this).attr({ src: "/images/btn-" + $(this).parent().attr('rel') + ".gif" })
		}
	);
	 

	// FACEBOX
		$("a[rel=facebox]").facebox();
	

	// PNG FIX
		$('img[src*=.png]').ifixpng();
	

	// CAPTCHA: ELIMINO BORDO
		$("#simple_captcha").children().andSelf().css({
			border: "0"
		});
	
		
});

