﻿$(document).ready(function(){
	
	Cufon.replace('.serif, #main-menu a, #main-menu strong, #content h1 ', { fontFamily: 'serif' , hover: true});
	    
	$('#lang').bind('mouseenter mouseleave', function(){
        $(this).toggleClass('hover');
    });    
    
    // DROPDOWN init
    $('.select-box select, #search-box select').msDropDown();
   
    // CONTENT TABLE
    $('#content tbody tr:odd').addClass('odd');
    
    // WEB SIZE
    $bd = $('body');
    $('#size a').click(function(){
        if(!$(this).is('.active'))
        {
            $('#size a').removeClass('active');
            $(this).addClass('active');
            
            if($(this).is('.size-s'))
            {
                $bd.css('font-size', '75%');
            }
            else if($(this).is('.size-m'))
            {
                $bd.css('font-size', '87.5%');
            }
            else{
                $bd.css('font-size', '100%');
            }
            
            Cufon.refresh();
        }
        
        return false;
    });
  
	// LIGHTBOX
	$('a.lightbox').lightBox({
		txtImage : 'Obrázek',
		txtOf	: 'z',
		overlayBgColor : '#000',
		imageLoading:			'/public/images/lightbox-ico-loading.gif',		// (string) Path and the name of the loading icon
		imageBtnPrev:			'/public/images/lightbox-btn-prev.gif',			// (string) Path and the name of the prev button image
		imageBtnNext:			'/public/images/lightbox-btn-next.gif',			// (string) Path and the name of the next button image
		imageBtnClose:			'/public/images/lightbox-btn-close.gif',		// (string) Path and the name of the close btn
		imageBlank:				'/public/images/lightbox-blank.gif'
	});

	

});


