$(document).ready(function(){
	setTimeout("$('#newsletter').fadeIn(2000)", 1000);

	var fader = $('#photos');
	if(fader) {
		$(fader).cycle('fade');
	}

	var lb = $('.lightbox');
	if(lb) {
		$(lb).lightBox({
			fixedNavigation:true,
			imageBtnPrev: '/resources/3rdparty/lightbox/images/lightbox-btn-prev.gif',
			imageBtnNext: '/resources/3rdparty/lightbox/images/lightbox-btn-next.gif',
			imageBtnClose: '/resources/3rdparty/lightbox/images/lightbox-btn-close.gif',
			imageLoading: '/resources/3rdparty/lightbox/images/lightbox-ico-loading.gif'
		});
	}

	$('.blurtext').focus(function() {
		if($(this).attr('value') == $(this).attr('title')) {
			$(this).attr('value', '');
		}
	});

	$('.blurtext').blur(function() {
		if($(this).attr('value') == '') {
			$(this).attr('value', $(this).attr('title'));
		}
	});

	$(function() {
		$("input.date").datepicker();
	});


  var eventcalendar = $('#eventcalendar');

  if(eventcalendar) {
    $('#eventcalendar').fullCalendar({

    	events: "/includes/json-music.php",

    	loading: function(bool) {
    		if (bool) $('#loading').show();
    		else $('#loading').hide();
    	}

    });
  }


});

function hideDiv() {
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById('newsletter').style.visibility = 'hidden';
	}
	else {
		if (document.layers) { // Netscape 4
			document.hideShow.visibility = 'hidden';
		}
		else { // IE 4
			document.all.hideShow.style.visibility = 'hidden';
		}
	}
}
