// Superfish Menu
$(document).ready(function() { 
	$('ul.menu').superfish({
		animation:   {opacity:'show',height:'show'}
	 })
});
	
// Cufon Font Replacement
Cufon.replace('h1, h2, h3, h4, h5, h6, p#breadcrumbs', { hover: true, });

//Featured
$(function() {
	$("#featured").tabs({event:"mouseover"});
});

// Reviews
$(function() {
	$("#reviewslide").tabs({fx:{opacity: "toggle"}}).tabs("rotate", 5000, true).tabs({event:"mouseover"});
});
	
// Digg
(function() {
	var s = document.createElement('SCRIPT'), s1 = document.getElementsByTagName('SCRIPT')[0];
	s.type = 'text/javascript';
	s.async = true;
	s.src = 'http://widgets.digg.com/buttons.js';
	s1.parentNode.insertBefore(s, s1);
})();

// Contact Form
jQuery(document).ready(function(){
	
	$('#contactform').submit(function(){
	
		var action = $(this).attr('action');
		
		$("#message").slideUp(750,function() {
		$('#message').hide();
		
 		$('#submit')
			.after('<img src="../images/ajax-loader.gif" class="loader" />')
			.attr('disabled','disabled');
		
		$.post(action, { 
			name: $('#name').val(),
			email: $('#email').val(),
			phone: $('#phone').val(),
			//subject: $('#subject').val(),
			comments: $('#emailcomments').val(),
			//verify: $('#verify').val()
		},
			function(data){
				document.getElementById('message').innerHTML = data;
				$('#message').slideDown('slow');
				$('#contactform img.loader').fadeOut('slow',function(){$(this).remove()});
				$('#contactform #submit').attr('disabled',''); 
				if(data.match('success') != null) $('#contactform').slideUp('slow');
				
			}
		);
		
		});
		
		return false; 
	
	});
	
});
