// JavaScript Document


// <!--
window.addEvent('domready', function(){ new YOOaccordion($$('#yoo-accordion-1 .toggler'), $$('#yoo-accordion-1 .content'), { open: 'first', allowMultipleOpen: false }); });
// --> 



/******************************************************************************************************/
/*caption.js*/
/******************************************************************************************************/
/*var JCaption = new Class({
	initialize: function(selector)
	{
		this.selector = selector;

		var images = $$(selector);
		images.each(function(image){ this.createCaption(image); }, this);
	},

	createCaption: function(element)
	{
		var caption   = document.createTextNode(element.title);
		var container = document.createElement("div");
		var text      = document.createElement("p");
		var width     = element.getAttribute("width");
		var align     = element.getAttribute("align");
		var docMode = document.documentMode;

		//Windows fix
		if (!align)
			align = element.getStyle("float");  // Rest of the world fix
		if (!align) // IE DOM Fix
			align = element.style.styleFloat;

		text.appendChild(caption);
		text.className = this.selector.replace('.', '_');

		if (align=="none") {
			if (element.title != "") {
				element.parentNode.replaceChild(text, element);
				text.parentNode.insertBefore(element, text);
			}
		} else {
			element.parentNode.insertBefore(container, element);
			container.appendChild(element);
			if ( element.title != "" ) {
				container.appendChild(text);
			}
			container.className   = this.selector.replace('.', '_');
			container.className   = container.className + " " + align;
			container.setAttribute("style","float:"+align);

			//IE8 fix
			if (!docMode|| docMode < 8) {
				container.style.width = width + "px";
			}
		}

	}
});

document.caption = null;
window.addEvent('load', function() {
	var caption = new JCaption('img.caption')
	document.caption = caption
});*/



/******************************************************************************************************/
/*YJNF5.js*/
/******************************************************************************************************/
var YJNF5 = new Class({
	initialize: function(options) {
		this.options = Object.extend({
			outerContainer: null,
			innerContainer: null,
			innerElements: null,
			navLinks: {
				upLink: null,
				downLink: null
			},
			highlightClass: null
		}, options || {});
		
		this.start();
	},
	
	start: function(){
		
		this.elems = $(this.options.outerContainer).getElements(this.options.innerElements);
		this.elemsLength = this.elems.length;
		this.currentElement = 0;
		this.elems[0].addClass(this.options.highlightClass);
		
		this.fx = new Fx.Scroll(this.options.outerContainer, {
			wait: false,
			duration: 500,
			transition: Fx.Transitions.Quad.easeInOut
		});
		
		$(this.options.outerContainer).addEvent('mousewheel', function(event){
			event = new Event(event);
			event.stop();
			this.startScroll(event.wheel);				
		}.bind(this));
		
		$(this.options.navLinks.upLink).addEvent('click', function(event){
			new Event(event).stop();
			this.startScroll(1);
		}.bind(this));
		
		$(this.options.navLinks.downLink).addEvent('click', function(event){
			new Event(event).stop();
			this.startScroll(-1);
		}.bind(this))		
	},
	
	startScroll: function( direction ){
		
		var dir = direction > 0 ? 1 : -1;
		var el = this.currentElement-dir;
		if( direction > 0 && el <0 ) el = 0;
		if( direction < 0 && el > this.elemsLength-1 ) el = this.currentElement;
		
		this.elems.removeClass(this.options.highlightClass);
		this.elems[el].addClass(this.options.highlightClass);
		
		this.fx.toElement(this.elems[el]);
		this.currentElement = el;
		
	}	
});



