﻿
$(function () {
    $(".news li").first().addClass("top1");
   $(".news li").eq(1).addClass("top1");
    GetArtList(24, 'div_c_1');
    GetArtList(25, 'div_c_2');
    GetArtList(26, 'div_c_3');
    GetArtList(27, 'div_c_4');
    GetPicArtList(80, 'marquee_product1');
    $("#scrollDiv").textSlider({ line: 2, speed: 800, timer: 3000 });

    $("#cjcx").bind("click", function () {
        $("#Layer3").show().bind("mouseover", function () {
            $(this).show();
        }).bind("mouseout", function () {
            $(this).hide('slow');
        });
    });
    //    .bind("mouseout", function () {
    //        setTimeOut(1000);
    //        $("#Layer3").hide('slow');
    //    });
});

//关键字搜索
function Search_Keys(objstr) {
    var Url;
    var Keyword = encodeURI(objstr.replace(/(^\s*)|(\s*$)/g, ""));
    Url = "http://hr.hbwsrc.net/job/search-result.aspx?key=" + Keyword;
    window.open(Url);
}

function GetArtList($ID, $divId) {
    $.ajax({
        url: "/AjaxHandler/GetHtml.aspx?classid=" + $ID + "&action=getOutArticle&time=" + new Date().toString(),
        type: 'GET',
        cache: false,
        async: false,
        success: function () {
            $('#' + $divId).html(arguments[0]);
        },
        error: function (str) {
            alert('读取错误');
        }
    });
}

function GetPicArtList($ID, $divId) {
    $.ajax({
        url: "/AjaxHandler/GetHtml.aspx?classid=" + $ID + "&action=getPicArticle&time=" + new Date().toString(),
        type: 'GET',
        cache: false,
        async: false,
        success: function () {
            $('#' + $divId).html(arguments[0]);
        },
        error: function (str) {
            alert('读取错误');
        }
    });
}
