$(document).ready(function() {

/*
	if ($.browser.msie && $.browser.version == "6.0") {
		alert('Az oldal nem támogatja a Microsoft Internet Explorer 6 -os böngészőjét! (Automatikus átirányítás a böngészőválasztó oldalra...)');
		window.location.href='http://www.browserchoice.eu';
	}
	else if ($.browser.msie && $.browser.version == "7.0") {
		
	}
	else {
		
	}
*/
	
	
	$("span.Apple-style-span").removeAttr("style");
	
	$("div.body div.right").corner("round 6px");
	$("div.body div.left").corner("round 6px");
	$("div.body div.right div.form_ajanlatkeres ").corner("round 6px");
	
	

	$("div.sharelinks").width(720-$("div.datetime").width()-5);

	$("div.topmenu ul.menulevel_1 li").each(function() {
		var ez = $(this);
		$(this).mouseover(function() {
			$(this).children("ul").show();
		});
		$(this).mouseout(function() {
			$(this).children("ul").hide();
		});
		$(this).children("ul").mouseover(function() {
			$(this).show();
		});
		$(this).children("ul").mouseout(function() {
			$(this).hide();
		});
	});


	textautohide();
	
	(function($) {
	  var cache = [];
	  $.preLoadImages = function() {
		var args_len = arguments.length;
		for (var i = args_len; i--;) {
		  var cacheImage = document.createElement('img');
		  cacheImage.src = arguments[i];
		  cache.push(cacheImage);
		}
	  }
	})(jQuery)	
	jQuery.preLoadImages("templates/base/images/topmenu_magunkrol_on.png","templates/base/images/topmenu_szolgaltatasok_on.png","templates/base/images/topmenu_referenciak_on.png","templates/base/images/topmenu_ajanlatkeres_on.png","templates/base/images/topmenu_kapcsolat_on.png");
});


function textautohide() {
	$("input.textautohide").each(function() {
		var ez = $(this).val();
		$(this).focus(function() {
			$(this).val("");
		});	
		$(this).blur(function() {
			if ($(this).val() == "") {
				$(this).val(ez);
			}
		});			
	});
}
