﻿//this file is for anything that can be used on multiple pages.
$(function() {
//	var currentFile = window.location.pathname.replace('^.*/(?<fileName>[^/]+).aspx?(\?.*)?', "").replace('/', '');

//	//adds '.background-color-fff' to any of the files in the array below
//	if ($.inArray(currentFile, [
//		'advertise.aspx',
//		'contact.aspx',
//		'subscribe.aspx'
//	]) != -1) {
//		$('#bd').addClass('background-color-fff').removeClass('large-in-the-margin');
//	}

	//controls the display of defualt text in form fields
	$('.has-default-text').focus(function(srcc) {
		if ($(this).val() == $(this)[0].title) {
			$(this).removeClass('default-text');
			$(this).val('');
		}
	});

	$('.has-default-text').blur(function() {
		if ($(this).val() == '') {
			$(this).addClass('default-text');
			$(this).val($(this)[0].title);
		}
	});

	// fires the 'blur' event to populate the default text
	// on load... this is probably stupid but I don't care
	// Joey G. The Hit Man
	$('.has-default-text').blur().addClass('default-text');
});
