$(document).ready( function(){ 
/* InnerFade on homepage*/
	$('#testimonialsRotate').innerfade({ 
		animationtype: 'fade',
		speed: 1000, 
		timeout: 5500, 
		type: 'random_start',
		containerheight: '305px' 
	});
	$('#largefeatures').innerfade({ 
		animationtype: 'fade',
		speed: 1000, 
		timeout: 4500, 
		type: 'random_start',
		containerheight: '150px' 
	}); 	

/* Last class on account nav */
	$('ul#account li:last-child').addClass('last');
	
/* Labelify */
	$("#newsletter input:text").labelify();	

}); 

/* Datepickers for Quote Form - from */
$(function() {
	$('.datefrom input').datepicker({
 		onSelect: function() {}, // This is to fix problem where cal stays open in IE because of conflict with .net validator
		showOn: 'both', 
		buttonImage: 'http://www.lcsparking.com/media/images/calendar.png', 
		buttonImageOnly: true,
		dateFormat: 'dd/mm/yy',
		yearRange: '1',
		maxDate: +365,
		minDate: 0,
		numberOfMonths: 3,
		showAnim: '',
		duration: 'fast'		
	});
	if($('.datefrom input').val() == "") { // if value is empty. insert default date.
		var currentTime = new Date()
		var day = currentTime.getDate()
		var month = currentTime.getMonth() + 1
		var year = currentTime.getFullYear()
		var TodayDate = day + "/" + month + "/" + year
		$(".datefrom input").val(TodayDate);
	}
	else {
		return;
	}
}); 


/* Datepicker for Quote Form - to */
$(function() {
	$('.dateto input').datepicker({
 		onSelect: function() {}, // This is to fix problem where cal stays open in IE because of conflict with .net validator
		showOn: 'both', 
		buttonImage: 'http://www.lcsparking.com/media/images/calendar.png', 
		buttonImageOnly: true,							
 		dateFormat: 'dd/mm/yy',
		yearRange: '1',
		maxDate: +365,
		minDate: +1,
		numberOfMonths: 3,
		showAnim: '',
		duration: 'fast'		
	});
	if($('.dateto input').val() == "") { // if value is empty. insert default date.
		var currentTime = new Date()
		currentTime.setDate(currentTime.getDate()+7)
		var day = currentTime.getDate()
		var month = currentTime.getMonth()+1
		var year = currentTime.getFullYear()
		var TodayDate = day + "/" + month + "/" + year
		$(".dateto input").val(TodayDate);
	}
	else {
		return;
	}
});

$(document).ready( function(){ 
	$("img.ui-datepicker-trigger").attr({ 
          title: "Click here to show selectable calendar.",
          alt: ""
	});
});

/* Facebox popup */
jQuery(document).ready(function($) {
  $('a[rel*=facebox]').facebox()
}) 




