﻿
var Crown = Crown || {};

// common methods that may execute on all pages
Crown.Common = {

	init: function () {
		Crown.Common.SignatureClubHeader.init();
	},

	isEmpty: function (value) {
		return value === null || value === undefined || value === '';
	},

	// Sets the javascript onclick event for the Siganture Club link in the header.
	SignatureClubHeader: {
		LINK_ID: 'SigClub',
		init: function () {
			$('#' + this.LINK_ID).click(function () {
				window.open($(this).attr("href"), '', 'width=1000,height=800,resizable=1,scrollbars=1,status=1,menubar=0,toolbar=0');
				return false;
			});
		}
	},

	// Common Flash values
	Flash: {

		MIN_VERSION: '9.0.0',
		EXPRESSINSTALL_PATH: '/flash/expressInstall.swf',
		NOFLASH_HTML: '<p>This content requires the latest Adobe Flash Player.</p><a href="http://www.adobe.com/go/getflashplayer" target="_blank">Download it for free!</a>',

		// swbobject embed callback, displays no Flash message if embed was unsuccessful
		embedCallBack: function (e) {
			if (e.success == false) {
				$('#' + e.id).html(Crown.Common.Flash.NOFLASH_HTML);
			}
		}
	}
};

// on domready
$(document).ready(function () {
	Crown.Common.init();
});
