
jQuery(document).ready(function(){
	
	////
	// add '_blank' to external links
	//
		$('a[href^="http://"]:not([href*="'+location.hostname+'"])').each(function() {
		var orgTitle = $(this).attr("title");		$(this).attr({title: orgTitle+" External Link"});
		 //$(this).attr({target: "_blank", title: orgTitle+" [new window]"});
		 //$(this).append('<img class="out" src="pixels/out-arrow.png" alt="opens in a new window" width="7" height="7" />');
		 });
	
	////
	// add 'target="_blank"' to links to PDFs
	//
		$('a[href$=".pdf"]').each(function()
		{
			$(this).attr({target: "_blank"});
			$(this).addClass('pdf');
		});  
	////
	// form validation
	//
		$("#eoiform form").validate({
		  rules: {
		    eoifirstname: {
		      required: true,
		      minlength: 2
		    }}
		});



	$('.columns2').columnize({ columns: 2 });
	
	
	
	
	/////
	// more text for speakers etc.
	//
	$('.sspot .more').before('<a class="morebtn" href="#" title="View more.">more &rang;</a>').append('<a class="lessbtn" href="#" title="hide">&uarr; hide</a>') .hide();
	
	
	//// more button
	$('.morebtn').click(function(event) {
		event.preventDefault();
		$(this).hide().next('.more').slideDown('fast');
	});
	//// less button - hide more
	$('.lessbtn').click(function(event) {
		event.preventDefault();
		$(this).parent('.more').slideUp('fast').prev('.morebtn').show();
	});

});

