jQuery(document).ready(function($) {
	
	// fade rollovers
	$(function() {
		// set opacity to nill on page load
		$("ul.rollovers span").css("opacity","0");
		// on mouse over
		$("ul.rollovers span").hover(function () {
			// animate opacity to full
			$(this).stop().animate({
				opacity: 1
			}, "slow");
		},
		// on mouse out
		function () {
			// animate opacity to nill
			$(this).stop().animate({
				opacity: 0
			}, "slow");
		});
	});
	// end fade rollovers
	
	// apple conditionals
	var isiPad = navigator.userAgent.match(/iPad/i) != null;
	var isiPhone = (navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i));
	
	if(isiPad){
		$("html").addClass("ipad");
	}
	if(isiPhone){
		$("html").addClass("iphone");
	}
	// end apple conditionals
	
	//contact form
	
	$('.field-roll').each(function() {
       var default_value = this.value;
       $(this).focus(function(){
               if(this.value == default_value) {
                       this.value = '';
               }
       });

       $(this).blur(function(){
               if(this.value == '') {
                       this.value = default_value;
               }
       });
	});
	
	// form submission =================================================
	$("form").submit(function() {
		
		var action = $(this).attr("action");
		
		$.post(action, $(this).serialize(), function(data){
			$("#valid").html(data);
		});
		
		return false;
	});
	
	//end contact form
	
});

