// JavaScript Document by Steward Godwin Jornsen - 26 Aug 2011, 2:52pm


   $(document).ready(function(){
       $('a[rel*=facebox]').facebox();
	   $('a[rel*=lightbox]').lightBox();
	   $('a[rel*=colorbox]').colorbox({slideshow:true});
	   $('a[rel*=colorboxSlideshow]').colorbox({slideshow:true, transition:'elastic', speed:500, slideshowSpeed:5000, title:function(){return $(this).attr('title')}});
	  
	//Cycle through Services and Operations  
	  $('#circlethis').cycle({
				fx: 'scrollLeft',
				speed: 1000,
				timeout: 15000,
				height:270,
				pager:'#slidenav',
				easing:'easeInOutBack',
					pause:		   1,	  // true to enable "pause on hover"
	pauseOnPagerHover: 1 // true to pause when hovering over pager link
			});
	  
	  n=0;
	  h3originalh = 0;
	  $('.news3col ol li').each(function(){
			var h = $(this).height();
			var h3 = $(this).find('h3');
			var h3h = h3.height();
			
			if( h > n){
				n = h;
			}
			
			if(h3h > h3originalh){
				h3originalh = h3h;
			}
			
		$(this).height(n);
		h3.height(h3originalh);
			//console.log(n);						
		}).filter(':first').css('border', '0px none #FFF');
	  	 
		
		$('.news3col ol li').each(function(){
			var h = $(this).height();
			
			if( h > n){
				n = h;
			}
		$(this).height(n);
			//console.log(n);						
		}).filter(':first').css('border', 'none')
		  
		  
	  
	  //Make footer list item same height...
	  n = 0;
	  $('#footer ol li').each(function(){
			var h = $(this).height();
			
			if( h > n){
				n = h;
			}
		$(this).height(n);
			//console.log(n);						
		}).filter(':last').css('border', 'none');
	  	  $('.news3col ol li').each(function(){
			var h = $(this).height();
			
			if( h > n){
				n = h;
			}
		$(this).height(n);
			//console.log(n);						
		})//.filter(':last').css('border', 'none');
		  
	$('.button').button();
	$('.NavigationMenu li ol').css('opacity', 0.9).hide();  
	 $('.NavigationMenu li').hover(function(){
					$this = $(this);
					$this.not('ol li').addClass('menuover');
					$this.find('ol').stop(true, true).slideDown('fast');
					
				}, function(){
					$this = $(this);
					$this.not('ol li').removeClass('menuover');
					$this.find('ol').slideUp('slow');
					});
	$('#gallery ul li a img').css({minWidth:'100px', minHeight:'100px'});
	
	function saythis(words){
	if($('#x')) {$('#x').remove(); }
	$("body").append( "<div id='x'>"+words+"</div>");
	$('#x').dialog({title:'Error Processing Download'});
	return false;
}
	
	  
    })


