//	jQuery Compatibility Method
var $j = jQuery.noConflict();





$j("document").ready(function(){




	//	hide the commments
	$j('#comments').hide();
	
	
	
	//	tabs
	$j(".tabs a").click(function (event) {
		event.preventDefault();
		
		$j(".tabs a").removeClass();
		$j(this).addClass("on");
		
		tag_id = $j(this).attr('href').slice(1);
		$j(".tab_content").hide();
		$j("#" + tag_id).show(200);
	});
	
	
	
	//	comment form
	$j(".comment_form form").submit(function (event) {
		event.preventDefault();
		if($j(".name_field").val().length > 0 && $j(".comment_field").val().length > 0)
		{
			$j(".your_comment dt").html($j(".name_field").val());
			$j(".your_comment dd").html($j(".comment_field").val());
			
			$j(".name_field").val('');
			$j(".comment_field").val('');
		
			$j(".your_comment").show("slow");
		}
		else
		{
			alert("Please fill out all fields.");
		}
	});
	
	
	
	//	animated #anchor based by 'id' attribute (creates scrolling animation)
	$j('a[href*=#]').click(function (event) {
		event.preventDefault();
		if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname)
		{
			var $target = $j(this.hash);
			$target = $target.length && $target || $j('[id=' + this.hash.slice(1) +']');
			if ($target.length)
			{
				var targetOffset = $target.offset().top;
				$j('html,body').animate({scrollTop: targetOffset}, 600);
				return false;
			}
		}
	});


// Lyriana affiliate stuff
	
	$j('.viga').click(function(e){
		e.preventDefault();
		window.location = 'http://www.vigorelle.com/ct/81751?b=607';
	});
	
	$j('.lyriana').click(function(e){
		e.preventDefault();
		window.location = 'http://www.lyriana.com/aff/71D8B7FED6D59A0128D1AD5AE4051400/index.html';
	})


}); // Ends Ready Function