jQuery.fn.shuffleChildren = function() { 
    return this.each(function(){ 
        var items = new Array(); var newList = ''; 
         jQuery(this).children().each(function(){ 
            var newItem = '<' + this.tagName; 
            jQuery(this).each(function(){ 
                for( i=0; i<this.attributes.length; i++ ){ 
                    if( !!this.attributes[i]['nodeValue'] && this.attributes[i]['nodeValue'] != "null" ) 
                        newItem += ' ' + this.attributes[i]['nodeName'] + '="' + this.attributes[i]['nodeValue'] + '"'; 
                } 
            }); 
            newItem += '>' + jQuery(this).html() + '</' + this.tagName + '>'; 
            items.push(newItem); 
        }); 
        var i = items.length; 
        if ( i == 0 ) return false; 
        while ( --i ) { 
            var j = Math.floor( Math.random() * ( i + 1 ) ); 
            var tempi = items[i]; 
            var tempj = items[j]; 
            items[i] = tempj; 
            items[j] = tempi; 
        } 
        for(i=0;i<items.length;i++) 
            newList += items[i]; 
        jQuery(this).html(newList); 
    }); 
};


(function($) {
	$(function() { //on DOM ready
		$('ul').show();
		$('#scroller').shuffleChildren();
		$('#scroller2').shuffleChildren();
		$('#scroller3').shuffleChildren();
		$('#ads_left').shuffleChildren();
		$('#faded').shuffleChildren();
	
		$("#scroller").simplyScroll({
			autoMode: 'loop',
			speed: 2
		});
		$("#scroller2").simplyScroll({
			className: 'sponsors-scroll',
			autoMode: 'loop',
			speed: 1
		});		
		$("#scroller3").simplyScroll({
			className: 'exhibitors-scroll',
			autoMode: 'loop',
			speed: 1
		});		
		
		$('ul#faded').innerfade({
			speed: 1000,
			timeout: 5000,
			type: 'sequence',
			containerheight: '220px'
		});		
	
	
		jQuery('ul.sf-menu').superfish({ 
		minWidth:    20,   // minimum width of sub-menus in em units 
		maxWidth:    27,   // maximum width of sub-menus in em units 
		extraWidth:  1     // extra width can ensure lines don't sometimes turn over 
						   // due to slight rounding differences and font-family 
	}).superfish(); 
	
						
	});
})(jQuery);