﻿var topchannel = "#taskindex";
var focus_pic_count=1;
var focus_pic_autochange;
var newtask_list_scroll;

function newtask_list_up(){
	$("#newtask_list").animate({top:"-16px"},1000,function(){
		$(this).find("li:first").appendTo(this)
		$(this).css({top:0});
	});
}

$(document).ready(function(){

$(".tablist .task_tab li").hover(function(){
	$(".task_list ul").hide().eq($(".task_tab li").removeClass("task_tab_on").index($(this).addClass("task_tab_on"))).show();
},function(){});
$(".employer .tab li").hover(function(){
	$(".employer .tab_list .tl").hide().eq($(".employer .tab li").removeClass("curr").index($(this).addClass("curr"))).show();
},function(){});
$(".worker .title a").hover(function(){
	$(".worker .worker_list").hide().eq($(".worker .title a").index(this)).show();
},function(){});

var costlist = $(".employer .cost_list").length-1;
var costlist_i = 0;
$(".employer .cost_list:first").show();
$(".employer .larr").click(function(){
	if (costlist_i > 0){
		$(".employer .cost_list").hide();
		$(".employer .cost_list").eq(costlist_i-1).show();
		costlist_i--;
	}
});
$(".employer .rarr").click(function(){
	if (costlist_i < costlist){
		$(".employer .cost_list").hide();
		$(".employer .cost_list").eq(costlist_i+1).show();
		costlist_i++;
	}	
});



newtask_list_scroll=window.setInterval('newtask_list_up()',2000);

$("#newtask_list").hover(function(){
	clearInterval(newtask_list_scroll);
},function(){
	newtask_list_scroll=window.setInterval('newtask_list_up()',2000);
});


});
