//jQuery
$(document).ready(function(){
						   
					   
	$('.sub_nav').hover(function(){
	var temp=$(this).attr('src')
	temp=temp.replace('.gif', '-over.gif');
	$(this).attr('src', temp);
	}, 
	function() {
	var temp=$(this).attr('src')
	temp=temp.replace('-over.gif', '.gif');
	$(this).attr('src', temp);
	});
	
	
	
var tab_on=0;	
$('.item_tab').click(function() {
var index=$('.item_tab').index(this);
tab_on=index;
for (var i=0; i<$('.item_tab').length ;i++) {
var t=$('.item_tab:eq(' + i + ')').attr('src');
if (i==index) {
t=t.replace('_down.gif', '_up.gif');
$('.item_tab:eq(' + i + ')').attr('src', t);
$('.tab_container:eq(' + i + ')').fadeIn(300);
} else {
t=t.replace('_up.gif', '_down.gif');
$('.item_tab:eq(' + i + ')').attr('src', t);
$('.tab_container:eq(' + i + ')').hide();
}
}
return false;
});

var tab_org;
$('.item_tab').hover(function(){
var temp=$(this).attr('src');
tab_org=temp;
temp=temp.replace('_down.gif', '_up.gif');
$(this).attr('src', temp);
}, 
function() {
if ($('.item_tab').index(this)!=tab_on) {
$(this).attr('src', tab_org);		
}

});
/* */


$("input#footer_zip").focus(function() {
	$(this).attr("value", "");									 
 });

$("input#contact_email").focus(function(){
	$(this).attr("value", "");
});

$("#signup_submit").click(function(event){
var email=$("input#contact_email").val();
if (email!="") {
var dataString = 'contact_email=' + email; // + '&phone=' + phone;   
//alert (dataString);return false;   


$.ajax({   
  type: "POST",   
  url: "/contact/contact_newsletter.aspx",   
  data: dataString,  
  success: function(xml) { 
	$(xml).find('message').each(function(){
	var msg = $(this).attr('id');
	if (msg=='failed') {
	$("input#contact_email").val("Error. Please try again");
	}else{
	$("input#contact_email").val("Thank You!");	
	//$('#signup_form').html("<div id='message'><p>Thank You!</p></div>");
	}
	});
  
  }   
});
}
return false;
});  


		
}); // end ready
