﻿jQuery(document).ready(function() {
    jQuery("#btnsearchcity").css("cursor", "pointer");
    jQuery(".jkqxm li:first").addClass("current");
    showGuidePoint(jQuery(".jkqxm li:first").attr("tog"));
    jQuery(".jkqxm li").mouseover(function() {
        jQuery(".jkqxm li").each(function() {
            jQuery(this).removeClass("current");
        });
        jQuery(this).addClass("current");
        if(jQuery(this).attr("tog")!="世博园区热指数预报"){
            showGuidePoint(jQuery(this).attr("tog"));
        }else{
            window.open('../Default.aspx?m=hid');
        }
    });
    jQuery("#sxyb").mouseover(function() {
        jQuery("#showforecaster").slideToggle(100);
    }).mouseout(function() {
        jQuery("#showforecaster").slideToggle(100);
    });
    jQuery(".gd2").fxMarquee({speed: 60,autoStop: true,direction: 'up'});
    setInterval('expoautostation()', 5000);
});
var i;
function expoautostation() {
    if (i != 2) {
        if (i != 3) {
            jQuery(".tqsk div").each(function() {
                jQuery(this).css("display", "");
                if (jQuery(this).attr("group") == "2" || jQuery(this).attr("group") == "3") {
                    jQuery(this).css("display", "none");
                }
            });
            i = 2;
        } else {
            jQuery(".tqsk div").each(function() {
                jQuery(this).css("display", "");
                if (jQuery(this).attr("group") == "1" || jQuery(this).attr("group") == "3") {
                    jQuery(this).css("display", "none");
                }
            });
            i = 1;
        }
    } else {
        jQuery(".tqsk div").each(function() {
            jQuery(this).css("display", "");
            if (jQuery(this).attr("group") == "1" || jQuery(this).attr("group") == "2") {
                jQuery(this).css("display", "none");
            }
        });
        i = 3;
    }
    return i;
}
//健康气象
function showGuidePoint(name) {
    jQuery.ajax({
        url: 'Ashx/ShowGuidePoint.ashx',
        type: 'POST',
        data: { "name": name },
        dataType: 'html',
        timeout: 20000,
        success: function(html) { jQuery(".jkqxc").html(html); },
        error: function() { }
    });
}
