$(document).ready(function() {

	/* Set all links prefixed http:// as external links and to be opened in new tab/window */
	$('a[href^="http://"]').addClass('external').attr('target', '_blank');

	/* This would make links tagged rel="external" open in new window */
	/*
	$('a').each(function(current) {
		if ($(this).attr('rel') == 'external' || $(this).attr('href') ) {
			$(this).attr('target','_blank');
		}
	});
	*/

	/* Rockplayer */
	$('#trigger_rockplayer').click(function() {
		var rockplayer_url = $('#trigger_rockplayer').attr('href');
		window.open(rockplayer_url,'_blank','scrollbars=no,resizable=no,width=400,height=200');
		return false;
	});

	/* Past gigs panel */
	$('#past_gigs').hide();	
	$('#trigger_past_gigs').click(function() {
		$('#past_gigs').toggle();
		return false;
	});

	
	/* Photo gallery Fancybox */
	$('a.gallery_photo').fancybox({
		'hideOnContentClick': true,
		'zoomSpeedIn': 300,
		'zoomSpeedOut': 300, 
		'overlayShow': false
	});
	

});

function rockplayer() {
}

function validateGuestbookForm(form) {
	var reply = '';
	if (form.f1.value != '') {
		reply = 'You must fill in all fields, ' + form.f1.value + '!'; 
	} else {
		reply = 'You must fill in all fields.';
	}
	if (form.f1.value != '' && form.f2.value != '' && form.f3.value != '') {
		return true;
	} else {
		alert(reply);
		return false;
	}
}