jQuery(function($) {
    $(document).ready(function(){
        // Posts
        $("#linielotnicze img").each(function () {
            rollsrc = $(this).attr("src");
            rollON = rollsrc.replace(/.gif$/gi, "-on.gif");
            $("<img>").attr("src", rollON);
        });

        $("#linielotnicze li>a").mouseover(function () {
            imgsrc = $(this).children("img").attr("src");
            matches = imgsrc.match(/-on/);
            if (!matches) {
                imgsrcON = imgsrc.replace(/.gif$/gi, "-on.gif");
                $(this).children("img").attr("src", imgsrcON);
            }
        });

        $("#linielotnicze li>a").mouseout(function () {
			    $(this).children("img").attr("src", imgsrc);
        });

        
    });
});