
	$(document).ready(function(){
	
	$("#homeMPU a:first").addClass("active");
	$("#homeMPU a").everyTime(10000, function(i) {
		var $active = $('#homeMPU .active');
		var $next = ($('#homeMPU .active').next().length > 0) ? $('#homeMPU .active').next() : $('#homeMPU a:first'); 
		$active.fadeOut(function() {
			 $active.removeClass('active');
			 $next.fadeIn().addClass('active');
		});
	});
	
	$("#homeOverseas a:first").addClass("active");
	$("#homeOverseas a").everyTime(10000, function(i) {
		var $active = $('#homeOverseas .active');
		var $next = ($('#homeOverseas .active').next().length > 0) ? $('#homeOverseas .active').next() : $('#homeOverseas a:first'); 
		$active.fadeOut(function() {
			 $active.removeClass('active');
			 $next.fadeIn().addClass('active');
		});
	});

	$("#homeEPC a:first").addClass("active");
	$("#homeEPC a").everyTime(10000, function(i) {
		var $active = $('#homeEPC .active');
		var $next = ($('#homeEPC .active').next().length > 0) ? $('#homeEPC .active').next() : $('#homeEPC a:first'); 
		$active.fadeOut(function() {
			 $active.removeClass('active');
			 $next.fadeIn().addClass('active');
		});
	});
	
	$("#homeRLB a:first").addClass("active");
	$("#homeRLB a").everyTime(10000, function(i) {
		var $active = $('#homeRLB .active');
		var $next = ($('#homeRLB .active').next().length > 0) ? $('#homeRLB .active').next() : $('#homeRLB a:first'); 
		$active.fadeOut(function() {
			 $active.removeClass('active');
			 $next.fadeIn().addClass('active');
		});
	});
	
	$("#homeDevs a:first").addClass("active");
	$("#homeDevs a").everyTime(10000, function(i) {
		var $active = $('#homeDevs .active');
		var $next = ($('#homeDevs .active').next().length > 0) ? $('#homeDevs .active').next() : $('#homeDevs a:first'); 
		$active.fadeOut(function() {
			 $active.removeClass('active');
			 $next.fadeIn().addClass('active');
		});
	});

	$("#homeMortgages a:first").addClass("active");
	$("#homeMortgages a").everyTime(10000, function(i) {
		var $active = $('#homeMortgages .active');
		var $next = ($('#homeMortgages .active').next().length > 0) ? $('#homeMortgages .active').next() : $('#homeMortgages a:first'); 
		$active.fadeOut(function() {
			 $active.removeClass('active');
			 $next.fadeIn().addClass('active');
		});
	});

	$('#slides1Wrapper').ppFeatureSlider({
		controller : ".sliderController",
		slidesWrapper : ".slides",
		slideWrapper : ".slide",
		selectedWrapper: ".slideSelected",
		paginationWrapper: ".pagination",
		paginationSelected: ".selected",
		infoPane: '.details',
		infoMode: 'static',
		autoCentre: false,
		drag: true
	});
});
