		
						   



$(document).ready(function() {
	
	

//Uniform - transfor the look of form select elements on our-work.php
$("select").uniform();



/*********
* JQuery Tools - Tool Tip 
*
*/

// initialize tooltip for our-work.php 
$(".trigger").tooltip({	
	
	relative: true,
	delay: 10,
	//offset: [0,0],
	position: 'center, left',
	offset: [30,90],
   // use the "slide" effect
   effect: 'slide'

});
	
	
	/*
	* Initial banner load
	
	$('.view-case-study').animate({
		opacity: 0
	  }, 100, function() {
		// Animation complete. 	
					
	  });
	  $('.scrollable').fadeTo(300, 0.0, function() {
      // Animation complete.

			$('.scrollable').fadeTo(1000, 1.0, function() {
			
			// Animation complete.
			$('.view-case-study').animate({
				opacity: 1.0
				
			  }, 300, function() {
				// Animation complete.
			  });
		  });
					
	  });			   
		
	*/					   
	//Banner scroller
	
	
	// custom easing called "custom"
	$.easing.custom = function (x, t, b, c, d) {
		var s = 1.70158; 
		if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
		return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
	}

	
	
	
	$("#banner .scrollable").scrollable({speed: 700, circular: true}).autoscroll({ autoplay: true, interval:10000 });
	
	
	/*Banner nav buttons rollovers*/					   
	$('.left-button,.right-button').append('<span class="hover"></span>').each(function () {
		var $span = $('> span.hover', this).css('opacity', 0);
		$(this).hover(function () {
			$span.stop().fadeTo(300, 1);
		}, function () {
	$span.stop().fadeTo(300, 0);
		});
	});
	
	
	//Banner "View Case Study" link				   
	$('.view-case-study').append('<span class="hover"></span>').each(function () {
		var $span = $('> span.hover', this).css('opacity', 0);
		$(this).hover(function () {
			$span.stop().fadeTo(300, 1);
		}, function () {
	$span.stop().fadeTo(300, 0);
		});
	});
	
	//Banner "more about us" link				   
	$('.more-about-us').append('<span class="hover"></span>').each(function () {
		var $span = $('> span.hover', this).css('opacity', 0);
		$(this).hover(function () {
			$span.stop().fadeTo(300, 1);
		}, function () {
	$span.stop().fadeTo(300, 0);
		});
	});
	
	
	/*
	* Banner nav button scroll control
	*/
	$('#right-button-banner, #left-button-banner').click(function() {
																  
			$('.overlay').slideToggle(500); 													  
  
	  $('#call-to-action').animate({
		opacity: 0
	  }, 100, function() {
		// Animation complete.
		
					
	  });
	  
	  $('#banner .scrollable').fadeTo(300, 0.0, function() {
      // Animation complete.
		
			$('#banner .scrollable').fadeTo(1000, 1.0, function() {
			
			
			
			// Animation complete.
			$('#call-to-action').animate({
				opacity: 1.0
				
			  }, 300, function() {
				// Animation complete.
				
			  });
			
			$('.overlay').slideToggle(1000);
			
		  });
					
	  });
	  
	    
	});
	
	
	
	/*
	* Testimonials
	*/
	
	$("#what-our-clients-are-saying .scrollable").scrollable({speed: 900, circular: true});
	$('#testimonial-prev, #testimonial-next').click(function() {
																  
																  
  
	  $('.testimonial').animate({
		opacity: 0
	  }, 100, function() {
		// Animation complete.
		
					
	  });
	  $('#what-our-clients-are-saying .scrollable').fadeTo(300, 0.0, function() {
      // Animation complete.
		
			$('#what-our-clients-are-saying .scrollable').fadeTo(1000, 1.0, function() {
			
			
			
			// Animation complete.
			$('.testimonial').animate({
				opacity: 1.0
				
			  }, 300, function() {
				// Animation complete.
				
			  });
			
			
			
		  });
					
	  });
	  
	    
	});
	
	
	//home services scroller
	$("#services-scroller .scrollable").scrollable({speed: 900, circular: true});
	
	
	//Services Read more				   
	$('.service-read-more').append('<span class="hover"></span>').each(function () {
		var $span = $('> span.hover', this).css('opacity', 0);
		$(this).hover(function () {
			$span.stop().fadeTo(300, 1);
		}, function () {
	$span.stop().fadeTo(300, 0);
		});
	});
	
	/*
	* Services Page Scroller
	*/
	$("#service-page-scroller .scrollable").scrollable({speed: 900, circular: true});
	
	$('#service-callout-prev, #service-callout-next').click(function() {
																  
																  
  
	  $('.service-callout').animate({
		opacity: 0
	  }, 300, function() {
		// Animation complete.
		
					
	  });
	  $('#service-page-scroller .scrollable').fadeTo(300, 0.0, function() {
      // Animation complete.
		
			$('#service-page-scroller .scrollable').fadeTo(300, 1.0, function() {
			
			
			
			// Animation complete.
			$('.service-callout').animate({
				opacity: 1.0
				
			  }, 300, function() {
				// Animation complete.
				
			  });
			
			
			
		  });
					
	  });
	  
	    
	});
	
	
	
	/*
	* Our Work 
	*/
	
	$("#our-work-scroller .scrollable").scrollable({speed: 300, circular: true});
	
	/*Our Work nav buttons rollovers*/					   
	$('#our-work-prev,#our-work-next').append('<span class="hover"></span>').each(function () {
		var $span = $('> span.hover', this).css('opacity', 0);
		$(this).hover(function () {
			$span.stop().fadeTo(300, 1);
		}, function () {
	$span.stop().fadeTo(300, 0);
		});
	});

/*
	$('#our-work-prev, #our-work-next').click(function() {
																  
																  
  
	 
	  $('#our-work-scroller .scrollable').fadeTo(100, 0.0, function() {
      // Animation complete.
		
			$('#our-work-scroller  .scrollable').fadeTo(300, 1.0, function() {
			
			
			
			
			
			
			
		  });
					
	  });
	  
	    
	});
	*/
	
	//Blog Newsletter subscribe button				   
	$('.newsletter-subscribe').append('<span class="hover"></span>').each(function () {
		var $span = $('> span.hover', this).css('opacity', 0);
		$(this).hover(function () {
			$span.stop().fadeTo(300, 1);
		}, function () {
	$span.stop().fadeTo(300, 0);
		});
	});
	
	
	
	
	
	
	/*banner nav button scroll control
	$('#right-button-banner, #left-button-banner').click(function() {
  
	  $('.view-case-study').animate({
		opacity: 0
	  }, 100, function() {
		// Animation complete. 	
					
	  });
	  $('div.scrollable').animate({
		opacity: 0
	  }, 300, function() {
		// Animation complete. 	
			$('div.scrollable').animate({
			opacity: 1.0
			
		  }, 1000, function() {
			// Animation complete.
			$('.view-case-study').animate({
				opacity: 1.0
				
			  }, 300, function() {
				// Animation complete.
			  });
		  });
					
	  });
	  
	    
	});*/
	
//contact form validation
$("#contact-form").validator();

/* Regular Expression to test whether the value is valid
$.tools.validator.fn("[type=name]", "Please complete this mandatory field.", function(input, value) { 

	
	return /^[^a-z-\'\\s]+\$/i.test(value);
});
*/



//our process
 $("#our-process-default").fadeIn("slow");
		
		$('#learn-link').mouseover(function() {
		  $('#our-process-default').fadeOut('fast');
		  $('#our-process-strategy').fadeOut('fast');
		  $('#our-process-plan').fadeOut('fast');
		  
		   $('#our-process-concept').fadeOut('fast');
		    $('#our-process-design').fadeOut('fast');
			 $('#our-process-build').fadeOut('fast');
			 
			  $('#our-process-maintain').fadeOut('fast');
			   $('#our-process-measure').fadeOut('fast');
			    $('#our-process-market').fadeOut('fast');
				
		  $('#our-process-learn').fadeIn('slow', function() {
			// Animation complete
		  });
		});
		
		$('#strategy-link').mouseover(function() {
		  $('#our-process-default').fadeOut('fast');
		  $('#our-process-learn').fadeOut('fast');
		  $('#our-process-plan').fadeOut('fast');
		  
		   $('#our-process-concept').fadeOut('fast');
		    $('#our-process-design').fadeOut('fast');
			 $('#our-process-build').fadeOut('fast');
			 
			  $('#our-process-maintain').fadeOut('fast');
			   $('#our-process-measure').fadeOut('fast');
			    $('#our-process-market').fadeOut('fast');
				
		  $('#our-process-strategy').fadeIn('slow', function() {
			// Animation complete
		  });
		});
		
		$('#plan-link').mouseover(function() {
		  $('#our-process-default').fadeOut('fast');
		  $('#our-process-learn').fadeOut('fast');
		  $('#our-process-strategy').fadeOut('fast');
		  
		   $('#our-process-concept').fadeOut('fast');
		    $('#our-process-design').fadeOut('fast');
			 $('#our-process-build').fadeOut('fast');
			 
			  $('#our-process-maintain').fadeOut('fast');
			   $('#our-process-measure').fadeOut('fast');
			    $('#our-process-market').fadeOut('fast');
				
		  $('#our-process-plan').fadeIn('slow', function() {
			// Animation complete
		  });
		});
		
		
		$('#concept-link').mouseover(function() {
		  $('#our-process-default').fadeOut('fast');
		  $('#our-process-learn').fadeOut('fast');
		  $('#our-process-strategy').fadeOut('fast');
		  
		   $('#our-process-plan').fadeOut('fast');
		    $('#our-process-design').fadeOut('fast');
			 $('#our-process-build').fadeOut('fast');
			 
			  $('#our-process-maintain').fadeOut('fast');
			   $('#our-process-measure').fadeOut('fast');
			    $('#our-process-market').fadeOut('fast');
				
		  $('#our-process-concept').fadeIn('slow', function() {
			// Animation complete
		  });
		});
		
		$('#design-link').mouseover(function() {
		  $('#our-process-default').fadeOut('fast');
		  $('#our-process-learn').fadeOut('fast');
		  $('#our-process-strategy').fadeOut('fast');
		  
		   $('#our-process-concept').fadeOut('fast');
		    $('#our-process-plan').fadeOut('fast');
			 $('#our-process-build').fadeOut('fast');
			 
			  $('#our-process-maintain').fadeOut('fast');
			   $('#our-process-measure').fadeOut('fast');
			    $('#our-process-market').fadeOut('fast');
				
		  $('#our-process-design').fadeIn('slow', function() {
			// Animation complete
		  });
		});
		
		$('#build-link').mouseover(function() {
		  $('#our-process-default').fadeOut('fast');
		  $('#our-process-learn').fadeOut('fast');
		  $('#our-process-strategy').fadeOut('fast');
		  
		   $('#our-process-concept').fadeOut('fast');
		    $('#our-process-design').fadeOut('fast');
			 $('#our-process-plan').fadeOut('fast');
			 
			  $('#our-process-maintain').fadeOut('fast');
			   $('#our-process-measure').fadeOut('fast');
			    $('#our-process-market').fadeOut('fast');
				
		  $('#our-process-build').fadeIn('slow', function() {
			// Animation complete
		  });
		});
		
		$('#maintain-link').mouseover(function() {
		  $('#our-process-default').fadeOut('fast');
		  $('#our-process-learn').fadeOut('fast');
		  $('#our-process-strategy').fadeOut('fast');
		  
		   $('#our-process-concept').fadeOut('fast');
		    $('#our-process-design').fadeOut('fast');
			 $('#our-process-build').fadeOut('fast');
			 
			  $('#our-process-plan').fadeOut('fast');
			   $('#our-process-measure').fadeOut('fast');
			    $('#our-process-market').fadeOut('fast');
				
		  $('#our-process-maintain').fadeIn('slow', function() {
			// Animation complete
		  });
		});
		
		$('#measure-link').mouseover(function() {
		  $('#our-process-default').fadeOut('fast');
		  $('#our-process-learn').fadeOut('fast');
		  $('#our-process-strategy').fadeOut('fast');
		  
		   $('#our-process-concept').fadeOut('fast');
		    $('#our-process-design').fadeOut('fast');
			 $('#our-process-build').fadeOut('fast');
			 
			  $('#our-process-maintain').fadeOut('fast');
			   $('#our-process-plan').fadeOut('fast');
			    $('#our-process-market').fadeOut('fast');
				
		  $('#our-process-measure').fadeIn('slow', function() {
			// Animation complete
		  });
		});
		
		$('#market-link').mouseover(function() {
		  $('#our-process-default').fadeOut('fast');
		  $('#our-process-learn').fadeOut('fast');
		  $('#our-process-strategy').fadeOut('fast');
		  
		   $('#our-process-concept').fadeOut('fast');
		    $('#our-process-design').fadeOut('fast');
			 $('#our-process-build').fadeOut('fast');
			 
			  $('#our-process-maintain').fadeOut('fast');
			   $('#our-process-measure').fadeOut('fast');
			    $('#our-process-plan').fadeOut('fast');
				
		  $('#our-process-market').fadeIn('slow', function() {
			// Animation complete
		  });
		});
		

});
