$(document).ready(function(){
/*баннер про школу */
if(location.pathname=='/'){$('.main_banner').show(); $('.wrapper').hide();}
$('.main_banner').click(function(){$(this).hide();$('.wrapper').fadeIn('slow');});						
						
/*$('.main_events .item:first-child a.p_simage').attr('href','http://msk.elkabank.ru/');*/
$('.arrowl').hover(function(){
        $(this).attr('src','/images/arrowl-on.png');

    }, function(){
       $(this).attr('src','/images/arrowl.png');
    });
    $('.arrowr').hover(function(){
        $(this).attr('src','/images/arrowr-on.png');

    }, function(){
       $(this).attr('src','/images/arrowr.png');
    });
   $('.arr').hover(function(){
        $(this).attr('src','/images/arrowr-on.png');

    }, function(){
       $(this).attr('src','/images/arrowr.png');
    });
    $('.arl').hover(function(){
        $(this).attr('src','/images/arrowl-on.png');

    }, function(){
       $(this).attr('src','/images/arrowl.png');
    });
/*везде*/
$('.arrow1').hide();$('.arrow').mouseover(function(){$(this).attr('src','/images/close-menu-on.gif');});
$('.arrow').mouseout(function(){$(this).attr('src','/images/close-menu.gif');});
$('.arrow1').mouseover(function(){$(this).attr('src','/images/menu-on.png');});
$('.arrow1').mouseout(function(){$(this).attr('src','/images/menu.png');});
$('.arrow').click(function() {$('.left_panel').animate({width:'hide'});
$('.containerb1').animate({width:'+=282px'});$('.arrow1').fadeIn('slow');$('.arr').fadeOut('slow');
$('.jScrollPaneTrack').css('position','relative');});
$('.arrow1').click(function() {$('.left_panel').animate({width:'show'});
$('.containerb1').animate({width:'-=282px'});$('.arrow1').fadeOut('slow');$('.arr').fadeIn('slow');
$('.jScrollPaneTrack').css('position','relative');});
$('.arr').click(function() {$('.left_panel').animate({width:'hide'});
$('.containerb1').animate({width:'+=282px'});$('.arrow1').fadeIn('slow');
$('.jScrollPaneTrack').css('position','relative');$(this).hide();});
$('.highlightclose_div').click(function(){$('.friend').hide();$('#fotos').hide();$('#video').hide();});
/*------*/
/*периодика репертуар*/
var url =location.toString();
if(url.indexOf('/1022/',0)!=-1){var href=$('a.page').attr('href').replace('index','detail');$('a.page').attr('href',href)};
if(url.indexOf('/1027/',0)!=-1){var href=$('a.page').attr('href').replace('index','detail');$('a.page').attr('href',href)};
/*-----*/
/*дневник*/
$('.letter').hide();
$('.diar').click(function(){$('.arhive').attr('href','/pages/main/diary/7882/index.shtml');$('.arhive').html('читать дневник');$('.diary_list').show();$('.dn_text .arhive').css('color','#2e9f8c');$('.letter').hide();$('.letter').hide();$(this).attr('src','/images/dnevnik1.png');$('.let').attr('src','/images/letter2.png');});
$('.let').click(function(){$('.arhive').attr('href','/pages/main/diary/7883/index.shtml');$('.arhive').html('читать письма');$('.dn_text .arhive').css('color','#edc379');$('.letter').show();$('.diary_list').hide();$(this).attr('src','/images/letter1.png');$('.diar').attr('src','/images/dnevnik2.png');});
/*-----*/
$('div.datepicker a').css('border-radius','4px 4px 4px 4px');
if(location.pathname=='/pages/main/biografy/index.shtml'){$('.footer').css('background','url("/images/pixel-biografia.png") repeat');$('.header').css('background','url("/images/pixel-biografia.png") repeat');}
if(location.pathname=='/pages/main/repertuar/index.shtml'){$('.footer').css('background','url("/images/pixel-repertuar.png") repeat');$('.header').css('background','url("/images/pixel-repertuar.png") repeat');}
if(location.pathname=='/pages/main/press/index.shtml'){$('.footer').css('background','url("/images/pixel-pressa.png") repeat');$('.header').css('background','url("/images/pixel-pressa.png") repeat');}
if(location.pathname=='/pages/main/friends/index.shtml'){$('.footer').css('background','url("/images/pixel-friends.png") repeat');$('.header').css('background','url("/images/pixel-friends.png") repeat');}
if(location.pathname=='/pages/main/gallery/index.shtml'){$('.footer').css('background','url("/images/pixel-galery.png") repeat');$('.header').css('background','url("/images/pixel-galery.png") repeat');}
if(location.pathname=='/pages/main/feedback/index.shtml'){$('.footer').css('background','url("/images/pixel-svyaz.png") repeat');$('.header').css('background','url("/images/pixel-svyaz.png") repeat');}
if(location.pathname=='/pages/main/contacts/index.shtml'){$('.footer').css('background','url("/images/pixel-contacts.png") repeat');$('.header').css('background','url("/images/pixel-contacts.png") repeat');$('.menu').css('bottom','0');}
$('#classic').hide();
$('#modern').hide();
$('#partner').hide();
$('.close').mouseover(function(){$(this).attr('src','/images/close-on.gif');});
$('.close').mouseout(function(){$(this).attr('src','/images/close.gif');});
$('.arrowl').hide();
$('.arl').hide();
$('.arrow1').hide();$('.arrow').mouseover(function(){$(this).attr('src','/images/close-menu-on.gif');});
$('.arrow').mouseout(function(){$(this).attr('src','/images/close-menu.gif');});
$('.arrow1').mouseover(function(){$(this).attr('src','/images/menu-on.png');});
$('.arrow1').mouseout(function(){$(this).attr('src','/images/menu.png');});
$('.arrow').click(function() {$('.left_panel').animate({width:'hide'});
$('.arrow1').fadeIn('slow');
$('.scroll-box').css('width','1288px !important');});
$('.arrow1').click(function() {$('.left_panel').animate({width:'show'});
$('.arrow1').fadeOut('slow');});
$('.classic').click(function(){$('#classic').show();});
$('.modern').click(function(){$('#modern').show();});
$('.partners').click(function(){$('#partner').show();});
$('.close').click(function(){$('#classic').hide();$('#modern').hide();$('#partner').hide();});
var count =0;
$('.arrowr').click(function() {
$('.bio').animate({left:'-=300px'});var left= $('.bio ').css('left');
/*if(left==-909+'px'){$('.arrowr').fadeOut();}*/
count++;
if(count==4){$('.arrowr').hide();}
$('.arrowl').fadeIn();}
);
$('.arrowl').click(function() {
$('.bio').animate({left:'+=300px'});var left= $('.bio ').css('left');
/*if(left==-309+'px'){$('.arrowl').fadeOut();}*/
count--;
if(count==0){$('.arrowl').hide();}
$('.arrowr').fadeIn();});

$('.arl').click(function() {$('.news').animate({left:'+=355px'});var left= $('.news ').css('left');if(left==-364+'px'){$('.arl').fadeOut();}$('.arr').fadeIn();});
/*фотогаллерея*/
$('#video').hide();
$('#fotos').hide();
$('.fot').click(function(){$('#fotos').show();$('#video').hide();});
$('.vid').click(function(){$('#fotos').hide();$('#video').show();});
$('#fotos').click(function(){$('#video').hide();$('#fotos').hide();});
$('#video').click(function(){$('#video').hide();$('#fotos').hide();});
$('.ar_close').click(function(){$('#fotos').hide();$('#video').hide();});
$('.save').hover(function() {
$(this).attr('src','/images/save-over.png');
}, function() {
$(this).attr('src','/images/save.png');
});
/*наши друзья*/
/*if(location.pathname=="/pages/main/friends/index.shtml"){
$('.rep img').click(function(){
var cl=$(this).attr('className');
$('.rep div.friend').fadeOut();
$('.rep div.'+cl+'').fadeIn();
});	
}*/

});
