$(document).ready( function() {

	/*COTAÇÕES DE MOEDAS*/
	var ul = $('<ul></ul>').appendTo('#cotacoes');
	$('#indicadores tr').each(
		function() {
			var tds = $('td', this );

			if( tds.length == 3 )
			{
				if( $(tds[0]).text().length != 1 ) {
					$('<li> '+
						'<h3>'+ $(tds[0]).text() +'</h3>' +
						'<div class="compra">' +
							'<span>Compra</span>' +
							'<strong>'+ $(tds[1]).text() +'</strong>' +
						'</div>' +
						'<div class="venda">' +
							'<span>Venda</span>' +
							'<strong>'+ $(tds[2]).text() +'</strong>' +
						'</div>' +
					'</li>').appendTo( ul );
				}
			}
		}
	);

	$('#indicadores').remove();




	/* video de reciclagem */
	//$('#coluna_auxiliar_conteudo_capa ul.links li.reciclagem a').click( function(evt){ evt.preventDefault(); } );



$.cookie("modal", 'false');
if($.cookie("modal") != 'true')
{

	var where = "http://www.lcldesign.com.br/img/splashs/LCL_Design_Carnaval.jpg";
	var title = "";
	var comment = "";

		$.prettyPhoto.open(where, title, comment);

    $('#modal_close').live('click', function(e) {
        e.preventDefault();
        $.cookie("modal", "true", { path: '/', expires: 7 });
    });
}


});

/**
* jQuery Cookie plugin - https://github.com/carhartl/jquery-cookie
*
* Copyright (c) 2010 Klaus Hartl, @carhartl
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
*/
(function($) {
    $.cookie = function(key, value, options) {

        // key and at least value given, set cookie...
        if (arguments.length > 1 && (!/Object/.test(Object.prototype.toString.call(value)) || value === null || value === undefined)) {
            options = $.extend({}, options);

            if (value === null || value === undefined) {
                options.expires = -1;
            }

            if (typeof options.expires === 'number') {
                var days = options.expires, t = options.expires = new Date();
                t.setDate(t.getDate() + days);
            }

            value = String(value);

            return (document.cookie = [
                encodeURIComponent(key), '=', options.raw ? value : encodeURIComponent(value),
                options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
                options.path ? '; path=' + options.path : '',
                options.domain ? '; domain=' + options.domain : '',
                options.secure ? '; secure' : ''
            ].join(''));
        }

        // key and possibly options given, get cookie...
        options = value || {};
        var decode = options.raw ? function(s) { return s; } : decodeURIComponent;

        var pairs = document.cookie.split('; ');
        for (var i = 0, pair; pair = pairs[i] && pairs[i].split('='); i++) {
            if (decode(pair[0]) === key) return decode(pair[1] || ''); // IE saves cookies with empty string as "c; ", e.g. without "=" as opposed to EOMB, thus pair[1] may be undefined
        }
        return null;
    };
})(jQuery);
