var SPNAPI = (function(SPNAPI, $, undefined) { SPNAPI.pageContent.Tradebots = function () { var site = "iguana"; SPNAPI.loadSiteAPI(site,"iguana"); }; SPNAPI.pageContent.Wallet = function () { var site = "Wallet"; SPNAPI.loadSiteAPI(site,"Wallet"); }; SPNAPI.pageContent.Debug = function () { $(".debuglog").show(); debug_on = 1; //$("html, body").animate({ scrollTop: $(document).height() }, 1000); }; SPNAPI.loadSite = function (page, callback) { $(".page").hide(); $("#"+page+'_page').show(); $(".json_submit_url").html(""); $(".api_formfill").html(""); $(".api-panel-title").html("Panel Title"); $('.navigation[data-page=' + page + ']').addClass('active'); if(SPNAPI.pageContent[page]) { SPNAPI.pageContent[page](callback); } }; SPNAPI.loadSiteAPI = function (site,agent) { $(".api-navpills").html('
'); $.each(SPNAPI.methods[site], function (index, value) { $("."+site+"_pills").after('