﻿$(document).ready(function() {
    $(".text__list table td:first-child").css("border", "0");
    $(".text__list table td:last-child").css("border", "0");
    $(".text__list table td:last-child").css("white-space", "nowrap");

    $(".b-editor table tr:odd").css("background", "#f0f0f0");
    $(".b-editor table td:first-child").css("text-align", "left");
    $(".b-editor table th:last-child").css("border", "0");
    $(".b-editor table td:last-child").css("border", "0");

    $('.iter').hover(
      function() {
          $(this)
            .removeClass('inactive')
            .css('z-index', '99')
            .children().css('display', 'block');
      },
      function() {
          $(this)
            .addClass('inactive')
            .css('z-index', '50')
            .children().removeAttr('style');
      }
    );



    $('.flash__menu li').hover(
        function() {
            $(this).addClass('selected')
            .children('div').show('slow');

        },
        function() {
            $(this).removeClass('selected')
            .children('div').hide('slow')
            .children('div').stop();
        });


    //gallery init
    if ($("a[rel=gallery]").size() > 0) {
        $("a[rel=gallery]").fancybox({
            overlayOpacity: 0.8,
            overlayColor: "#948D86",
            titlePosition: "inside",
            onStart: function() { if ($.browser.msie && $.browser.version.substr(0, 1) < 7) { $(".container__bg").css('top'); } },//ie 6 hack
            centerOnScroll: true,
            padding: 43,
            titleFormat: function(title, currentArray, currentIndex, currentOpts) {
                var date = $(currentArray[currentIndex]).attr("date") ? "<br/><b>" + $(currentArray[currentIndex]).attr("date") + "</b>" : "";
                if (!title) title = "";
                return '<span id="fancybox-title-over">' + title + date + '</span>';
            }
        });
    }
});

