
(function($){$.fn.urlbuilder=function(options){if(!$(this).attr("nodeName")=="#document"){return null;}};$.fn.urlbuilder.querystring=function(arg){return querystring(arg);};$.fn.urlbuilder.pagename=function(){return pagename();};function pagename(){var page;var index=window.location.pathname.lastIndexOf('/');return window.location.pathname.substr(index+1);}
function querystring(arg){strParamName=encodeURIComponent(decodeURIComponent(arg));var returnVal=new Array();var qs;var qString=null;if(window.location.search.search(strParamName)>-1){qs=decodeURIComponent(window.location.search.substr(1,window.location.search.length));qString=qs.split("&");}
if(qString==null)
return null;for(var i=0;i<qString.length;i++){if(qString[i].split("=")[0]==decodeURIComponent(strParamName)){returnVal.push(qString[i].split("=")[1]);}}
if(returnVal.length==0)
return null;else if(returnVal.length==1)
return returnVal[0];else
return returnVal;};})(jQuery);
