/* 我的远播下拉 */
$(function(){
	$("#GlobalHeader .navuser li a.s1").each(function(){
		$(this).parent().hover(function(){
			$(this).addClass("hover");
			$(this).children("p").show();
		},function(){
			$(this).removeClass("hover");
			$(this).children("p").hide();
		});	
	});		
});

/* 导航下拉 */
$(function() {
    $("#GlobalHeader nav ul li").each(function() {
        $(this).hover(function(){
            $(this).addClass("hover");
        },function(){
            $(this).removeClass("hover");
        })
    })
});


/* 边导航悬浮 */

$(function() {
    var timeout = 200;
    var delay = 0;
	var obj = $("#pop_subCategory");
	var menu = $("#J_category > li");
	
	$("[id^='pop_subCategory_']").each(function() {
		var item = $(this);
		item.hover(function() {
			clearTimeout(delay);
			delay = setTimeout(function(){
				var id = item.attr('id');
				obj.removeAttr("style").children().html($("#" + id + "_ctn").html());
				if (item.index() < 3){
					obj.css("top","38px");
				} else {
					obj.css("bottom","0px");
				}
				menu.removeClass("selected");
				item.addClass("selected");
				obj.show();
				clearTimeout(delay);
			},timeout);
		}, function() {
			clearTimeout(delay);
			delay = setTimeout(function() { obj.hide().removeAttr("style"); menu.removeClass("selected"); clearTimeout(delay); }, timeout);
		});
	});

	obj.hover(function() {
		clearTimeout(delay);
		obj.show();
	}, function() {
		clearTimeout(delay);
		delay = setTimeout(function() { obj.hide().removeAttr("style"); menu.removeClass("selected"); clearTimeout(delay); }, timeout);
	});

});

