
	$( document ).ready(function() {
		parseHash();
		function parseHash(){
			var hashobject = {};
			var hash = window.location.hash;
			hash = hash.substr(1, hash.length);
			hash.split('#').forEach(function(q) {
				if(q.includes(':')){
					var res = q.split(':');
					hashobject[res[0]] = decodeURI(res[1]);
				} else {
					hashobject[q] = true;
				}
			});
			//Handler
			if(hashobject.hasOwnProperty("snack")){
				(function (value) { 
	snackbar.MaterialSnackbar.showSnackbar({message: value}); }(hashobject['snack']));
			};if(hashobject.hasOwnProperty("tab")){
				(function (value) { 
	value = value - 1;
	$('.mdl-tabs')[0].MaterialTabs.tabs_[value].click();
	 }(hashobject['tab']));
			};

		}
		window.addEventListener('hashchange', parseHash, false);
	});
	