// ------------- slidedown top -------------- // 
	  
	  $(document).ready(function() {
    
        var top = '-' + $('#slidedown_content .content').css('height');
        var easing = 'easeOutBounce';

        $('#slidedown_top').mouseover(function() {
            $('#slidedown_content').animate({ 'top': -12 }, { queue: false, duration: 1000, easing: easing });
        });

        $('#slidedown_top').click(function() {
            $('#slidedown_content').animate({ 'top': -12 }, { queue: false, duration: 1000, easing: easing });
        });

        $('#slidedown_bottom').mouseover(function() {
            $('#slidedown_content').animate({ 'top': top }, { queue: false, duration: 500, easing: easing });
        });
		
    });
	
	
// ------------- Navigation bar -------------- //
/*	
	$(document).ready(function() {
        
        
        $("#topnav li").prepend("<span></span>"); //Throws an empty span tag right before the a tag
        $("#topnav2 li").prepend("<span></span>"); //Throws an empty span tag right before the a tag
        
        $("#topnav li").each(function() { //For each list item...
            var linkText = $(this).find("a").html(); //Find the text inside of the a tag
            $(this).find("span").show().html(linkText); //Add the text in the span tag
        }); 

        $("#topnav2 li").each(function() { //For each list item...
            var linkText = $(this).find("a").html(); //Find the text inside of the a tag
            $(this).find("span").show().html(linkText); //Add the text in the span tag
        }); 
        
        $("#topnav li").hover(function() {	//On hover...
            $(this).find("span").stop().animate({ 
                marginTop: "-40" //Find the span tag and move it up 40 pixels
            }, 250);
        } , function() { //On hover out...
            $(this).find("span").stop().animate({
                marginTop: "0" //Move the span back to its original state (0px)
            }, 250);
        });

        $("#topnav2 li").hover(function() {	//On hover...
            $(this).find("span").stop().animate({ 
                marginTop: "-40" //Find the span tag and move it up 40 pixels
            }, 250);
        } , function() { //On hover out...
            $(this).find("span").stop().animate({
                marginTop: "0" //Move the span back to its original state (0px)
            }, 250);
        });
        
        
    });
	
*/	
	
// ------------- sidebar menu -------------- //	
	
	$(document).ready(function(){
		var Duration = 205; //time in milliseconds
		$('.sidebar_menu ul li a').hover(function(){
			$(this).animate({
				paddingLeft: '20px'
			}, Duration);
		}, function(){
			$(this).animate({
				paddingLeft: '0px'
			}, Duration);
		});
		
		
	});
	
	
	
// ------------- portfolio -------------- //	
	
	$(document).ready(function(){
    $('ul#filter a').click(function(){
        $(this).css('outline', 'none');
        $('ul#filter .current').removeClass('current');
        $(this).parent().addClass('current');
        
        var filterVal = $(this).text().toLowerCase().replace(' ', '-');
        
        if (filterVal == 'all') {
            $('ul#portfolio li.hidden').fadeIn('slow').removeClass('hidden');
        }
        else {
        
            $('ul#portfolio li').each(function(){
                if (!$(this).hasClass(filterVal)) {
                    $(this).fadeOut('normal').addClass('hidden');
                }
                else {
                    $(this).fadeIn('slow').removeClass('hidden');
                }
            });
        }
        
        return false;
    });
});
	
	
	$(function(){
                $('#portfolio li a img').animate({
                    "opacity": .59
                });
                
                $('#portfolio li a img').hover(function(){
                    $(this).stop().animate({
                        "opacity": 1
                    });
                }, function(){
                    $(this).stop().animate({
                        "opacity": .59
                    });
                });
            });
