// JavaScript Document
//顶部滚动新闻
var myTimer = null;
var topPos = 0;
var innerHeight = 0;
function iScroll() {
topPos -= 1;
$('#outer .inner').css('top', topPos + 'px');
if (innerHeight + topPos <= 0) topPos = 0;
}
$(function() {
innerHeight = $('#outer .inner').height();
$('#outer .inner').html($('#outer .inner').html() + $('#outer .inner').html());
myTimer = setInterval(iScroll, 50);
$('#outer .inner').bind('mouseover', function() {clearInterval(myTimer);});
$('#outer .inner').bind('mouseout', function() {myTimer = setInterval(iScroll, 50);});
});


$(".daohang").ready(function() {
    //    //导航菜单 
    //    $(".daohang .count a").mouseover(function() {
    //    //删除历史样式

    //      $(".daohang .count a").removeClass("daohang_a_chose");
    //      $(".daohang .count span").removeClass("daohang_a_chose_span");
    //        //给选中项添加样式
    //      $(this).addClass("daohang_a_chose");
    //      $(this).find("span").addClass("daohang_a_chose_span");
    //        $(this).removeClass("daohang");
    //        //修改字体颜色
    //       // alert($(this).attr("color"));
    //    })


    $("li").mouseover(function() {
        $(".jx_list_by_dq_right_li_chose").removeClass("jx_list_by_dq_right_li_chose");
        $(this).addClass("jx_list_by_dq_right_li_chose");
    })

    $("input").mouseover(function() {
        $(".jx_list_by_dq_right_input_chose").removeClass("jx_list_by_dq_right_input_chose");
        $(this).addClass("jx_list_by_dq_right_input_chose");
    })


    $("select").mouseover(function() {
        $(".jx_list_by_dq_right_input_chose").removeClass("jx_list_by_dq_right_input_chose");
        $(this).addClass("jx_list_by_dq_right_input_chose");
    })

    $(".jx_msg_list_hd li").mouseover(function() {
        $(".jx_msg_list_hd_chose").removeClass("jx_msg_list_hd_chose");
        $(this).addClass("jx_msg_list_hd_chose");
    })


})


function correctPNG() {
    var arVersion = navigator.appVersion.split("MSIE")
    var version = parseFloat(arVersion[1])
    if ((version >= 5.5) && (document.body.filters)) {
        for (var j = 0; j < document.images.length; j++) {
            var img = document.images[j]
            var imgName = img.src.toUpperCase()
            if (imgName.substring(imgName.length - 3, imgName.length) == "PNG") {
                var imgID = (img.id) ? "id='" + img.id + "' " : ""
                var imgClass = (img.className) ? "class='" + img.className + "' " : ""
                var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
                var imgStyle = "display:inline-block;" + img.style.cssText
                if (img.align == "left") imgStyle = "float:left;" + imgStyle
                if (img.align == "right") imgStyle = "float:right;" + imgStyle
                if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
                var strNewHTML = "<span " + imgID + imgClass + imgTitle
             + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
             + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
             + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>"
                img.outerHTML = strNewHTML
                j = j - 1
            }
        }
    }
}
window.attachEvent("onload", correctPNG);

//加载地区数据



