$(document).ready(function() { 
			
	/* Super Fish Navigation */
	jQuery('ul.sf-menu').superfish();
	
	/* Cufon Font Replacement */
	Cufon.replace('#page .title, #sidebar .box .title, .browse_entries a, #page .author h2, #page #comments h2, #page #reply h2', { fontFamily: 'League Gothic' });
	Cufon.replace('#entries h2, .quick_links h3, #page .author h3', { fontFamily: 'OFL Sorts Mill Goudy', hover: true
 });

});

//Contact Form
$(document).ready(function() {

	//Define URL to PHP mail file
	url = $("meta[name=template_url]").attr('content') + "/sendmail.php";
	
	//Activate jQuery form validation
	$("#jaybich-contact").validate({
	
		submitHandler: function() {
		
			//Define data string
			var datastring = $("#jaybich-contact").serialize();
			
			//Submit form
			$.ajax({
				type: "POST",
				url: url,
				data: datastring,
				success: function(){
					$('#jaybich-contact').slideUp();
					$('#sent').fadeIn();
				}
			});
		}
	
	});
			
});

//Sidebar widget tabs
$(document).ready(function() {

	//Default Action
	$(".tab_content").hide(); //Hide all content
	$("ul.tabs li:first").addClass("active").show(); //Activate first tab
	$(".tab_content:first").show(); //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").hide(); //Hide all tab content
		var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content
		$(activeTab).fadeIn(); //Fade in the active content
		return false;
	});

});

