Better URL parse with jQuery