﻿$(document).ready(function () {

    $("#detail h1 a").css('display', 'block');


    $(".search .search-txt").hover(
                function () {
                    $(this).addClass('search-txt-hover');
                }, function () {
                    $(this).removeClass('search-txt-hover');
                }
                                          );

                $(".search .search-txt").focusin(
                    function () {
                        if ($(".search .search-txt").val() == " vyhledávání...") {
                            $(".search .search-txt").val("");
                        }
                    }
            );
                    $(".search .search-txt").focusout(
                function () {
                    if ($(".search .search-txt").val() == "") {
                        //                        $("#fieldset .search-txt").val(" vyhledávání...");
                    }
                }
            );





    $("#category ul li").hover(function () {

        $(this).find("div").stop()
		.animate({ left: "210", opacity: 1 }, "fast")
		.css("display", "block")

    }, function () {
        $(this).find("div").stop()
		.animate({ left: "0", opacity: 0 }, "fast")
    });




    $("#menu ul li").prepend("<span></span>"); //Throws an empty span tag right before the a tag

    $("#menu ul li").each(function () { //For each list item...
        var linkText = $(this).find("a").html(); //Find the text inside of the <a> tag
        $(this).find("span").show().html(linkText); //Add the text in the <span> tag
    });

    $("#menu ul li").hover(function () {	//On hover...
        $(this).find("span").stop().animate({
            marginTop: "-48" //Find the <span> tag and move it up 40 pixels
        }, 200);
    }, function () { //On hover out...
        $(this).find("span").stop().animate({
            marginTop: "0"  //Move the <span> back to its original state (0px)
        }, 200);
    });

});
   
