// JavaScript Document
Cufon.replace('.symbol,.percent,.span,.faq h2,#sidebar h2,.slider h3,div.privacy,.fullw h2,.fullw h1,.fullw h3,.fullw h4,.fullw h5'); // Works without a selector engine
//Cufon.replace('#sub1'); // Requires a selector engine for IE 6-7, see above





$(document).ready(function() {
	if ($('div.seenOn').length) {
		$("div.seenOn").smoothDivScroll({
			autoScroll:'always',
			autoScrollDirection:'endlessloop'
		});
	}

	$('input[name=fields_email]').each(function() {
		$(this).val('Insert Email Address Here').attr('color', $(this).css('color'));
	}).focus(function() {
		if (($(this).val() == 'Insert Email Address Here') || ($(this).val() == 'Invalid Email Address'))
		{
			$(this).val('').css({
				color:$(this).attr('color'),
				fontWeight:'normal'
			});
		}
	}).blur(function() {
		if (!$(this).val()) //if (!$(this).val().match(/.*?\@.*?\..*/))
		{
			$(this).val('Insert Email Address Here').css({
				color:$(this).attr('color'),
				fontWeight:'normal'
			});
		}
	}).parents('form').submit(function() {
		if (!$(this).find('input[name=fields_email]').val().match(/.*?\@.*?\..*/))
		{
			$(this).find('input[name=fields_email]').blur().val('Invalid Email Address').animate({
				color:'#ff0000',
				fontWeight:'bold'
			}, 250, 'linear', function() {
				$(this).animate({
					color:'#800000'
				}, 250, 'linear', function() {
					$(this).animate({
						color:'#ff0000'
					}, 250, 'linear');
				});
			});
			return false;
		}
	});
});
