
$(document).ready(function(){
        $("#content a[rel*='lightbox']").lightBox({
        imageLoading:			root + 'img/images/lightbox-ico-loading.gif',
        imageBtnPrev:			root + 'img/images/lightbox-btn-prev.gif',
        imageBtnNext:			root + 'img/images/lightbox-btn-next.gif',
        imageBtnClose:			root + 'img/images/lightbox-btn-close.gif',
        imageBlank:				root + 'img/images/lightbox-blank.gif',
        txtImage:				'Foto',
        txtOf:					'z'
    });
});

$(document).ready(function(){
    if($("#popup").length > 0){
        $("#popup").fadeIn();
        $("div").bind("click", function(){
            $("#popup").fadeOut();
        });
    }
});
/*
// left menu position fixed
var lastTop = 0;
var MENU_TOP = 115;
$(document).ready(function(){
    var menuBottomDefault = $("#menu").offset().top + $("#menu").height();
    var leftTDBottom = $("td.left").offset().top + $("td.left").height();
    $(window).scroll(function(){
        if(Math.abs($(window).scrollTop() - lastTop) > 20){
            lastTop = $(window).scrollTop();
            var menuRelativeBottom = menuBottomDefault + lastTop;
            if(menuRelativeBottom < leftTDBottom){
                $("#menu").animate({top: lastTop});
            }
        }
    });
});

// fade in
$("#hideable-content").fadeIn(1500);

// menu link on-click fade-out
$(document).ready(function(){
    $("a[href='#']").bind("click", function(){
        $("#hideable-content").fadeOut(function(){
            $(this).fadeIn();
        });
    });
    $("a[href!='#']:not([href^='#']):not([rel*='lightbox'])").each(function(){
        var _this = this;
        $(this).attr("href_submit", $(this).attr("href"));
        $(this).attr("href", "#");
        $(this).bind("click", function(){
            $("#hideable-content").fadeOut(function(){
                window.location = $(_this).attr("href_submit");
            });
        });
    });
});
*/
// [zavinac] -> @
$(document).ready(function(){
    $(".email").each(function(){
        var text = $(this).text().replace("[zavinac]","@");
        $(this).text(text);
    });
});

// text
$(document).ready(function(){
    $("#content p, #content li").bind("mouseover", function(){
        $(this).addClass("hover");
    }).bind("mouseout", function(){
        $(this).removeClass("hover");
    });
});

