
(function($){$.fn.ProizvodZoomer=function(b){
        var c=$.extend({
            speedView:200,
            speedRemove:400,
            altAnim:false,
            speedTitle:400
            },
        b);
        var d=$.extend(c,b);
        if(typeof d.speedView!="undefined"||typeof d.speedRemove!="undefined"
            ||typeof d.altAnim!="undefined"||typeof d.speedTitle!="undefined") {
            $(this).hover(function(){
                $(this).css({'z-index':'10'});
                $(this).find('img.akcija_img').stop().animate({marginTop:'-25px',marginLeft:'-25px'},d.speedView);
                $(this).find('img.pro_img').addClass("hover").stop()
                    .animate({marginTop:'-6px',marginLeft:'-6px',width:'162px',height:'162px'},d.speedView);
                if(d.altAnim==true){
                    var title = $(this).find('.title_hover');
                    if(title.length==0) {
                        var a=$(this).find("img.pro_img").attr("alt");
                        $(this).append('<div class="title_hover">'+a+'</div>');
                        title = $(this).find('.title_hover');
                        $(title[0]).css({opacity:1});
                    }
                    $(title[0]).stop().animate({opacity:1});
                }
            },function(){
                $(this).css({'z-index':'0'});
                $(this).find('img.akcija_img').stop().animate({marginTop:'-20px',marginLeft:'-18px'},d.speedView);
                $(this).find('img.pro_img').removeClass("hover").stop()
                    .animate({marginTop:'0',marginLeft:'0',top:'0',left:'0',width:'150px',height:'150px'},d.speedRemove);
                var title = $(this).find('.title_hover');
                if(title.length!=0) $(title[0]).stop().animate({opacity:0});
                }
            )
        }
    }
})(jQuery);
