// $('#toggle').click(function() {
//   $('#featured').slideToggle('slow', function() {
//   
//     // Animation complete.
//   });
// });

$('#toggle').click(function(){
        if($(this).hasClass('expanded'))
        {
            $(this).addClass('collapsed').removeClass('expanded');
		 	$('#featured').animate({
		  		height: "0px", 
		  		}, 500);
			$('#slider-wrapper').slideUp().delay(200);
			$('#ar-wrapper').delay(400).fadeIn(400);
			$('#featured').delay(200).animate({
		  		height: "425px", 
		  		}, 500);
        }
        else 
        {
            $(this).addClass('expanded').removeClass('collapsed');
			$('#ar-wrapper').fadeOut(800);
		 	$('#featured').animate({
		  		height: "190px", 
		  		}, 500);
		
			$('#slider-wrapper').delay(500).fadeIn(900);
        }
    });

$('.showWeb').click(function(){
		$('.motion').fadeOut(800);
		$('.video').fadeOut(800);
		$('.fineart').fadeOut(800);
		$('.web').fadeIn(800);
});

$('.showMotion').click(function(){
	$('.web').fadeOut(800);
	$('.motion').fadeOut(800);
	$('.video').fadeOut(800);
	$('.fineart').fadeOut(800);
	$('.motion').fadeIn(800);
});

$('.showVideo').click(function(){
	$('.web').fadeOut(800);
	$('.motion').fadeOut(800);
	$('.video').fadeOut(800);
	$('.fineart').fadeOut(800);
	$('.video').fadeIn(800);
});

$('.showFineart').click(function(){
	$('.web').fadeOut(800);
	$('.motion').fadeOut(800);
	$('.video').fadeOut(800);
	$('.fineart').fadeOut(800);
	$('.fineart').fadeIn(800);
});

$('.showAll').click(function(){
	$('.web').fadeOut(800);
	$('.motion').fadeOut(800);
	$('.video').fadeOut(800);
	$('.fineart').fadeOut(800);

	$('.web').fadeIn(800);
	$('.motion').fadeIn(800);
	$('.video').fadeIn(800);
	$('.fineart').fadeIn(800);
});

$('.general_median').click(function(){
	$('#general_median').animate({
  		height: "620px", 
  		}, 500);
});

$('.general_median_hide').click(function(){
	$('#general_median').animate({
  		height: "180px", 
  		}, 500);
});

$('.stranger').click(function(){
	$('#stranger').animate({
  		height: "650px", 
  		}, 500);
});

$('.stranger_hide').click(function(){
	$('#stranger').animate({
  		height: "180px", 
  		}, 500);
});

$('.octo').click(function(){
	$('#octo').animate({
  		height: "650px", 
  		}, 500);
});

$('.octo_hide').click(function(){
	$('#octo').animate({
  		height: "180px", 
  		}, 500);
});

$('.octo').click(function(){
	$('#octo').animate({
  		height: "650px", 
  		}, 500);
});

$('.octo_hide').click(function(){
	$('#octo').animate({
  		height: "180px", 
  		}, 500);
});

$('.print').click(function(){
	$('#print').animate({
  		height: "650px", 
  		}, 500);
});

$('.print_hide').click(function(){
	$('#print').animate({
  		height: "180px", 
  		}, 500);
});

$(window).load(function() {
    $('#slider').nivoSlider();
});

$(document).ready(function(){
   $(".tweet").tweet({
       username: "pjybay",
       join_text: "auto",
       avatar_size: 0,
       count: 10,
       auto_join_text_default: "", 
       auto_join_text_ed: "I",
       auto_join_text_ing: "I was",
       auto_join_text_reply: "I replied to",
       auto_join_text_url: "I was checking out",
       loading_text: "Loading Tweets..."
   });
});

$(function() {
	$('a[@rel*=lightbox]').lightBox(); // Select all links that contains lightbox in the attribute rel
});

function openwindow()
{
	window.open("ar_help.html","mywindow","menubar=1,resizable=1,width=350,height=600");
}
