// Fullscreen OSC link
function fullwin(href,maxW,maxH){
// Define defaults for older browsers that have issues
		var winWidth = 400; 
		var winheight = 400;
		var winMaxWidth = maxW;
		var winMaxHeight = maxH;
		var winLeft = 0;
		var winTop = 0;
		
		if (screen.availWidth) { // Check if we have screen.avail...
			// Go to a maximise size of 1024x768
		   winWidth = (screen.availWidth > winMaxWidth) ? winMaxWidth : screen.availWidth;
		   winHeight = (screen.availHeight > winMaxHeight) ? winMaxHeight : screen.availHeight;
		}
		// Check we have window.open
		if (window.open) {
			// Open the new window
			var winLeft = (screen.availWidth/2)-(winWidth/2);
			var win = window.open(href,'scom','toolbar=no,location=yes,scrollbars=yes,resizable=yes,width='+winWidth+',height='+winHeight+',left='+winLeft+',top='+winTop);
			// Provide focus
			win.focus();
			event.preventDefault();
		} 	
}

$(document).ready(function() { 
	// Capture click events on all links with class "osc"
	$(".osc").click(function(event){
		fullwin($(this).attr("href"),1024,768);
	}); 
	// Left for legacy links
	$("a[href^='https://service.gemoney.com.au']").click(function(event){
		fullwin($(this).attr("href"),1024,768);
	}); 
});