$(document).ready(function(){

	setTimeout(function(){$('.tagline').fadeTo(600, 0.7); }, 0);


	$(".fNav1").addClass('urh');


    $(".fNav1").click(function(){
     $("#feature1").fadeIn(500); //fade in the feature image
	 $(".tagline").hide(); //hide tagline before we fade it in
	 $(".fNav1").addClass('urh'); // apply class for green border on nav btn
	 $(".fNav2").removeClass('urh'); //remove other green lines
	 $(".fNav3").removeClass('urh'); // "
	 $(".fNav4").removeClass('urh'); // "
	 $(".fNav5").removeClass('urh'); // "
	$(".fNav6").removeClass('urh'); // "
	 setTimeout(function(){ $('.tagline').fadeIn(600); }, 500); //have a small delay before the tagline fades in
	 $(".tagline .tagline2").hide(); // hide it before we can fade it in
	 setTimeout(function(){ $('.tagline .tagline2').fadeIn(1000); }, 1300); //have a small delay before the tagline fades in
	 $("#feature2, #feature3, #feature4, #feature5, #feature6").hide(); //hide all other divs
	 
	 setTimeout(function(){ window.location = 'services.php?id=1'; }, 1700);
	 
	 num=1000
	 return false
    })

	$(".fNav2").click(function(){
     $("#feature2").fadeIn(500); //fade in the feature image
	 $(".tagline").hide(); //hide tagline before we fade it in
	 $(".fNav2").addClass('urh'); // apply class for green border on nav btn
	 $(".fNav1").removeClass('urh'); //remove other green lines
	 $(".fNav3").removeClass('urh'); // "
	 $(".fNav4").removeClass('urh'); // "
	 $(".fNav5").removeClass('urh'); // "
	 $(".fNav6").removeClass('urh'); // "
	 setTimeout(function(){ $('.tagline').fadeIn(600); }, 500); //have a small delay before the tagline fades in
	 $(".tagline .tagline2").hide(); // hide it before we can fade it in
	 setTimeout(function(){ $('.tagline .tagline2').fadeIn(1000); }, 1300); //have a small delay before the tagline fades in
	 $("#feature1, #feature3, #feature4, #feature5, #feature6").hide(); //hide all other divs

	 setTimeout(function(){ window.location = 'services.php?id=2'; }, 1700);

	 num=1000
	 return false
    })

	$(".fNav3").click(function(){
     $("#feature3").fadeIn(500); //fade in the feature image
	 $(".tagline").hide(); //hide tagline before we fade it in
	 $(".fNav3").addClass('urh'); // apply class for green border on nav btn
	 $(".fNav1").removeClass('urh'); //remove other green lines
	 $(".fNav2").removeClass('urh'); // "
	 $(".fNav4").removeClass('urh'); // "
	 $(".fNav5").removeClass('urh'); // "
	 $(".fNav6").removeClass('urh'); // "
	 setTimeout(function(){ $('.tagline').fadeIn(600); }, 500); //have a small delay before the tagline fades in
	 $(".tagline .tagline2").hide(); // hide it before we can fade it in
	 setTimeout(function(){ $('.tagline .tagline2').fadeIn(1000); }, 1300); //have a small delay before the tagline fades in
	 $("#feature1, #feature2, #feature4, #feature5, #feature6").hide(); //hide all other divs

	 setTimeout(function(){ window.location = 'services.php?id=3'; }, 1700);

	 num=1000
	 return false
    })

	$(".fNav4").click(function(){
     $("#feature4").fadeIn(500); //fade in the feature image
	 $(".tagline").hide(); //hide tagline before we fade it in
	 $(".fNav4").addClass('urh'); // apply class for green border on nav btn
	 $(".fNav1").removeClass('urh'); //remove other green lines
	 $(".fNav2").removeClass('urh'); // "
	 $(".fNav3").removeClass('urh'); // "
	 $(".fNav5").removeClass('urh'); // "
	$(".fNav6").removeClass('urh'); // "
	 setTimeout(function(){ $('.tagline').fadeIn(600); }, 500); //have a small delay before the tagline fades in
	 $(".tagline .tagline2").hide(); // hide it before we can fade it in
	 setTimeout(function(){ $('.tagline .tagline2').fadeIn(1000); }, 1300); //have a small delay before the tagline fades in
	 $("#feature1, #feature2, #feature3, #feature5, #feature6").hide(); //hide all other divs

	 setTimeout(function(){ window.location = 'services.php?id=4'; }, 1700);

	 num=1000
	 return false
    })

	$(".fNav5").click(function(){
     $("#feature5").fadeIn(500); //fade in the feature image
	 $(".tagline").hide(); //hide tagline before we fade it in
	 $(".fNav5").addClass('urh'); // apply class for green border on nav btn
	 $(".fNav1").removeClass('urh'); //remove other green lines
	 $(".fNav2").removeClass('urh'); // "
	 $(".fNav3").removeClass('urh'); // "
	 $(".fNav4").removeClass('urh'); // "
	$(".fNav6").removeClass('urh'); // "
	 setTimeout(function(){ $('.tagline').fadeIn(600); }, 500); //have a small delay before the tagline fades in
	 $(".tagline .tagline2").hide(); // hide it before we can fade it in
	 setTimeout(function(){ $('.tagline .tagline2').fadeIn(1000); }, 1300); //have a small delay before the tagline fades in
	 $("#feature1, #feature2, #feature3, #feature4, #feature6").hide(); //hide all other divs

	 setTimeout(function(){ window.location = 'services.php?id=5'; }, 1700);

	 num=1000
	 return false
    })

	$(".fNav6").click(function(){
     $("#feature6").fadeIn(500); //fade in the feature image
	 $(".tagline").hide(); //hide tagline before we fade it in
	 $(".fNav6").addClass('urh'); // apply class for green border on nav btn
	 $(".fNav1").removeClass('urh'); //remove other green lines
	 $(".fNav2").removeClass('urh'); // "
	 $(".fNav3").removeClass('urh'); // "
	 $(".fNav4").removeClass('urh'); // "
	 $(".fNav5").removeClass('urh'); // "
	 setTimeout(function(){ $('.tagline').fadeIn(600); }, 500); //have a small delay before the tagline fades in
	 $(".tagline .tagline2").hide(); // hide it before we can fade it in
	 setTimeout(function(){ $('.tagline .tagline2').fadeIn(1000); }, 1300); //have a small delay before the tagline fades in
	 $("#feature1, #feature2, #feature3, #feature4, #feature5").hide(); //hide all other divs

	 setTimeout(function(){ window.location = 'services.php?id=6'; }, 1700);

	 num=1000
	 return false
    })

	


});


