Greetings - I'm using jquery mobile and phone gap to make what is essentially an installable catalog app for a company.

Using xCode as my IDE everything is perfect in Simulator iPhone v4.3 - when viewing in 4.2, 4.1 and 3.2 my app isn't cooperating.

I've got the following function which detects a particular page and then gets the $_GET vars for json to dynamically build a list (from hosted API).

HTML Code:
// LOAD THE CLOTHING LIST
				if($(this).attr("id") == "clothing") {
					var $_GET = {};
					document.location.search.replace(/\??(?:([^=]+)=([^&]*)&?)/g, function () {
					    function decode(s) {
					        return decodeURIComponent(s.split("+").join(" "));
					    }
					    $_GET[decode(arguments[1])] = decode(arguments[2]);
					});
					cat = $_GET['cat'];
					type = $_GET['type'];
					
					$.getJSON("http://domain.com/api/products.php?cat="+cat+"&type="+type, function(data) { 
							// LOOP THROUGH EACH ITEM AND BUILD AN LI LINK
							$.each(data, function(index, item) {
								id = item.ID;
								product_name = item.PRODUCT_NAME;
								$("#prod_list").append("<li><a href='product.html?id="+id+"'>"+product_name+"</a></li>");
							})
							$("#prod_list").listview();
							$("#prod_list").listview("refresh");
						});
					
				}
As stated ALL works well on 4.3 but in other versions $_GET['cat'] and $_GET['type'] are undefined. If I hard-code the link it works as expected. Any ideas?

Thank You