$(document).ready(function(){
		var origHeight = $("#content-small").height();
		var origWidth = 348;
		var LorigHeight = $("#content-large").height();
		var LorigWidth = 448;
		var name = "#floatmenu";
		var menuYloc = 200; 
		var offset = menuYloc+$(document).scrollTop()+"px";
		
		$("#content-hide").hide();
		$("#content-holder", this).stop().animate({opacity: 0.5},0);
		
	$("#CloseContent").click(function(){ 
									  
		$(".content-text").animate({opacity: 0},600);
		$("#content-small").delay(600).animate({height: 0, width: 0, opacity: 0}, 1000);
		$("#content-small").hide(10);
		$("#content-hide").delay(600).show(1000);
		$(name).animate({top:offset},{duration:800,queue:false});
		
	}); 
	
	$("#ShowContent").click(function(){ 
									 
		$("#content-hide").hide(500);
		$("#content-small").show();
		$("#content-small").animate({height: origHeight, width: origWidth, opacity: 1, backgroundColor: '#ffffff'}, 900);
		$(".content-text").delay(900).animate({opacity: 1,},500);
		$(".content-text").animate({backgroundColor: '#ffffff'}, 1);
		
	});
	
	$("#CloseContentLarge").click(function(){ 
										   
		$(".content-text").animate({opacity:0},600);
		$("#content-large").delay(600).animate({height: 0, width: 0, opacity:0}, 1000);
		$("#content-large").hide(10);
		$("#content-hide").delay(600).show(1000);
		$(name).animate({top:offset},{duration:800,queue:false});
		
	}); 
	
	$("#ShowContentLarge").click(function(){ 
										  
		$("#content-hide").hide(500);
		$("#content-large").show();
		$("#content-large").animate({height: LorigHeight, width: LorigWidth, opacity: 1, backgroundColor: '#ffffff'}, 900);
		$(".content-text").delay(900).animate({opacity:1,},500);
		$(".content-text").animate({backgroundColor: '#ffffff'}, 1);
		
	});
	
	$('#slideshow').cycle({
		fx: 'scrollHorz',
		timeout: 0,
		next:   '#gallery-right', 
    	prev:   '#gallery-left'
	});
	
	$(window).scroll(function () {
    var offset = menuYloc+$(document).scrollTop()+"px";
	$(name).animate({top:offset},{duration:800,queue:false});
	}); 

}); 
