var init_f = function() { // bla bla bla } if(typeof onAjaxLoad == "function") onAjaxLoad(init_f); if (window.jQuery) jQuery(document).ready(init_f);