$(function(){ $('#webpage').click(function(){ $('#init').hide(); $('#result').show(); $('#srcurl').html("Source:"); getActionsForThing("http://schema.org/WebPage"); $.get('example/webpage.html', function(data) { var srccode = $("
").text(data);
			$('#src').html(srccode);
		})
	});
	
	$('#mediaobject').click(function(){
		$('#init').hide();
		$('#result').show();
		$('#srcurl').html("Source:");

		getActionsForThing("http://schema.org/ImageObject");

		$.get('example/mediaobject.html', function(data) {
			var srccode = $("
").text(data);
			$('#src').html(srccode);
		})
	});
	
});

function getActionsForThing(thing){
	
	$.getJSON('intents.js', function(data) {
		var intents = data;
		$.getJSON('map.js', function(mdata) {
			var actions = mdata[thing];
			var buf = "");
			
		})
	});
}

// function invokeShare(withURL) {
// 	var intent = new WebKitIntent("http://webintents.org/share", "text/uri-list", withURL);
// 	var onSuccess = function(data) { /* woot */ };
// 	var onError = function(data) { /* boooo */ };
// 	window.navigator.webkitStartActivity(intent, onSuccess, onError);
// }