// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults

$(function(){

$('a', $(".lightbox_description")).click(function(){
this.target = "_blank";
});

  $('#dynamic_navigation a')
  .css( {
    backgroundPosition: "0 0"
  } )
  .hover(function(){
    $(this).stop().animate({
      backgroundPosition:"(-170px 0)"
    }, {
      duration:500
    })
   
  },
  function(){
    $(this).stop().animate({
      backgroundPosition:"(-330px 0)"
    }, {
      duration:200,
      complete:function(){
        $(this).css({
          backgroundPosition: "0 0"
        });
      }
    })
  })

 $('#dynamic_navigation a.current')
  .css( {
    backgroundPosition: "160px 0"
  } )
  .hover(function(){
    $(this).stop().animate({
      backgroundPosition:"(0px 0)"
    }, {
      duration:500
    })

  },
  function(){
    $(this).stop().animate({
      backgroundPosition:"(160px 0)"
    }, {
      duration:200,
      complete:function(){
        $(this).css({
          backgroundPosition: "160px 0"
        });
      }
    })
  })



   $('#dynamic_subnavigation a')
  .css( {
    backgroundPosition: "0 0"
  } )
  .hover(function(){
    $(this).stop().animate({
      backgroundPosition:"(0px -24px)"
    }, {
      duration:500
    })

  },
  function(){
    $(this).stop().animate({
      backgroundPosition:"(0px -48px)"
    }, {
      duration:200,
      complete:function(){
        $(this).css({
          backgroundPosition: "0 0"
        });
      }
    })
  })

});

