jQuery.noConflict();
//首页菜单下拉显示
window.onload = function() {
    menu();
}

function menu() {
    jQuery('#ul_allCatDropDown li').hover(function(){
        jQuery(this).children('div').stop(true,true).show();
    },function(){
        jQuery(this).children('div').stop(true,true).hide();
    });
}

//显示分类
jQuery(document).ready(function() {
    jQuery('#siteNav li').hover(function(){
        jQuery(this).children('div').stop(true,true).show();
    },function(){
        jQuery(this).children('div').stop(true,true).hide();
    });
    
    jQuery('#ul_ShowAllCate li').hover(function(){
        jQuery(this).children('div').stop(true,true).show();
        jQuery(this).addClass('active');
    },function(){
        jQuery(this).children('div').stop(true,true).hide();
        jQuery(this).removeClass('active');
    });
    //Ajax显示BlockUI
    jQuery('.PPCheckout').click(function() {
        jQuery(document).ajaxStart(jQuery.blockUI({message:'<img src="http://www.fyygame.com/images/loading.gif" /><h1>Redirecting to Paypal, please wait patiently.</h1>'})).ajaxStop(jQuery.unblockUI);
    });
    //Ajax保存游戏选单
    jQuery('.ch-foot-orderImg').click(function() {
        jQuery(document).ajaxStart(jQuery.blockUI({message:'<img src="http://www.fyygame.com/images/loading.gif" /><h1>Redirecting to shopping cart, please wait patiently.</h1>'})).ajaxStop(jQuery.unblockUI);
    });
    //Ajax付款按钮
    jQuery('.btn-checkout').click(function() {
        jQuery(document).ajaxStart(jQuery.blockUI({message:'<img src="http://www.fyygame.com/images/loading.gif" /><h1>Submiting order infomation, please wait patiently.</h1>'})).ajaxStop(jQuery.unblockUI);
    });
    //显示Notice框	
	/*
	jQuery(function(){
        jQuery.easyNotification({
            cookieEnable: false,
            text: 'Noitce: Due to our wesbite server upgrade(Feb 3, 2012 - Feb 7, 2012), PayPal gateway has rejected request for the moment. Any more doubts about payment, please feel free to contact us via <a onclick="ShowDialog();" href="javascript:void(0)">Live Support</a> or mail to <a href="mailto:service@fyygame.com">service@fyygame.com</a>.',
            parent: '#attention'
        });
    });
	*/
    //显示弹出框
    /*function showTips(){
        jQuery.blockUI({ message: jQuery('#boxtips'),css: {
        border: '1px solid #ddd',
        padding: '15px',
        backgroundColor: '#F1FFD6',
        '-webkit-border-radius': '2px',
        '-moz-border-radius': '2px',
        color: '#666666;',
        height: '240px',
        top:  (jQuery(window).height() - 240) /2 + 'px',
        cursor: 'default'
        }
      });
    }
    jQuery('.tips_close_btn').click(function() {
        jQuery.unblockUI();
    });*/
    //首页伸缩广告
	if(window.location.href=='http://www.fyygame.com/'){
		jQuery(".big_notice").slideDown("slow");
		setTimeout("displayimg()",5000);
	}else{
		jQuery(".small_notice").slideDown("slow");
	}
    jQuery('#notice_container').click(function(){
        jQuery(".small_notice").fadeOut("fast");
        jQuery(".big_notice").slideDown(1000);
    });
	jQuery(".big_notice").mouseout(function(){
        jQuery(".big_notice").slideUp(1000,function(){
        jQuery(".small_notice").slideDown(1000);
    })
    });
   jQuery('#google_load_js').html('<script src="http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script><script src="https://apis.google.com/js/plusone.js"></script>');
});
//Google翻译包
function googleTranslateElementInit() {
    new google.translate.TranslateElement({
        pageLanguage: 'en',
        autoDisplay: false
    }, 'google_translate_element');
}
    
//首页大图广告
function displayimg(){
    jQuery(".big_notice").slideUp(1000,function(){
       jQuery(".small_notice").slideDown(1000);
    })
}

//客服窗口
function ShowDialog(url){
    var iWidth=525; //窗口宽度
    var iHeight=675;//窗口高度
    var iTop=(window.screen.height-iHeight)/2;
    var iLeft=(window.screen.width-iWidth)/2;
    window.open("http://fyygame.com/livezilla/chat.php","","Scrollbars=no,Toolbar=no,Location=no,Direction=no,Resizeable=no,Width="+iWidth+" ,Height="+iHeight+",top="+iTop+",left="+iLeft);
}
//ShowDialog();

//清除未知js错误
<!--
function ResumeError(){
    return true;
}
window.onerror=ResumeError;
-->

