/* Copyright (c) 2006-2007 Mathias Bank (http://www.mathias-bank.de/2007/04/21/jquery-plugin-geturlparam-version-2/)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 * 
 * Version 2.1
 * 
 * Thanks to Hinnerk Ruemenapf - http://hinnerk.ruemenapf.de/ for bug reporting and fixing. Tom Leonard for some improvements
 */
jQuery.fn.extend({getUrlParam:function(a){a=escape(unescape(a));var b=new Array();var c=null;if($(this).attr("nodeName")=="#document"){if(window.location.search.search(a)>-1){c=window.location.search.substr(1,window.location.search.length).split("&")}}else if($(this).attr("src")!=undefined){var d=$(this).attr("src");if(d.indexOf("?")>-1){var e=d.substr(d.indexOf("?")+1);c=e.split("&")}}else if($(this).attr("href")!=undefined){var d=$(this).attr("href");if(d.indexOf("?")>-1){var e=d.substr(d.indexOf("?")+1);c=e.split("&")}}else{return null}if(c==null)return null;for(var i=0;i<c.length;i++){if(escape(unescape(c[i].split("=")[0]))==a){b.push(c[i].split("=")[1])}}if(b.length==0)return null;else if(b.length==1)return b[0];else return b}});
