function show_clients_big(img) {
    jslib.messagebox.show(570, 0, 'Recent Students Feedback', '<img src=\'' + img.src + '\' />', function() {
        jslib.messagebox.hidden();
        jslib.$('jslib_messagebox_close').id = 'jslib_messagebox_ok';
    });
    jslib.$('jslib_messagebox_ok').id = 'jslib_messagebox_close';
}

function mygoto() {
$("#clients_left ul li").removeClass("s1");
$("#clients_left ul li").eq(2).addClass("s1");
$("#showbord1").hide();
$("#showbord2").show();
showfa();
}

var mainimgIndex = 0;
function switchmainimg() {
    var len = $("#showArea img").length;
    mainimgIndex++;
    if (mainimgIndex >= len) mainimgIndex = 0;
    $('#main_img').attr('src',$("#showArea img").get(mainimgIndex).src);
    setTimeout(switchmainimg, 6000);
}

function showfa() {

var MyMar;
var speed = 1;
var spec = 5;
var i = 0
var areaWidth = $("#showArea li").eq(0).width() * $("#showArea li").length - 450 || 5000;
if (typeof indexClients != 'undefined') {
	areaWidth =  $("#showArea li").eq(0).width() * $("#showArea li").length - 405 || 5000 ;
}

$("#showArea img").click(function(){
	var src = $(this).attr("src");
	$("#main_img").attr("src",src);
});

$("#showArea img").hover(
  function () {
	$(this).css({opacity:"0.6",filter:"alpha(opacity=60)",border:"#990000 solid 1px;"})
  },
  function () {
	$(this).css({opacity:"1",filter:"alpha(opacity=100)",border:"#B0B0B0 solid 1px;"})
  }
);

$(".pic_left").hover(
  function () {
    MyMar=setInterval(gotop,speed);
	$(this).css({opacity:"0.3",filter:"alpha(opacity=30)"})
  },
  function () {
    clearInterval(MyMar);
	$(this).css({opacity:"1",filter:"alpha(opacity=100)"})
  }
);

$(".pic_right").hover(
  function () {
    MyMar=setInterval(gobottom,speed);
	$(this).css({opacity:"0.3",filter:"alpha(opacity=30)"})
  },
  function () {
    clearInterval(MyMar);
	$(this).css({opacity:"1",filter:"alpha(opacity=100)"})
  }
);
function gotop() {
    i = i < 0 ?0:i-spec;
	if ( i > 0 ) {
	$("#thumbarea").animate({ scrollLeft : "-="+spec } , 0);
	}
}

function gobottom() {
    i = i < areaWidth?i+spec:areaWidth;
	if (i < areaWidth){
		$("#thumbarea").animate({ scrollLeft : "+="+spec } , 0);
	}
}
}
