/*******************************************************************************
	OLDIE - or Old IE. A script that finds the version of IE you're using,
	and does smth if lower than the set parameter.
*******************************************************************************/
var browser		= navigator.appName
var ver			= navigator.appVersion
var thestart	= parseFloat(ver.indexOf("MSIE"))+1 //This finds the start of the MS version string.
var brow_ver	= parseFloat(ver.substring(thestart+4,thestart+7)) //This cuts out the bit of string we need.

if ((browser=="Microsoft Internet Explorer") && (brow_ver < 7)) //By default the min. IE ver is set to 6. Change as desired.
{
   $(function(){
      $('body').html('<div id="getNewBrowser">Atnaujinkite Naršyklės Versija.</div>');
   });
}

$(window).load(function() {
   resizeBground();       
});

$(window).bind("resize", function(){
   resizeBground();
}); 


function resizeBground(){
   /*var img_width = 1400;
   if (img_width!=0) {
      if ($(window).width()>img_width) {
         $("#body-background").show();      
         $("#body-background").ezBgResize();
      } else 
         $("#body-background").hide();
   }*/ 
   $("#body-background").show(); 
   $("#body-background").ezBgResize();
}
$(document).ready(function() {
	/*$('#top_menu li').hover(		
		function () {
			//show its submenu
			$('ul', this).show();
		},
		function () {
			//hide its submenu
			$('ul', this).hide();
		}			
	);*/
	$('#top_menu li').hoverIntent( makeTall, makeShort );
	
	function makeTall(){ $('ul', this).show(); }
	function makeShort(){ $('ul', this).hide(); }
	
	$('.submenu li.top').each(function(index) {		
		$(this).css('min-width',$(this).parent().width()-12+'px');
	});
});
