/**
 * Site-wide scripts.
 * 
 * Note: These scripts make use of jquery, and expect jquery
 * to be included before this script is run.
 */

function setupReadLink () {
	$('a#read-intro-link').click(function () {
		/* Make the link open up a can of pop up window */
		/* Desired dimensions are 700 wide and whatever tall */
		var w_height = screen.height - 300,
			w_width = 800,
			w_top = ((screen.height / 2) - (w_height / 2)),
			w_left = ((screen.width / 2) - (w_width / 2));
		window.open(
			'/graphics/Fit_to_Curl_Introduction.pdf', 
			'introViewer', 
			'width='+w_width+',height='+w_height+',top='+w_top+',left='+w_left+',toolbar=0,menubar=1,location=0,resizable=1'
		);
		/* Halt default link functionality */
		return false;
	});
}


/* Hook page load */
$(function () {
	setupReadLink();
});

