	$(document).ready(function() {
		$(".selectNew ul li").live('mouseover', function(){ if($(this).attr("key")!=''){ $(this).css({ background: "#333", color: "#FFF"});}});
		$(".selectNew ul li").live('mouseout', function(){ $(this).css({ background: "", color: "#999"});});
		
		$('#main .centerColumn .WorldMarkets .minimize').live('click', function(){
			$(this).removeClass('minimize').addClass('maximize');
			$(this).parents('.WorldMarkets').find('.mainRates').slideToggle('fast');
			$(this).parents('.WorldMarkets').find('.map').animate({height: '26px', top: '-=4px'}, 'fast');
			return false;
		});
		$('#main .centerColumn .WorldMarkets .maximize').live('click', function(){
			$(this).removeClass('maximize').addClass('minimize');
			$(this).parents('.WorldMarkets').find('.mainRates').slideToggle('fast');
			$(this).parents('.WorldMarkets').find('.map').animate({height: '60px', top: '+=4px'}, 'fast');
			return false;
		});

		$('#main div.ContentBlock:has(.RatesDataTable)').each(function(){
			if ($(this).find('table.RatesDataTable').height() > $(this).find('div.RatesGraphics').height()-2) {
				$(this).find('div.RatesGraphics').height($(this).find('table.RatesDataTable').height()-1);
			}
			if ($.browser.msie && $.browser.version < 7) {
				$(this).find('div.content').height($('.RatesGraphics').height()-4);
			}
		});

		$('table.withoutBG:not(.noTrAutoColouring)').each(function(){
            $(this).find('tr:odd').css({'background' : '#f9f9f9'});
		});

		/*$('table.RatesDataTable').each(function(){
			$(this).find('tr:last').css({'background-image' : 'none'});
		});
		$('table.switchableRows').each(function(){
			$(this).find('tr:first th:last').css({'border-right' : '#f8de75 1px solid'});
		});

		$('table.switchableRows tr:not(.selected, .headerTR)').live('click',function(){
//			selTab = $(this).attr('id').replace('T_', '');;
//			$(this).parents('div.content').find('div.RatesGraphics').hide().filter('#'+selTab).show();

			$(this).parents('table').find('tr.selected').prev().removeClass('noneBG');
			$(this).parents('table').find('tr.selected').removeClass('selected');
			$(this).parents('table').find('tr td').css({'border-bottom' : '#cccccc 0px dashed'});

			$(this).addClass('selected');
			$('table.switchableRows tr.selected').each(function(){
				$(this).parents('table').find('tr').find('td:first').css({'border-left' : '#f8de75 0px solid'});
				$(this).parents('table').find('tr').find('td:last').css({'border-right' : '#f8de75 1px solid'});
				$(this).find('td:first').css({'border-left' : '#f8de75 1px solid'});
				$(this).find('td:last').css({'border-right' : '#fffcea 0px solid'});
				$(this).prev().addClass('noneBG');
				$(this).parents('table').find('tr:last td').css({'border-bottom' : '#fff 0px solid'});
			});
		});
		$('table.switchableRows tr.selected').each(function(){
			$(this).parents('table').find('tr').find('td:first').css({'border-left' : '#f8de75 0px solid'});
			$(this).parents('table').find('tr').find('td:last, th:last').css({'border-right' : '#f8de75 1px solid'});
			$(this).find('td:first').css({'border-left' : '#f8de75 1px solid'});
			$(this).find('td:last').css({'border-right' : '#fffcea 0px solid'});
			$(this).prev().find('td').css({'border-bottom' : '#f8de75 1px solid'});
		});*/

        $('div.TabsNews ul.tabsHover>li').live('mouseover', function(){
			$(this).parent().find('li').removeClass('current');
			$(this).addClass('current');
			selTab = $(this).find('a').attr('rel');

			$(this).parents('div.ContentBlock').find('div.TabContent').hide()
			.filter('#'+selTab).show()
			.find('div.scrollHandleVertical').show();

			$(window).resize();
			return false;
		});
});

		

