(function($){
	$.getFileName = function(){
		/*
		var arrHref = window.location.href.split('/');
		var filename=arrHref[arrHref.length-1].split('.')[0];
		*/
		var filename=getUrlVal("arky");//by zhx
		return filename
	};
	$.chgBigTitle = function(title){
		var iTop = 0;
		var iHeight = 20;
		switch(title.toLowerCase()){
			case 'home':
				iTop = 0;
				break;
			case 'services':
			case 'process':
			case 'product':
			case 'package':
				iTop = -21;
				break;
			case 'products':
			case 'cytokines':
			case 'enzymes':
			case 'place-order':
				iTop = -42;
				break;
			case 'login':
				iTop = -102;
				iHeight = 26;
				break;
			case 'about us':
			case 'about':
				iTop = -62;
				break;
			case 'contact us':
			case 'contact':
				iTop = -82;
		}
		$('#bigTitle').css('background-position','right ' + iTop +'px');
		$('#bigTitle').css('height',iHeight +'px');
	};
})(jQuery);

jQuery(function($){
	$.chgBigTitle($.getFileName());
	$('#leftNavigator>ul>li').hover(function(){
		var text = $(this).find('a:eq(0)').text();
		$.chgBigTitle(text);
	},function(){
		$.chgBigTitle($.getFileName());
	});
});

function getUrlVal(Name) { 
	var reg = new RegExp("(^|&)" + Name + "=([^&]*)(&|$)"); 
	var r = window.location.search.substr(1).match(reg); 
	if (r != null) 
	return unescape(r[2]); 
	return null; 
} 
function safe_mailto(mail){
	mail=mail.replace(/,/g,".").replace("..","@");
	document.write("<a href='mailto:" +mail+"'>" +mail+"</a>");
}
