$(document).ready(function () {
		
	/*  INICIO DOS DESTAQUES HOME
    :   apenas para o site de < serviços >
	
    var $boxs = $('#slider .scrollContainer > div');
    var $container = $('#slider .scrollContainer');

    var horizontal = true;

    if (horizontal) {
        $boxs.css({
            'float' : 'left',
            'position' : 'relative'
        });
	
		// remove a scrollbar que apareceria
		$container.css('width', $boxs[0].offsetWidth * $boxs.length);
    }

	// remove a scrollbar que apareceria
	var $scroll = $('#slider .scroll').css('overflow', 'hidden');

    // adiciona a classe de item selecionado a navegação
    function selectNav() {
        $(this)
            .parents('ul:first')
                .find('a')
                    .removeClass('selected')
                .end()
            .end()
            .addClass('selected');
    }

    $('#slider .navigation').find('a').click(selectNav);

    // acha o link selecionado
    function trigger(data) {
        var el = $('#slider .navigation').find('a[href$="' + data.id + '"]').get(0);
        selectNav.call(el);
    }

    if (window.location.hash) {
        trigger({ id : window.location.hash.substr(1) });
    } else {
        $('ul.navigation a:first').click();
    }
    

    var offset = parseInt((horizontal ? 
        $container.css('paddingTop') : 
        $container.css('paddingLeft')) 
        || 0) * -1;


    var scrollOptions = {
        target: $scroll,
		
        items: $boxs,

        navigation: '.navigation a',

        prev: 'a.left', 
        next: 'a.right',
        
        axis: 'xy',

        onAfter: trigger,

        offset: offset,

        duration: 500,
        interval : 4000,

        easing: 'swing'
    };

    // aplica o serialScroll no slider.
    $('#slider').serialScroll(scrollOptions);

    // aplica o  localScroll 
    $.localScroll(scrollOptions);

    // move-se para a #hashtag que estiver no url
    scrollOptions.duration = 1;
    $.localScroll.hash(scrollOptions);
    
    // clica no primeiro link e da inicio ao auto-scroll
    $('ul.navigation a:first').click();
	
	/* FIM DOS DESTAQUES HOME */



	/* INICIO DO FADE DE NOTÍCIAS */
	
	$('.fade-news ul').innerfade({
		animationtype: 		'fade',			// fade or slide
		speed: 				'fast',			// slow, normal ou fast
		timeout: 			5000,			// tempo entre a mudança de um para o outro
		type: 				'sequence',		// Tipo do slideshow: sequence, random ou random_start
		containerheight:	'32px',			// Altura do container em CSS (padrão: 'auto')
		prevLink:			'prev-news',
		nextLink:			'next-news'
	});
	
	/* FIM DO FADE DE NOTÍCIAS */



		
	//$('#nav ul ul').css('display', 'block');

    $('.region-footer .block:nth-child(n+5)').css({ marginRight: '0' });


});


