jQuery(document).ready(function($){	
    
	// 'false' - ukáže se vždy, 'true' - neukáže se nikdy. jinak nechat zakomentované (lomítka před)
    $.cookie("tsb-cookie", 'true')

    /**
      *  MODAL BOX
      */
    // if the requested cookie does not have the value I am looking for show the modal box
    if($.cookie("tsb-cookie") != 'true')
    {
        var _message_to_show = '<div class="modal-content"></div>';
         
         // on page load show the modal box
         $.fancybox(
             _message_to_show,
             {
                'width' : 524,
                'height' : 744
             }
         );
         
         // in the message is a link with the id "modal_close"
         // when you click on that link the modal will close and the cookie is set to "true"
         // path "/" means it's active for the entire root site.. if you set it to "/admin" will be active on the "admin" folder
         // "tsb-cookie" is the name i gave the cookie.. you can name it anything you want
         $('#fancybox-close').live('click', function(e) {
             e.preventDefault();
             $.cookie("tsb-cookie", "true", { path: '/', expires: 7 });
             $.fancybox.close()
         });
     }    
     
});
