$(document).ready(function() {

     /* FancyBox gallery */
    $("a.galleryImg").fancybox({
        'speedIn'	:	600,
        'speedOut'	:	200,
        'overlayShow'	:	false,
        'hideOnContentClick' :  true,
        'scrolling'     :       'yes'
    });

    $(".match").click(function() {
       $(this).children(".details").slideToggle('normal');

    });

    $(".mainrow").mouseover(function() {
       $(this).css("background","#EFE80C");
       $(this).next(".inforow").css("background","#EFE80C");
    });
    $(".inforow").mouseover(function() {
       $(this).css("background","#EFE80C");
       $(this).prev(".mainrow").css("background","#EFE80C");
    });
    $(".mainrow").mouseout(function() {
       $(this).css("background","none");
       $(this).next(".inforow").css("background","none");
    });
    $(".inforow").mouseout(function() {
       $(this).css("background","none");
       $(this).prev(".mainrow").css("background","none");
    });
    
    $(".matchBoxTable").find(".mainrow").each(function() {
        $(this).click(function() {
            document.location.href='http://www.bkteplice.cz/?sectionID='+$(this).attr("teamSection")+'&subSection=matches#match'+$(this).attr("matchID");;
        });
    });


    var src = $("input[name='math']").val();
    if (!isNaN(src)) {
        var num2 = parseInt(src.substr(0,1));
        var num1 = parseInt(src.substr(1,1));
        $("input[name='verify']").val((num1-num2));
        $(".hideMe").css("display","none");
    }




});
