$(document).ready(function(){
	$('body').pngFix(); // IE6 and below
	//  Initialize Backgound Stretcher	   
	$(document).bgStretcher({
		images: ['images/background.jpg'],
		imageWidth: 1440, imageHeight: 900,
		resizeProportionally: false
	});
	$("a[rel='cover1']").colorbox({opacity:"0.4"});
	$("a[rel='cover2']").colorbox({opacity:"0.4"});
	$("a[rel='cover3']").colorbox({opacity:"0.4"});
	$("a[rel='cover4']").colorbox({opacity:"0.4"});
	$("a[rel='cover5']").colorbox({opacity:"0.4"});
	// Bottom four gallery
	$("a[rel='click1']").colorbox({opacity:"0.4"});
	// banner fade sequence
	$('ul#img_rotate').innerfade({
		speed: 1500,
		timeout: 5000,
		type: 'sequence',
		containerheight: '251px'
	});
});

// Function for handling contact form submissions
function vdc_show_contact()
{
	// Initiate ajax variable
	var ax_call = '';
	
	// Ensure no cache of ajax call and set global timeout
	$.ajaxSetup ({   
		cache: false,
		timeout: 5000
	});
			
	// Set url without arguments
	var url = root_url+'/forms/process.php';
	
	// Set ajax loader image and text
	var ajax_load = '<div style="position:relative;top:0px;left:145px;width:100px;height:60px;color:#8a1863;font-weight:bold;"><img style="margin:0px 0px 5px 26px;" src="../images/loader.gif" alt="Please wait.." /><br />Please wait..</div>';

	// Over write passed arguments if any
	args = $("form").serialize();

	// Set loader
	$("#ajax").html(ajax_load);
	
	// Make ajax call
	ax_call = $.ajax({
		type: 'POST',
		url: url,
		data: args,
		success: function(data){
			$("#ajax").html(data);
		}
	});
}
