$(window).ready(
	function(){
		
//		if (!$.browser.msie){
				$('.menu li li li a').hover(
				function(){
					$(this).parents('.drop').find('a.drop').filter(':first').addClass('dropthis');
				},
				
				function(){
				  	$(this).parents('.drop').find('a.drop').filter(':first').removeClass('dropthis');
				});
//		}
	
	
	
		if ($('.bc div').html() == '&nbsp;') {
				$('.bc div').html('');
				$('.bar').css('top', '155px');


		}
		
		$("#content table tr:nth-child(odd)").addClass("odd");

		$("#content table tr:nth-child(even)").addClass("even");
		
		$('.footnote').html('<p class="btn"></p><p class="info" style="display:none;">'+$('.footnote').html() +'</p>');
		
		$('img.inlinepic').each(
			function(){
				
				$(this).wrap("<div class='inlinepic'></div");
				if ($.trim($(this).attr('alt')) != '')	$(this).after("<span>"+$(this).attr('alt')+"</span>");
			}					  
		);
		
		$('img.bodypic').each(
			function(){
				
				$(this).wrap("<div class='bodypic'></div");
				if ($.trim($(this).attr('alt')) != '')	$(this).after("<span>"+$(this).attr('alt')+"</span>");
			}					  
		);
	
		$('img.topimage').each(
			function(){
				
				$('h2').before($(this).clone());
				$(this).remove();
			}
		);
		
		
			$('.footnote p.btn').bind('click', function(){
				
				
											 
				if ($('.footnote .info').css('display') == 'none'){
					$('.footnote .info').show(300);	
				} else {
					$('.footnote .info').hide(300);
				}
				return false;
			});
	}
	
	
);


function font(id){
	$('.font').css('display', 'block');
	//$('#font'+id).css('display', 'none');
	$('#content').removeClass($('#content').attr('class'));
	$('#content').addClass('font'+id);
}

function printit(){
	
	
		printerwin=window.open('','printer','height=500,width=750,status=0,toolbar=0,resizable=1,scrollbars=1');
		var tmp = printerwin.document
		tmp.write('<html><head><title>Printing</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8" />');
		tmp.write('</head><body>');
		tmp.write('<div id="bodyprinter" style="padding:5px 20px;">' + $('#content').html() + '<div>');
		tmp.write('</body></html>');
		tmp.close();
		printerwin.focus();
		printerwin.print();
		
		

}