var num = 1;

function start_show() { //this function is to start the function, put the on the body tag
	// Time is in seconds X 1000
	var abc = setInterval("slideshow()", 7000); //7000
}

function slideshow() {
num++;
	if (num==1) {

	 $("#feature1").fadeIn(500); //fade in the feature image
	 $(".tagline").hide(); //hide tagline before we fade it in
	 $(".fNav1").addClass('urh'); // apply class for green border on nav btn
	 $(".fNav2").removeClass('urh'); // "
	 $(".fNav3").removeClass('urh'); // "
	 $(".fNav4").removeClass('urh'); // "
	 $(".fNav5").removeClass('urh'); // "
	 $(".fNav6").removeClass('urh'); // "
	 setTimeout(function(){ $('.tagline').fadeIn(600); }, 500); //have a small delay before the tagline fades in
	 $(".tagline .tagline2").hide(); // hide it before we can fade it in
	 setTimeout(function(){ $('.tagline .tagline2').fadeIn(1000); }, 1300); //have a small delay before the tagline fades in
	 $("#feature2, #feature3, #feature4, #feature5, #feature6").hide(); //hide all other divs

	}else if (num==2){

	 $("#feature2").fadeIn(500); //fade in the feature image
	 $(".tagline").hide(); //hide tagline before we fade it in
	 $(".fNav2").addClass('urh'); // apply class for green border on nav btn
	 $(".fNav1").removeClass('urh'); // "
	 $(".fNav3").removeClass('urh'); // "
	 $(".fNav4").removeClass('urh'); // "
	 $(".fNav5").removeClass('urh'); // "
	 $(".fNav6").removeClass('urh'); // "
	 setTimeout(function(){ $('.tagline').fadeIn(600); }, 500); //have a small delay before the tagline fades in
	 $(".tagline .tagline2").hide(); // hide it before we can fade it in
	 setTimeout(function(){ $('.tagline .tagline2').fadeIn(1000); }, 1300); //have a small delay before the tagline fades in
	 $("#feature1, #feature3, #feature4, #feature5, #feature6").hide(); //hide all other divs

	}else if (num==3){

	 $("#feature3").fadeIn(500); //fade in the feature image
	 $(".tagline").hide(); //hide tagline before we fade it in
	 $(".fNav3").addClass('urh'); // apply class for green border on nav btn
	 $(".fNav1").removeClass('urh'); // "
	 $(".fNav2").removeClass('urh'); // "
	 $(".fNav4").removeClass('urh'); // "
	 $(".fNav5").removeClass('urh'); // "
	$(".fNav6").removeClass('urh'); // "
	 setTimeout(function(){ $('.tagline').fadeIn(600); }, 500); //have a small delay before the tagline fades in
	 $(".tagline .tagline2").hide(); // hide it before we can fade it in
	 setTimeout(function(){ $('.tagline .tagline2').fadeIn(1000); }, 1300); //have a small delay before the tagline fades in
	 $("#feature1, #feature2, #feature4, #feature5, #feature6").hide(); //hide all other divs
	 

	}else if (num==4){

	 $("#feature4").fadeIn(500); //fade in the feature image
	 $(".tagline").hide(); //hide tagline before we fade it in
	 $(".fNav4").addClass('urh'); // apply class for green border on nav btn
	 $(".fNav1").removeClass('urh'); // "
	 $(".fNav2").removeClass('urh'); // "
	 $(".fNav3").removeClass('urh'); // "
	 $(".fNav5").removeClass('urh'); // "
	 $(".fNav6").removeClass('urh'); // "
	 setTimeout(function(){ $('.tagline').fadeIn(600); }, 500); //have a small delay before the tagline fades in
	 $(".tagline .tagline2").hide(); // hide it before we can fade it in
	 setTimeout(function(){ $('.tagline .tagline2').fadeIn(1000); }, 1300); //have a small delay before the tagline fades in
	 $("#feature1, #feature2, #feature3, #feature5, #feature6").hide(); //hide all other divs

	}else if (num==5){

	 $("#feature5").fadeIn(500); //fade in the feature image
	 $(".tagline").hide(); //hide tagline before we fade it in
	 $(".fNav5").addClass('urh'); // apply class for green border on nav btn
	 $(".fNav1").removeClass('urh'); // "
	 $(".fNav2").removeClass('urh'); // "
	 $(".fNav3").removeClass('urh'); // "
	 $(".fNav4").removeClass('urh'); // "
	 $(".fNav6").removeClass('urh'); // "
	 setTimeout(function(){ $('.tagline').fadeIn(600); }, 500); //have a small delay before the tagline fades in
	 $(".tagline .tagline2").hide(); // hide it before we can fade it in
	 setTimeout(function(){ $('.tagline .tagline2').fadeIn(1000); }, 1300); //have a small delay before the tagline fades in
	 $("#feature1, #feature2, #feature3, #feature4, #feature6").hide(); //hide all other divs

		}else if (num==6){

	 $("#feature6").fadeIn(500); //fade in the feature image
	 $(".tagline").hide(); //hide tagline before we fade it in
	 $(".fNav6").addClass('urh'); // apply class for green border on nav btn
	 $(".fNav1").removeClass('urh'); // "
	 $(".fNav2").removeClass('urh'); // "
	 $(".fNav4").removeClass('urh'); // "
	 $(".fNav5").removeClass('urh'); // "
	$(".fNav3").removeClass('urh'); // "
	 setTimeout(function(){ $('.tagline').fadeIn(600); }, 500); //have a small delay before the tagline fades in
	 $(".tagline .tagline2").hide(); // hide it before we can fade it in
	 setTimeout(function(){ $('.tagline .tagline2').fadeIn(1000); }, 1300); //have a small delay before the tagline fades in
	 $("#feature1, #feature2, #feature4, #feature5, #feature3").hide(); //hide all other divs

	
	
	num=0;
	}

}
