Merge pull request #2 from klimtog/andrew

Updated jQuery code
fixed the additional fields...fixed the curl connection issue...added more additional fields and got them posting to the call correctly...very happy camper right now...
Cleaned if statements and reduced duplication of defined vars

Using if/elseif rather than multiple ifs
Broke out postfields that were duplicated.
Broke out the query_string definition
Added choice to define json/xml as the responsetype