function togglePopWindow(event){
	$('#pop_window').toggle();
	return false;
}

function fetchVideoLink(){
	videoLink = $('#video_link')
	closeVideoLink = $('#close_pop_window')
	if(closeVideoLink) closeVideoLink.click(togglePopWindow)
	if(videoLink)videoLink.click(togglePopWindow);
}

$(document).ready(function(){
	fetchVideoLink();
	$(".scrollable").scrollable().find("a").tooltip({

	 // use this single tooltip element for all trigger elements
	 tip: '#tooltip'


	}).overlay({

	 // each trigger uses the same overlay with id "gallery"
	 target: '#gallery',

	 // optional exposing effect with custom color
	 expose: '#111',

	 // clicking outside the overlay does not close it
	 closeOnClick: false

	// gallery plugin
	}).gallery({

	 // do not use the same disabled class name as scrollable
	 disabledClass: 'inactive'
	});
});
