$(function() {

	// Select all links with cycle class
	$('.cycle').cycle({
		delay: 0,
		timeout: 10000,
		speed: 1000,
		fx: 'scrollRight'
	});
	
	$('a.lightbox').lightBox(); // Select all links with lightbox class
	
	$('.columnize').columnize({
		columns: 3
	})

	$('.jqmWindow').jqm();
	
	$("#gallery").awShowcase({
        content_width:  		560,
        content_height: 		300,
		buttons:				false,
		btn_numbers:			false,
		thumbnails:				true,
		show_caption:			'onhover', /* onload/onhover/show */
		thumbnails_position:	'outside-last', /* outside-last/outside-first/inside-last/inside-first */
		thumbnails_direction:	'horizontal', /* vertical/horizontal */
		thumbnails_slidex:		1, /* 0 = auto / 1 = slide one thumbnail / 2 = slide two thumbnails / etc. */
		dynamic_height:			false,
		speed_change:			true,
		viewline:				false
	});
	
	// fix mailto spam bot filter
	$('a').each(function() {
		var url = $(this).attr('href');
		url = url.replace('###', '@');
		var text = $(this).html();
		text = text.replace('###', '@');		
		$(this).attr('href', url);
		$(this).html(text);
	}); 
  
});
