$ (document) .ready(function() {
	$("#first").corner("tl");
	$("#last").corner("tr");	
	
	//Accordian on Projects pages
	$(function() {
		$("#accordion").accordion({
			header: 'h4',
			collapsible: true,
			active: false,
			autoHeight: false
		});
	});
	
	//Toggle
	//Hide all divs with class of "toggle"
	$(".toggle").hide();
	var showText='More Info';
	var hideText='Less Info';
	
	//Toggle to show when "toggle_link" is clicked
	$(".togglelink").click(function() {
		$(this).html ($(this).html()==hideText ? showText : hideText);	
		$(this).parents().next(".toggle").toggle(0);
		return false;		
	});
	
	$("img.thumbnail").click(function() {
		$("#project_gallery img").removeClass("selected");
		$(this).addClass("selected");
		var thumbFilename = $(this).attr("src");
		var filename = thumbFilename.replace("small","home");
		var bigimg = thumbFilename.replace("small","big");
		$("img.large_photo").attr({
			src: filename
		});
		$("#project_gallery a").attr({
			href: bigimg
		});
	});
	
	
	//Lightbox Initialization
	$("a[rel^='prettyPhoto']").prettyPhoto();
	
	
});