function preloadImages(imgs){
	var picArr = [];
		for (i = 0; i<imgs.length; i++){
				picArr[i]= new Image(100,100); 
				picArr[i].src=imgs[i]; 
			}
	}

var jQnumber = 0;
var jQhref = window.location.href;
if(jQhref.indexOf("/news") != -1){jQnumber = 0;}
if(jQhref.indexOf("/director") != -1){jQnumber = 1;}
if(jQhref.indexOf("/training") != -1){jQnumber = 2;}
if(jQhref.indexOf("/video") != -1){jQnumber = 3;}
if(jQhref.indexOf("/activities") != -1){jQnumber = 4;}
if(jQhref.indexOf("/member") != -1){jQnumber = 0;}
if(jQhref.indexOf("/contact") != -1){jQnumber = 5;}

	var $j = jQuery.noConflict();
  $j.fn.cycle.defaults.timeout = 100000;
	$j(function() {
    // run the code in the markup!
    $j('table pre code').not('#skip,#skip2').each(function() {
        eval($j(this).text());
    });
    
    $j('#s4').cycle({
    fx:'fade',
    delay: -1000 ,
		autostopCount:   5,
		autostop:   5,
    timeout: 100000,
		startingSlide: jQnumber,
		next:   '#next2',
		prev:   '#prev2'
    });
});


	var $j = jQuery.noConflict();
		$j(document).ready(function(){
		$j('.nav li').hover(
			function() {
				$j(this).addClass("active");
				$j(this).find('.ulwrapper').stop(false, true).slideDown();
				$j(this).find('.ulwrapper .ulwrapper').stop(false, true).slideUp('fast');
			},
			function() {
				$j(this).removeClass("active");        
				$j(this).find('div').stop(false, true).slideUp('fast');
			}
		);
		$j('.ulwrapper').hover(
			function() {
				$j('.parent').addClass("active_tab");
			},
			function() {
				$j('.parent').removeClass("active_tab");        
			}
		);
	});
