$(document).ready(function() {

		$('.sidelist a').click(function(){
			return false;
		});
$('div.thumb p').hide();
$('code').hide();

$('.small_cap').hide();
$('#blank').hide();

$('.small').click(function(){
	var thumb = $(this).attr("src");
	var thumb_cap = $(this).next().text();
	$('.big img').attr("src",thumb);
	$('#main_cap').text(thumb_cap);
});

if($('img').hasClass('small') || $('div.big').next('img')){
		$(this).css("border","2px solid blue");


}

$.each($.browser, function(i,val){
	if(i=="msie" && $.browser.version.substr(0,3)=="6.0")
		$('.hide_in_ie').hide();
});


	$('div.thumb img').click(function() {
	var big_image = $(this).parents().siblings('div.big').children('img').attr("src");
	var big_desc = $(this).parents().siblings('div.big').children('img').next('p').text();
		

	var thumb_image = $(this).attr("src");
	var thumb_desc = $(this).next('p').text();
		$(this).parents().siblings('div.big').children('img').attr("src",thumb_image);
		$(this).parents().siblings('div.big').children('img').next('p').text(thumb_desc);
		$(this).attr("src",big_image);
		$(this).next('p').text(big_desc);
	});

$('img.popup').hide();
/*	$('div.studentmenu h5 , div.studentmenu h4').hover(function(){
		$(this).next('img').show();},function(){$(this).next('img').hide();
	});*/


	$('body').css("overflow-x","hidden"); 
		$('div.teacher').hover(function() {
			$('div.title',this).css("background","#CE5913");
			}, function() {
			$('div.title',this).css("background","#A13C00");
			});
		$('div.student').hover(function() {
			$('div.title',this).css("background","#556A94");
			}, function() {
			$('div.title',this).css("background","#263A62");
			});
		$('div.compant').hover(function() {
			$('div.title',this).css("background","#8C6A41");
			}, function() {
			$('div.title',this).css("background","#654B2B");
			});
	$('div.studentmenu> div').hide(); 
		$('div.studentmenu> h3').click(function() { $('div.studentmenu> div').css("border-left","3px solid #ABBDE5"),
			$(this).next('div').slideToggle('slow')
			.siblings('div:visible').slideUp('slow');
			return false;
			});
		$('div.teachermenu>div').hide();
	
	
		$('div.teachermenu> h3').click(function() {$('div.teachermenu> div ').css("border-left","3px solid #FB8F4F"),
				$(this).next('div').slideToggle('slow')
				.siblings('div:visible').slideUp('slow');
		return false;
		});
	
		function popup(mylink, windowname)
		{
		if (! window.focus)return true;
		var href;
		if (typeof(mylink) == 'string'){href=mylink;}
		else{href=mylink.href;}
		window.open(href, windowname, 'width=250,height=350,scrollbars=yes');
		return false;
		}
});
