$(document).ready(function(){
		
		function contentIteration(){
			var color = $('a.selected').css('background-color');
			$('h2').css('background-color',color);
			$('#lhs blockquote').css('background-color',color);
			$('#lhs span').css('background-color',color);
			$('#special').css('border-color',color);
		}
		
		$('div#module:has(h4:contains("International Services"))').find('.wp-caption').css({'float':'none','margin':'0px auto 20px auto'});
		$('.doitnow').parent('.wp-caption').css({'float':'none','margin':'0px auto 20px auto'});

		
		function randomTweaks(){
			$('#lhs ul#subnav li:first-child').css('border-top','none');
			//$('#content ul#contact:first-child').css('text-align', 'center');
			$('#content ul#contact + ul#contact + ul#contact').css('padding','0px 0px 20px 10px');
			$('#content blockquote').append('<span></span>');
		}
				
		
		
		function logoHover(){
			$('#header h1').hover(function(){
				if($.browser.msie) {
					$(this).prev().children('em').css('background-color','#b3ad9b');
					$(this).prev().children('em').fadeIn(500);
				} else {
					$(this).prev().children('em').fadeIn(500);
				}
			}, function(){
				$(this).prev().children('em').fadeOut(500);
			});
		}
		
		
		function scrollThere(){
			$('a[href*=#]').click(function() {
				if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
				&& location.hostname == this.hostname) {
					var $target = $(this.hash);
					$target = $target.length && $target
					|| $('[name=' + this.hash.slice(1) +']');
					if ($target.length) {
						var targetOffset = $target.offset().top;
						$('html,body')
						.animate({scrollTop: targetOffset}, 1000);
						return false;
					}
				}
			});
		}
		
		if($.browser.msie && parseInt(jQuery.browser.version) == 6){
			$('html').css({'background-image':'none'});	
			$('#lhs blockquote').css({'background-image':'url(/wp-content/themes/gooch/images/logo-punch.gif)'});
			$('h2').css({'background-image':'url(/wp-content/themes/gooch/images/page-title-bg.gif)'});
			$('ul#nav li a').css({'border':'none'});
			$('#header div span').css({'background-image':'url(/wp-content/themes/gooch/images/logo.gif)'});
			$('#header div span em').css({'background-image':'url(/wp-content/themes/gooch/images/logo-shadow.gif)'});
		}
		
		if($.browser.msie && parseInt(jQuery.browser.version) == 7){
			$('#header div span em').css({'background-image':'url(/wp-content/themes/gooch/images/logo-shadow.gif)'});
		}
		
contentIteration();
randomTweaks();
logoHover();
scrollThere();
});
