﻿/// <reference path="../jquery/jquery.js"/>
/// <reference path="../jquery/jquery.flash.js"/>
var jericho = {
    innerHeadFlash: function() {
        $('#head>.logo').flash({
            src: 'flash/leaf.swf',
            width: 900,
            height: 144,
            wmode: 'transparent'
        });
    },
    showMsg: function(msg) {
        $.fn.jmodal({
            title: '来自 AjaxPlaza 的消息',
            content: msg,
            buttonText: '不再提示',
            okEvent: function(e) {
                var d = new Date();
                d.setTime(d.getTime() + (1 * 248 * 60 * 60 * 1000));
                $.cookie('nevershowtips', '1', { expires: d });
                $('#ajaxplazamsg').attr('class', 'msg').children('#msgcount').html('0').click(function() { });
            }
        });
    },
    msg: '<div>您好：</div>' +
            '<div style="line-height:18px;text-indent:20px">感谢您的访问，这是此站点在更新后第一次上线运行，' +
            '虽然是Alpha版本，但是已经具备了基本的功能，请您多多支持，' +
            '如有发现任何的问题，请及时联系我^^!</div>' +
            '<div style="line-height:18px;text-indent:20px;">Mail To: <span style="color:red">thisnamemeansnothing[at]gmail.com</span></div>' +
            '<div style="text-align:right">-by jericho</div>'
}
$().ready(function() {
    //jericho.innerHeadFlash();
    if (typeof curselecttab != 'undefined') {
        $('menu a.selected').removeClass('selected');
        $('#' + curselecttab).addClass('selected');
    }
  
    if (jericho.msg != '' && $.cookie('nevershowtips') == null)
        $('#ajaxplazamsg').attr('class', 'newmsg').children('#msgcount').html('1').click(function() {
            jericho.showMsg(jericho.msg);
        });
    else
        $('#ajaxplazamsg').attr('class', 'msg').children('#msgcount').html('0').click(function() { });
})