function uniquearr(arrayName) {
  var newArray=new Array();
  label:for(var i=0; i<arrayName.length;i++ )
  {  
      for(var j=0; j<newArray.length;j++ )
      {
          if(newArray[j]==arrayName[i]) 
              continue label;
      }
      newArray[newArray.length] = arrayName[i];
  }
  return newArray;
}

jQuery(document).ready(function() { 
	$('nav#secondary a').live('click', function($e){
		$e.preventDefault();
		$('nav#secondary a').removeClass('active');
		$(this).addClass('active');	
		var tab = $(this).attr('rel');
		$('.body .window').hide();
		$('#tab_'+tab).slideDown();
	});
	if ($('#rotate').length) {
		$('#rotate').cycle({ 
		  fx:     'scrollLeft', 
		  speed:  200
		});
	}
	if ($('#portfolio').length) {
		$('#portfolio').cycle({ 
		  fx: 'scrollHorz',
		  timeout:  0,
		  prev:   '#prev',
	    next:   '#next'
		});
		$('#tab_portfolio').hide();
	}
	$('#local').live('mouseover', function () {
		var text = $(this).text();
		if (text == 'Local') {
			$(this).hide().text('Pittsburgh').fadeIn();
		} else {
			$(this).hide().text('Local').fadeIn();
		}
	});
	
	
	$('#members li').each(function () {
		var letter = $(this).text().toLowerCase().slice(0, 1);
		if (isNaN(letter)) {
			$(this).addClass(letter);
		} else {
			$(this).addClass('numbers');
		}
	});
	$('#controls').fadeIn();
	$('#hint').html('<em>Choose a company by clicking the alphabetical sort above...</em>');
	
	$('#controls a').live('click', function($e){
		$e.preventDefault();
		$('#hint').hide();
		$('#controls a').removeClass('current');
		$(this).addClass('current');	
		var tab = $(this).attr('rel');
		$('#members li').hide();
		$('#members li.'+tab).fadeIn();
	});
	
	
	
	
	
	
	
});

