jQuery(document).ready(function() {

  $(".video").click(function() {
    $.fancybox({
      'padding'    : 0,
      'autoScale'    : false,
      'transitionIn'  : 'none',
      'transitionOut'  : 'none',
      'title'      : this.title,
      'width'      : 640,
      'height'    : 385,
      'href'      : this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
      'type'      : 'swf',
      'swf'      : {
      'wmode'        : 'transparent',
      'allowfullscreen'  : 'true'
      }
    });

    return false;
  });
  
    $("#links_origin a").click(function()
    {
        var pageToLoad = $(this).attr("href");
        var pageContent;
        $.get(pageToLoad, function(data)
        {
           pageContent=data;

                $("#links_origin").html(pageContent).hide();
                $("#links_origin").addClass("links_origin_css");
                $("#links_origin").addClass("shine");
                $("#links_origin").fadeIn("slow");

        });
        return false;
    });
      $(".nbimgs").hover(function() {  
       var h = $(this).find("div span").height() + 15;
      $(this).find("div").stop(true,true).animate({height: h +'px'}, 400);  
      $(this).find("div span").stop(true,true).fadeIn(300);
        },function(){
      $(this).find("div").stop(true, true).animate({height:'20px'}, 400);  
      $(this).find("div span").stop(true,true).fadeOut(300);
        });
});
