﻿
$(function () {
  Cufon.replace('#menu li,#bottom li a,table tr td, #footer ul li,     .photo span, .contact p');

  Cufon.replace('h1');

  $('#album a').each(function () {
    $('<img src="' + $(this).attr('href') + '" />');
  });
  $('#album a').hover(function () {
    $('.picture img').attr('src', $(this).attr('href'));
  });


  bluenotion.menu.autoFocus($('#menu > ul'));
  if ($("#menu ul li.active img").length > 0) {
    if ($("#menu ul li.active img").attr("src")) {
      newsrc = $("#menu ul li.active img").attr("src").replace(".png", "_active.png");
      $("#menu ul li.active img").attr("src", newsrc);
    }
  }

  $("#menu ul li").hover(function () {
    if ($(this).attr('class') == 'active') { return false; }
    newsrc = $(this).find("img").attr("src").replace(".png", "_active.png");
    $(this).find("img").attr("src", newsrc);
  },
    function () {
      if ($(this).attr('class') == 'active') { return false; }
      newsrc = $(this).find("img").attr("src").replace("_active.png", ".png");
      $(this).find("img").attr("src", newsrc);
    }
    );




  $('.item a').hover(function () { $(this).find('img.dt').stop().fadeTo("slow", 0); },
            function () { $(this).find('img.dt').stop().fadeTo("slow", 1); });



});
