if(!$j){
//alert('axis-prt-init: jQuery not initialized ');
}else{
    $j(document).ready(function () {
        initDigicraft()
    });
}

function initDigicraft(){

    $j.preloadImages = function() {
        for(var i = 0; i<arguments.length; i++){
            $j("<img>").attr("src", arguments[i]);
        }
    }

    $j('.MainLastWorksImg').each(function(){
        if(this.src.lastIndexOf('_gray.png')>0){
            $j.preloadImages(this.src.replace('_gray.','_act.'));
            $j(this).hover(function () {
                $j(this).addClass('MainLastWorksImgActive');
                this.src = this.src.replace('_gray.','_act.');
            }, function () {
                this.src = this.src.replace('_act.','_gray.');
                $j(this).removeClass('MainLastWorksImgActive');
            });
        }
    });

    if($j('.MainLastWorksImg').size()>0){
        $j('.MainLastWorksImg').tooltip({
            showURL: false,
            delay: 0,
            track: true,
            fade: 250
        });
    }

}

