$(function() {

    var expand = false;

    $('#expand').click(function(e) {
        e.preventDefault();
        if (expand == false) {
            expand = true;
            $('#content').css({
                opacity: '0'
            });
        } else {
            expand = false;
            $('#content').css({
                opacity: '1'
            });
        }
    });
 
   var slide = 2;
   var slides = $('#slider img').length + 1;
   
   $.fn.slide = function() {
        $('#slider img:nth-child(' + slide + ')').css('opacity', '1');
        if (slide == slides) {
            slide = 2;
			var q;
            for (q = 2; q <= slides - 1; q++) {
                $('#slider img:nth-child(' + q + ')').css('opacity', '0');
            }
        } else {

            slide++;
        }
    };
	 
    var slider = setInterval(function() {
        $.fn.slide();
    }, 6000);
	
	
	$.support.placeholder = false;
    var input = document.createElement('input');
    if('placeholder' in input){
        $.support.placeholder = true; 
    } 
   
   if(!$.support.placeholder){

		$('input[placeholder],textarea[placeholder]').each(function() {
            var placeholder = $(this).attr('placeholder');
			$(this).css('color','#999');
            $(this).val(placeholder);
        });

        $('input[placeholder],textarea[placeholder]').focus(function() {
			$(this).css('color','#000');
            if($(this).val() == $(this).attr('placeholder')){
                $(this).val('');
            }
        }).blur(function() {
            if ($(this).val() == '') {
                var placeholder = $(this).attr('placeholder');
				$(this).css('color','#999');
                $(this).val(placeholder);
                
            }
        });
   }

});
