using php classes and jquery