// This is the website specific javascript file, anything that is site specific gets put in here

$(function() {
	$(".datepicker").datepicker({dateFormat: 'dd/mm/yy',minDate: 0});
	$('#s1').cycle();
	$('.hide').hide();
 	$('.minimizer').click(function(){
 		var $t = $(this);
 		if ($t.attr('src') == '/assets/img/icon_min.jpg') {
 			
 			$t.attr('src','/assets/img/icon_max.jpg');
 			$t.parent().parent().parent().parent().animate({paddingTop:154},400);
 			$t.parent().parent().parent().find('.whitebox_mid').slideUp();
 		}
 		else {
 			$t.attr('src','/assets/img/icon_min.jpg');
 			$t.parent().parent().parent().parent().animate({paddingTop:0},400);
 			$t.parent().parent().parent().find('.whitebox_mid').slideDown();

 		}
 	
 	});
	$('.minimizer').click();
 	$('.faqsec .textright a').click(function() {
 		$t = $(this);
 		$t.parent().slideUp();
 		$t.parent().parent().children('p').slideDown();
 		return false;
 	});
 	
 	
 	$('h1').each(function() {
 		var $t = $(this);
 		var $after = $t.next();
 		var $afterafter = $after.next();
 		$after.next();
 		
 		
 		if ($after.hasClass('font3') && $after.hasClass('textright') && $afterafter.hasClass('hide')) {
 			$after.click(function() {
 				$afterafter.slideToggle();
 				toggleButton();
 				return false;
 			});
 			$t.click(function() {
 				$afterafter.slideToggle();
 				toggleButton();
 				return false;
 			});
 			
 			function toggleButton() {
 				if ($after.html() == 'hide')
 					$after.html('view');
				else
 					$after.html('hide');	
 			}
 		}
 	
 	});
});
