$(document).ready( function(){ 
/* InnerFade on homepage*/
	$('#testimonialsRotate').innerfade({ 
		animationtype: 'fade',
		speed: 1000, 
		timeout: 5500, 
		type: 'random_start',
		containerheight: '275px' 
	});
	$('#largefeatures').innerfade({ 
		animationtype: 'fade',
		speed: 1000, 
		timeout: 4500, 
		type: 'random_start',
		containerheight: '150px' 
	}); 	
}); 

/* Datepickers for Quote Form - from */
$(function() {
	$('#ctl08_datefrom').datepicker({
 		onSelect: function() {}, // This is to fix problem where cal stays open in IE because of conflict with .net validator
		showOn: 'both', 
		buttonImage: 'media/images/calendar.png', 
		buttonImageOnly: true,
		dateFormat: 'dd/mm/yy',
		yearRange: '1',
		maxDate: +365,
		minDate: 0,
		numberOfMonths: 3
	});
	var currentTime = new Date()
	var day = currentTime.getDate()
	var month = currentTime.getMonth() + 1
	var year = currentTime.getFullYear()
	var TodayDate = day + "/" + month + "/" + year
	$("#ctl08_datefrom").val(TodayDate);
}); 


/* Datepicker for Quote Form - to */
$(function() {
	$('#ctl08_dateto').datepicker({
 		onSelect: function() {}, // This is to fix problem where cal stays open in IE because of conflict with .net validator
		showOn: 'both', 
		buttonImage: 'media/images/calendar.png', 
		buttonImageOnly: true,							
 		dateFormat: 'dd/mm/yy',
		yearRange: '1',
		maxDate: +365,
		minDate: +1,
		numberOfMonths: 3
	});
	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
	$("#ctl08_dateto").val(TodayDate);
});

$(document).ready( function(){ 
	$("img.ui-datepicker-trigger").attr({ 
          title: "Click here to show selectable calendar.",
          alt: ""
	});
});

/* Label for Datepickers 
$(document).ready(function() {
	$("input:text").labelify({labelledClass: "formlabel"});
});
*/

///* Validation for Quote Form Dates */
//$(document).ready(function() {
//	$("#form").validate({
//		rules: { 
//			ctl08$datefrom: {
//					required: true
//			},
//			ctl08$dateto: {
//					required: true
//			}
//        }, 
//        messages: { 
//            ctl08$datefrom: { 
//                required: "Required", 
//            }, 
//            ctl08$dateto: { 
//                required: "Required", 
//            }			
//        }, 
//        // set this class to error-labels to indicate valid fields 
//        success: function(label) { 
//            // set   as text for IE 
//            label.html(" ").addClass("checked"); 
//        } 
//	});
//});

/* Facebox popup */
jQuery(document).ready(function($) {
  $('a[rel*=facebox]').facebox()
}) 



