// JavaScript Core Document
$(document).ready(function() {
	//inizialize equalHeight Function
	equalHeight($(".equal"));
	
	//scrolling up
	$('#offerte').click(function(){
		$('html, body').animate({
			scrollTop: $("#offerte_target").offset().top
			}, 1000);				   
	});
	$('#brochure').click(function(){
		$('html, body').animate({
			scrollTop: $("#brochure_target").offset().top
			}, 1000);				   
	});
	$('#contatti').click(function(){
		$('html, body').animate({
			scrollTop: $("#contatti_target").offset().top
			}, 1000);				   
	});
		
});//end

//cufon
Cufon.replace('h1, h2, h3, h4, h5, h6');
Cufon.replace('h1, h2, h3, h4, h5, h6', {
				textShadow: '1px 1px 2px #eee'
			});

//equalHeight Function
function equalHeight(group) {
	tallest = 0;
	group.each(function() {
		thisHeight = $(this).height();
			if(thisHeight > tallest) {
				tallest = thisHeight;
			}
	});
	group.height(tallest);
}
