$(document).ready(function(){			
  $('#newsletterSubmit').attr('value', '');
	$('#newsletter').focus(function(){if (this.value == 'Enter your email address'){this.value = '';}});
	$('#newsletter').blur(function(){if (this.value == ''){this.value = 'Enter your email address';}});  
  
	  $("#categoryposts-4").click(function(){    
		$("#categoryposts-4").mouseover(function() {
		  $('#categoryposts-4 ul li').css("cursor","hand");
		  }).mouseout(function(){
		  $('#categoryposts-4 ul li').css("cursor","default");
		});
		window.location = '/news-and-events';
		return false;
	  });
	
	
	
	// Remove double arrows from breadcrumbs
	// Updated by Ben Lacey, 11th November 2011
	// Check to see that the breadcrumb trail exists before trying to do a find and replace.
	if( $('#breadcrumbs').length ){
		//remove empty breadcrumbs
		$('#breadcrumbs a').each(function(index) {
			if ($(this).text() == '') {
				$(this).remove();
			}
		});
		
		$('#breadcrumbs').html($('#breadcrumbs').html().replace('\u00BB\u0020\u0020\u00BB', '\u00BB'));
	}
	
	$("a[rel='lightbox']").colorbox();
		$('a.contact').attr('href', '#dialog');
		$('a.contact').colorbox({inline:true, width:330, height:460});
		$('a.contact').click(function(){
		$('input#contactName').attr('value', $(this).attr('title'));
		$('input#recipient').attr('value', $(this).attr('email'));
		$('#dialog').show();
	});
	$(document).bind('cbox_closed', function(){
    $('#dialog').hide();
	});
});
