/**
 *
 *	Datlabs.co.uk JavaScript
 *
 *	@library: jQuery
 *
 *	@copyright 2008 Datlabs\Phil Thompson
 *	@edited 27/11/2008 Phil Thompson
 */
 
 
function clickableArea(value){
	$(value).each(function(){
		/* grab first link */
		var link = $(this).find('a:first').attr('href');
		if(link.length == 0){
			return;	
		}
		/* Click sends user to the linked page */
		$(this).click(function(){
			window.location.href = link;
		});
		
		/* Hover affects */
		$(this).hover(
			function(){
				$(this).addClass('hover');
			},
			function(){
				$(this).removeClass('hover');
			}
		);
	});
}

/**
 *
 *
 */
function pullQuotes(){
	$('em.pullquote').each(function(){
		var text = $(this).html();
		$(this).before(text);
	});
}
 
 
/* document.ready :: AKA: onload */
$(document).ready(function(){
	clickableArea('.clickable');
	pullQuotes();
});