function show(id,elm) {
    document.getElementById(id).style.display='block';
    document.getElementById(elm).style.backgroundImage='url(\'/images/menu/cz/'+elm+'_a.jpg\')';
}

function hide(id,elm) {
    document.getElementById(id).style.display='none';
    document.getElementById(elm).style.backgroundImage='url(\'/images/menu/cz/'+elm+'.jpg\')';
}

function Check() {
    var prom1 = self.document.forms.formular.email.value;
    var prom2 = self.document.forms.formular.obsah.value;
    if (prom1 == "" || prom1 == "váš email" || prom2 == "" || prom2 == "váš dotaz") {
        var vysledek = false;
        alert('Nebyl vyplněn váš email, nebo text zprávy!');
    } else {
        var vysledek = true;
    }
    return vysledek;
}

function OpenWin(url) {
	window.open(url,"_blank","directories=no,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,titlebar=no,toolbar=no,height=480,width=640,top=0,left=0",true);
}

function Size() {
    Img=document.getElementById('imgfr');
    ImgWidth=Img.width;
    ImgHeight=Img.height;
    HeadHeight=document.getElementById('headfr').offsetHeight;
    WinWidth = document.documentElement.clientWidth;
    WinHeight = document.documentElement.clientHeight;
    fWidth = ImgWidth-WinWidth;
    fHeight = (ImgHeight-WinHeight)+HeadHeight;
    window.resizeBy(fWidth+10,fHeight+10);
    self.focus();
}

function mycarousel_initCallback(carousel) {
    // Script for control buttons
    jQuery('.jcarousel-control a').bind('click', function() {
        carousel.scroll(jQuery.jcarousel.intval(jQuery(this).text()));
        return false;
    });

    jQuery('.jcarousel-scroll select').bind('change', function() {
        carousel.options.scroll = jQuery.jcarousel.intval(this.options[this.selectedIndex].value);
        return false;
    });

    jQuery('#mycarousel-next').bind('click', function() {
        carousel.next();
        return false;
    });

    jQuery('#mycarousel-prev').bind('click', function() {
        carousel.prev();
        return false;
    });
};

jQuery(document).ready(function() {
    
    $('#pane1').jScrollPane({scrollbarWidth: 11});

	$("a.zoom").fancybox({
		"centerOnScroll": false,
        "overlayShow": false 
	});

    jQuery("#mycarousel").jcarousel({
        vertical: true,
        wrap: "last",
        auto: 8,
        scroll: 1,
        buttonNextHTML: null,
        buttonPrevHTML: null,
        initCallback: mycarousel_initCallback
    });
    
    jQuery("#mycarousel2").jcarousel({
        vertical: false,
        scroll: 3
    });
    
    $('.ref_bg').hover(function() {
        $(this).children(".c2").children(".over").animate({opacity: "toggle",height: "114px"}, 400);
    }, function() {
        $(this).children(".c2").children(".over").animate({opacity: "toggle",height: "0px"}, 600);
    });

});
