// JavaScript Document

	function menu(){
		$("ul.sf-menu").superfish({ 
			animation: {height:'show'},
			delay: 1200,
			speed: 'normal',
			autoArrows: true,
			dropShadows: true
		}); 		
	}
	
	function slideshow(){
		$('#slide').cycle({
			fx: 'fade', //'turnDown',   //'scrollDown', 
			speed: 1500,
			timeout:  10000,
			random: 1
		});	 
	}

	function sponsorBanner(){
		$('#sponsors').cycle({
			fx: 'scrollDown', //'turnDown', 'scrollDown', 'fade'
			speed: 500,
			timeout:  5000,
			random: 1
		});	 
	}

	
	
	function mc_menu(){
		jQuery(function($){
		$('div.demo').each(function(i){ 
			var opts = { align:        [ 'bottom', 'right', 'top' , 'middle', 'left', 'center' ][i] || 'bottom' //default
					   , size:         [  48     ,  48    ,  48   ,  48     ,  36   ,  60      ][i] || 36       //default
					   , distance:     [  60     ,  60    ,  60   ,  60     ,  48   ,  80      ][i] || 54       //default
					   , coefficient : [  1.5    ,  1.5   ,  1.5  ,  1      ,  1.5  ,  1.5     ][i] || 1.5      //default
					   , labels:       [  true   ,  'mc'  ,  true ,  'br'   ,  true ,  false   ][i] || false    //default
					   , duration:     500 //default
					   , source:       (i==0 || i==6) ? function(i){ return (this.alt) ? false : this.src.replace(/(jpg|gif)$/,'png'); } : false //default
					   };
			$(this).jqDock(opts);
		  });
		  
		$('div.demo a>img').not($('#menu1 a>img')).bind('click', function(){
			var Href = $(this).parent().get(0).href;
			if(Href && !/^javascript:/i.test(Href)){ 
			  location.href = Href;
			}else{ 
			  $(this).parent().trigger('click');
			}
			return false;
		  });
		});	
	}

$(document).ready(function(){ 
	menu();
	document.getElementById('slide').style.display = 'block';
	slideshow();
	document.getElementById('sponsors').style.display = 'block';
	sponsorBanner();
	mc_menu();
}); 
