 $(document).ready(function(){
   $("#accordion").accordion({ 
		clearStyle: false, 
		autoHeight: true,
		animated: false,
		alwaysOpen: false,
		active: false
	});
	
	$("#accordion").click(function() {
		blur();
	});
		 
	$("#coverbox img").css({ 
		opacity: "0.25" 
	});	 
	
	$("#coverbox img").each(function(){
		$(this).jHelperTip({
			trigger: "hover",
			dC: $(this).parent("a").next(".buy"),
			opacity: "0.85"
		});
	});				
	
	$("#coverbox img").mouseover(function() {
		$(this).animate({
			bottom: "15px", 
			paddingLeft: "5px", 
			paddingRight: "5px",
			opacity: "1.0"
		});
	});
	
	$("#coverbox img").mouseout(function() {
		$(this).animate({
			bottom: "0px", 
			paddingLeft: "0px", 
			paddingRight: "0px",
			opacity: "0.25"
		});
	});
	
	$("#up").click(function() {
		$("#coverbox").animate({ scrollTop: 0 }, 1000);
		$("#up").hide();
		$("#down").show();
	});
	
	$("#down").click(function() {
		var divOffset = $('#coverbox').offset().top;
		var pOffset = $('#coverbox .row:eq(2)').offset().top;
		var pScroll = pOffset - divOffset;
		$("#coverbox").animate({ scrollTop: '+=' + pScroll + 'px' }, 1000);
		$("#up").show();
		$("#down").hide();
	});
								 
	createThumbnails('caricature');
	createThumbnails('illustration');
	createThumbnails('book');
	createThumbnails('sketches');
	createThumbnails('otherarts');
	   
	showRandomInitImage();
 });