﻿$(function() {
    $('#pause').click(function() { $('#slideContent').cycle('pause'); return false; });
    $('#play').click(function() { $('#slideContent').cycle('resume'); return false; });

    $('#slideshow').hover(
        function() { $('#controls').fadeIn(); },
        function() { $('#controls').fadeOut(); }
    );

    $('#slideContent').cycle({
        fx: 'fade',
        speed: 800,
        timeout: 6000,
        next: '#next',
        prev: '#prev',
        pager: '#pagerNav'
    });

});
function setTab(name, cursel, n) {
    for (i = 1; i <= n; i++) {
        var menu = document.getElementById(name + i);
        var con = document.getElementById("con_" + name + "_" + i);
        menu.className = i == cursel ? "hover" : "";
        con.style.display = i == cursel ? "block" : "none";
    }
}
$(document).ready(function() {
    if (screen.width >= 1024) {
        $('#rightAD').css({ left: (screen.width - "800") / 2 + 800 });
        $('#leftAD').css({ left: (screen.width - "800") / 2 - 110 });

        for (i = 1; i <= 7; i++) {
            $("#Cover_17_" + i).mouseover(function() {
                $(this).css({ filter: "alpha(opacity=100)", opacity: "1" });
            });
            $("#Cover_17_" + i).mouseout(function() {
                $(this).css({ filter: "alpha(opacity=5)", opacity: "0.05" });
            });
            $("#Cover_18_" + i).mouseover(function() {
                $(this).css({ filter: "alpha(opacity=100)", opacity: "1" });
            });
            $("#Cover_18_" + i).mouseout(function() {
                $(this).css({ filter: "alpha(opacity=5)", opacity: "0.05" });
            });
        }
    }
    else {
        $('#rightAD').css({ display: "none" });
        $('#leftAD').css({ display: "none" });
    }
});
//打开定制窗口
function OpenWindowSize(url, height, width) {
    window.open(url, '', 'height=' + height + ',width=' + width + ',top=0,left=0,location=no,menubar=no,resizable=no,scrollbars=no,status=no,titlebar=no,toolbar=no,directories=no');
}
