		
$(document).ready(function(){
				
	// Expand Panel
	$("#open").click(function(){
		$("div#panel").slideDown("slow");
	
	});	
	
	// Collapse Panel
	$("#close").click(function(){
		$("div#panel").slideUp("slow");	
	});		
	
	// Switch buttons from on click
	$("#toggle a").click(function () {
		$("#toggle a").toggle();
	});		
	

	$('#contact_form').ajaxForm(function(data) {
            $('#success').hide();
            $('#badserver').hide();
            $('#bademail').hide();

            if (data==1){
                $('#success').fadeIn("slow");
                $('#contact_form').resetForm();
            }
            else if (data==2){
                $('#badserver').fadeIn("slow");
            }
            else if (data==3)
            {
                $('#bademail').fadeIn("slow");
            }
        });


	$(".test").hrzAccordion({eventTrigger:"click",openOnLoad:1,cycle: false, handlePosition: "left", fixedWidth: 710 });
	var $active = "#web";
		
	// Portfolio navigation
	$('#webnav').hover(
		function() {
			$(this).addClass("webnav_active");
		},
		function() {
			$(this).removeClass("webnav_active");
		}
	).click(
		function() {
			$(this).addClass("webnav_selected");
			$("#printnav").removeClass("printnav_selected");
			$("#brandnav").removeClass("brandnav_selected");
			
			$("#print").hide();
			$("#brand").hide();
			$("#web").fadeIn("slow");

		}
	);

	$("#printnav").hover(
		function() {
			$(this).addClass("printnav_active");
		},
		function() {
			$(this).removeClass("printnav_active");
		}
	).click(function() {
		$(this).addClass("printnav_selected");
		$("#webnav").removeClass("webnav_selected");
		$("#brandnav").removeClass("brandnav_selected");
		
		$("#web").hide();
		$("#brand").hide();
		$("#print").fadeIn("slow");

	});
	
	$("#brandnav").hover(
		function() {
			$(this).addClass("brandnav_active");
		},
		function() {
			$(this).removeClass("brandnav_active");
		}
	).click(function() {
		$(this).addClass("brandnav_selected");
		$("#printnav").removeClass("printnav_selected");
		$("#webnav").removeClass("webnav_selected");

		$("#web").hide();
		$("#print").hide();
		$("#brand").fadeIn("slow");
	});
		
	$('#thumbs_container a').fancybox();  
		
});