$(document).ready(function() {

	$("#twitter_window_bottom").getTwitter({
		userName: "flowdesignNL",
		numTweets: 2,
		loaderText: "Loading tweets...",
		slideIn: false,
		slideDuration: 750,
		showHeading: false,
		headingText: "Latest Tweets",
		showProfileLink: false,
		showTimestamp: true
	});

	
	$('#social #facebook_icon').hover(function () {
		$('#facebook_window').show();
		$('#social #twitter_window').hide();
	});
	
	$('#social #twitter_icon').hover(function () {
		$('#twitter_window').show();
		$('#social #facebook_window').hide();
	});
	
	
	
	
	$('#social #facebook_icon').mouseleave(function() {
		setTimeout( function() {
		$('#social #facebook_window').hide();
		}, 2000 );
	   
	});
	
	$('#social #twitter_icon').mouseleave(function() {
		setTimeout( function() {
		$('#social #twitter_window').hide();
		}, 2000 );
	   
	});
	
	
	$('html').click(function() {
		$('#social #twitter_window').hide();
		$('#social #facebook_window').hide();
	});
	
	$('#facebook_window').click(function(event){
		event.stopPropagation();
	});
	
	$('#twitter_window').click(function(event){
		event.stopPropagation();
	});
	
});


			
var auto_refresh = setInterval(

function () {
	$(document).ready(function() {
		$("#twitter_window_bottom").getTwitter({
		userName: "flowdesignNL",
		numTweets: 2,
		loaderText: "Loading tweets...",
		slideIn: false,
		slideDuration: 750,
		showHeading: false,
		headingText: "Latest Tweets",
		showProfileLink: false,
		showTimestamp: true
		});
	});
	}, 10000); //twitter refresh interval


