
function slideSwitch() {
    var $active = $('#slideshow img.active');
    var $text = $('#top_right_title');

    if( $('#slideshow').find('img').length <= 1) return;

    if ( $active.length == 0 ) $active = $('#slideshow img:last');

    var $next =  $active.next().length ? $active.next() : $('#slideshow img:first');
    
    
    $active.addClass('last-active')
	 .css({'opacity':'1'});

    $next.css({'opacity':'0'})
        .addClass('active')
	.animate({'opacity':'1'}, 1000, function() {
	//.fadeIn( 1000, function() {
            $active.removeClass('active last-active');
	    if(jQuery.browser.msie){ 

		$text.css({'opacity':'1'});

/*		if(jQuery.browser.version=='8.0'){
		    $text.get(0).style.removeAttribute('filter');	//cleartype bug
		}
*/		if(jQuery.browser.version=='7.0'){
		    
		    //$text.get(0).style.addAttribute('filter');	//cleartype bug
		    
		    //$text.css({'filter':'none'});
		    
		    //$text.className = $text.className;
		    //$text.get(0).style.removeAttribute('filter');	//cleartype bug
		}
		
	    }
        });

    $text.css({'opacity':'1'});
        
/*    if(jQuery.browser.version=='8.0'){
	$text.get(0).style.removeAttribute('filter');			//cleartype bug	
    }
*/    if(jQuery.browser.version=='7.0'){
	//$text.get(0).style.removeAttribute('filter');			//cleartype bug	
    }
    
}

$(function() {
    setInterval( "slideSwitch()", 3500 );
});

