// JavaScript Document
// First Scribe

var $j = jQuery.noConflict();
$j(document).ready(function() {
	$j('ul.ulnav li').addClass("js");
	$j(	'ul.ulnav li').hoverIntent(function() {
		$j(this).children('ul').stop(true, true).fadeIn("fast");
		}, function() {
		$j(this).children('ul').stop(true, true).fadeOut("fast");
		});
	
	$j('.product-custom-option option').each(function() {$j(this).text($j(this).text().replace( /.\d\d(\d|\s)/  , ''))});
	
	//gift card event listener
	$j('#gift-card-form').bind('submit', function()
	{
	$j.post("/giftcard/balance.php", $j('#gift-card-form').serialize(), function(data)
		{
			if(data == 0)
			{
				$j('#price').text("Either your card is not valid or we were unable to find the balance at this time.");
			}
			else
			{
				$j('#price').text("$" + data);
			}
		});
	
	});
	
	
});


