﻿/// <reference path="jquery-vsdoc.js" />
$(document).ready(function() {
    $('.Conteudo .Cabeca ul.Banner').innerfade({
        speed: 'slow',
        timeout: 10000,
        type: 'sequence',
        containerheight: '200px'
    });
    $("div.Video span.assistir").click(function() {
        var _videoID = $(this).find("input[type=hidden]").attr("value");
        ytp(_videoID);
    });
    $('.BoxLateralMateria .FotoMateriaDestaque a').lightBox({ fixedNavigation: false });
    $('.Principal .Materia .fotosNoticia a').lightBox();
    $("a.fechar").click(function() {
        $(".control[id=erros]").slideUp("fast");
    });
    $("#sysmessage").dialog({
        resizable: false,
        zIndex: 1000,
        bgiframe: true,
        modal: true,
        buttons: {
            Ok: function() {
                $(this).dialog('close');
            }
        }
    });
    $("#ctl00_Conteudo_Arquivos").tabs();
});
var Banner = function(server, code) { window.open(server + "/Banners.aspx?C=" + code); }
var ytws = function(id) { yt(id, 440, 330); }
var ytp = function(id) { if (wOpen("http://www.youtube.com/v/" + id + "&rel=1&color1=0xAAAAAA&color2=0x778899&border=0&fs=1&hd=1", 440, 330) == null) { alert("Desabilite seu bloqueador de popups para ver os videos!"); } }
var yt = function(id, width, height) { if (!id) return false; new Flash("http://www.youtube.com/v/" + id + "&rel=1&color1=0xAAAAAA&color2=0x778899&border=0&fs=1&hd=1", "ytplayer", width, height, { "allowfullscreen": "true", "menu": "false", "wmode": "transparent", "allowscriptaccess": "always" }).write(); }
var wOpen = function(url, width, height) { var _win = window.open(url, '_popup', 'left=' + Math.round((screen.availWidth - width) / 2) + ',top=' + Math.round((screen.availHeight - height) / 2) + ',width=' + width + ',height=' + height + ',toolbar=no,menubar=no,status=no,scrollbars=auto,resizable=no'); return _win; }
