jQuery.noConflict();

jQuery.fn.liScroll = function(settings) {
		settings = jQuery.extend({
		travelocity: 0.05
		}, settings);		
        
		return this.each(function(){
				var $strip = jQuery(this);
				$strip.addClass("newsticker")
				var stripWidth = 0;
				$strip.find("li").each(function(i){
                    jQuery(this,i).html ('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+++&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' + jQuery(this,i).html())
                    stripWidth += jQuery(this, i).outerWidth(true); // thanks to Michael Haszprunar and Fabien Volpi
				});
                
				var $mask = $strip.wrap("<div class='mask'></div>");
				var $tickercontainer = $strip.parent().wrap("<div class='tickercontainer'></div>");								
				var containerWidth = $strip.parent().parent().width();	//a.k.a. 'mask' width 	
				$strip.css('width', stripWidth);			
				var totalTravel = (stripWidth) / 2.0;
				var defTiming = totalTravel/settings.travelocity;	// thanks to Scott Waye
                
				function scrollnews(spazio, tempo){
                    $strip.animate({left: '-='+ spazio}, tempo, "linear", function(){$strip.css("left", 0); scrollnews(totalTravel, defTiming);});
				}
                
				scrollnews(totalTravel, defTiming);	
                
				$strip.hover(function(){
                    jQuery(this).stop();
				},
                
				function(){
                    var offset = jQuery(this).offset();
                    var residualSpace = offset.left + stripWidth;
                    var residualTime = residualSpace/settings.travelocity;
                    scrollnews(residualSpace, residualTime);
				});			
		});	
};

jQuery(document).ready(function($) {

    $("p.faq_quest a").click(function(){
        var elems = $("div.faq_answ"), count = elems.length; 

        thisObj = $(this).parent().parent().next();
        doShow = $(thisObj).is(':hidden');
        elems.each(function(){
            $(this).slideUp('slow', function() {
                count--;
                if (count == 0) {
                    if (doShow) {
                        thisObj.slideDown("slow");
                    } else {
                        thisObj.slideUp("slow");
                    }
                }
            });
        });

        return false;
	});

    if(typeof phplistSrc != "undefined") {
        $("iframe#phplistFrame").attr("src",phplistSrc);
    }
    
     $(function(){
        $("ul#ticker").liScroll();
    });    
       
    
})
