$(function() {
	//Slideshow setup
	$("#gallery").cycle({
		fx: 'fade',
		timeout: 5000
	});
	
	//jQuery Lightbox
	$(".slideShow").lightBox({
		imageLoading: 'assets/images/lightbox/lightbox-ico-loading.gif',
		imageBtnClose: 'assets/images/lightbox/lightbox-btn-close.gif',
		imageBtnPrev: 'assets/images/lightbox/lightbox-btn-prev.gif',
		imageBtnNext: 'assets/images/lightbox/lightbox-btn-next.gif'
	});
	
	//Open PDFs in a different window
	$('a').each(function(){
		if( $(this).attr('href') != "" ) {
			var href = $(this).attr('href');
			if(href.indexOf('.pdf') != -1){
				$(this).click(function(){
					window.open(this.href);
					return false;
				});
			}
		} else {
			return false;
		}
	});
	
	// Required
	jQuery(".fieldArea.required label").append('<span class="fieldRequiredMark">*</span>');
	
}); 
