function myMethod(href) {
	document.location.href=href;
}


$(document).ready(function() {
	$(".bears_menu ul li a").click(function() {
		$(".bears_menu ul li a.active_time").removeClass("active_time");
		$(".handle_arrow").css({"visibility" : "visible"});
		$(this).addClass("active_time");
	});
	$(".bears_menu ul li").click(function() {
		if($(this).hasClass("btn_1")) {
			$('.handle_arrow').animate({left: '60px'}, 1000);
			href = $('#hiddehLink1').attr('href');
			window.setTimeout('myMethod(href)', 1000);
		}
		if($(this).hasClass("btn_2")) {
			$('.handle_arrow').animate({left: '250px'}, 1000);
			href = $('#hiddehLink2').attr('href');
			window.setTimeout('myMethod(href)', 1000);
		}
		if($(this).hasClass("btn_3")) {
			$('.handle_arrow').animate({left: '350px'}, 1000);
			href = $('#hiddehLink3').attr('href');
			window.setTimeout('myMethod(href)', 1000);
		}
		if($(this).hasClass("btn_4")) {
			$('.handle_arrow').animate({left: '500px'}, 1000);
			href = $('#hiddehLink4').attr('href');
			window.setTimeout('myMethod(href)', 1000);
		}
		if($(this).hasClass("btn_5")) {
			$('.handle_arrow').animate({left: '600px'}, 1000);
			href = $('#hiddehLink5').attr('href');
			window.setTimeout('myMethod(href)', 1000);
		}
		if($(this).hasClass("btn_6")) {
			$('.handle_arrow').animate({left: '700px'}, 1000);
			href = $('#hiddehLink6').attr('href');
			window.setTimeout('myMethod(href)', 1000);
		}
		if($(this).hasClass("btn_7")) {
			$('.handle_arrow').animate({left: '790px'}, 1000);
			href = $('#hiddehLink7').attr('href');
			window.setTimeout('myMethod(href)', 1000);
		}
	});
	attachNavEvents(".btn_1", "hover_time");
	attachNavEvents(".btn_2", "hover_time");
	attachNavEvents(".btn_3", "hover_time");
	attachNavEvents(".btn_4", "hover_time");
	attachNavEvents(".btn_5", "hover_time");
	attachNavEvents(".btn_6", "hover_time");
	attachNavEvents(".btn_7", "hover_time");
	function attachNavEvents(parent, myClass) {
		$(parent).mouseover(function() {
			//alert="myClass"
			$(this).append('<div class="' + myClass + '"></div>');
			$("div." + myClass).css({display:"none"}).fadeIn(550);
		}).mouseout(function() {
			// fade out & destroy pseudo-link
			$("div." + myClass).fadeOut(200, function() {
				$(this).remove();
			});
		});
	};
});

