$(function(){
	$('body :first-child').addClass('firstChild');
	$('body :last-child').addClass('lastChild');
	$('body :empty').addClass('empty');
	$('body :only-child').removeClass('firstChild');
	$('body :only-child').removeClass('lastChild');
	$('body :only-child').addClass('onlyChild');
	$(".pageTop a").click(function(){
		$('html,body').animate({ scrollTop: $($(this).attr("href")).offset().top }, 'slow','swing');
		return false;
	})
	$('a img').hover(function(){
		$(this).attr('src', $(this).attr('src').replace('_ro', '_ro_f2'));
			}, function(){
				 if (!$(this).hasClass('currentPage')) {
				 $(this).attr('src', $(this).attr('src').replace('_ro_f2', '_ro'));
		}
	});
	$('#catList li').flatHeights();
	$('#catList li:nth-child(3n)').after('<br class="clear">');
	window.onload = function(){
		document.getElementById("historyBack").onclick = function(){history.back()};
	}
});
