//var $J = jQuery.noConflict();
jQuery(document).ready(function(){

$(".conroun").corner();
$(".stairs_cor").corner();

	//menu
    $("#menu td").hover(function(){
		$(this).css("background", "#450402 url(/data/img/bg_menu_act.jpg) top repeat-x");
		$("ul:first:hidden", this).slideDown(200);
	},function(){
		$("a", this).filter(":not(.active)").parent().css("background", "none");
		$("ul:first:visible", this).slideUp(150);
	});
	$("#menu ul").css({top: $("#menu").height()});
    $(window).resize(function(){
        $("#menu ul").css({top: $("#menu").height()});
    });
    
    $("#menu td a.active").parent().css("background", "#450402 url(/data/img/bg_menu_act.jpg) repeat-x");

	// neklikabel'nost'
    $("#menu a").next("ul").each(function(){
		$(this).prev("a").css({cursor: "default"});
	});
    
    $("#menu ul a").hover(function(){
		$(this).parent().css("background", "#d0d0d0");
	},function(){
		$(this).filter(":not(.active)").parent().css("background", "none");
	});
    $("#menu ul a.active").parent().css("background", "#d0d0d0");
	
	//book shops
	/*$(".buy_btn").hover(function(){
		$(this).attr('src', '/data/img/buy_btn_a.jpg');
	},function(){
		$(this).attr('src', '/data/img/buy_btn.jpg');
	});*/
	$(".prices").each(function(){
		$("span:not(:last)", this).append("&nbsp;&nbsp;|&nbsp;");
	});
	
	//blokcs - consulting
	$(".clickable li > .consult_hidden").hide();
	$(".clickable li > .conroun").click(function(){
		$(this).next(".consult_hidden").toggle(500);
	});
    
	/*$("#menu td a").hover(function(){
		$(this).parent().css("background", "url(data/img/bg_menu_act.jpg) repeat-x");
		$(this).next().toggle();
	},
	function(){
		$(this).filter(":not(.active)").parent().css("background", "none");
		$(this).next("ul").toggle().css("display", "none");
	});
	

	
	//submenu
	$("#menu ul").bind("mouseleave", function(){
		$(this).toggle();
	});
	$("#menu ul a").hover(function(){
		$(this).parent().css("background", "#d0d0d0");
	},
	function(){
		$(this).parent().css("background", "none");
	});
	$("#menu ul a.active").css("background", "#d0d0d0");
	*/
});
