﻿$(function()
{
  $(".mainnews .list .title").click(function()
    {
        $(".mainnews .visible").removeClass("visible");
        $(this).parent().addClass("visible");
    });
    GPotato.RSS.init();
    
     $("#bottom_gallery .gallery_menu img").click(function()
    {
        $("#bottom_gallery .gallery_menu img").each(function()
        {
            ReplaceImage($(this), "_on", "_off");
        });
        $("#bottom_gallery .screens_list").addClass("invisible");

        $("#bottom_gallery ." + $(this).attr("class")).removeClass("invisible");

        ReplaceImage($(this), "_off", "_on");
    });

    function ReplaceImage(obj, from, to)
    {
        var src = obj.attr("src");
        obj.attr("src", src.replace(from, to));
    } 
});

