/*Gallery and Slideshow timing settings*/
	var AutorotationTimer = 3000;
	var AnimationTimer = 900;
	var AutorotationTimerSS = 2000;
	var AnimationTimerSS = 900;
/*Gallery and Slideshow timing settings*/


function initNav()
{
	var nav = document.getElementById("nav");
	if(nav)
	{
		var lis = nav.getElementsByTagName("li");
		for (var i=0; i<lis.length; i++)
		{
			lis[i].onmouseover = function()
			{
				this.className += " hover";
			}
			lis[i].onmouseout = function()
			{
				this.className = this.className.replace(" hover", "");
			}
		}
	}
}
if (document.all && !window.opera) attachEvent("onload", initNav);
function main_height()
{
	var col = document.getElementsByTagName("div");
	for (var i = 0; i < col.length; i++)
	{
		if(col[i].className.indexOf('blockholder') != -1)
		{
			var _h = col[i].offsetHeight;
			var hold = col[i].getElementsByTagName("div");
			for( var j = 0 ; j < hold.length ; j++)
				if( hold[j].className.indexOf('br') !=-1)
				{
					hold[j].style.minHeight = _h - 2 +'px';
					if (window.attachEvent && !window.opera){ hold[j].style.height = _h - 2 +'px'; }
				}
		}
	}
}

if (window.addEventListener){
	window.addEventListener("load", main_height, false);
}
else if (window.attachEvent && !window.opera){
	window.attachEvent("onload", main_height);
}


$(window).bind('load',function(){
	if(typeof($().uniShow) == 'function'){
		$('.visual').uniShow({
			// front page images
			holderList: '>div.s-holder',
			scrollElParent: 'ul.s-items',
			scrollEl: 'ul.s-items > li',
			animateFunc: 'FromRight',
			btNext:'a.next',
			btPrev:'a.prev',
			special: true,
			autoStart: true,
			switchTime: AutorotationTimer,
			duration: AnimationTimer
		})
		$('.visual').uniShow({
			// front page captions
			holderList: '>div.visual-txt-mdl',
			scrollElParent: 'ul.item-text',
			scrollEl: 'ul.item-text > li',
			animateFunc: 'Fade',
			btNext:'a.next',
			btPrev:'a.prev',
			autoStart: true,
			switchTime: AutorotationTimer,
			duration: AnimationTimer
		})
	}
	
	if(typeof($().slideShow) == 'function'){
		$('div.visual').slideShow({
			slideEl:'ul.visual-list > li',
			linkNext:'li.next a',
			linkPrev:'li.prev a',
			linkPause:'li.start-slide a',
			autoSlideShow:false,
			stopable: true, 
			switchTime:AutorotationTimerSS,
			duration:AnimationTimerSS
		});
	}	
	
});

