$(document).ready(function(){experts_moving_down_flag=experts_moving_flag=true;experts_moving_up_flag=false;experts_container_height=625;experts_moving_margin=150;$(".expert-event").click(function(){$(this).blur();var a=$(this).parent().parent();a.hasClass("active")||$(".experts .active .balloon").fadeOut(600,function(){$(".experts .active").removeClass("active");a.addClass("active");a.children(".balloon").fadeIn(600)});return false});$(".center .right .block1 .t_arrow").addClass("t-bw");$(".experts").height()<= experts_container_height&&$(".center .right .block1 .b_arrow").addClass("b-bw");$(".center .right .block1 .b_arrow").click(function(){$(this).blur();var a=$(".experts").height();if(experts_moving_down_flag&&a>experts_container_height){var b=$(".experts").css("marginTop");b=Math.round(b.substring(0,b.length-2))-experts_moving_margin;if(experts_container_height-b-a>=0){b=experts_container_height-a;experts_moving_down_flag=false;$(".center .right .block1 .b_arrow").addClass("b-bw")}if(experts_moving_flag){experts_moving_flag= false;$(".experts").animate({marginTop:b+"px"},400,function(){experts_moving_up_flag=experts_moving_flag=true;$(".center .right .block1 .t_arrow").removeClass("t-bw")})}}return false});$(".center .right .block1 .t_arrow").click(function(){$(this).blur();var a=$(".experts").height();if(experts_moving_up_flag&&a>experts_container_height){a=$(".experts").css("marginTop");a=Math.round(a.substring(0,a.length-2));a=experts_moving_margin+a;if(a>=0){a=0;experts_moving_up_flag=false;$(".center .right .block1 .t_arrow").addClass("t-bw")}if(experts_moving_flag){experts_moving_flag= false;$(".experts").animate({marginTop:a+"px"},400,function(){experts_moving_down_flag=experts_moving_flag=true;$(".center .right .block1 .b_arrow").removeClass("b-bw")})}}return false});$(".experts .next_href").click(function(){$(this).blur();var a=$(this).parent(),b=Math.round(a.children(".quotes_cnt").val()),c=Math.round(a.children(".current_quote").val()),d=c+1;a.parent().children(".quote_"+c).hide();a.parent().children(".quote_"+d).show();a.children(".prev_span").hide();a.children(".prev_href").show(); if(d==b){a.children(".next_href").hide();a.children(".next_span").show()}a.children(".current_quote").val(d);return false});$(".experts .prev_href").click(function(){$(this).blur();var a=$(this).parent();Math.round(a.children(".quotes_cnt").val());var b=Math.round(a.children(".current_quote").val()),c=b-1;a.parent().children(".quote_"+b).hide();a.parent().children(".quote_"+c).show();a.children(".next_span").hide();a.children(".next_href").show();if(c==1){a.children(".prev_href").hide();a.children(".prev_span").show()}a.children(".current_quote").val(c); return false})});