
$(window).load(function() {

	$(".row").each(function(){
		columns = $(this).children((($.browser.msie && $.browser.version.substr(0,1)<"8")?".cell, ":'')+".item");
		var tallestcolumn = 0;
		columns.each(function(){
			var currentHeight = $(this).height();
			if (currentHeight > tallestcolumn) tallestcolumn = currentHeight;
		});
		columns.height(tallestcolumn);  
	});
});



$(document).ready(function() {

//	$(document).pngFix({ blankgif: '/images/blank.gif' }); 

	$(".box").colorbox({close:'x',opacity:'0.60'});

	$(".zebra li:even").addClass('even');
	
	$("a[href^=http://]").attr('target','_blank');
/*
	$("ul").filter(".navigation, .menu, .path").each(function(){
		$(this).children("li:first").css('border-left', 'none');//.css('padding-left','0');
		$(this).children("li:last").css('border-right', 'none');//.css('padding-right','0');
		$(this).children("li.after:last").css('content', ' ');
	});


	$('input[title]').bind({
	focus: function(){
		if ($(this).attr('title') == $(this).attr('value')) $(this).attr('value', '');
	},
	blur: function(){
		if ($(this).attr('value') == '') $(this).attr('value', $(this).attr('title'));
	}
	});


	$("input.toggle:checkbox:enabled").click(function(){
	$("input.checkbox:checkbox:enabled", $(this).parents("form")).each(function(){
		$(this).attr('checked', !$(this).attr('checked'));
	});
	});


	$(".checkbox.trigger").change(function(){
		$('.'+$(this).attr("id")).toggle();
		$(this).val($(this).attr("checked")?'1':'0');
	}).filter("[type=checkbox], [type=radio]").each(function(){
		if ($(this).attr("value")=='0') $(this).val('');
		if ($(this).attr("value")) $(this).attr('checked', 'true');
	}).filter(":checked").each(function(){	
		$("."+$(this).attr("id")).show();
	});


	$(".row").each(function(){
		$(this).children(".cell:last").css('border-right', 'none').css('padding-right','0');
	}).each(function(){
		$(this).children(".break").prev().css('border-right', 'none');
	});
*/

 
/*
	var discount = $("#discount").text();
	if (!(discount==null) && !(discount=='') && !(discount==0)) {
		$(".price").each(function(){
			price = $(this).find("span[id^='price']").text();
			$(this).find("span[id^='discount']").html(price-(price/100*discount));
		}).find(".price_discount").show();	
	}
*/


	$(".item .open").click(function(){
		$.fn.colorbox({
			href: $(this).attr('href')+'?isbody=1',
			width: '800px',
			height: '800px',
			onComplete: function(){
				$(".thumb a[href]").click(function(){
					$("#image_"+$(this).attr('rel')).attr('src', $(this).attr('href'));
					return false;
				});
			}
	    });
	    return false;
	});


	$(".thumb a[href]").click(function(){
		$("#image_"+$(this).attr('rel')).attr('src', $(this).attr('href'));
		return false;
	});

});




/*

function addBasket(item, amount, price, netto)
{
	if (item == null || item == '') return false;
	if (amount == null || amount == '') amount = 1;
	if (price == null || price == '') price = 0;
	if (netto == null || netto == '') netto = 0;

	$("#netto").text(Number($("#netto").text())+Number(netto)*Number(amount));
	$("#amount").text(Number($("#amount").text())+Number(amount));
	$("#bill").text(Number($("#bill").text())+((price-(price/100*Number($("#discount").text())))*Number(amount)));

	cookies = null;

	begin = document.cookie.indexOf('basket'+'=');
	if (begin != -1) {
		begin = document.cookie.indexOf('=', begin) + 1;
		end = document.cookie.indexOf(';', begin);
		if (end == -1) end = document.cookie.length;
		cookies = unescape(document.cookie.substring(begin, end));
	}

	if (cookies == null || cookies == ' ') cookies = '';
	if ((begin_item = cookies.indexOf(item)) != -1) {
		begin_amount = cookies.indexOf('(', begin_item) + 1;
		end_amount = cookies.indexOf(')', begin_item);
		amount = Number(amount)+Number(cookies.substring(begin_amount, end_amount));
		cookies = cookies.substring(0, begin_amount)+amount+cookies.substring(end_amount);
	} else 
		cookies = cookies+(cookies.length>1?'-':'')+item+'('+amount+')';

	document.cookie = 'basket'+'='+escape(cookies)+"; path=/";

	return false;
}
*/


