//-- Preload images to cure the browser flickering issue
if (document.images) {
	var aryImages = new Array(
		"images/spacer.gif",
		"images/btn_aqua.png",
		"images/btn_blue.png",
		"images/btn_disabled.png",
		"images/btn_gray.png",
		"images/btn_green.png",
		"images/btn_orange.png",
		"images/btn_red.png",
		"images/btn_yellow.png"
	);
	var aryPreload = new Array();
	for (var img=0; img<aryImages.length; img++) {
		aryPreload[img] = new Image();
		aryPreload[img].src = aryImages[img];
	}
}

Array.prototype.contains = function(obj) {
	var i = this.length;
	while (i--) {
		if (this[i] === obj) {
			return true;
		}
	}
	return false;
}

function formatPhone(field, event) {
	if (field.value.replace(/^\s+|\s+$/g, "") == "") {
		return true;
	}
	try {
		if (field.value.substr(0,1) == "+" || field.value.substr(0,1) == "0") {
			return true;
		}
	} catch (er) { }
	var code = 0;
	if (event) {
		event = event || window.event;
		code = event.which || event.keyCode;
	}
	//-- ignore backspace, tab, shift, ctrl, home, end, arrows, del
	var aryCodes = [ 8, 9, 16, 17, 35, 36, 37, 38, 39, 46 ];
	if (!aryCodes.contains(code)) {
		if (field.value.match(/^[01]?\s?\(\d{1,2}$/) ||
			field.value.match(/^[01]?\s?\(\d{3}\)\s\d{1,2}$/) ||
			field.value.match(/^[01]?\s?\(\d{3}\)\s\d{3}-\d{1,4}$/) || 
			field.value.match(/^[01]?\s?\(\d{3}\)\s\d{3}-\d{4}\s[x]{1}\s[\d]{1,5}$/)
		) {
			return true;
		}
		var proceed = true;
		if (proceed) proceed = !field.value.match(/^([01])\s$/);
		if (proceed) proceed = !field.value.match(/^([01]?\s?)(\()$/);
		if (proceed) proceed = !field.value.match(/^([01]?\s?)(\([0-9]{3}\))\s$/);
		if (proceed) proceed = !field.value.match(/^([01]?\s?)(\([0-9]{3}\))\s([0-9]{3})\-$/);
		if (proceed) proceed = !field.value.match(/^([01]?\s?)(\([0-9]{3}\))\s([0-9]{3})\-([0-9]{4})([ex\s])$/);
		if (proceed) {
			var temp = field.value.replace(/[^0-9]/g, "");
			var cursor = temp.length;
			var prefix = temp.replace(/^([01]?)([0-9]*)$/, "$1").length;
			temp = temp.replace(/^([01]?)([0-9]{0,3})([0-9]{0,3})([0-9]{0,4})([0-9]*)$/, "$1 ($2) $3-$4 x $5");
			if (cursor < (11+prefix)) temp = temp.replace(/\s*x\s*$/, "");
			if (cursor < (6+prefix)) temp = temp.replace(/\-\s*$/, "");
			if (cursor < (3+prefix)) temp = temp.replace(/\)\s*$/, "");
			if (cursor < (1+prefix)) temp = temp.replace(/\s\(*$/, "");
			if (!cursor) temp = "";
			if (cursor > (15+prefix)) temp = temp.substring(0,temp.length-(cursor-(15+prefix)));
			temp = temp.replace(/^\s+|\s+$/g, "");
			field.value = temp;
		} else {
			if (field.value.match(/^([01]?\s?)(\([0-9]{3}\))\s([0-9]{3})\-([0-9]{4})([ex\s])$/)) {
				field.value = field.value.replace(/([ex\s])$/, " x ");
			} else {
				field.value = field.value;
			}
		}
		//field.focus();
	}
	return true;
}

function formatNumeric(field, event) {
	// Usage: onkeyup="formatNumeric(this,event)"
	event = event || window.event;
	code = event.which || event.keyCode;
	//-- ignore backspace, tab, shift, ctrl, home, end, arrows, del
	var aryCodes = [ 8, 9, 16, 17, 35, 36, 37, 38, 39, 46 ];
	if (!aryCodes.contains(code)) {
		field.value = field.value.replace(/[^0-9\-]/g, "");
		field.value = field.value.replace(/^([-][1-9]\d*|\d+)(.*?)$/g, "$1");
	}
	return true;
}

function formatAlphaNumeric(field, event) {
	// Usage: onkeyup="formatAlphaNumeric(this,event)"
	event = event || window.event;
	code = event.which || event.keyCode;
	//-- ignore backspace, tab, shift, ctrl, home, end, arrows, del
	var aryCodes = [ 8, 9, 16, 17, 35, 36, 37, 38, 39, 46 ];
	if (!aryCodes.contains(code)) {
		field.value = field.value.replace(/[^a-fA-F0-9]/g, "");
		field.value = field.value.replace(/^([a-fA-F0-9]{0,6})(.*?)$/g, "$1");
	}
	return true;
}

function formatZipCode(field, event) {
	// Usage: onkeyup="formatZipCode(this,event)"
	if (field.value.replace(/^\s+|\s+$/g, "") == "") {
		return true;
	}
	event = event || window.event;
	code = event.which || event.keyCode;
	//-- ignore backspace, tab, shift, ctrl, home, end, arrows, del
	var aryCodes = [ 8, 9, 16, 17, 35, 36, 37, 38, 39, 46 ];
	if (!aryCodes.contains(code)) {
		if (!field.value.match(/^[0-9]*$/)) {
			field.value = field.value.replace(/[^0-9]/g, "");
		}
		if (field.value.replace(/^\s*|\s*$/) != "") {
			if (!field.value.match(/^([0-9]{1,5})$/)) {
				field.value = field.value.replace(/([0-9]{1,5})([0-9]*)$/, "$1");
			}
		}
	}
	return true;
}

function isNumeric(text) {
	if (text.replace(/^\s+|\s+$/g, "") == "") {
		return false;
	}
	var objRegExp = /^([-][1-9]\d*|\d+)$/;
	return objRegExp.test(text);
}

function isPhone(text) {
	if (text.replace(/^\s+|\s+$/g, "") == "") {
		return false;
	}
	var objRegExp = /^[01]?[- .]?(\([2-9]\d{2}\)|[2-9]\d{2})[- .]?\d{3}[- .]?\d{4}(([\s]*(x|ext|ext.){1}[\s]*[0-9]{1,6}[\s]*|[\s]*[0-9]{0,6}[\s]*))$/;
	return objRegExp.test(text);
}

function formatCardNumber(field, amex, event) {
	try {
		var code = 0;
		if (event) {
			event = event || window.event;
			code = event.which || event.keyCode;
		}
		var code = 14;
		//-- ignore backspace, tab, shift, ctrl, home, end, arrows, del
		var aryCodes = [ 8, 9, 16, 17, 35, 36, 37, 38, 39, 46 ];
		if (!aryCodes.contains(code)) {
			return formatCardNumberBase(field, amex.checked);
		}
	} catch (er) { }
	return true;
}

function formatCardNumberBase(field, formatAmex) {
	try {
		if (field.value.replace(/^\s+|\s+$/g, "") == "") {
			return true;
		}
		var strValue = field.value.replace(/^\s+|\s+$/g, "");
		if (formatAmex) {
			if (strValue.match(/^\d{1,3}$/) ||
				strValue.match(/^\d{4}-?$/) ||
				strValue.match(/^\d{4}-\d{1,5}$/) ||
				strValue.match(/^\d{4}-\d{6}-?$/) ||
				strValue.match(/^\d{4}-\d{6}-\d{1,5}$/)
			) {
				return true;
			}
		} else {
			if (strValue.match(/^\d{1,3}$/) ||
				strValue.match(/^\d{4}-?$/) ||
				strValue.match(/^\d{4}-\d{1,3}$/) ||
				strValue.match(/^\d{4}-\d{4}-?$/) ||
				strValue.match(/^\d{4}-\d{4}-\d{1,3}$/) ||
				strValue.match(/^\d{4}-\d{4}-\d{4}-?$/) ||
				strValue.match(/^\d{4}-\d{4}-\d{4}-\d{1,4}$/)
			) {
				return true;
			}
		}
		
		strValue = strValue.replace(/[^0-9]/g, "");
		if (formatAmex) {
			if (strValue.length >= 10) {
				field.value = strValue.replace(/^(\d{4})(\d{6})(\d*)$/, "$1-$2-$3");
			} else if (strValue.length >= 4) {
				field.value = strValue.replace(/^(\d{4})(\d*)$/, "$1-$2");
			}
		} else {
			if (strValue.length >= 12) {
				field.value = strValue.replace(/^(\d{4})(\d{4})(\d{4})(\d*)$/, "$1-$2-$3-$4");
			} else if (strValue.length >= 8) {
				field.value = strValue.replace(/^(\d{4})(\d{4})(\d*)$/, "$1-$2-$3");
			} else if (strValue.length >= 4) {
				field.value = strValue.replace(/^(\d{4})(\d*)$/, "$1-$2");
			}
		}
	} catch (er) { }
	return true;
}

function validateFormField(isValid, theField, strMessage) {
	if (isValid && theField) {
		var strType = theField.type;
		try {
			strType = (theField[0].type != undefined ? theField[0].type : strType);
		} catch (er) { }
		var strValue = "";
		var isChecked = false;
		if (strType.indexOf("select") < 0) {
			if (strType.indexOf("checkbox") < 0 && strType.indexOf("radio") < 0) {
				strValue = new String(theField.value);
			} else {
				for (var i=0; i<theField.length; i++) {
					if (theField[i].checked) {
						strValue = new String(theField[i].value);
						isChecked = true;
						break;
					}
				}
			}
		} else {
			strValue = theField.options[theField.selectedIndex].value;
			strValue = (strValue.replace(/^\s+|\s+$/g, "") == "-1" ? "" : strValue);
		}
		if (strValue.replace(/^\s+|\s+$/g, "") == "" && !isChecked) {
			if (strMessage.replace(/^\s+|\s+$/g, "") != "") { alert(strMessage); }
			try {
				theField.focus();
			} catch (er) { }
			return false;
		}
		return true;
	}
	return isValid;
}

function validateFormFieldState(isValid, theField, strMessage) {
	if (isValid && theField) {
		var strValue = new String(theField.value);
		if (strValue.replace(/^\s+|\s+$/g, "") == "") {
			if (strMessage.replace(/^\s+|\s+$/g, "") != "") { alert(strMessage); }
			try {
				theField.focus();
			} catch (er) { }
			return false;
		}
		var objRegExp = /^[a-zA-Z]{2}$/;
		if (!objRegExp.test(strValue)) {
			if (strMessage.replace(/^\s+|\s+$/g, "") != "") { alert(strMessage); }
			try {
				theField.focus();
			} catch (er) { }
			return false;
		}
		return true;
	}
	return isValid;
}

function validateFormFieldZipCode(isValid, theField, strMessage) {
	if (isValid && theField) {
		var strValue = new String(theField.value);
		if (strValue.replace(/^\s+|\s+$/g, "") == "") {
			if (strMessage.replace(/^\s+|\s+$/g, "") != "") { alert(strMessage); }
			try {
				theField.focus();
			} catch (er) { }
			return false;
		}
		var objRegExp = /^[0-9]{5}$/;
		if (!objRegExp.test(strValue)) {
			if (strMessage.replace(/^\s+|\s+$/g, "") != "") { alert(strMessage); }
			try {
				theField.focus();
			} catch (er) { }
			return false;
		}
		return true;
	}
	return isValid;
}

function validateFormFieldEmail(isValid, theField, strMessage) {
	if (isValid && theField) {
		var strValue = new String(theField.value);
		if (strValue.replace(/^\s+|\s+$/g, "") == "") {
			if (strMessage.replace(/^\s+|\s+$/g, "") != "") { alert(strMessage); }
			try {
				theField.focus();
			} catch (er) { }
			return false;
		}
		var objRegExp = /^[A-Za-z0-9](([_\.\-]?[a-zA-Z0-9]+)*)@([A-Za-z0-9]+)(([\.\-]?[a-zA-Z0-9]+)*)\.([A-Za-z]{2,})$/;
		if (!objRegExp.test(strValue)) {
			if (strMessage.replace(/^\s+|\s+$/g, "") != "") { alert(strMessage); }
			try {
				theField.focus();
			} catch (er) { }
			return false;
		}
		return true;
	}
	return isValid;
}

function validateFormFieldPhone(isValid, theField, strMessage) {
	if (isValid && theField) {
		var strValue = new String(theField.value);
		if (strValue.replace(/^\s+|\s+$/g, "") == "") {
			if (strMessage.replace(/^\s+|\s+$/g, "") != "") { alert(strMessage); }
			try {
				theField.focus();
			} catch (er) { }
			return false;
		}
		var objRegExp = /^[01]?[- .]?(\([2-9]\d{2}\)|[2-9]\d{2})[- .]?\d{3}[- .]?\d{4}(([\s]*(x|ext|ext.){1}[\s]*[0-9]{1,6}[\s]*|[\s]*[0-9]{0,6}[\s]*))$/;
		if (!objRegExp.test(strValue)) {
			if (strMessage.replace(/^\s+|\s+$/g, "") != "") { alert(strMessage); }
			try {
				theField.focus();
			} catch (er) { }
			return false;
		}
		return true;
	}
	return isValid;
}

function validateFormFieldPassword(isValid, theField, strMessage) {
	if (isValid && theField) {
		var strValue = new String(theField.value);
		if (strValue.replace(/^\s+|\s+$/g, "") == "") {
			if (strMessage.replace(/^\s+|\s+$/g, "") != "") { alert(strMessage); }
			try {
				theField.focus();
			} catch (er) { }
			return false;
		}
		var objRegExp = /^[a-zA-Z0-9_\.\-]{6,}$/;
		if (!objRegExp.test(strValue)) {
			if (strMessage.replace(/^\s+|\s+$/g, "") != "") { alert(strMessage); }
			try {
				theField.focus();
			} catch (er) { }
			return false;
		}
		return true;
	}
	return isValid;
}

function validateFormFieldEquals(isValid, theField1, theField2, strMessage) {
	if (isValid && theField1 && theField2) {
		if (theField1.value.replace(/^\s+|\s+$/g, "") != theField2.value.replace(/^\s+|\s+$/g, "")) {
			if (strMessage.replace(/^\s+|\s+$/g, "") != "") { alert(strMessage); }
			try {
				theField1.focus();
			} catch (er) { }
			return false;
		}
		return true;
	}
	return isValid;
}

var maxLengthField;
function imposeMaxLength(field, event) {
	//-- maxlength attribute must be set
	//-- onkeyup, onkeydown				return imposeMaxLength(this, event)
	//-- onpaste						imposeMaxLength(this, event); this.blur(); this.focus();
	//-- oninput, onfocus, onblur		imposeMaxLength(this, event)
	try {
		if (field.value.replace(/^\s+|\s+$/g, "") == "") {
			return true;
		}
		event = event || window.event;
		code = event.which || event.keyCode;
		//-- allow backspace, tab, shift, ctrl, home, end, arrows, del
		var aryCodes = [ 8, 9, 16, 17, 35, 36, 37, 38, 39, 46 ];
		if (aryCodes.contains(code)) {
			return true;
		}
		var maxlen = (field.getAttribute ? parseInt(field.getAttribute("maxlength")) : "");
		if (isNaN(maxlen)) {
			return true;
		}
		if (field.value.length >= maxlen) {
			field.value = field.value.substring(0, maxlen-1);
			maxLengthField = field;
			setTimeout("maxLengthField.scrollTop = maxLengthField.scrollHeight;", 0);
		}

		return (field.value.length < maxlen);
	} catch (err) {
		//alert(err.description);
		return true;
	}
}


function selectPrevShipping(objCheckbox, intAddressID) {
	if (objCheckbox.checked) {
		$("#previousShippingAddress input[name='ship_AddressID']").each(function(i){
			$(this).attr("checked", false);
			if ($(this).val() == intAddressID.toString()) {
				$(this).attr("checked", true);
				$("#newShippingAddress").hide();
				$("#previousShippingNo").attr("checked", false);
				$("#previousShippingYes").attr("checked", true);
				$("#previousShippingAddress").show();
			}
		});

		try {
			setTimeout(function() { objCheckbox.checked = false; }, 3000);
		} catch (err) { }
	} else {
		clearShipping(objCheckbox);
	}
}

function copyNewShipping(objCheckbox, firstName, middleInitial, lastName, companyName, address1, address2, city, state, zip, country, phone1, phone2) {
	if (objCheckbox.checked) {
		theForm = objCheckbox.form;
		theForm.ship_FirstName.value = firstName;
		theForm.ship_MiddleInitial.value = middleInitial;
		theForm.ship_LastName.value = lastName;
		theForm.ship_CompanyName.value = companyName;
		theForm.ship_Address1.value = address1;
		theForm.ship_Address2.value = address2;
		theForm.ship_City.value = city;
		theForm.ship_State.value = state;
		theForm.ship_Zip.value = zip;
		for (var i=0; i<theForm.ship_Country.length; i++) {
			if (theForm.ship_Country.options[i].innerText == country) {
				theForm.ship_Country.selectedIndex = i;
				break;
			}
		}
		theForm.ship_Phone1.value = phone1;
		theForm.ship_Phone2.value = phone2;

		$("#previousShippingAddress").hide();
		$("#previousShippingNo").attr("checked", true);
		$("#previousShippingYes").attr("checked", false);
		$("#newShippingAddress").show();

		try {
			setTimeout(function() { objCheckbox.checked = false; }, 3000);
		} catch (err) { }
	} else {
		clearShipping(objCheckbox);
	}
}

function clearShipping(objCheckbox) {
	if (!objCheckbox.checked) {
		theForm = objCheckbox.form;
		theForm.ship_FirstName.value = "";
		theForm.ship_MiddleInitial.value = "";
		theForm.ship_LastName.value = "";
		theForm.ship_CompanyName.value = "";
		theForm.ship_Address1.value = "";
		theForm.ship_Address2.value = "";
		theForm.ship_City.value = "";
		theForm.ship_State.value = "";
		theForm.ship_Zip.value = "";
		for (var i=0; i<theForm.ship_Country.length; i++) {
			if (theForm.ship_Country.options[i].innerText == "United States") {
				theForm.ship_Country.selectedIndex = i;
				break;
			}
		}
		theForm.ship_Phone1.value = "";
		theForm.ship_Phone2.value = "";

		$("#previousShippingAddress input[name='ship_AddressID']").attr("checked", false);
		$("#previousShippingAddress").hide();
		$("#previousShippingNo").attr("checked", true);
		$("#previousShippingYes").attr("checked", false);
		$("#newShippingAddress").show();
	}
}

function checkAddresses(objElement) {
	var parent = $("#previousBillingAddress");
	var inputName = "bill_AddressID";
	if ($(objElement).attr("name") == "previousShipping") {
		parent = $("#previousShippingAddress");
		inputName = "ship_AddressID";
	}
	if ($("input[name='" + inputName + "']:checked", parent).length == 0) {
		$("input[name='" + inputName + "']", parent).first().attr("checked", true);
	}
}

function toggleFAQ(faqId) {
	try {
		if ($("#faq" + faqId).hasClass("selected")) {
			//-- hide answer
			$("#faq" + faqId).removeClass("selected");
			$("#faq" + faqId + " .question a").attr("title", "Click to view answer");
			$("#faq" + faqId + " .answer").slideUp("fast");
		} else {
			//-- comment next three lines to allow multiple open faqs
			$(".faqs li.selected .question a").attr("title", "Click to view answer");
			$(".faqs li.selected .answer").slideUp("fast");
			$(".faqs li.faq").removeClass("selected");
			//-- show answer
			$("#faq" + faqId).addClass("selected");
			$("#faq" + faqId + " .question a").attr("title", "Click to hide answer");
			$("#faq" + faqId + " .answer").slideDown("fast");
		}
	} catch (err) { }
	return false;
}

//-- Slideshow - Sliding
var slideshowPos = 0;
function slideshowInit() {
	var photos = $("div#sidebar-slideshow-outer .slideshow-thumb");
	setTimeout("slideshowNext(" + photos.length + ", '+=" + photos.eq(0).css("width") + "')", 10000);
}
function slideshowNext(numPhotos, amtScroll) {
	//-- since first/last photos are the same, we need
	//-- at least 3 images to make a slideshow
	if (numPhotos > 2) {
		slideshowPos++;
		if (slideshowPos >= numPhotos) {
			slideshowPos = 1;
			$("div#sidebar-slideshow-outer").scrollTo("0", 0, {duration: 0, axis: "x"});
		}
		$("div#sidebar-slideshow-outer").scrollTo(amtScroll, 0, {duration: 500, axis: "x"});
		slideshowInit();
	}
}
//-- Slideshow - Fading
var fadeshowArray, fadeshowPos = 0;
var fadeshowDelay = 8100, fadeshowFade = 1900;
function fadeshowInit() {
	fadeshowArray = $("div#sidebar-fadeshow-preload img");
	$("div#sidebar-fadeshow-outer").css("backgroundImage", "url(" + fadeshowArray.eq(fadeshowPos).attr("src") + ")");
	fadeshowPos++;
	fadeshowNext();
}
function fadeshowNext() {
	fadeshowPos = (fadeshowPos+1 > fadeshowArray.length ? 0 : fadeshowPos);
	$("div#sidebar-fadeshow-inner").css("display", "none");
	$("div#sidebar-fadeshow-inner").css("backgroundImage", "url(" + fadeshowArray.eq(fadeshowPos).attr("src") + ")");
	$("div#sidebar-fadeshow-inner").delay(fadeshowDelay).fadeIn(fadeshowFade);
	setTimeout("fadeshowInit()", (fadeshowDelay + fadeshowFade + 100));
}

$(document).ready(function(){
	$("a.colorbox, a.thickbox").each(function(){
		if (this.rel) {
			$("a[rel='" + this.rel + "']").colorbox();
		} else {
			$(this).colorbox();
		}
	});
	//-- the following makes colorbox work on iOS devices
	if (navigator.userAgent.match(/Mobile/i) && navigator.userAgent.match(/Safari/i)) {
		var ios_scrollTop = $(window).scrollTop() + 75;
		$(document).bind("cbox_load, cbox_complete", function(){
			var ios_scrollLeft = ($(document).width() - $(window).width()) / 2 - $(window).scrollLeft();
			if ($(window).scrollTop() <= 0) {
				window.scrollTo(0, 1);
			}
			$("#cboxOverlay").css({width:$(document).width(),height:$(document).height()});
			$("#colorbox").css("webkitTransition", "all .5s ease-in-out");
			$("#colorbox").css("webkitTransform", "translate(" + (ios_scrollLeft).toString() + "px, " + (ios_scrollTop).toString() + "px)");
		});
	}

	$("#nav li.navitem:last-child").addClass("nav-last");
	$("#nav li.navitem").has("ul").hover(
		function() {
			$(this).clearQueue();
			$(this).delay(250);
			$(this).queue(function(){
				$(this).addClass("hover");
				$(this).dequeue();
			});
		},
		function() {
			$(this).clearQueue();
			$(this).delay(250);
			$(this).queue(function(){
				$(this).removeClass("hover");
				$(this).dequeue();
			});
		}
	);
	//-- makes drop-down navigation work on iOS devices
	if (navigator.userAgent.match(/Mobile/i) && navigator.userAgent.match(/Safari/i)) {
		$(document).bind("touchmove", function(){
			$("#nav li.hover").mouseout();
		});
		$("#nav li.navitem").has("ul").unbind("mouseenter");
		$("#nav li.navitem").has("ul").children("a.navlink").click(function() {
			var parent = $(this).parent("li.navitem");
			if (parent.hasClass("hover")) {
				return true;
			}
			parent.clearQueue();
			parent.delay(250);
			parent.queue(function(){
				parent.addClass("hover");
				parent.dequeue();
			});
			return false;
		});
	}
	
	if ($("div#sidebar-slideshow").length) {
		slideshowInit();
	} else if ($("div#sidebar-fadeshow").length) {
		fadeshowInit();
	}

	//-- helps simulate text-shadow when used with IE7/8 css filters
	if ($.browser.msie) {
		if (/MSIE (7|8)\.0/i.test(window.navigator.userAgent)) {
			$("#top ul li a, #nav li ul li a, #content .pageTitle, #footer ul li a, #copyright, body.pg-links #content .left ul.categories li.selected a, body.pg-faq #content .faqs .category-title, body.pg-faq #content .faqs ul li .question, body.pg-magazine #content .magazine-listing .title a, body.pg-magazine #content .magazine-listing .preview-title, body.pg-magazine #content .magazine-details .details-subtitle, body.pg-articles #content .article-listing .title a, body.pg-events #content .event-details .details h3, body.pg-events #content .event-details .details h4, body.pg-events #content .event-details .details h5").each(function(){
				$(this).css({ "position":"relative", "z-index":"1" });
				var html = $(this).html();
				if (!$(this).hasClass("pageTitle") && (!$("body").hasClass("pg-links") || !$(this).hasClass("category-link"))) {
					html = html.replace(/\s+/g, "&nbsp;");
				}
				$(this).append("<span class='jQtextShadow'>" + html + "</span>");
			});
			$(".jQtextShadow").live("select", function(){ return false; });
		}
	}
});

