
/* ====================================================
General Site variables script
==================================================== */

pagelink		= document.location
pagename		= document.title
siteUrl		= 'www.template.com'
developer		= 'John Mounsey'
developerurl	= 'www.peaknet.ltd.uk'
defaultStatus	= siteUrl
mailTitle		= siteUrl + ' - ' + pagename + ' : ' + pagelink

var capDefault	= '';



/* Set position of left menu "marker" on page load */

function setMarker(pos)

{
document.getElementById('marker').style.top=pos;
}



/* Hide (anything with a unique ID) */

function jHide(obj)

{
document.getElementById(obj).className = 'off';
}




/* Show (anything with a unique ID) */

function jShow(obj)

{
document.getElementById(obj).className = 'on';
}




/* Caption a photo on Gallery section */

function photoCap(msg)

{
document.getElementById('caption').innerText = msg;
}



/* Previous Page ... */

function previous() { history.go(-1); }

/* Display Page Title ... */

function title() { document.write(document.title); }


/* ====================================================
Print Today's DATE function - Y2K + Netscape friendly
==================================================== */

var months=new Array(13);

months[1]	= "January";
months[2]	= "February";
months[3]	= "March";
months[4]	= "April";
months[5]	= "May";
months[6]	= "June";
months[7]	= "July";
months[8]	= "August";
months[9]	= "September";
months[10]	= "October";
months[11]	= "November";
months[12]	= "December";

var time=new Date();
var lmonth=months[time.getMonth() + 1];
var date=time.getDate();
var year=time.getYear();
if (year < 2000)
year = year + 1900;

function today() { document.write(lmonth + " " + date); }



/* Loaded Page actions ... */

function loaded(currentPage)
{
document.alert(currentPage);
}

/* Hide "Loading" message ... */

function hideLoad()

{
document.getElementById('loading')
loading.style.display='none';
}



function go(place)
	{
	top.location = place;
	}



/* Fancybox trigger ... */

$(document).ready(function() {

	/* This is basic - uses default settings */
	
	$("a#single_image").fancybox();
	
	/* Using custom settings */
	
	$("a#inline").fancybox({
		'hideOnContentClick': true
	});

	/* Apply fancybox to multiple items */
	
	$("a.group").fancybox({
		'transitionIn'	:	'zoom',
		'transitionOut'	:	'zoom',
		'titlePosition'	:	'over',
		'speedIn'		:	500, 
		'speedOut'		:	200, 
		'overlayShow'	:	true,
		
		'onComplete'	:	function()
		
		{
		$("#fancybox-wrap").hover(function()
			{
			$("#fancybox-title").show();
			}, function()
			{
			$("#fancybox-title").hide();
			});
		}
	});	
});
