		$(document).ready(function(){	

			$(function(){
				var spt = $('span.mailme');
				var at = / at /;
				var dot = / dot /g;
				var addr = $(spt).text().replace(at,"@").replace(dot,".");
				$(spt).after('<a href="mailto:'+addr+'" title="Contattaci via mail"><img src="'+ conf_siteurl+'/images/email_32x32.png"/></a>')
				.hover(function(){window.status="Contattaci";}, function(){window.status="";});
				$(spt).remove();
				});
			$(function(){
				var spt = $('span.mailme2');
				var at = / at /;
				var dot = / dot /g;
				var addr = $(spt).text().replace(at,"@").replace(dot,".");
				$(spt).after('<a href="mailto:'+addr+'" title="Contattaci">'+ addr +'</a>')
				.hover(function(){window.status="Contattaci";}, function(){window.status="";});
				$(spt).remove();
				});
			$(function(){
				var spt = $('span.mailme3');
				var at = / at /;
				var dot = / dot /g;
				var addr = $(spt).text().replace(at,"@").replace(dot,".");
				$(spt).after('<a href="mailto:'+addr+'" title="Contattaci">'+ addr +'</a>')
				.hover(function(){window.status="Contattaci";}, function(){window.status="";});
				$(spt).remove();
				});
			
		});	

		$(document).ready(function(){
			$("#ajax-contact-form").submit(function(){
			
				var str = $(this).serialize();
			
			   $.ajax({
			   type: "POST",
			   url: "http://www.artechbrand.it/formcontatti/contact.php",
			   data: str,
			   success: function(msg){
			    
					$("#form-note").ajaxComplete(function(event, request, settings){
			
						if(msg == 'OK') // Message Sent? Show the 'Thank You' message and hide the form
						{
							result = '<div class="notification_ok">Il tuo messaggio è stato inviato correttamente! Verrai ricontattato al più presto dal nostro staff.</div>';
							$("#fields").hide();
						}
						else
						{
							result = msg;
						}
				
						$(this).html(result);
				
					});
				}
			 });
			return false;
			});
		});		
		
		
		
    	jQuery.fn.slideFadeToggle = function(speed, easing, callback) {
  		  return this.animate({opacity: 'toggle', height: 'toggle'}, speed, easing, callback);  
  		};

  		$(document).ready(function() {
  		  $('#a').click(function() {
  			  $('#b').slideFadeToggle('slow', function() {
  		      var $this = $(this);
  		      if ($this.is(':visible')) {
  		    	  $('#a').html('Nascondi le keywords &laquo;');
  		      } else {
  		    	  $('#a').html('Visualizza le keywords &raquo;');
  		      }
  		    });
  		  });
  		  
  		});
		
