function $(id) {
	return document.getElementById(id);
}
function changeOpacity(obj,value) {
	obj.style.filter = "progid:DXImageTransform.Microsoft.Alpha(Opacity=" + value + ")";
	obj.style.opacity = value / 100;
	obj.style.MozOpacity = value / 100;
}
function start() {
	changeOpacity($('bg'), 80);
	var clientH = document.documentElement.clientHeight;
	var clientW = document.documentElement.clientWidth;
	var top = clientH>=880?150:(clientH - 580)/2;
	var left = (clientW - 980)/2;
	$('bg').style.left = $('content').style.left = left + "px";
	$('bg').style.top = $('content').style.top = top + "px";
}
function comm() {
	changeOpacity($('main_bg'), 80);
	var clientW = document.documentElement.clientWidth;
	var left = (clientW - 980)/2;
	$('main_bg').style.left = $('main_content').style.left = left + "px";
	$('main_bg').style.height = $('main_content').offsetHeight + "px";
}
//Drapdown menu
function wxq_drapdown_menu(id){
	jQuery('#subNav').html(jQuery(id).children('ul').children('li').children('.active').next().html());
	//if (jQuery(id).find('.current-cat').length>0) jQuery('#subNav').html(jQuery(id).find('.current-cat').parent().html());
	//else jQuery('#subNav').html(jQuery(id).find('ul li .active').parent().parent().html());
	jQuery(id).children('ul').children('li').hover(
		function(){
			/*clearTimeout(jQuery(this).data('jQueryMenu'));
			jQuery(this).find('ul').css('z-index', '1');
			jQuery(this).find('ul:first').css('z-index', '10').animate({height:'show'}, 'fast');*/
			jQuery('#subNav').html(jQuery(this).find('ul:first').html());
		},
		function(){
			/*var mm = jQuery(this);
			var timer = setTimeout(function(){
				jQuery('#subNav').html(jQuery(id).find('.current-cat').parent().html());
			}, 200);
			jQuery(this).data('jQueryMenu', timer);*/
		}
	)
}
window.onresize = function() {
	try {
		start();
		comm();
	} catch(e) {}
}
