CGSITE = {};

CGSITE.textToFlash = function(textToConvert) {
	// TO DO: Convert all special characters
	textToConvert = textToConvert.replace(/\u2026/, "...");
	textToConvert = textToConvert.replace(/\u2018/, "'");
	textToConvert = textToConvert.replace(/\u2019/, "'");
	textToConvert = textToConvert.replace(/\u201C/, "\"");
	textToConvert = textToConvert.replace(/\u201D/, "\"");
	/*textToConvert = textToConvert.replace(/&amp;/, "%26");
	textToConvert = textToConvert.replace(/\u0026/, "%26");*/
	textToConvert = textToConvert.replace(/&amp;/, "&");
	return escape(textToConvert);
}

CGSITE.updateCopyright = function(startYear) {
	var today = new Date();
	var month = today.getMonth() + 1;
	var day = today.getDate();
	var year = today.getFullYear();
	if (startYear < year && $('#copyRightYear')) {
		var oldCopyright = $('#copyRightYear').html();
		$('#copyRightYear').html(oldCopyright + "&ndash;" + year);
	}
}

CGSITE.isAppleDevice = function() {
	return navigator.userAgent.match(/iphone|ipod|ipad/i);
}
