$(document).ready(function(){
	$('a.popup').attr({target:'_blank'});
	/*-------- Colorbox --------*/
	$(".colorbox").colorbox(transition = "fade");
	$(".colorbox-map").colorbox({width:"80%", height:"80%", iframe:true});
	$(".colorbox-form").colorbox({width:"560px", height:"450px", iframe:true});
	
	
	/*-------- Input value --------*/
	$('.del-value').click(function() {
		if (this.value == this.defaultValue) {
		this.value = '';}}
	);
	$('.del-value').blur(function() {
		if (this.value == '') {
		this.value = this.defaultValue;}}
	);

	
	
	
	
	$(".product-list-item, .right .block-content, .middle .block-content, .level-nav .levels-tree li, .btn-set .button, .scrollable-item, .show-filters").corner("round 3px");
	
	$(".level-nav, .btn-set").corner("round 6px");
	$(".middle .block, .right .block").corner("round bottom 6px");
	
	
	
	
	$('#product-detail .cat-picture img, img.right').preload({
       placeholder:'http://primahodinky.inshop.cz/inshop/Layout/Schemata/Vinis/images/preloader.gif',
       notFound:'http://primahodinky.inshop.cz/inshop/Layout/Schemata/Vinis/images/preloader.gif'
   });

	$(".level-nav .levels-tree ul").children().addClass("test");
	$(".level-nav .levels-tree ul li li").removeClass("test");
	/*$(".cat-nav .levels-tree li.test:eq(2)").after("<li></li>");
	$(".cat-nav .levels-tree li.test:eq(2)").next("li").addClass("cleaner");*/
	
	
	$(".level-nav .levels-tree ul li.test").equalHeights();

	
	
/*	var blockHeight = $(".level-nav .levels-tree li:first-child").height();

	$(".level-nav .levels-tree ul ul").hide();
	
	$(".level-nav .levels-tree li.test").height(20);
	
	$(".btn-slide").click(function(){
		$(".level-nav .levels-tree ul ul").slideToggle("fast");
		$(".level-nav .levels-tree li.test").height(blockHeight);
		$(this).toggleClass("active");
		return false;
	});*/
	
	$("div.scrollable").scrollable({size: 5, clickable: false});
	/*$("#catalogue .tooltip-btn").tooltip();*/
	
	$("#header-nav ul li a:first").hide();
	$("#header-nav ul li li a:first").hide();
	$(".homepage-block ul li:first").hide();
	
	
});



/*-------- Cufon --------*/	
	Cufon.replace('h1, .right .block-title, #header-nav .department li, .middle .block-title, .text-block h2, .text-block h3, .filters legend, .text-block legend');