$(function() {
    $("#slideshow").cycle();
    $('#social-media-logos').find('img').each(function() {
           $(this).animate({opacity: 0.8});
           $(this).hover(
               function(event) { $(event.target).animate({opacity: 1}); },
               function(event) { $(event.target).animate({opacity: 0.8}); }
           );
    });
    
    
    $(":input[placeholder]").each( 
        function() 
        {
            showPlaceholder($(this));
        } 
    )
    .blur( 
        function() 
        {
            showPlaceholder($(this));
        }
    )
    .focus( 
        function() 
        {
            var input = $(this);
            if (input.val() === input.attr("placeholder")) 
            {
                input.val("");
            }
        } 
    );

    function showPlaceholder(input) 
    {    
        //see if there is HTML5 support - if so bail out... no need for the rest
        if ('placeholder' in document.createElement('input')) return;
        
        var placeholderText = input.attr("placeholder");
        
        if ( input.val() === "" || input.val() === placeholderText ) 
        {
            input.val(placeholderText);
        }
    };
    
});