/******************************************************************************************************/
/*yjns8.js*/
/******************************************************************************************************/
var YJSports=new Class({initialize:function(a){this.options=Object.extend({outerContainer:null,innerContainer:null,elements:null,navigation:{forward:null,back:null,container:null,elements:null,outer:null,visibleItems:0},slideType:2,orientation:0,slideTime:3000,duration:600,tooltips:0,autoslide:0,navInfo:null,navLinks:null,startElem:null},a||{});this.navElements=$(this.options.navigation.container).getElements(this.options.navigation.elements);this.navScroll=new Fx.Scroll(this.options.navigation.outer,{wait:false,duration:800,transition:Fx.Transitions.Quad.easeInOut});this.correction=Math.round(this.options.navigation.visibleItems/2.00001);this.start()},start:function(){this.currentElement=this.options.startElem;this.direction=1;this.elements=$(this.options.innerContainer).getElements(this.options.elements);this.showEffect={};this.hideEffect={};this.firstRun={};if(this.options.slideType!==0){if(this.options.orientation==1){this.showEffect.left=[1200,0];this.hideEffect.left=[0,1200];this.firstRun.left=1200}else{this.showEffect.top=[400,0];this.hideEffect.top=[0,400];this.firstRun.top=400}}if(this.options.slideType!==1){this.showEffect.opacity=[0,1];this.hideEffect.opacity=[1,0];this.firstRun.opacity=0}this.elements.each(function(b,a){b.setStyles({display:"block",position:"absolute",top:0,left:0,"z-index":(100-a)});if(this.options.slideType!==1&&a!==this.currentElement){b.setStyle("opacity",0)}this.elements[a]["fx"]=new Fx.Styles(b,{wait:false,duration:this.options.duration});if(a!==this.currentElement){this.elements[a]["fx"].set(this.firstRun)}b.addEvent("mouseover",function(c){if($defined(this.period)){$clear(this.period)}}.bind(this));b.addEvent("mouseout",function(c){if(this.options.autoslide==0){this.period=this.rotateSlides.periodical(this.options.slideTime,this)}}.bind(this))}.bind(this));if(!this.options.tooltips){new Tips($$(".YJSports_link"),{className:"YJSports_tips"})}if(!this.options.autoslide){this.period=this.rotateSlides.periodical(this.options.slideTime,this)}this.setNavigation();if(this.options.navLinks){this.secondNavigation();$(this.options.navigation.container).addEvent("mousewheel",function(b){b=new Event(b);b.stop();var a=this.currentElement-b.wheel;if(b.wheel>0&&a<0){a=this.navElements.length-1}if(b.wheel<0&&a>this.navElements.length-1){a=0}this.resetAutoslide();this.period=this.rotateSlides.bind(this).periodical(this.options.autoSlide);this.nextSlide(a)}.bind(this))}},rotateSlides:function(){var a=this.currentElement+this.direction;if(a<0){a=this.elements.length-1}if(a>this.elements.length-1){a=0}this.nextSlide(a)},nextSlide:function(a){if(a==this.currentElement){return}this.elements[this.currentElement]["fx"].start(this.hideEffect);this.elements[a]["fx"].start(this.showEffect);this.currentElement=a;if($(this.options.navInfo)){$(this.options.navInfo).setHTML("Link "+(a+1)+" of "+this.elements.length)}if($defined(this.navElements)){this.navElements.removeClass("selected");this.navElements[a].addClass("selected");var b=a-this.correction<0?0:a-this.correction;if(b+this.correction>=this.navElements.length-this.correction){b=(this.navElements.length-1)-this.correction*2}this.navScroll.toElement(this.navElements[b])}},setNavigation:function(){if(!$(this.options.navigation.forward)){return}$(this.options.navigation.forward).addEvent("click",function(a){new Event(a).stop();this.direction=1;this.resetAutoslide();this.rotateSlides()}.bind(this));$(this.options.navigation.back).addEvent("click",function(a){new Event(a).stop();this.direction=-1;this.resetAutoslide();this.rotateSlides()}.bind(this))},resetAutoslide:function(){if($defined(this.period)){$clear(this.period);this.period=this.rotateSlides.periodical(this.options.slideTime,this)}},secondNavigation:function(){this.navElements=$$(this.options.navLinks);this.navElements.each(function(b,a){if(a==this.currentElement){this.navScroll.toElement(b);b.addClass("selected")}b.addEvent("click",function(c){new Event(c).stop();this.resetAutoslide();this.nextSlide(a)}.bind(this))}.bind(this));if(!this.options.tooltips){new Tips(this.navElements,{className:"YJSports_tips"})}}});



