<!-- Start Tabs Functions JS -->
$(document).ready(function() {

	//Default Action
	$(".tab_content").hide(); //Hide all content
	$("ul.tabs li:first").addClass("active").slideDown("slow"); //Activate first tab
	$(".tab_content:first").slideDown("slow"); //Show first tab content
	
	//On Click Event
	$("ul.tabs li").click(function() {
		$("ul.tabs li").removeClass("active"); //Remove any "active" class
		$(this).addClass("active"); //Add "active" class to selected tab
		$(".tab_content").slideUp("slow").animate({opacity: 0}); //Hide all tab content
		var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content
		$(activeTab).fadeOut().animate({opacity: 1.0}).slideDown("slow"); //Fade in the active content
		return false;
	});

});

<!-- Start AJAX Subscriber Form JS -->
$(document).ready(function() { 
var options = { 
target:  '#warning'
}; 
$('.subscriberForm').ajaxForm(options); 
}); 

<!-- Start AJAX Contact Form JS -->
$(document).ready(function() { 
var options = { 
target : '#alert'
}; 
$('#contactForm').ajaxForm(options); 
}); 

<!-- Clear Form after Submit -->
$.fn.clearForm = function() {
  return this.each(function() {
	var type = this.type, tag = this.tagName.toLowerCase();
	if (tag == 'form')
	  return $(':input',this).clearForm();
	if (type == 'text' || type == 'password' || tag == 'textarea')
	  this.value = '';
	else if (type == 'checkbox' || type == 'radio')
	  this.checked = false;
	else if (tag == 'select')
	  this.selectedIndex = -1;
  });
};

<!-- Refresh Captcha Code -->
function refreshCaptcha()
{
	var img = document.images['captchaimg'];
	img.src = img.src.substring(0,img.src.lastIndexOf("?"))+"?rand="+Math.random()*1000;
}

<!-- Start Cufon -->
Cufon.replace('h1,h2,h3,h4,h5,h6,p,.column ul,.column ol,#footer',{
	hover: true
});

