 $(document).ready(function(){

  $('#logo').click(function(){
	  window.location.href = 'index.php';
	});
 
  $('#navlinks .navlinkwrapper').click(function(){
		var id = $(this).attr('id');
		var navlink = id+'.php';
	  window.location.href = navlink;
	});

  $('#navlinks .navlinkwrapper').hover(
		function(){
			var id = $(this).attr('id');
			$('#'+id+'-link a').css({
			color: '#e2e2e2'
			});
		},
		function(){
			var id = $(this).attr('id');
			$('#'+id+'-link a').css({
			color: '#ffffff'
			});
		}
	);

  $('#navlinks .navlinkwrapper-active').click(function(){
		var id = $(this).attr('id');
		var navlink = id+'.php';
	  window.location.href = navlink;
	});

	
$('#casestudy').click(function(){
	  window.location.href = 'gallery.php';
	});

  $('#casestudy').hover(
		function(){

			$('#casestudy h6 a').css({
			color: '#cff29c'
			});
		},
		function(){
			$('#casestudy h6 a').css({
			color: '#ffffff'
			});
		}
	);

$('#callnow').click(function(){
	  window.location.href = 'contact.php';
	});

  $('#callnow').hover(
		function(){

			$('#callnow h3 a').css({
			color: '#95E16A'
			});
		},
		function(){
			$('#callnow h3 a').css({
			color: '#cff29c'
			});
		}
	);
			
	$('.service-nuggit').click(function(){
		var id = $(this).attr('id');
		var navlink = id+'-services.php';
	  window.location.href = navlink;
	});

  $('.service-nuggit').hover(
		function(){
			var id = $(this).attr('id');
			$('#'+id+' h2 a').css({
			color: '#6a6a6a'
			});
		},
		function(){
			var id = $(this).attr('id');
			$('#'+id+' h2 a').css({
			color: '#404040'
			});
		}
	); 
  $('a.service-gallery').click(function(){
  		var id = $(this).attr('id');
	  	$('.gallery').fadeOut();
			$('#'+id+'-wrap').fadeIn('slow');
			$('#'+id+'-fullsize img:first').fadeIn('slow');
			$('a.service-gallery').css({
				color: '#666666'
			});
			$('#'+id).css({
				color: '#333333'
			});
	});	
	
	$('img.thumb-image').click(function(){
		var id = $(this).attr('id');	
		$('.main-image').fadeOut('fast');
 		$('#'+id+'-lg').fadeIn('slow');		
 	});
 	
 	
});


