$(document).ready(function(){
	    $('h1').flash(
	        {
	            src: '/flash/jfr.swf',
	            wmode: 'transparent',
	            flashvars: {
	                css: [
	                    '* { color: #CC3300; }',
	                    'a { color: #CC3300; text-decoration: none; }',
	                    'a:hover { text-decoration: underline; }'
	                ].join(' ')
	            }
	        },
	        { version: 7 },
	        function(htmlOptions) {
	            htmlOptions.flashvars.txt = this.innerHTML;
	            this.innerHTML = "<div>"+this.innerHTML+"<\/div>";
	            var $alt = $(this.firstChild);
	            htmlOptions.height = $alt.height();
	            htmlOptions.width = $alt.width();
	            $alt.addClass('alt');
	            $(this)
	                .addClass('flash-replaced')
	                .prepend($.fn.flash.transform(htmlOptions));
	        }
	    );
	});

	function addToCart(codeID){
		// $("#cart").html("bezig met laden");
		$("#loader").load(
			"/libs/addToCart.php",
			{code: codeID, num: 1},
				function(){
					$("#cart").load("/libs/order.php",{},
						function(data){
							document.location = '/order';
							// $("#cart").html(data);
						}
				);
				}
		);
	}

	function deleteFromCart(codeID){
		// $("#cart").html("bezig met laden");
		$("#loader").load(
			"/libs/deleteFromCart.php",
			{code: codeID},
				function(){
					$("#cart").load("/libs/order.php",{},
						function(data){
							document.location = '/order';
							// $("#cart").html(data);
						}
				);
				}
		);
	}