$(document).ready(function() {
	
	/* angoli stondati per il menù a sx */
	makeRoundedCorners();
	
	
	abilita_confronto(0);
	
	/* testo sul rollover delle icone di share e strumenti */
	$('#strumenti a').mouseover(function(el){strumenti_over(el)});
	$('#strumenti a').mouseout(function(){strumenti_out()});
	
	$("a[rel='lightbox-brico']").colorbox();
	
	/* footer */
	$('#footer_open').click(function(e) {openFooter()});
	$('#footer_close').click(function(e) {closeFooter()});
	$('#footer_close').hide();
	$('#footer_map').hide();
	
	/* overlay sui prodotti nella EP categoria */
	$('#product_overlay input').live('click', function(e) {alignProductCheckbox(e)});
	$('#frm_prodotti > .preview_prodotto_gia').mouseover(function(e){setProductInterval(e);});
	$('#frm_prodotti > .preview_prodotto_gia').mouseout(function(e){window.clearTimeout(overlayInterval);});
	
	/* apertura e chiusura delle tendine */
	$('#service_nav').click(function(e) {e.stopPropagation()});
	$('#service_catalogue_btn').click(function() {clickServiceCatalogue()});
	$('#service_search_btn').click(function() {clickServiceSearch()});
	$(document).click(function(e) {documentClick();});
	
	/* ricerca prodotto in tendina */
	$('#box_form_area').change(function() {checkSearchForm()});
	$('#box_form_sup').keyup(function() {checkSearchForm()});
	$('#link_submit_prod').click(function() {submitSearchForm()});
	checkSearchForm();
	
	/* ricerca prodotto in home */
	$('#form_home_ricerca select').change(function() {checkHomeSearchForm()});
	$('#form_home_ricerca input').keyup(function() {checkHomeSearchForm()});
	$('#form_home_ricerca .submit a').click(function(ev) {ev.preventDefault();submitHomeSearchForm()});
	checkHomeSearchForm();
	
	/* disabilita l'invio sui form */
	disableFormSubmit();
	
	/* fumetto per il pdf */
	pdfAlert();
	
	$('#share_fb').click(function(e) {e.preventDefault(); share('fb')});
	$('#share_tw').click(function(e) {e.preventDefault(); share('tw')});
	
	/* script per il calcolatore pellets in guida & consigli */
	$('#calcolatore_pellets').calcolatorePellets();
});


