// tabs
$(document).ready(function(){

	$('ul.caseNav li.brief a, .bottomBrief').click(function(event) { 
		event.preventDefault();
				
		$('.tab').hide();
		$('ul.caseNav li a').removeClass('active');
		$('ul.caseNav li.brief a').addClass('active');
		$('#brief').show();
		
		$('.bottom li').hide();
		$('.bottomSolution').show();
	});
	
	$('ul.caseNav li.solution a, .bottomSolution, .bottomSolution2').click(function(event) { 
		event.preventDefault();
		
		$('.tab').hide();
		$('ul.caseNav li a').removeClass('active');
		$('ul.caseNav li.solution a').addClass('active');
		$('#solution').show();
		
		$('.bottom li').hide();
		$('.bottomBrief').show();
		$('.bottomPresentation').show();
	});
	
	$('ul.caseNav li.presentation a, .bottomPresentation, .bottomPresentation2').click(function(event) { 
		event.preventDefault();
		
		$('.tab').hide();
		$('ul.caseNav li a').removeClass('active');
		$('ul.caseNav li.presentation a').addClass('active');
		$('#presentation').show();
		
		$('.bottom li').hide();
		$('.bottomSolution2').show();
		$('.bottomResults').show();
	});
	
	$('ul.caseNav li.results a, .bottomResults').click(function(event) { 
		event.preventDefault();
		
		$('.tab').hide();
		$('ul.caseNav li a').removeClass('active');
		$('ul.caseNav li.results a').addClass('active');
		$('#results').show();
		
		$('.bottom li').hide();
		$('.bottomPresentation2').show();
	});

// sliders

// home page slider	
	$('#homeSlider ul').cycle({ 
    	fx: 'fade',
    	//easing: 'easeInOutQuart',
    	fit: 0,
		width: 635,
		height: 420,
    	pager: '#pager'
	});
	$('#pager a').click(function(){
		$('#homeSlider ul').cycle('pause');
	});
	
// work page slider	

	$('#prev,#next').css("opacity","0");

	if($('.slider ul').children().length==1){
		$('#prev,#next').hide();
	} else {
		$(".slider ul").cycle({
			fx: 'scrollHorz',
	    	easing: 'easeInOutQuart',
	    	fit: 0,
			width: 636,
			height: 422,
	    	prev: '#prev',
			next: '#next'
		});
		$('#prev').click(function(){
			$('.slider ul').cycle('pause');
		});
		$('#next').click(function(){
			$('.slider ul').cycle('pause');
		});
	}
	
	$('.slider ul,#prev,#next').hover(function(){
		$('#prev,#next').stop().animate({opacity:1.0},{queue:false,duration:200});
	}, function(){
		$('#prev,#next').stop().animate({opacity:0},{queue:false,duration:200});
	});

// work thumbs hover

	$('.workHover').css("opacity","0");
	$('.workHover').css("display","block");
	
	$('.projectContainer h3 a').hover(function() {
		$(this).find('.workHover').stop().animate({opacity:1.0},{queue:false,duration:200});	
	}, function () {
		$(this).find('.workHover').stop().animate({opacity:0},{queue:false,duration:200});
	});
	
// logo thumb hover
	
	$('img.small-logo').css("opacity","0");
		
	$('a.logo-link').hover(function() {
		$(this).find('img.small-logo').stop().animate({opacity:1.0},{queue:false,duration:200});	
	}, function () {
		$(this).find('img.small-logo').stop().animate({opacity:0},{queue:false,duration:200});
	});
	
});


