$(document).ready(function(){ $("#SearchField").click(function () { if (this.value=="Cerca nel sito"){ this.value=""; } }); $("#SearchField").blur(function () { if (this.value==""){ this.value="Cerca nel sito"; } }); $('#backtotop').click(function(){$('html, body').animate({scrollTop:0}, 'slow');}); Shadowbox.init(); }); function checkSearch(){ if (document.getElementById('SearchField').value.length>2){ location.href='/contents/'+document.getElementById('SearchField').value+".html"; return false; }else{ alert("Inserite un termine di ricerca di almeno 3 caratteri"); document.getElementById('SearchField').value=""; document.getElementById('SearchField').focus(); return false; } } function showBasket(){ Shadowbox.open({content:'http://www.conforti-allarmi.it/basket.php?act=view&confirm=1', player: 'iframe', width: 800, height:$(window).height()}); }