$(document).ready(function(){
	var orig_id = "class1_1";
	$(".zuire_hunyin .item").live("mouseover",function()
	{
		if($(this).attr("id") != orig_id)
		{
			$(this).addClass("curr_item").removeClass("orig_item");
			$("#" + orig_id).removeClass("curr_item").addClass("orig_item");
			$("#zuire_list_" + orig_id).hide();
			orig_id = $(this).attr("id");
			$("#zuire_list_" + orig_id).show();
		}
	});
	var orig_id2 = "class2_1";
	$(".zuire_yingui .item").live("mouseover",function()
	{
		if($(this).attr("id") != orig_id2)
		{
			$(this).addClass("curr_item").removeClass("orig_item");
			$("#" + orig_id2).removeClass("curr_item").addClass("orig_item");
			$("#zuire_list_" + orig_id2).hide();
			orig_id2 = $(this).attr("id");
			$("#zuire_list_" + orig_id2).show();
		}
	});
	var orig_id3 = "class3_1";
	$(".zuire_hunyin2 .item").live("mouseover",function()
	{
		if($(this).attr("id") != orig_id3)
		{
			$(this).addClass("curr_item").removeClass("orig_item");
			$("#" + orig_id3).removeClass("curr_item").addClass("orig_item");
			$("#zuire_list_" + orig_id3).hide();
			orig_id3 = $(this).attr("id");
			$("#zuire_list_" + orig_id3).show();
		}
	});
	var orig_id4 = "class4_1";
	$(".zuire_yingui2 .item").live("mouseover",function()
	{
		if($(this).attr("id") != orig_id4)
		{
			$(this).addClass("curr_item").removeClass("orig_item");
			$("#" + orig_id4).removeClass("curr_item").addClass("orig_item");
			$("#zuire_list_" + orig_id4).hide();
			orig_id4 = $(this).attr("id");
			$("#zuire_list_" + orig_id4).show();
		}
	});
});
function moreRecommends()
{
	var offset = parseInt($("#moreRecommends").val()*1+5);
	$.ajax({
		type: "POST",
		url: "/main.php",
		data: "moreRecommends=" + offset,
		success: function(msg) {
			var arr = msg.split('++++++++++++++++');
			$("#moreRecommends").val(arr[1]);
			$("#recommendsContent").html(arr[0]).fadeIn("slow");
		}
	});
}
function addAlltoList(name, type)
{
	$("input[name='" + name + "']").each(function()
	{ 
		if($(this).attr("checked"))
		{
			addPlaylist(type, $(this).val());
		}
	});
}
function allplay(type, str)
{
	var ids = str.split(",");
	for(var i=0; i<ids.length; i++)
	{
		addPlaylist(type, ids[i]);
	}
}
function showSlide()
{
	var flashvars = {};
	var params = {};
	var attributes = {};
	params.wmode = "transparent";
	swfobject.embedSWF("/swf/slide.swf?ver=0.0.1", "flash_img", "100%", "100%", "10.0.0", "/swf/expressInstall.swf", flashvars, params, attributes);
}
function turnActions()
{
	var curAct = $("#curAction").val();
	if (curAct == "mine")
	{
		$("#turnActionIMG").attr("src", "/img/haoyou_ouxiang.gif");
		curAct = "other";
		$("#actionLabel").text("达人最近动向... ");
	}
	else
	{
		$("#turnActionIMG").attr("src", "/img/qita.gif");
		curAct = "mine";
		$("#actionLabel").text("好友/偶像最近动向... ");
	}
	$("#curAction").val(curAct);
	$.ajax({
		type: "POST",
		url: "/main.php",
		data: "turnAction=" + curAct,
		success: function(msg) {
			$("#actions").html(msg);
		}
	});
}
