    $(function() {  


$('#coin-slider').coinslider({ width: 604, height: 378, navigation: false, delay: 8000, effect: 'rain', sDelay: 10, hoverPause: true, spw: 5, // squares per width
sph: 3 // squares per height
  });



// $("#1, #2, #3").lavaLamp({
    //            fx: "backout", 
  //              speed: 700,
  //              click: function(event, menuItem) {
  //                  return true; // make sure this is true or the links wont work
  //              }
  //          });

//
// for navigation
	  $(document).ready(function(){
			$("#nav-one li").hover(
				function(){ $("ul", this).fadeIn("fast"); }, 
				function() { } 
			);
	  	if (document.all) {
				$("#nav-one li").hoverClass ("sfHover");
			}
	  });
	  
		$.fn.hoverClass = function(c) {
			return this.each(function(){
				$(this).hover( 
					function() { $(this).addClass(c);  },
					function() { $(this).removeClass(c); }
				);
			});
		};	  
	

//end navigation




$('#footerad').hide();

$('#web').hover(
	function(){
	$('#footerad').fadeIn(1000);
	},
	function(){
	$('#footerad').fadeOut(1000);
	}
);


//$('#web').mouseover(function() {
//$('#footerad').fadeIn(1000);
//});

//$('#web').mouseleave(function() {// no because of IE
//$('#footerad').fadeOut(1000);
//});


  $('.borderimage').hover(function() { //for thumbnails
        $(this).addClass('hoverborderimage');
      }, function() {
        $(this).removeClass('hoverborderimage');
      });


$("div.clickable").click( //this makes divs clickable (including any images in them), specify the url in the page , in the <div> tag. (in gallery.php for example)
function()
{
    window.location = $(this).attr("url");
});




var emailExp = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/;

$('input#name').focus(function() {//clear comment prompt on focus- this is the same as //onFocus="this.value=''; this.onfocus=null;"
  $("input#name").val(""); //clear field
});

$('input#email').focus(function() {//clear comment prompt on focus- this is the same as //onFocus="this.value=''; this.onfocus=null;"
  $("input#email").val(""); //clear field
});



      $('.error').hide();  
      $(".button").click(function() {  
        // validate and process form here  
          
        $('.error').hide();  
          var name = $("input#name").val();  
            if (!name || name == "Your name") {  
			$("label#name_error").show();  
			$("input#name").focus();  
			 return false;  
			}
			
           var email = $("input#email").val();  
			if (!email.match(emailExp)){  
			$("label#email_error").show();  
			$("input#email").focus();  
			return false;  
		   }  

           var message = $("textarea#message").val();  
           if (message == "") {  
			$("label#message_error").show();  
			$("textarea#message").focus();  
			return false;  
		   }  
			
			var spam = $("input#spam").val();  
           if (spam != "blue" && spam!="BLUE") {  
			$("label#spam_error").show();  
			$("input#spam").focus();  
			return false;  
		   }  
	

   var dataString = 'name='+ name + '&email=' + email + '&message=' + message; 

 // var dataString = $("#contact_form form").serialize();
    //alert (dataString);return false;  
    $.ajax({  
      type: "POST",  
 //     url: "http://www.meantimeviola.com/cgi-bin/FormMail.pl",  
	  url: "processmail.php", 
      data: dataString,  
      success: function() {  
        $('#contact_form').html("<div id='message1'></div>");  //replaces contact_form with div
        $('#message1').html("<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><h2>Contact Form Submitted!</h2>")  
       .append("<p>We will be in touch soon.</p>")  
       .hide()  
       .fadeIn(1500, function() {  
         $('#message1').append("<img id='checkmark' src='images/check.png' />");  
       });  
     }  
   });  
   return false;  
     });  
   });  
