$(document).ready(function() { //Form if ($(".acomplete").length > 0) { $(".acomplete").autocomplete("res/inc/autocomplete/cities.php", { width: 300, matchContains: false, selectFirst: false, mustMatch: false, scroll: false, scrollHeight: 600 }); } if ($(".aop").length > 0) { $(".aop").autocomplete("res/inc/autocomplete/operatori.php", { width: 300, matchContains: false, selectFirst: false, mustMatch: false, scroll: false, scrollHeight: 600 }); } if ($(".m_dt").length > 0) { $(".m_dt").mask("99/99/9999"); } //Notice if ($(".notice").length > 0) { $('.notice').slideDown().delay(4000).slideUp(); } //toggle input value swapValue = []; $(".togglekey").each(function(i){ swapValue[i] = $(this).val(); $(this).focus(function(){ if ($(this).val() == swapValue[i]) { $(this).val(""); } $(this).addClass("focus"); }).blur(function(){ if ($.trim($(this).val()) == "") { $(this).val(swapValue[i]); $(this).removeClass("focus"); } }); }); //Fadeimg $(".pimg").fadeTo("slow", 1.0); $(".pimg").hover( function(){ $(this).fadeTo("fast", 0.5); }, function(){ $(this).fadeTo("fast", 1.0); }); $(".dimg").fadeTo("slow", 0.5); }); Shadowbox.init({ //skipSetup: true, overlayColor: '#069', overlayOpacity: '0.6', language: 'it', players: ['img', 'html', 'iframe'] });