fixed bug when ajax result does not contain "query" property
made all links protocol-less

this will use http on http sites,
and https on https sites.
This way there will be no warning about unsafe embedded content.
Merge remote-tracking branch 'sebi/master'