$(document).ready(function() {

	$('.more, .callout').each(function() {
		$(this).wrapInner('<span class="w1"><span class="w2"><span class="w3"><span class="w4"></span></span></span></span>');
		$('.w4',this).prepend('<span class="w4-1"></span>');
		$('p:last-child',this).addClass('last');
	});

	$('hr').wrap('<div class="hr"></div>');

	$('.testimonial p').prepend('<img src="/_img/lyt/qmark.gif" style="float: left; margin: 3px 10px 0 1px" />');

	$('#nav-secondary li').hover(
		function(){ $(this).addClass('hover'); $(this).siblings('li').removeClass('hover'); },
		function(){ $(this).removeClass('hover'); }
	);
	$('body').click(function() {
		$('#nav li').removeClass('hover');
	});

	// forms
	$('legend').each( function() {
		val = $(this).html();
		$(this).after('<h4 class="legend">' + val + '</h4>');
		$(this).html('');
	});

	$('input:text,input:password,textarea').not(':hidden').wrap('<div class="txtfield"></div>');
	$('select').wrap('<div class="optfield"></div>');
	$('.toggleset').wrapInner('<div class="toggleset-w"></div>');
	$('.toggle').wrap('<div class="toggle-w"></div>');
	
	$('p:last-child, div:last-child').addClass('last');

});