$(document).ready(function() {
   
  
   $(".aboutText a").click(function(event) {
	
	event.stopPropagation();
									
	});
   
   
   $(".myElement").click(function (event) {
		
		
		
		var thisElement = $(this);
		
		
		
		if ($(this).is(".open")) {
		$(this).addClass("tempClose");
		$(".tempClose .detail").slideUp("normal");	
		$(this).removeClass("tempClose");
		$(this).removeClass("open");
		
		} else {
		thisElement.addClass("open");
		
		/*thisElement.css('margin-top', '20px');*/
    	$(".open .detail").slideDown("normal", function() {
		$.scrollTo(thisElement, 300, {offset:-20}, {easing:'easeOutBack'})
		});
		
		
		};
		
	
	});
	

	$(".colapseAll").click(function () {
									 
		$(".open .detail").slideUp("fast");
		$(".myElement").removeClass("open");
	
	
	});
	
	$(".expandAll").click(function () {
		$(".detail").slideDown("normal");
		$(".myElement").addClass("open");
	
	
	});

	$(".filterWeb").click(function () {
			$(".graphicCat").slideUp("normal");					
			$(".motionCat").slideUp("normal");
			$(".graphicMotionCat").slideUp("normal");
			
			$(".webCat").slideDown("normal");
			$(".webGraphicCat").slideDown("normal");
			$(".webMotionCat").slideDown("normal");
			$(".webGraphicMotionCat").slideDown("normal");
												
								
			
			
										
	});
	
	$(".filterGraphic").click(function () {
			$(".webCat").slideUp("normal");
			$(".motionCat").slideUp("normal");
			$(".webMotionCat").slideUp("normal");
			
			$(".graphicCat").slideDown("normal");
			$(".webGraphicCat").slideDown("normal");
			$(".graphicMotionCat").slideDown("normal");
			$(".webGraphicMotionCat").slideDown("normal");
										
	});
	
	$(".filterMotion").click(function () {
			$(".webCat").slideUp("normal");							
			$(".graphicCat").slideUp("normal");
			$(".webGraphicCat").slideUp("normal");
			
			$(".motionCat").slideDown("normal");
			$(".webMotionCat").slideDown("normal");
			$(".graphicMotionCat").slideDown("normal");
			$(".webGraphicMotionCat").slideDown("normal");
			
										
	});
	
	
	$(".viewAll").click(function () {
			$(".webCat").slideDown("normal");							
			$(".graphicCat").slideDown("normal");
			$(".motionCat").slideDown("normal");
			$(".webGraphicMotionCat").slideDown("normal");
			$(".webGraphicCat").slideDown("normal");
			$(".webMotionCat").slideDown("normal");
			$(".graphicMotionCat").slideDown("normal");
			
										
	});
	
	
	$("#aboutWrapper").hover(function() {
		$(this).find("div").stop()
		.animate({top: "-15", opacity:1}, "normal")
		.css("display","block")

	}, function() {
		$(this).find("div").stop()
		.animate({top: "-200", opacity: 0}, "fast")
	});

	
	$('.preview').qtip({
				   
			   
	   content: $(this).attr("title"),
	   show: 'mouseover',
	   hide: 'mouseout',
	   style: { 
		  width: 240,
		  padding: 6,
		  background: '#C1272D',
		  color: 'white',
		  textAlign: 'right',
		  border: {width: 0, radius: 0,color: '#333'},
		  name: 'dark', // Inherit the rest of the attributes from the preset dark style
	   },
	  position: {
      		corner: {
			 target: 'topLeft',
			 tooltip: 'topLeft'
		  			}
	   			}
	   
	})





}); 