scripts in functions + ajax