﻿//Description: shows and hides element with class "invisible" which has the same index
//as clicked element a with classes "mlink click"
//jQuery realization. Go to http://jquery.com
//Author: Alexander Yakushev
$(document).ready(function() {
    $(".click").click(function() {
        var curIndex = $(".click").index($(this));

        var txt = $(".invisible").filter(function(index) {
            return index == curIndex;
        });

        if ($(this).text() == 'кратко') {
            $(this).text('подробнее');
            $(this).removeClass('shlink');
            $(this).removeClass('sh1');
            $(this).addClass('mlink');
            $(this).addClass('m1');
            txt.hide();
        }
        else {
            $(this).text('кратко');
            $(this).removeClass('mlink');
            $(this).removeClass('m1');
            $(this).addClass('shlink');
            $(this).addClass('sh1');
            txt.show();
        }
        MoveFooter();
        return false;
    });
});

function MoveFooter() {
    document.getElementById('footer_div').style.bottom = "1px";
    document.getElementById('footer_div').style.bottom = "0px";
}
