$(document).ready(function() {
	$("#menu").append('<a href="/index.html" style="cursor:pointer;"><div class="dots"></div><div class="dots2"></div></a>');
	$("#menu ul li").each(function() {
		$(this).append('<div class="dot"></div>');
	});
	$("#menu ul").hover(
		function(e) {
			setbg('/images/dots2.gif');
		},
		function(e) {
			setbg('/images/dots.gif');
		}
	);
	$("#menu ul li[@class != 'active']").hover(
		function(e) {
			$("#menu div.dots").stop().fadeOut("slow");
			$(this).children('div.dot').fadeIn("slow");
		},
		function(e) {
			$("#menu div.dots").stop().fadeIn("slow");
			$(this).children('div.dot').fadeOut("slow");
		}
	);
	$("li.active").children('div.dot').css('background-color', '#c40404').fadeIn("slow");
	if ($("li.active").length != 0)
	{
		$("#menu div.dots").stop().fadeOut("slow");
	}
});

function setbg(p)
{
}

function loadimage(path)
{
	  var img = new Image();
	  $(img).load(function () {
	      $(this).hide();
	      $('#loader').removeClass('loading').append(this);
	      $(this).fadeIn();
	  }).error(function () {}).attr('src', path);
}
