jQuery(function($)
{
	// nospam mailto replacements
	$('.email').nospam({filterLevel:'low'});
	$('.rtext').nospam({filterLevel:'low',replaceText:true});

	//

	// IE6 png fix (apply to all png images)
	//mh line below was giving error changed to below that w/ quotes 
	//$('img[src$=.png], input[src$=.png], .dotted-rule').ifixpng();
	$('img[src$=".png"], input[src$=".png"], .dotted-rule').ifixpng();
	//

	// enables two column scrolling
	$('<div></div>').addClass('clear').appendTo('.scroll-content');

	//

	// adds vertical rule between columns
	if ($('.col-left').length && $('.col-right').length) 
	{
		if ($('#scroll').length) $('<div></div>').addClass('col-rule').insertBefore('#scroll');
		else $('<div></div>').addClass('col-rule').insertAfter('.content h1');
	}
	
	if ($('.col-short-left').length && $('.col-wide-right').length)
	{
		if ($('#scroll').length) $('<div></div>').addClass('col-short-rule').insertBefore('#scroll');
		else $('<div></div>').addClass('col-short-rule').insertAfter('.content h1');
	}

	if ($('.col-wide-left').length && $('.col-short-right').length) 
	{
		if ($('#scroll').length) $('<div></div>').addClass('col-wide-rule').insertAfter('#scroll');
		else $('<div></div>').addClass('col-wide-rule').insertAfter('.content h1');	
	}

	//

	// only cover and fade out if NOT in the process of a form submission
	if (location.href.indexOf('f=1') < 0)
	{
		// clone bg images then fade out to reveal content
		$('.content-bg').clone().addClass('content-mask').appendTo($('.body-container')).animate({marginTop:0},500).fadeOut(1500);
		$('.highlight-bg').clone().addClass('content-mask').appendTo($('.body-container')).animate({marginTop:0},500).fadeOut(1500);
	}

	// show content area
	$('.content').css('display','block');

	// set custom scroll bars (init flexcroll after showing content area)
	CSBfleXcroll('scroll');

	//

	// highlight image rotation
	$('.highlight-bg').cycle({slideExpr:'img'});
});
