﻿/// <reference path="jquery-1.3.2.js" />

$(function() {
  //document.domain = 'meisel.com';
  swapValues = [];
  $('.watermark').each(function(i) {
    swapValues[i] = $(this).val();
    $(this).focus(function() {
      if ($(this).val() == swapValues[i])
        $(this).val('').removeClass('watermark');
    }).blur(function() {
      if ($.trim($(this).val()) == '')
        $(this).val(swapValues[i]).addClass('watermark');
    })
  })

  $('li.root').hover(function() {
    $(this).addClass('hovered').find('div.subMenuContainer').addClass('hovered');
  }, function() {
    $(this).removeClass('hovered').find('div.subMenuContainer').removeClass('hovered');
  });

  // $('#aUpload').fancybox({
    // overlayOpacity: 0.8,
    // overlayColor: '#000',
    // transitionIn: 'elastic',
    // transitionOut: 'elastic',
    // modal: true,
    // scrolling: 'no',
    // width: 600,
    // height: 500,
    // autoScale: false
  // });

  $('a.lightbox').attr('rel', 'gallery').fancybox({
    overlayOpacity: 0.8,
    overlayColor: '#000',
    transitionIn: 'elastic',
    transitionOut: 'elastic',
    titlePosition: 'over',
    titleFormat: function(title, currentArray, currentIndex, currentOpts) {
      return '<span id="fancybox-title-over">Sample ' + (currentIndex + 1) + ' / ' + currentArray.length + '</span>';
    }
  });
}); 
