$(function() {
	
		// hide all elements which will be dynamically displayed
		$('.piclinkind a').css('display','none');
		$('.piclinkind .desc').hide();
		
		// show the titles (hidden by default so that if no js we get the main boxes only)
		$('.piclinkind .title').show();
		
		// set the link boxes to hide the title and show the description when hovered over
		$('.piclinkind').hover(function () {
    		$('.title',this).hide();
			$('.desc',this).show();
			
  		}, 
  		function () {
    		$('.desc',this).hide();
			$('.title',this).show();
  		}
		);
		
		// turn the whole of the link boxes into a link, using the embedded (hidden) link
		$('.piclinkind').click(function(){
			var linklocation = $("a", this).attr('href');
			window.location = linklocation;
		})	
		
	})
