$(function(){
	
	//font size changer
	$('#fontL').bind('click', function(e){
		$('body').css({
			'font-size' : '120%'
		});
    
    $(this).css({
        'background-position': 'bottom center'
    });
        
    $('#fontS').css({
        'background-position': 'top center'
    });
    
    $('#fontM').css({
        'background-position': 'top center'
    });
    
	});

	$('#fontM').bind('click', function(e){
		$('body').css({
			'font-size' : '100%'
		});
    
    $(this).css({
        'background-position': 'bottom center'
    });
    
    $('#fontS').css({
        'background-position': 'top center'
    });
    
    $('#fontL').css({
        'background-position': 'top center'
    });

	});

	$('#fontS').bind('click', function(e){
		$('body').css({
			'font-size' : '88%'
		});
    
    $(this).css({
        'background-position': 'bottom center'
    });
    
    $('#fontM').css({
        'background-position': 'top center'
    });
    
    $('#fontL').css({
        'background-position': 'top center'
    });        
    
	});

	//Accordion Navigation
   $( ".side_block" ).accordion( { header: '.acBtn', autoHeight: false, event: 'click' } );

   $( ".side_block01" ).accordion( { header: '.acBtn', autoHeight: false, event: 'click', active: 0 } );

   $( ".side_block02" ).accordion( { header: '.acBtn', autoHeight: false, event: 'click', active: 1 } );

   $( ".side_block03" ).accordion( { header: '.acBtn', autoHeight: false, event: 'click', active: 2 } );

   $( ".side_block04" ).accordion( { header: '.acBtn', autoHeight: false, event: 'click', active: 3 } );

   $( ".side_block05" ).accordion( { header: '.acBtn', autoHeight: false, event: 'click', active: 4 } );

   $( ".side_block06" ).accordion( { header: '.acBtn', autoHeight: false, event: 'click', active: 5 } );

   $( ".side_block07" ).accordion( { header: '.acBtn', autoHeight: false, event: 'click', active: 6 } );

   $( ".side_block08" ).accordion( { header: '.acBtn', autoHeight: false, event: 'click', active: 7 } );

   $( ".side_block_close" ).accordion( { header: '.acBtn', autoHeight: false, event: 'click',collapsible: true, active: false } );

   $('.link_to_top').click(function () {
            $(this).blur();

            $('html,body').animate({ scrollTop: 0 }, 'slow');

            return false;
     });

});
