/*create by2016-02-27! The author:118154194@qq.com! */ define(["jquery","lazyload"],function(){var a={u:window.location.href,api:"http://api.65.com/"},b={allgame:"#allgame",loginlink:".login-link",registetlink:".registet-link",collect:".collect",setindex:".setindex",tlogout:".t-log-out",nav:"#nav",b4xflist:".b4-xf-list"},c={lazy:".lazy"},d={gamelist:".game-list"},e=$(b.allgame),f=$(d.gamelist),g=$(b.loginlink),h=$(b.registetlink),i=$(b.collect),j=$(b.setindex),k=$(b.tlogout),l=$(b.nav),m=$(b.b4xflist),n=$(c.lazy);n.lazyload({threshold:200,effect:"fadeIn",failure_limit:10,skip_invisible:!1}),e.hover(function(){f.fadeIn(100)},function(){f.fadeOut(100)}),g.live("click",function(){window.open("http://my.65.com/login.html?url="+a.u)}),h.live("click",function(){window.open("http://www.65.com/account/register.html?url="+a.u)}),i.click(function(){q.AddFavorite(window.location,document.title)}),j.click(function(){q.SetHome(this,window.location)}),k.live("click",function(){r.LoginOut()});var o=l.attr("data-id"),p=0;p=271==o?0:282==o?1:292==o?3:283==o||284==o||285==o||286==o||287==o||288==o||289==o||290==o?2:0,l.find("dd:eq("+p+")").addClass("on"),l.find("dd").live({mouseenter:function(){$(this).siblings("dd").removeClass("on"),$(this).addClass("on")},mouseleave:function(){$("#nav dd").removeClass("on"),l.find("dd:eq("+p+")").addClass("on")}}),m.find("li:gt(0) p.b4-xfl1").show(),m.find("li:eq(0) div.b4-xfl2").show(),m.find("li").live({mouseenter:function(){m.find("li .b4-xfl1").show(),m.find("li .b4-xfl2").hide(),$(this).find(".b4-xfl1").hide(),$(this).find(".b4-xfl2").show()}});var q={AddFavorite:function(a,b){try{window.external.addFavorite(a,b)}catch(c){try{window.sidebar.addPanel(b,a,"")}catch(c){alert("加入收藏失败,请使用Ctrl+D进行添加")}}},SetHome:function(a,b){try{a.style.behavior="url(#default#homepage)",a.setHomePage(b)}catch(c){if(window.netscape){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect")}catch(c){alert("此操作被浏览器拒绝!\n请在浏览器地址栏输入“about:config”并回车\n然后将 [signed.applets.codebase_principal_support]的值设置为'true',双击即可。")}var d=Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);d.setCharPref("browser.startup.homepage",b)}}},GameList:function(){$.getJSON(a.api+"65api/mplantform_info.php?callback=?",{action:"get_game"},function(a){if(1==a.code){$(".web-game-sum").html("网页游戏("+a.web_total+")"),$(".hand-game-sum").html("手机游戏("+a.m_total+")");for(var b=a.webgame.length,c=a.mgame.length,d="",e="",f="",g=0;b>g;g++)f="1"==a.webgame[g].status?'':"2"==a.webgame[g].status?'':"3"==a.webgame[g].status?'':"",d+='