$(document).ready(function() {
	
	Cufon.replace('.thin');
	
	adjustFooter();	
	$(window).resize(adjustFooter);
	
	$('#printPage').click(function() {
		window.print();
		return false;
	});
	
	var addmore = '<span class="readmore2">&nbsp;<span class="smaller">&nbsp;</span></span> <span class="readmore">&nbsp;&nbspmore&nbsp;<span class="smaller">&#9660;</span>&nbsp;</span><span class="readless">&nbsp;&nbspless&nbsp;<span class="smaller">&#9650;</span>&nbsp;</span>';
	
	/*$('.helpvt-article').append('<p><a href="#" class="bordered close-article">Close</a></p>');*/
	
	$('h2.helpvt').append(addmore)
	.hover(
		function() { 
			$(this).addClass('helpvt-over'); 
			if ( $(this).hasClass('h2on') ) {
				$(this).contents('.readless').show();
			} else {
				$(this).contents('.readmore').show();
			}			
		},
		function() { 
			$(this).removeClass('helpvt-over'); 
			$(this).contents('.readmore').hide();
			$(this).contents('.readless').hide();
			
	}).click(function() {
		$(this).next('.helpvt-article').slideToggle();
		$(this).toggleClass('h2on');
			if ( $(this).hasClass('h2on') ) {
				$(this).contents('.readless').show();
				$(this).contents('.readmore').hide();
			} else {
				$(this).contents('.readless').hide();
				$(this).contents('.readmore').show();
			}		
	});
	
	$('.close-article').click(function() {
		$(this).closest('.helpvt-article').slideToggle().siblings('.helpvt').toggleClass('h2on');
		return false;
	});
	
});

function adjustFooter() {
/*
	var wH = $(window).height();
	var bH = $('body').height();
	
	if(wH > bH) {
		$('footer').css({position: 'fixed', bottom: 0});	
	}
	else {
		$('footer').css({position: 'relative', bottom: ''});
	}
*/
}
