

function fpHeight(){    
  var bigWidth = $(window).width();  

  var flowPanesHeight = $(".slidei").height();
  $("#slideshow").css({
	  'height': ((((bigWidth / 100) *58) / 3) * 2)	  
	  })  
}

function eachWidth(){
	
	  var bigWidth = $(window).width();  
	 $(".slidei").css({
	 'width': (bigWidth / 100 ) * 58
   });
	
	}

function slideSwitch() {
    var $active = $('#slideshow IMG.active');

    if ( $active.length == 0 ) $active = $('#slideshow IMG:last');

    // use this to pull the images in the order they appear in the markup
    var $next =  $active.next().length ? $active.next()
        : $('#slideshow IMG:first');

    // uncomment the 3 lines below to pull the images in random order
    
    // var $sibs  = $active.siblings();
    // var rndNum = Math.floor(Math.random() * $sibs.length );
    // var $next  = $( $sibs[ rndNum ] );


    $active.addClass('last-active');

    $next.hide().addClass('active').fadeIn('slow', function() {
            $active.removeClass('active last-active');
        });
}
$(document).ready(function(){

	
$('a.projectsclick').toggle(function(event) {
$(this).removeClass('projectslink').addClass('projectsselected');
$('ul#slide').slideDown('slow', function () {
$('ul#hide').fadeIn('slow');
});
event.preventDefault();
  },
function(event){  
$(this).removeClass('projectsselected').addClass('projectslink');
$('ul#hide').fadeOut('slow');
event.preventDefault();
});

 fpHeight();
eachWidth();	






$(function() {
    setInterval( "slideSwitch()", 5000 );
});


});



