var linkedin_url;
var hyves_url;
var facebook_url;
var twitter_url;
function setupSocial(){
	linkedin_url = "http://www.linkedin.com/shareArticle?mini=true&url="+getUrl()+"&title="+getTitle()+"&summary="+getTitle()+"%20visualisatie$20door&20VIA%20Drupsteen&source=VIA%20Drupsteen";
	hyves_url = "http://www.hyves.nl/profilemanage/add/tips/?name=home&text="+getUrl();
	facebook_url = "http://www.facebook.com/sharer.php?u="+getUrl()+"&t="+getTitle();
	twitter_url = "http://twitter.com/home?status="+getUrl();
	
	$(document).ready(function(){

		$(function(){
		/* 
			Social Media buttons,
			Bind click event to button.
		*/
			$('#linkedin').click(function() {
				window.open(linkedin_url);
				return false;
			});		
			$('#hyves').click(function() {
				window.open(hyves_url);	
				return false;
			});		
			$('#facebook').click(function() {
				window.open(facebook_url);	
				return false;
			});		
			$('#twitter').click(function() {
				window.open(twitter_url);	
				return false;				
			});
			/*
				Check if de tour is offline, then hide the social sharing icons
			
			if(window.location.protocol != "http:" && window.location.protocol != "https:")
			{
				$('#twitter, #facebook, #linkedin, #hyves').css("display", "");
			}
			*/
		});	
	});	
}
function Share(type)
{
	/*
		Called from within krpano, opens the correct social website
	*/
	switch (type){
		case "hyves":
			window.open(hyves_url);
			return false;
			break;
		case "facebook":
			window.open(facebook_url);	
			return false;			
			break;
		case "linkedin":
			window.open(linkedin_url);		 
			return false;
			break;
		case "twitter":
			window.open(twitter_url);		  
			return false;
			break;
	}
	return false;
}


