$(document).ready(function(){
	$('#songs td p').hide();
	$('#songs td p').delay(200).fadeIn(800);
	// Reset Font Size
		 var originalFontSize = $('.post-body').css('font-size');
		 $(".resetFont").click(function(){
		 $('.post-body').css('font-size', originalFontSize);
		 });
		 // Increase Font Size
		 $(".increaseFont").click(function(){
		  var currentFontSize = $('.post-body').css('font-size');
		 var currentFontSizeNum = parseFloat(currentFontSize, 10);
		   var newFontSize = currentFontSizeNum*1.2;
		 $('.post-body').css('font-size', newFontSize);
		 return false;
		 });
		 // Decrease Font Size
		 $(".decreaseFont").click(function(){
		  var currentFontSize = $('.post-body').css('font-size');
		 var currentFontSizeNum = parseFloat(currentFontSize, 10);
		   var newFontSize = currentFontSizeNum*0.8;
		 $('.post-body').css('font-size', newFontSize);
		 });
	});

	$('div#album:first').css({'border-bottom-width':'0px'});
	$('a.mp3add').click(function() {
		$.get('cartupdate2.php', { item: $(this).children('input[name=add]').val(), action: "add", type: $(this).children('input[name=type]').val() }, function(output) {	
		$('div#cartupdate').stop(true, true).html(output);
		$('#cartupdate').fadeIn(500).delay(1500).fadeOut(1500);
		//$('#cartupdate').delay(1500).fadeOut(1500);
		
		});
		return false;
	});
	
	$('a.buycd').click(function() {
		$.get('cartupdate2.php', { item: $(this).children('input[name=add]').val(), action: "add", type: $(this).children('input[name=type]').val() }, function(output) {
			$('#cartupdate').stop(true, true).html(output).fadeIn(500).delay(1500).fadeOut(1500).delay(2000);
		});
	return false;
	});

	$('a.viewcart').click(function() {
        $('#cart').prepend(function(){
			$(this).load('cart2.php');
		});
        $('#cart').fadeIn(300);
        return false;
    });
	
	$('a.mp3sample').click(function() {
		$.get('sample.php', { track: $(this).parents('td.albumpage').siblings('td.add').children('a').children('input[name=add]').val() }, function (outputsample) {
			$('#sample').stop(true, true).html(outputsample).show();															
		});
		return false;
	});
	
	
		//$(document).ready(function() {
			//$.get('cartupdate2.php', { action: "quantity" }, function(output) {
				//$('span.qty').html(output);
			//}); 
		//});