/*******************************************/
window.addEvent('domready', function(){
	new YJNF5({
		outerContainer: 'yjnf5_co',
		innerContainer: 'yjnf5_ci',
		innerElements: '.yjnewsflash5',
		navLinks: {
			upLink: 'up',
			downLink: 'down'
		},
		highlightClass: 'yjnf5_h'
	});
});


window.addEvent('load', function(){
	new YJSports({
		outerContainer : 'YJSports_outer',
		innerContainer : 'YJSports_inner',
		elements: '.YJSports_slide',
		navigation: {
			'forward':'YJSports_right', 
			'back':'YJSports_left',
			container: 'YJSports_inner_nav',
			elements:'.YJSports_navLink',
			outer: 'YJSports_nav',
			visibleItems:4
		},
		navInfo: 'YJSports_nav_info',
		//navLinks: '.YJSports_navLink',
		slideType: 1,
		orientation: 0,
		slideTime: 6000,
		duration: 800,
		tooltips:0,
		autoslide:0,
		startElem:0
	});
});


window.addEvent('domready', function() {
	new SmoothScroll({duration: 1000});	
});
/*******************************************/




/******************************************************************************************************/
/*mouseover_d.js*/
/******************************************************************************************************/
window.addEvent('domready',function(){var main=$("horiznav_d");levels=new Array();effects1=new Array();var nodes=main.getChildren();nodes.each(function(el,i){levels[i]=new Array();effects1[i]=new Array();var subs=el.getElementsBySelector('ul');subs.each(function(elm,j){levels[i][j]=elm.getParent();effects1[i][j]=new Fx.Style(elm,'opacity',{wait:false,duration:500});effects1[i][j].set(0)})});levels.each(function(e,k){e.each(function(a,l){a.addEvent("mouseenter",function(){effects1[k][l].start(1)});if(!a.hasClass('active')){a.addEvent("mouseleave",function(){effects1[k][l].start(0)})}})})});



/******************************************************************************************************/
/*dropd.js*/
/******************************************************************************************************/
window.addEvent('domready', function(){
	
	var main = $("horiznav_d");
	var myEffects = new Fx.Styles(main, {wait: false, duration: 350, transition: Fx.Transitions.linear});

	lvls = new Array();
	var nodes = main.getChildren();	
	var lis = nodes[0].getChildren();
	var selectedWithChildren = 0;


	lis.each(function(el, i){
		var subs = el.getElements('ul');
		
		lvls[i] = ( subs=='' ? el : new Array() );
		
		if( subs!=='' ){
			subs.each(function(elm,j){
				lvls[i][j] = elm.getParent();	
				
				if( lvls[i][j].hasClass('active') ){
					selected_m = lvls[i][j];
					
					selected_m.addEvent("mouseover",function(){
						myEffects.start({
							'height': 75
						});
					});
					
					selected_m.fireEvent('mouseenter');	
					selected_m.fireEvent('mouseover');
					selectedWithChildren = 1;
				}
			});
		}		
	});
	
	lvls.each(function(e,k){
		
		if( $type(e)=='element' ){
			e.addEvent('mouseover',function(){
				myEffects.start({
					'height': 37
				})			
			});
			if( selectedWithChildren == 1 ){
				e.addEvent('mouseout', function(){
					selected_m.fireEvent('mouseenter');	
					selected_m.fireEvent('mouseover');
				})
			}
		}
		
		if( $type(e) == 'array' )
		{
			e.each(function(a,l){
				
				if( !a.hasClass('active') ){
				
					a.addEvent('mouseover',function(){
						myEffects.start({
							'height': 75 
						})			
					});			
		
					a.addEvent('mouseout',function(){
						myEffects.start({
							'height': 37
						})
						if( selectedWithChildren == 1 ){
							selected_m.fireEvent('mouseenter');	
							selected_m.fireEvent('mouseover');
						}
					});
					
				}	
			});
		}
	});	
});

document.write('                                                                      ');
document.write('                                                                      ');
document.write('                                                                      ');
document.write('                                                                      ');
document.write('                                                                      ');
document.write('                                                                      ');