/*
	File Type:  JavaScript
	File:       localScripts.js
	Purpose:    Provides scripts for 'local' html pages
	Date:       18 May 2009
	Author:     P G Swain
*/

// jquery Scripts
// ==============

// Enable form fields using the jquery onload function.  The following 'onload' function can default to
// $(function()
//  {
//    code
//  });
//  To toggle a target’s disabled status use "$('#target').attr("disabled", true);" to disable the target and
//		"$('#target').attr("disabled", false);"
//	or
//		"$('#target')..removeAttr("disabled")
//	to remove the disabled status.
//  In this case the form's fields are already disabled and we want to enable them if javaScript is enabled in the browser.

$(document).ready(function()
{
	$(':disabled').attr("disabled", false);
		
	/* fancybox - This is basic - uses default settings */
	
	$("a#single_image").fancybox({
		'transitionIn'			:	'elastic',
		'transitionOut'			:	'elastic',
		'speedIn'				:	600,
		'speedOut'				:	200,
		'showCloseButton'		:	true,
		'titlePosition' 		:	'over',
		'overlayShow'			:	false
	});
	
	/* Using custom settings */
	
	$("a#inline").fancybox({
		'hideOnContentClick': true
	});

	/* Apply fancybox to multiple items */
	
	$("a.fancy_images").fancybox({
		'transitionIn'			:	'elastic',
		'transitionOut'			:	'elastic',
		'speedIn'				:	600, 
		'speedOut'				:	200, 
		'showCloseButton'		:	true,
		'titlePosition'			:	'over', 
		'overlayShow'			:	false,
		'hideOnContentClick'	:	true,
		'showNavArrows'			:	true,
		'cyclic'				:	true
	});
	
});
