var j = jQuery.noConflict();
j(function(){
   j('a[rel]').overlay({
      expose: {
         color:'#000',
         opacity: 0.6,
         closeSpeed: 1000
      },
      onBeforeLoad: function(){
         var wrap = this.getContent().find(".wrap");

         // load only for the first time it is opened
         if (wrap.is(":empty")) {
             wrap.load(this.getTrigger().attr("href"));
         }
      }
   });

// portfolio thumb fadein fadeout
   j('.itemPort').hover(function(){
      j(this).find('img').stop().animate({opacity:0.12}, 450);

   }, function(){
      j(this).find('img').stop().animate({opacity:1}, 250);
   });
});
