Updated custom.js to work with ajaxed content