$(function() {
$(document).ready(function() {
   $('.first #c_top #c_buttons a').mouseover(function() {
      $(this).css("background-position","0 -62px");
   });
   $('.first #c_top #c_buttons a').mouseout(function() {
      $(this).css("background-position","0 0");
   });
   $('.first #c_main #portf span').mouseover(function() {
      $(this).css("background-position","0 0");
   });
   $('.first #c_main #portf span').mouseout(function() {
      $(this).css("background-position","0 49px");
   });
   $('.first #c_top #c_about a.more').mouseover(function() {
      $(this).css("background-position","0 0");
   });
   $('.first #c_top #c_about a.more').mouseout(function() {
      $(this).css("background-position","0 34px");
   });
   $('#footer a.link').mouseover(function() {
      $(this).css("background-position","right -34px");
   });
   $('#footer a.link').mouseout(function() {
      $(this).css("background-position","right 0");
   });
   
   $('.second #c_top #transp').css("opacity",0.7);
   
    $('a[rel*=lightbox]').lightBox({fixedNavigation:true});
    
   $('.catimg').hover(function(){
       var img = $(this).css('backgroundImage');
       var img = img.replace('slud/','slud/hover/');
       var img = img.replace('.jpg','.gif');
       $(this).css('backgroundImage',img);
       console.log(img);
   }, function() {
       var img = $(this).css('backgroundImage');
       var img = img.replace('slud/hover/','slud/');
       var img = img.replace('.gif','.jpg');
       $(this).css('backgroundImage',img);
   });
    
   nospam();

});
});

function nospam() {
   $('a[rel=noSpam]').each(function() {
      var title = this.title;
      var array = title.split(' ');
      var email = array[2]+"@"+array[1]+"."+array[0];
      this.innerHTML = email;
      this.href='mailto:'+email;
      this      .title='';
   });
}
