// Функция readyEffects выход из сайта
// Подключается в файле resources/js/docs.js
var winSendMail;
function readyEffects(){
    Ext.get('loading').remove();
    Ext.get('loading-mask').fadeOut({remove:true});
	
	(function(){
		var el=Ext.get('img-logo');
		el.slideIn('t', {
			easing: 'bounceOut',
			duration: 3
		}).frame('',1,{
			callback:function(){
				el.shift({ x: 30, duration:1,
					callback:function(){
						Ext.get('img-left-logo').fadeIn({duration: 2});
						var arr_left_images = ['img-private-cabinet','img-question','img-letter'],
							obj_left_images = ['Личный кабинет','Частые вопросы','Обратная связь'],
							arr_iconCls = ['icon-private-cabinet','icon-question','icon-pencil'];
						for(var i=0;i<arr_left_images.length;i++){
							(function(i){
								return function(){
									var el=Ext.get(arr_left_images[i]);
									
									new Ext.ToolTip({
										target: arr_left_images[i],
										html: obj_left_images[i],
										anchor: 'right',
										showDelay:600,
										trackMouse: true
									});
									
									el.fadeIn({
										easing: 'bounceOut',
										endOpacity: 0.6,
										duration: 3,
										callback:function(){
											el.on('mouseover', function(){
												el.animate({
													opacity: {to: 1, from: 0.6},
													height: {to: 45, from: el.getHeight()},
													width: {to: 45, from: el.getWidth()}
												});											
											});
											el.on('mouseout' , function(){
												el.animate({
													opacity: {to: 0.6, from: 1},
													height: {to: 40, from: el.getHeight()},
													width: {to: 40, from: el.getWidth()}
												});
											});
										}
									});									
									if(i==2){ //abackConnectionMouseDown в файле resources/js/function/mainpage/handler.js
										el.on('mousedown' , abackConnectionMouseDown); 
									}									
								}
							})(i).defer(1000*i+500);
						}
					}
				});
			}
		});
	}).defer(250);
}
