$(document).ready(function() {
        $('ul li:last-child').addClass('lastChild');
	
        $("a#modalNewsletterForm").fancybox({
                'transitionIn'       : 'fade',
                'transitionOut'      : 'fade',
                'speedIn'            : 600,
                'hideOnOverlayClick' : false,
                'speedOut'           : 200,
                'onStart'            : function() {
                        $('.img-destaque iframe').css('visibility','hidden');
                        $('.img-destaque iframe').parent().css('background','#000');
                },
                'onCleanup'          : function() {
                        $('.img-destaque iframe').css('visibility','visible');
                }
        });
	
        $("a#modalNewsletterForm").click(function() {});
	
        $("#accordion" ).accordion({
                collapsible: true,
                active: false,
                animated: 'easeInOutCirc'
        });
	
        /*--SCROLL--*/
	
        var h = '100';
	
        $('#example1').fbWall({
                id:'compugrafcgs',
                accessToken:'AAAC7gAoWDQ0BAKui5hWndmJuiDAybkq5vUbLvP3f0X6cefSZCiIKPLpNCHvaThcmfZB1AdUWsGJUnXejilVmFitUIrfRdPOk9xx5OYCAZDZD',
                showGuestEntries:false,
                showComments:false,
                max:5,
                timeConversion:24,
                translateAt:'&agrave;s',
                callback: function() {
                       /* var wat = $('#content_1 .scroll li')
                        wat.each(function(){
                                var tH = $(this).height();
                                $(this).css({
                                        'height': function() {
                                                if(tH > h) return h = tH;
                                                return h;
                                        }
                                });
                        });
						
                        wat.height(h);*/
	
                        $('ul','#content_1').simplyScroll({
                                className: 'vert',
                                frameRate: 24,
                                horizontal: false,
                                speed: 1,
                                autoMode: 'loop',
                                pauseOnHover: true
                        });
	
	
                }
        });

     /*   h = '100';
        var wat = $('#content_2 .scroll li')
        wat.each(function(){
                var tH = $(this).height();
                $(this).css({
                        'height': function() {
                                if(tH > h) return h = tH;
                                return h;
                        }
                });
        });
        wat.height(h);*/


        $('ul', '#content_2').simplyScroll({
                className: 'vert',
                frameRate: 24,
                horizontal: false,
                speed: 1,
                autoMode: 'loop',
                pauseOnHover: true
        });

        tabSwitch('tab_1', 'content_1');
});
