$(document).ready(function() {  

pngToGif('img');

	if (evntsType != 0) { LoadGoogleCal(); } else if (evntsType == 0) { readGCalDonne = 1;  }
	if (blogType != 0) { LoadLJ(); } else if (blogType == 0) { readLjDone = 1;  }


	$("#prt_log img").hover(function(){
		$(this).css('background-color', 'red');
	},function(){
   		$(this).css('background-color', 'transparent');
	});		


	$(".img_hover_bg").hover(function(){
		$(this).css('border-bottom', '5px solid red');
	},function(){
   		$(this).css('border-bottom', '5px solid black');
	});	


$("#subscrImg").hover(function(){
		$(this).attr("src","img/in_podpiska_index-hover.png");
},function(){
		$(this).attr("src","img/in_podpiska_index.png");
});	

			$("#subscr").fancybox({
				'width'				: 380,
				'height'			: 450,
				'autoScale'			: false,
				'hideOnContentClick': false,
				'scrolling'			:	'no',
				'type'				: 'iframe'
			});	


   $('#inner_logo').hover(function() {
   	   $('#img_ttlLC_selector').stop().animate({ left: 195, top: 0 }, 70);
   	   $('#menu_inner_image_selector').stop().animate({ left: 622 }, 170);
       $('#inner_logo_selector').stop().animate({ left: 0 }, 150);
   }, function() {
  		$('#inner_logo_selector').stop().animate({ left: -286 }, 150);
  		$('#menu_inner_image_selector').stop().animate({ left: -112 }, 170);
  		$('#img_ttlLC_selector').stop().animate({ left: 0, top: 0 }, 70);
   });


   $('#upPic').hover(function() {
       $('#upPicSel').stop().animate({ bottom: 0 }, 150);
   }, function() {
  		$('#upPicSel').stop().animate({ bottom: -70 }, 150);
   });

   $('.menu_inner_loc').hover(function() {
       var tmp = '#' + $(this).attr("id");
       $('#img_ttlLC_selector').stop().animate({ top: -82, left: 195 }, 150);
       $('#menu_inner_image_selector').stop().animate({ left: $(tmp).position().left }, 150);
   }, function() {
  		$('#menu_inner_image_selector').stop().animate({ left: -112 }, 150);
  		$('#img_ttlLC_selector').stop().animate({ top: 0, left: 0 }, 150);
   });

   if ( typeof menuStart != "undefined" ) { $(menuStart).css('display', 'none'); }
   if ( typeof menuStart != "undefined" && menuStart == '#menu06' ) { $('#menu05').css('border-right', '5px solid black'); }  
	else if ( typeof menuStart != "undefined" && menuStart != '#menu06' ) { $('#menu06').css('border-right', '5px solid black'); }
   
   if ( typeof menuStart != "undefined" ) {
   $('#menu_vert_image_selector').css('top', $(menuStart).position().top);
   $('.menu_vert_loc').hover(function() {
       var tmp = '#' + $(this).attr("id");
       $('#menu_vert_image_selector').stop().animate({ top: $(tmp).position().top }, 150);
        }, function() {
  		$('#menu_vert_image_selector').stop().animate({ top: $(menuStart).position().top }, 150);
   });
   } else {
   $('.menu_loc').hover(function() {
       var tmp = '#' + $(this).attr("id");     
       $('#menu_image_selector').stop().animate({ left: $(tmp).position().left }, 150);
        }, function() {
  		$('#menu_image_selector').stop().animate({ left: 0 }, 150);
   });
   }

//if (!$.browser.msie) { $(this).attr({href : 'img/menu.gif'}); }

//	$("a[href$=.jpg],a[href$=.png],a[href$=.gif]").fancybox();

	viewportHeight = $(window).height();
	viewportWidth = $(window).width();
	
//$('#page').css('min-height', viewportHeight-$('.galloween').height()-75-18);

  $('.index #page').css('min-height', viewportHeight-$('#bottom').height()-45);	
	
	pageLoadDone = 1;
	
	allDone();
	
	checkUrl();
	

});


