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

    /**
      *  MODAL BOX
      */
    // if the requested cookie does not have the value I am looking for show the modal box
    if($.cookie("carnext-cookie") != 'true')
    {
        var _message_to_show = '<div class="modal-content"><a target="_blank" href="http://www.mapy.cz/#x=14.490059&y=49.989339&z=14&c=23-14-30-28-29-27&q=v%C3%ADde%C5%88sk%C3%A1%20573&qp=14.482973_49.989277_14.494650_49.993141_16&d=addr_11642477_0_1&t=o&u=m" class="map"><img src="/fileadmin/templates/redesign/img/banner-vestec-mapa.png"><span></span></a></div>';
         
         // on page load show the modal box
         $.fancybox(
             _message_to_show,
             {
                'width' : 924,
                'height' : 363
             }
         );
         
         // 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
         // "carnext-cookie" is the name i gave the cookie.. you can name it anything you want
         $('#fancybox-close').live('click', function(e) {
             e.preventDefault();
             $.cookie("carnext-cookie", "true", { path: '/', expires: 7 });
             $.fancybox.close()
         });
     }    
     
});
