$(document).ready(function() {
/*	
	if ($("span.price").length) {
		$("span.price").printPrice();
	}
*/	
	$("a.faktura").click(function() {
		$("div.faktura").show();
		$(this).hide();
		return false;
	});
});

function roundNumber(num, dec) {
	var result = Math.round(num * Math.pow(10, dec))/Math.pow(10, dec);
	return result;
}
/*
jQuery.fn.printPrice = function() {
	var allTotal = 0;
	$(this).each(function() {
        var price = $(this);	
		var amount = $("span.amount", price);
		
		if (amount.html() > 0) {
			//amount.html(amount.html() * 1.25);
			if (amount.html().indexOf(".") > 0) {
				amount.html(roundNumber(amount.html(), 2));
			}
			if (amount.html().indexOf(".") > 0 && amount.html().indexOf(".") == amount.html().length - 2) {
				amount.html(amount.html() + "0");
			}
			
			realPrice = amount.html();
		}
				
		amount.html(amount.html() + " " + currency);
				
		if ($("strong.total", price).length) {
			if (realPrice > 0) {
				$("strong.total", price).html($("span.nr", price).html() * realPrice);
				allTotal = $("span.nr", price).html() * realPrice + allTotal;
			} else {
				$("strong.total", price).html("0");
			}
			$("strong.total", price).html($("strong.total", price).html() + " " + currency);
		}
	});
	
	if ($("div.allTotal").length) {
		$("div.allTotal").html(allTotal + " " + currency);
	}
}
*/