$(document).ready(function() {
			/*
			*   Examples - images
			*/

  var last_currentOpts = {},
      last_pos = 0,
      
      titleFormat = function(titleStr, currentArray, currentIndex, currentOpts) {
          titleStr = '<div id="fancybox-title-' + currentOpts.titlePosition + '">' + titleStr + '<\/div>';
          last_currentOpts = currentOpts;
          last_pos = currentIndex;
          return titleStr;
      },
      
      Elem_fancybox_content = $("#fancybox-content"),
      Elem_fancybox_fullsize = $("<div>", {id: "fancybox-fullsize"}).click(function() {
          $.fn.fancybox.defaults.autoScale = !$.fn.fancybox.defaults.autoScale;
          $.fancybox.pos(last_pos);
      });
	
	$("a.thickbox").fancybox({
		'centerOnScroll': false,
    'overlayOpacity': 0.8,
    'overlayColor': '#000',
    'titlePosition': 'outside',
    'orig': $("img", this),
    'titleFormat': titleFormat,
    'titleShow' : true,
    'speedIn': 500,
    'onCleanup' : function()
    {
      Elem_fancybox_fullsize.detach();
    },
    'onComplete' : function()
    {
      var width = Elem_fancybox_content.width(),
          height = Elem_fancybox_content.height();
      if($.fn.fancybox.defaults.autoScale && (width < last_currentOpts.width || height < last_currentOpts.height)) {
        Elem_fancybox_fullsize.text("Zobrazit plnou velikost");
      }
      else if(!$.fn.fancybox.defaults.autoScale) {
        Elem_fancybox_fullsize.text("Zmenšit na velikost okna");
      }
      else {
        return;
      }
      Elem_fancybox_fullsize.appendTo(Elem_fancybox_content);
    }
	});
	
	
	
	
	
	/* other funny stuff */
$("label.rad").hover(
  function () {
    $(this).addClass("hover");
  },
  function () {
    $(this).removeClass("hover");
  }
);
	
	
	
	
	
});

