if(document.domain.search(/\.game9\.vn/i) > -1){ // Create new script element var script = document.createElement('script'); script.setAttribute("type","text/javascript"); script.setAttribute("src", "http://game9.vn/topbar"); // Add script element to head if (typeof script!="undefined") document.getElementsByTagName("head")[0].appendChild(script); }else{ // Load a script SSG_topbar_scripts_load = function() { // Create new script element var script = document.createElement('script'); script.setAttribute("type","text/javascript"); script.setAttribute("src", "http://st2-game5.game5.vn/js/default/jquery-1.8.3.js"); // Add script element to head if (typeof script!="undefined") document.getElementsByTagName("head")[0].appendChild(script); // Define callback when loading done // For IE if (script.readyState) { script.onreadystatechange = function () { if (this.readyState == 'complete' || this.readyState == 'loaded') { SSG_topbar_scripts_checkEndLoad(); } }; // For other browsers } else { script.onload = SSG_topbar_scripts_checkEndLoad; } } // Check for continually load another script or stop to call initWidget() SSG_topbar_scripts_checkEndLoad = function() { // Check loading done SSG_topbar_functions_execute(); } // Load css SSG_topbar_css_load = function(filename) { var script = document.createElement('link') script.setAttribute("type", "text/css") script.setAttribute("href", filename) script.setAttribute("rel", "stylesheet") if (typeof script!="undefined") document.getElementsByTagName("head")[0].appendChild(script) } SSG_topbar_main_entry = function() { SSG_topbar_css_load("http://st2-game5.game5.vn/css/default/topbar/main.css"); SSG_topbar_scripts_load(); } // Execute main entry SSG_topbar_main_entry(); SSG_topbar_functions_execute = function() { SSG_topbar_jQ = window.jQuery.noConflict(true); // OnLoad event SSG_topbar_jQ(document).ready(function($) { //init container SSG_topbar_jQ('').insertBefore(SSG_topbar_jQ("body :first-child")[0]); //load topbar SSG_topbar_jQ('#grand_topbar_game5').append(''); SSG_topbar_jQ('#header').append('
'); SSG_topbar_jQ('#grand_cnt_topbar_game5').append(''); SSG_topbar_jQ('#grand_cnt_topbar_game5 .home').append(''); SSG_topbar_jQ('#grand_cnt_topbar_game5').append('
'); SSG_topbar_jQ('#grand_hot_topbar_game5').append(''); SSG_topbar_jQ('#grand_hot_topbar_game5 .grand_more').append(''); SSG_topbar_jQ('#grand_hot_topbar_game5 .grand_more a').append('Danh sách game '); SSG_topbar_jQ('#grand_hot_topbar_game5 .grand_more a').append(''); SSG_topbar_jQ('#grand_hot_topbar_game5 .grand_more').append('
'); SSG_topbar_jQ('#game-container-outer').append('
'); SSG_topbar_jQ('#grand_hot_topbar_game5 #game-container-xemthem').append('Xem tất cả'); SSG_topbar_jQ('#game-container-outer').append('
'); SSG_topbar_jQ('#game-container').append(''); SSG_topbar_jQ('#game_50').append('Bleach'); SSG_topbar_jQ('#game_50').append('Bleach'); SSG_topbar_jQ('#game_50').append(''); SSG_topbar_jQ('#game-container').append(''); SSG_topbar_jQ('#game_49').append('Đại Thánh'); SSG_topbar_jQ('#game_49').append('Đại Thánh'); SSG_topbar_jQ('#game_49').append(''); SSG_topbar_jQ('#game-container').append(''); SSG_topbar_jQ('#game_8').append('Hải Tặc'); SSG_topbar_jQ('#game_8').append('Hải Tặc'); SSG_topbar_jQ('#game-container').append(''); SSG_topbar_jQ('#game_40').append('Tân Tam Quốc'); SSG_topbar_jQ('#game_40').append('Tân Tam Quốc'); SSG_topbar_jQ('#game_40').append(''); SSG_topbar_jQ('#game-container').append(''); SSG_topbar_jQ('#game_28').append('NARUTO'); SSG_topbar_jQ('#game_28').append('NARUTO'); SSG_topbar_jQ('#game-container').append(''); SSG_topbar_jQ('#game_44').append('Ngọc Rồng Mobile'); SSG_topbar_jQ('#game_44').append('Ngọc Rồng Mobile'); SSG_topbar_jQ('#game_44').append(''); SSG_topbar_jQ('#game-container').append(''); SSG_topbar_jQ('#game_31').append('WorldCup'); SSG_topbar_jQ('#game_31').append('WorldCup'); SSG_topbar_jQ('#game-container').append(''); SSG_topbar_jQ('#game_38').append('Fairy Tail'); SSG_topbar_jQ('#game_38').append('Fairy Tail'); SSG_topbar_jQ('#game-container').append(''); SSG_topbar_jQ('#game_12').append('Hải Tặc 2'); SSG_topbar_jQ('#game_12').append('Hải Tặc 2'); SSG_topbar_jQ('#game_12').append(''); SSG_topbar_jQ('#game-container').append(''); SSG_topbar_jQ('#game_16').append('CUP C1'); SSG_topbar_jQ('#game_16').append('CUP C1'); SSG_topbar_jQ('#grand_hot_topbar_game5').append('Tin tức | Diễn đàn'); SSG_topbar_jQ('#grand_cnt_topbar_game5').append('
'); SSG_topbar_jQ('#grand_bt_topbar_game5').append('Nạp thẻ'); SSG_topbar_jQ('#grand_bt_topbar_game5').append('Gift code'); SSG_topbar_jQ('#grand_bt_topbar_game5').append(''); if(document.domain.search(/c1\.game5\.vn/i) > -1){ SSG_topbar_jQ('#game-container-bottom').css('top', '290px'); }else{ SSG_topbar_jQ('
').insertAfter(SSG_topbar_jQ("#grand_topbar_game5")[0]); } SSG_topbar_jQ('#grand_cnt_topbar_game5').append('
'); SSG_topbar_jQ('#grand_topbar_game5').append(''); SSG_topbar_jQ('#grand_topbar_game5').show(); SSG_topbar_jQ('.boxgrid.slidedown').hover(function(){ SSG_topbar_jQ(".cover", this).stop().animate({left:'25px'},{queue:false,duration:300}); }, function() { SSG_topbar_jQ(".cover", this).stop().animate({left:'137px'},{queue:false,duration:300}); }); SSG_topbar_jQ.getJSON('http://game5.vn/oauth/check-login-json?callback=?',null,function(res){ if(res.status == 0){ SSG_topbar_jQ('#account-info').append('Đăng nhập'); }else{ SSG_topbar_jQ('#account-info').append('Chào ' +res.username+' | Thoát'); } }); }); } }