$(function(){
	windowBackLight();
	menuSelected();	
});



function windowBackLight(){
	var img = 'bqlo.png';
	if ($.ie6 == true){
		var img = 'bqlo.gif';
	}
	if($('.window').length==0){return false;}
	if($('.window').children('a.window_overlay').length==0){return false;}
	var light = '<img id="backLight" src="'+$.domain+'web/img/'+img+'" style="width:220px; height: 220px; position:absolute; top:-55px; left:-13px; z-index:-1;" alt="" />';

	$('.window').hover(
	function(){
		$(this).append(light);		
	},function(){
		$('#backLight').remove();		
	});	
}

function menuSelected(){
	if($('#menu a.sel').length==0){return false;}
	
	var selected = $('#menu a.sel').children('img');
	var old_src = selected.attr('src');
	var spl = old_src.split('.gif');
	var new_src = spl[0]+'2.gif';
	selected.attr('src', new_src);
	
}

function changemenuButtonsinIE(){
	if($.ie6!=true){return false;}
	
	$('#menu a img').each(function(i){
		var split = $(this).attr('src').split('.png');
		var newImg = split[0]+'.gif';
		alert(newImg);
		$(this).attr('src',newImg);
	});
}
