// Javascript for suzykitman.com
// By: Christian Reed christian@christianreed.org


jQuery(document).ready(function($) {
    $('.TanTanFlickrWidget_display a, a.tt-flickr')
      .each(function() {
	  $(this).attr('title',$(this).find('img:first').attr('alt'));
	})
      .lightBox({
      imageLoading: 'http://www.suzykitman.com/wp-content/themes/twentyten-suzy/images/lightbox/lightbox-ico-loading.gif',
	  imageBtnPrev:	'http://www.suzykitman.com/wp-content/themes/twentyten-suzy/images/lightbox/lightbox-btn-prev.gif',
	  imageBtnNext:	'http://www.suzykitman.com/wp-content/themes/twentyten-suzy/images/lightbox/lightbox-btn-next.gif',
	  imageBtnClose: 'http://www.suzykitman.com/wp-content/themes/twentyten-suzy/images/lightbox/lightbox-btn-close.gif',
	  imageBlank: 'http://www.suzykitman.com/wp-content/themes/twentyten-suzy/images/lightbox/lightbox-blank.gif',
          image_path_attr: 'img_path'		
      });


    $('#menu-portfolio li').each( function() {
	var a_obj = $(this).find('a:first');
	var a_link = $(a_obj).attr('href');
	var a_text = $(a_obj).html();
	var a_text_converted = a_text.toLowerCase().replace(' ','_').replace(' ','_');
	a_text_converted = 'url(http://suzykitman.com/wp-content/themes/twentyten-suzy/images/portfolio_' + a_text_converted + '.jpg)';
	//alert(a_text_converted);

	$(this)
	  .css('background-image',a_text_converted)
	  .click(function() {
	      window.location = a_link;
	    });
      });
  });

