
	$(document).ready(function(){
	
		$("#testmnext").animate({
				opacity:.4
		},200);
		
		$("#testmprev").animate({
				opacity:.4
		},200);
		
		
		
		$(".subnav").hide();
		
		$("#portleft img:gt(0)").hide();
				
		$("#tooltip").hide();
		
		$("#portmore").hide();
		
		$("#bottomlogo img").hover(function() {
		
			$("#tooltip").fadeIn(200);
			
		}, function() {
			
			$("#tooltip").fadeOut(200);
			
		});
		
		$(".mainav").hover(function() {
			
			if($(".subnav:animated"))
				$(".subnav").slideUp(10);
			
			$(this).find(".subnav").slideDown(250);
			
		}, function() {
			
			$(this).find(".subnav").slideUp(250);
			
		});
		
		$("#learnmore").toggle(
		
			function() {
				
				$("#portmore").slideDown();
				
			},
			function() {
				
				$("#portmore").slideUp();
				
			}
		);
		
		$(".thumb").click(function() {
		
			$(".thumb").find("img").css({ 'border' : '2px solid #d0d0d0'});
			
			$(this).find("img").css({ 'border' : '2px solid #f8a636'});
		
		});
		
		$('#slider').cycle({ 
			fx:     'fade', 
			timeout:  8000,
			speed:1000
		});
		
		$('#testimonials').cycle({ 
			fx:     'scrollLeft', 
			timeout:  9000,
			next: "#testmnext",
			prev: "#testmprev",
			speed:600
		});
		
		$("#testmnext").hover(function() {
			$(this).animate({
				opacity:1
			},10);
		}, function() {
			$(this).animate({
				opacity:.4
			},10);
		});
		
		$("#testmprev").hover(function() {
			$(this).animate({
				opacity:1
			},10);
		}, function() {
			$(this).animate({
				opacity:.4
			},10);
		});
		
		$(".landing_thumb").hover(function() {
			$(this).animate({
				opacity:.7
			},200);
		}, function() {
			$(this).animate({
				opacity:1
			},200);
		});
		
		$('#accordion:eq(0) > li ul').hide();
				
		$('#accordion:eq(0) > li a').click(function() {
			
			if($(this).next().is(":visible")) {
			
				$(this).next().slideUp();
							
			} else {
							
				$('#accordion:visible > li ul').slideUp('fast');
				
				$(this).next().slideToggle('fast');
														
			}
			
			var cur = $(this).attr("title");
				
			if(cur.indexOf("Health Screenings") != -1)
				return false;
			if(cur == "Wellness")
				return false;
								
		});		
		
	});
	
	function scrollTo(id){
		$('html, body').animate({
		scrollTop: $(id).offset().top
		}, 1000);
	}
	
	function swap(src,id) {
	
		document.getElementById(id).src = src;	
		
	}

