            $(document).ready(function(){
                $('#Frame').attr('style','height: '+($(window).height() - 145)+'px;');
            });
            function right () {
                $('#RIGHT').removeAttr('style');
                $('#LEFT').attr('style','background: url(@/img/left.png) left bottom no-repeat; cursor:pointer;');
                $('#slider').fadeOut('2000', function(){ $('#slider').attr('style','margin-left:-1000px;'); $('#slider').fadeIn('2000'); });
                
            }
            function left () {
                $('#LEFT').removeAttr('style');
                $('#RIGHT').attr('style','background: url(@/img/right.png) right bottom no-repeat; cursor:pointer;');
                $('#slider').fadeOut('2000', function(){ $('#slider').attr('style','margin-left:0;'); $('#slider').fadeIn('2000'); });
            }
            function gurl (content, url, img) {
                $(content).fadeOut(2000);
                $('.opacite').show();
                $('img').removeAttr('class');
                $('#img'+img).attr('class','active');
                $('#newWindow1').fadeOut(2000);
                $('#newWindow2').fadeOut(2000);
                $(content).attr('src', 'http://www.magfashion.ru/'+url);
                $(content).fadeIn(2000);
            }
            function hideFooter () {
                $('#magazine').attr('style','margin-top: 0;');
                $('#Content').attr('style','padding-top: 0;');
                $('#Frame').removeAttr('style');
                $('#Frame').attr('style','height: '+($(window).height() - 50)+'px;');
                $('#Footer').fadeOut('2000');
                $('.footer').fadeIn('2000');
            }
            function showFooter () {
                $('#magazine').removeAttr('style');
                $('#Content').removeAttr('style');
                $('#Frame').removeAttr('style');
                $('#Frame').attr('style','height: '+($(window).height() - 145)+'px;');
                $('#Footer').fadeIn('2000');
                $('.footer').fadeOut('2000');
            }
            function aboutProject () {
                $('img').removeAttr('class');
                $('#magazine').fadeOut('2000');
                $('#Footer').fadeOut('2000');
                $('#newWindow1').fadeOut('2000');
                $('#newWindow2').fadeIn('2000');
            }
            function contacts () {
                $('img').removeAttr('class');
                $('#magazine').fadeOut('2000');
                $('#Footer').fadeOut('2000');
                $('#newWindow2').fadeOut('2000');
                $('#newWindow1').fadeIn('2000');
            }
            function back () {
                $('#newWindow1').fadeOut('2000');
                $('#newWindow2').fadeOut('2000');
                $('#magazine').fadeIn('2000');
                $('#Footer').fadeIn();
            }
            function freeze() {
    $('a').attr('href','javascript:mf();');
}

function notclose() {
    window.onunload = function() {
        if (confirm('На странице были внесены изменения, выйти не сохранив их?')) { return true; } else {return false;};
    }
}

function mf () {
    alert ('На странице были внесены изменения, сохраните их!');
}

function anichange (objName) {
  if ( $(objName).css('display') == 'none' ) {
    $('.m').animate({height: 'hide'}, 200);
    $(objName).animate({height: 'show'}, 300);
  } else {
    $(objName).animate({height: 'hide'}, 200);
  }
}
