			$(document).ready(function() {
				var orig = $("#ispis").html();
				$(".ime_kat").hover(
					function () {
						$(this).css({'background-color' : '#c2d372'});
					}, 
					function () {
						$(this).css({'background-color' : '#aca9cf'});
					}
				);
				$(".ime_kat").toggle(
					function () {
						$(this).next().slideDown("fast", resize);
					}, 
					function () {
						$(this).next().slideUp("fast", resize);
					}
				);
				$("input:checkbox").click(function() {
					var art = "";
					$("input:checked").each(function() {
						var slika = $(this).next().next().attr("title");
						art += "<img src='images/proizvodi/" + slika + "' width='60' alt='slika_proizvoda' />" + $(this).next().next().text() + "<br />";
					});
					if (art == "") {
						$("#ispis").html(orig);
					} else {
						$("#ispis").html(art);
					}
				});
				$(".check").click(function() {
					var art = "";
					$("input:checkbox").attr("checked", true);
					$("input:checked").each(function() {
						var slika = $(this).next().next().attr("title");
						art += "<img src='images/proizvodi/" + slika + "' width='60'>" + $(this).next().next().text() + "<br />";
					});
					$("#ispis").html(art);
				});
				$(".uncheck").click(function() {
					$("input:checkbox").attr("checked", false);
					$("#ispis").html(orig);
				});
				$(".check").hover(
					function () {
						$(this).css({'background-color' : '#c2d372'});
					}, 
					function () {
						$(this).css({'background-color' : ''});
					}
				);
				$(".uncheck").hover(
					function () {
						$(this).css({'background-color' : '#c2d372'});
					}, 
					function () {
						$(this).css({'background-color' : ''});
					}
				);
				function resize() {
					var centertext = null;
					centertext = document.getElementById("centertext-cijene").clientHeight;
					var maxheight = null;

					leftheight=document.getElementById("contentleft").clientHeight;
					centerheight= centertext + document.getElementById("crumbFrame").clientHeight + document.getElementById("centerbanner").clientHeight;

					if (leftheight > centerheight) {
						maxheight = leftheight;
					} else {
						maxheight = centerheight;
					}

					document.getElementById("contentleft").style.height = maxheight+"px";
					document.getElementById("contentcenter-cijene").style.height = maxheight+"px";

					var frame;
					subheader = document.getElementById("subheaderbox").clientHeight;

					frame=maxheight+188+subheader;
					document.getElementById("frame").style.height = frame+"px";
				}
			});
