// jQuery Flash Replacement

// H1 - Headlines (marked width the CSS Class .flashReplace)
$(document).ready(function(){
    $('h1.flashReplace').flash(
        { 
            src: '/fileadmin/templates/flash/headline_h1.swf', 
            flashvars: { 
                css: [
                    '* { color: #db7d00; background-color: #ffffff; font-size: 18px; }',
                    'a { color: #db7d00; text-decoration: none; }',
                    'a:hover { color: #db7d00; text-decoration: none; }'
                ].join(' ')
            }
        },
        { version: 8 },
        function(htmlOptions) {
            htmlOptions.flashvars.txt = this.innerHTML;
            htmlOptions.flashvars.headline = this.innerHTML;
			htmlOptions.scale = 'noscale';
			//htmlOptions.wmode = 'transparent';
            this.innerHTML = '<div>'+this.innerHTML+'</div>';
            var $alt = $(this.firstChild);
            htmlOptions.height = 30;
            htmlOptions.width = '100%';
            $alt.addClass('alt');
            $(this)
                .addClass('flash-replaced')
                .prepend($.fn.flash.transform(htmlOptions));						
        }
    );
	
	$('.sbBox').biggerlink();
	
	$('#navMain li').sfHover();
	
	$(function(){ 
		//$("ul#ticker").liScroll(); 
		$("ul#ticker").liScroll({travelocity: 0.05});
	}); 	
	
});

sfHover = function() {
	var sfEls = document.getElementById("navMain").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
