$(document).ready(function(){
	if($.browser.msie && $.browser.version == 6){
		$('input[type="text"], input[type="password"]').addClass('ie-text');
		$('input[type="submit"], input[type="button"]').addClass('ie-btn');
	}
	$('.person dt a').lightBox({
			overlayBgColor: '#5d3f35',
			overlayOpacity: 0.8
		});	
	
	$('.ch-title a').toggle(function(){
		$(this).parent().next('.ch-content').fadeIn();
	}, function(){
		$(this).parent().next('.ch-content').fadeOut();
		return false;
	})
	
	$('.menu1 > li').hover(function(){
		$(this).find('.submenu1').stop(true, true);
		$(this).find('.submenu1').fadeIn();
	}, function(){
		$(this).find('.submenu1').fadeOut();
	})
	
	$('.prod tr:odd').addClass('odd');
	
	$('.mainmenu li:first').css('border-left', 0);
	var _timer = null;
	$('.mainmenu li').hover(function(){
		var _this = this;
		_timer = setTimeout(function(){
			$(_this).find('table').stop(true, true);
			$(_this).find('table').fadeIn('fast');
		}, 500);
	},function(){
		clearTimeout(_timer);
		$(this).find('table').fadeOut('fast');
	})
	
	$('.studies-switch, .studies h3 a').click(function(){
		if($(this).parents('.studies').is('.open')){
			$(this).parents('.studies').removeClass('open');
		}else{
			$(this).parents('.studies').addClass('open');
		}
		return false;
	})
	
});

$(function() {
	if (typeof sIFR == "function") {
		sIFR.replaceElement(named({sSelector:".sfir-elegant", sFlashSrc:"/i/elegant.swf", sColor:"#64453b", sLinkColor:"#64453b", sBgColor:"#FFFFFF", sHoverColor:"#64453b", nPaddingTop:0, nPaddingBottom:0, sWmode:'transparent'}));
	};
});