$(document).ready(function() {
						   
	
						   
	//When page loads...	
	$(".tab_content").hide(); //Hide all content
	$("#mainnav a #design").addClass("current").show(); //Activate first tab
	$("#content1").show(); //Show first tab content

	
	//On Click Event
	$("#mainnav a #art").click(function() {

		$("#mainnav a #design").removeClass("current"); //Remove any "active" class
		$(this).addClass("current"); //Add "active" class to selected tab
		$("#content1").hide(); //Hide all tab content

		$("#content2").show(); //Show first tab content
		$("#content2").fadeIn(); //Fade in the active ID content
		return false;
	});
	
	//On Click Event
	$("#mainnav a #design").click(function() {

		$("#mainnav a #art").removeClass("current"); //Remove any "active" class
		$(this).addClass("current"); //Add "active" class to selected tab
		$("#content2").hide(); //Hide all tab content
		
		$("#content1").show(); //Show first tab content
		$("#content1").fadeIn(); //Fade in the active ID content
		return false;
	});

$(window).ready(function() {
	//$("body").removeClass('bg').addClass("bg");
	$(".bg").hide(); //Hide all content
	$(".bg").fadeIn(1000); //Fade in the active ID content
	
	$("#header_over").animate({
			height: "0px"
		})
		.animate({
			height: "75px"
		}, "slow"); //Hide all content
	
						 
				
	
	
	
	//$("#biglogo").hide(); //Hide all content
	//$("#biglogo").fadeIn(5000);; //Fade in the active ID content
	
	});

	
	





$("ul.gallery li").hover(function() { //On hover...

		var thumbOver = $(this).find("img").attr("src"); //Get image url and assign it to 'thumbOver'

		//Set a background image(thumbOver) on the <a> tag - Set position to bottom
	
		$(this).find("a.thumb").css({'background' : 'url(' + thumbOver + ') no-repeat center bottom'});

		//Animate the image to 0 opacity (fade it out)
		$(this).find("span").stop().fadeTo('fast', 0 , function() {
			$(this).hide() //Hide the image after fade
		});
	} , function() { //on hover out...
		//Fade the image to full opacity 
		$(this).find("span").stop().fadeTo('slow', 1).show();
	});





//BUTTON ONE OPEN

	$("div.panel_button").click(function(){
										

		$("div#panel1").animate({ height: "580px" }).animate({ height: "530px", }, "fast"); 
		
		//var elementClicked = $(this).attr("href");
        //var destination = $(elementClicked).offset().top;
        //$("html:not(:animated),body:not(:animated)").animate({ scrollTop: destination-20}, 500 );
        //return false;

		
		
		
		$("div.panel_button").fadeIn(); //Fade in the active ID content
	
	});	
	
//BUTTON ONE TWO	
	
	$("div.panel_button2").click(function(){
		$("div#panel2").animate({
			height: "350px"
		})
		.animate({
			height: "300px"
		}, "fast");
		
		$("div.panel_button2").fadeIn(); //Fade in the active ID content
	
	});	
	
//CLOSE BUTTON ONE ONE
	
   $("div#hide_button").click(function(){
		$("div#panel1, div#panel2").animate({
			height: "0px"
		}, "fast");
		$("div#hide_button, div#hide_button2").fadeOut(); //Fade in the active ID content
		
	
   });	
 
//CLOSE BUTTON ONE TWO 
   
   $("div#hide_button2").click(function(){
		$("div#panel2").animate({
			height: "0px"
		}, "fast");
		$("div#hide_button2").fadeOut(); //Fade in the active ID content
		
	
   });	
   
   
 //   POP UP

			$("a#example7").fancybox({
				'titlePosition'	: 'outside'
			});

			

			$("a[rel=example_group]").fancybox({
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'titlePosition' 	: 'outside',
				'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
					return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
				}
			
});
			
});


