
$(document).ready(function(){	
			
	//lista de noticias Gatro cultura e lazer
    jQuery('#mycarousel0,#mycarousel1,#mycarousel2,#mycarousel4').jcarousel({
        vertical: true,
        scroll: 1
    });


	//slide ponto turistico	
	$(window).load(function(){
		if(document.getElementById('loading'))
			document.getElementById('loading').style.display = 'none';
		if(document.getElementById('slider'))			
			document.getElementById('slider').style.display = '';

		$("#slider").easySlider();			
	});
		
		$('#midrltop').tabs({ fxFade: true, fxSpeed: 'fast' });
		
		// menu
		$("ul.subnav,ul.subnav1").parent().append("<span></span>"); //Only shows drop down trigger when js is enabled - Adds empty span tag after ul.subnav
	
	$("ul.topnav li a").click(function() { //When trigger is clicked...
		//Following events are applied to the subnav itself (moving subnav up and down)
		$(this).parent().find("ul.subnav,ul.subnav1").slideDown('fast').show(); //Drop down the subnav on click
		
		$(this).parent().hover(function() {
		}, function(){	
			$(this).parent().find("ul.subnav,ul.subnav1").slideUp('slow'); //When the mouse hovers out of the subnav, move it back up
		});

		//Following events are applied to the trigger (Hover events for the trigger)
		}).hover(function() { 
			$(this).addClass("subhover"); //On hover over, add class "subhover"
		}, function(){	//On Hover Out
			$(this).removeClass("subhover"); //On hover out, remove class "subhover"
	});

		//menu inferior
		$("ul.dropdown li").hover(function(){
			$(this).addClass("hover");
			$('ul:first',this).css('visibility', 'visible');
		}, function(){ 
			$(this).removeClass("hover");
			$('ul:first',this).css('visibility', 'hidden');
		
		});
		
		$("ul.dropdown li ul li:has(ul)").find("a:first").append(" &raquo; ");
		var seletor = "#middle p,#middle li,#middle dd,#middle h6 a,#middle,#middle dt,#neutra,#neutra span,#neutra p,#middle h3,#middle h2";
		$("#up").fontscale(seletor,"up",{unit:"px",increment:2,useCookie:false});
		$("#down").fontscale(seletor,"down",{unit:"px",increment:2,useCookie:false});
		$("#reset").fontscale(seletor,"reset");
		
/*
                jQuery(".lightbox").lightBox({
                        overlayBgColor: "#1B4F7F",
                        imageLoading: "../lightbox/images/lightbox-ico-loading.gif",
                        imageBtnClose: "../lightbox/images/lightbox-btn-close.gif",
                        imageBtnPrev: "../lightbox/images/lightbox-btn-prev.gif",
                        imageBtnNext: "../lightbox/images/lightbox-btn-next.gif",
                        txtImage: "Imagem",
                        txtOf: "de"
                });
				*/
           
jQuery.cookie = function(name, value, options) {
	 if (typeof value != 'undefined') { // name and value given, set cookie
        options = options || {};
        if (value === null) {
            value = '';
            options.expires = -1;
        }
        var expires = '';
        if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
            var date;
            if (typeof options.expires == 'number') {
                date = new Date();
                date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
            } else {
                date = options.expires;
            }
            expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
        }
        // CAUTION: Needed to parenthesize options.path and options.domain
        // in the following expressions, otherwise they evaluate to undefined
        // in the packed version for some reason...
        var path = options.path ? '; path=' + (options.path) : '';
        var domain = options.domain ? '; domain=' + (options.domain) : '';
        var secure = options.secure ? '; secure' : '';
        document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
    } else { // only name given, get cookie
        var cookieValue = null;
        if (document.cookie && document.cookie != '') {
            var cookies = document.cookie.split(';');
            for (var i = 0; i < cookies.length; i++) {
                var cookie = jQuery.trim(cookies[i]);
                // Does this cookie string begin with the name we want?
                if (cookie.substring(0, name.length + 1) == (name + '=')) {
                    cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
                    break;
                }
            }
        }
        return cookieValue;
    }
};



});	
	
