
//http://stackoverflow.com/questions/901115/how-can-i-get-query-string-values-in-javascript
var urlParams;
(window.onpopstate = function () {
	var match,
		pl     = /\+/g,  // Regex for replacing addition symbol with a space
		search = /([^&=]+)=?([^&]*)/g,
		decode = function (s) { return decodeURIComponent(s.replace(pl, " ")); },
		query  = window.location.search.substring(1);

	urlParams = {};
	while (match = search.exec(query))
	   urlParams[decode(match[1])] = decode(match[2]);
})();



$(document).ready(function(){
	var a = urlParams['app'];
	var r = urlParams['role'];
	alert(a);
	$('span[data-product!=" + a + "]').not('[data-product=""]').css('background-color', 'red');
	$('span[data-product=" + a + "]').not('[data-product=""]').css('background-color', 'green');
	
	$("span[data-product!=" + a + "]").css("display", "none");
	$("span[data-product=" + a + "]").css("display", "inline");
});


$(window).load(function(){
$('#section-toggle').click( function(){
	$(this).find('i').toggleClass('glyphicon-collapse-up').toggleClass('glyphicon-collapse-down');
});
});> 