﻿
// used for referring to the reCaptcha assets
var gCaptchaName = 'recaptcha_response_field';
var gCaptchaID = '#' + gCaptchaName;

// used by protected views to indicate if the user of the view is a manager or not
var gIsManager = false;				

// currently active theme (currently always "default")
var gThemeFolder = '';

// where the root of app is running from, e.g. http://toepoke.co.uk/
var gBaseUrl = '';

$(document).ready(function() {

	// forces any rel="external" links to open in a new window


	$('a[rel*=external]').click(function() {
		window.open(this.href);
		return false;
	});

	// set date picker default format
	if ($.datepicker) {
		$.datepicker.setDefaults(
			{
				buttonImageOnly: true,
				showOn: 'button',
				buttonImage: gBaseUrl + 'Content/icons/menu/misc/calendar.png',
				dateFormat: 'dd/mm/yy'
			}
		);

		$.datepicker.formatDate("dd/mm/yy");
	}

	// set out the login form dialog parameters
	$("#signin-confirm").dialog({
		resizable: false,
		height:335,
		width: 525,
		modal: true,
		autoOpen: false,
		draggable: false,
		open: function(event, ui) { $("#email").focus(); }
	});

	// wire-up the login button to show the login dialog
	$("#signIn").click( 
		function() {
			$("#signin-confirm").dialog("open");
			
			return false;
		}
	);

	//	<script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#publisher=bb9c52d0-6bd0-4e0a-94db-bf5c8fc0aca0&amp;type=website&amp;post_services=email%2Cfacebook%2Ctwitter%2Cmyspace%2Cdigg%2Cwindows_live%2Cdelicious%2Cstumbleupon%2Creddit%2Cgoogle_bmarks%2Clinkedin%2Cbebo%2Cblogger%2Cyahoo_bmarks%2Cmixx%2Ctechnorati%2Cfriendfeed%2Cwordpress&amp;headerbg=%23333333&amp;linkfg=%23000080"></script>		
	
	
});





