
	$(document).ready(function(){
	
		$("#prev").animate({
				opacity:.4
		},200);
		
		$("#next").animate({
				opacity:.4
		},200);
		
		$("#pause").animate({
				opacity:.4
		},200);
		
		$(".clients").animate({
				opacity:.6
		},200);
		
		$(".clients").hover(function() {
			$(this).animate({
				fontSize:16,
				opacity:1
			},200);
		}, function() {
			$(this).animate({
				fontSize:13,
				opacity:.6
			},200);
		});

				
		$("#portleft img:gt(0)").hide();
				
		$("#tooltip").hide();
		
		$("#portmore").hide();
		
		$("#bottomlogo img").hover(function() {
		
			$("#tooltip").fadeIn(200);
			
		}, function() {
			
			$("#tooltip").fadeOut(200);
			
		});
		
		$("#learnmore").toggle(
		
			function() {
				
				$("#portmore").slideDown();
				
			},
			function() {
				
				$("#portmore").slideUp();
				
			}
		);
		
		$("#pause").toggle(
		
			function() {
				
				swap('images/slider/play.jpg','pauseimg');
				$('#slider').cycle('pause');
				
			},
			function() {
				
				swap('images/slider/pause.jpg','pauseimg');
				$('#slider').cycle('resume');
				
			}
		);
		
		$(".thumb").click(function() {
		
			$(".thumb").find("img").css({ 'border' : '2px solid #d0d0d0'});
			
			$(this).find("img").css({ 'border' : '2px solid #f8a636'});
		
		});
		
		$('#slider').cycle({ 
			fx:     'scrollLeft', 
			timeout:  9000,
			next: "#next",
			prev: "#prev",
			speed:300
		});
		
		$("#prev").hover(function() {
			$(this).animate({
				opacity:1
			},200);
		}, function() {
			$(this).animate({
				opacity:.4
			},200);
		});
		
		$("#next").hover(function() {
			$(this).animate({
				opacity:1
			},200);
		}, function() {
			$(this).animate({
				opacity:.4
			},200);
		});
		
		$("#pause").hover(function() {
			$(this).animate({
				opacity:1
			},200);
		}, function() {
			$(this).animate({
				opacity:.4
			},200);
		});
		
		$(".landing_thumb").hover(function() {
			$(this).animate({
				opacity:.7
			},200);
		}, function() {
			$(this).animate({
				opacity:1
			},200);
		});		
		
	});
	
	function scrollTo(id){
		$('html, body').animate({
		scrollTop: $(id).offset().top
		}, 1000);
	}
	
	function swap(src,id) {
	
		document.getElementById(id).src = src;	
		
	}

