jQuery(document).ready(function($){	
    
	/* Activate Lightbox */
	//$('a.lightbox').slimbox();
	//$('.img-bottle a').slimbox();

    /* This is basic - uses default settings */

    // if you let it set to 'false' it will show every time .. set it to 'true' and it will never show
     $.cookie("modal", 'true')

    /**
      *  MODAL BOX
      */
    // if the requested cookie does not have the value I am looking for show the modal box
    if($.cookie("modal") != 'true')
    {
        var _message_to_show = '<div class="modal-content"><div class="modal-logo"></div><ul class="modal-head"><li>Champion 44. Valtických<br />vinných trhů</li><li>Vinař roku 2011</li><li>Král vín 2011</li></ul><div class="modal-visual"></div></div>';

         // on page load show the modal box
         $.fancybox(
             _message_to_show,
             {

             }
         );

         // 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
         // "modal" is the name i gave the cookie.. you can name it anything you want
         $('#fancybox-close').live('click', function(e) {
             e.preventDefault();
             $.cookie("modal", "true", { path: '/', expires: 7 });
             $.fancybox.close()
         });
    }

    $('#page').append('<div id="ribbon"><a></a></div>');
	
	var showMoreInfo = function ($) { 
	
		$('.more-info').before('<div class="show-more"><a href="#">Zobrazit více</a></div>');
		$('.more-info').after('<div class="divider"></div>');
		$('.more-info').slideUp("fast");
		$('.show-more').bind('click', function() {
			if ($(this).next('.more-info').hasClass('opened') ) {
					$(this).next('.more-info').removeClass('opened').slideUp("slow");
					//$(this).next('.more-info').hide();
					$(this).children('a').text('Zobrazit více').removeClass('active');
			}
			else {
					$(this).next('.more-info').addClass('opened').slideDown("slow");
					//$(this).next('.more-info').hide();
					$(this).children('a').text('Zobrazit méně').addClass('active');
					
			}
			return false;		
		});
	};
	
	showMoreInfo($);

});
