$(function(){
	$('ul#menu li').hover(function() {
		$(this).children(".root").animate({backgroundPosition:"(0 0)"}, 200);
		}, function(){
		$(this).children(".root").animate({opacity: 1}, 300).animate({backgroundPosition:"(0 9px)"}, 200);
		});
});
$(function(){
	$('#menu ul').append('<span class="menu-bg"></span>')
});
$(function(){
	var imgAlt
	var imgWidth
	$('.weditor img.fleft').wrap('<div class="img-border-left"></div>')
	$('.weditor img.fright').wrap('<div class="img-border-right"></div>')
	
	$('.weditor img').each(function (i){
		i = i+1;
		$(this).addClass("imgAlts"+i);
		imgAlt = $('.weditor .imgAlts'+i).attr("alt")
		imgWidth = $(this).width() + 8;
		$(this).parent().css('width', imgWidth + "px");
		$(".weditor .imgAlts"+i).after("<p>" +imgAlt+ "</p>");
	});
});
$(function(){
	var selectHeight = new Array();
	var selectWidth = new Array();
	var spanLine = new Array();
	$("select.select").each(function (i) {
		i = i+1;
		$(this).addClass("s"+i); 
		$(this).parent().append('<span class="span' + i + '"></span>')
		selectHeight = $('select' + ".s"+i).height()
		selectWidth = $('select' + ".s"+i).width()
		$("span.span"+i).css('width', selectWidth);
		$("span.span"+i).css('height', selectHeight);
	});
});
$(function(){
	$('#menu li').each(function(i){ 
	$(this).css( 'z-index' , (700 - i) );
	});
});
$(function(){
	$('ul#menu').superfish({
	delay: 300,
	animation: {height:'show'},
	speed : 200,
	dropShadows:false,
	autoArrows:false
	}).find('ul').bgIframe({opacity:0});
}); 
$(function(){
	$('ul#menu ul').superfish({
	delay: 0,
	animation: {height:'show'},
	speed : 0,
	dropShadows:false
	});
}); 









