﻿    var obr_1 = new Image();
    obr_1.src = 'resources/img/NHopen.jpg';
    var obr_2 = new Image();
    obr_2.src = 'resources/img/NHclose.jpg';
    
  var fullscreen = 1;

  $(document).ready(function(){
     $(".content").tooltip({ 
    showURL: false,
    fade: 300 
   });   
   
   $(".wsize").tooltip({ 
    showURL: false,
    fade: 300 
   });  
   
      $(".close").tooltip({ 
    showURL: false
   });
    
	$(".obsah").load("resources/include/novinky.php");
	
    $(".close").click(function () {
      $(".close").fadeOut(2000);
    });
      $(".closethedoor").click(function () {
      $(".close").fadeIn (2000);
    });
    
      $("#1").click(function () {
      $(".obsah").load("resources/include/novinky.php");
    });
    
    $(".content").click(function () {
      var file = $(this).attr("href");
      $(".obsah").load("resources/include/"+file+".php");
      return false;
    });
    
    $(".wsize").hover(function () {
     this.src = 'resources/img/size-hover.gif';
  		}, function () {
    this.src = 'resources/img/size.gif';});
   
      $(".wsize").click(function () {
      if (fullscreen > 0)
      {
              $(".wsize").animate({ 
              	 marginTop: "1%",
         top:"0px",
         left:"88%"
         }, 1500 );

        $(".obsah").animate({ 
        top:"0px",
        left:"0px",
        width: "95%",
        height: "95%",
        marginLeft: "2%",
        marginTop: "0px",
        maxHeight: "100%",
        opacity: 0.9       
      }, 1500 );
	  
	 
         fullscreen = 0;
         }

      else
      {
      $(".wsize").animate({ 
     	marginTop: "3%",
          top:"155px",
         left:"700px"
        }, 1500 );

      
       $(".obsah").animate({ 
		top: "149px",
		left: "282px",
		width: "445px",
		height: "565px",
		 marginLeft: "7%",
        marginTop: "3%",
        maxHeight: "565px",
    	opacity: 1.0
		}, 1500 );
		

   
      fullscreen = 1;
      
      }
        return false;
    });

  });


