/*CSS Browser Selector v0.3.5 (Feb 05, 2010)*/
function css_browser_selector(u){var ua = u.toLowerCase(),is=function(t){return ua.indexOf(t)>-1;},g='gecko',w='webkit',s='safari',o='opera',h=document.documentElement,b=[(!(/opera|webtv/i.test(ua))&&/msie\s(\d)/.test(ua))?('ie ie'+RegExp.$1):is('firefox/2')?g+' ff2':is('firefox/3.5')?g+' ff3 ff3_5':is('firefox/3')?g+' ff3':is('gecko/')?g:is('opera')?o+(/version\/(\d+)/.test(ua)?' '+o+RegExp.$1:(/opera(\s|\/)(\d+)/.test(ua)?' '+o+RegExp.$2:'')):is('konqueror')?'konqueror':is('chrome')?w+' chrome':is('iron')?w+' iron':is('applewebkit/')?w+' '+s+(/version\/(\d+)/.test(ua)?' '+s+RegExp.$1:''):is('mozilla/')?g:'',is('j2me')?'mobile':is('iphone')?'iphone':is('ipod')?'ipod':is('mac')?'mac':is('darwin')?'mac':is('webtv')?'webtv':is('win')?'win':is('freebsd')?'freebsd':(is('x11')||is('linux'))?'linux':'','js']; c = b.join(' '); h.className += ' '+c; return c;}; css_browser_selector(navigator.userAgent);

/****************/
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
/****************/
function toggler(obj) {
	var el = document.getElementById(obj);
	if ( el.style.display != 'none' ) {
		el.style.display = 'none';
	}
	else {
		el.style.display = '';
	}
}
/****************/
function ShowHide(LayerName,TotalLayers){//v1.0
	var temp = new Array();
	temp = LayerName.split('_');
	ReLayerName = temp[0];
	
		for (i=1;i<=TotalLayers;i++){
		document.getElementById(ReLayerName+'_'+i).style.display = 'none';
		}
	document.getElementById(LayerName).style.display = 'block';
}
/****************/
function LinkClasses(IDlink,TotalLinks,OFF,ON){//v1.0
	var temp = new Array();
	temp = IDlink.split('_');
	ReIDlink = temp[0];

		for (i=1;i<=TotalLinks;i++){
		document.getElementById(ReIDlink+'_'+i).className = OFF;
		}
	document.getElementById(IDlink).className = ON;
}
/****************/
/* Modified to support Opera */
function bookmarksite(title,url){
if (window.sidebar) // firefox
	window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){ // opera
	var elem = document.createElement('a');
	elem.setAttribute('href',url);
	elem.setAttribute('title',title);
	elem.setAttribute('rel','sidebar');
	elem.click();
} 
else if(document.all)// ie
	window.external.AddFavorite(url, title);
}
/********ANTI IE6 BUG***********/
if (document.all && !window.opera && !window.XMLHttpRequest) {
	document.execCommand("BackgroundImageCache",false,true);
}
/*****jQUERY*****/
function equalHeight(group) {
	tallest = 0;
	group.each(function() {
		thisHeight = $(this).height();
		if(thisHeight > tallest) {
			tallest = thisHeight;
		}
	});
	group.height(tallest);
}
/*SKYPE*/
$(document).ready(function() {
		window.setTimeout(function() {
			$('.skype_pnh_container').html('');
			$('.skype_pnh_print_container').removeClass('skype_pnh_print_container');
		}, 800);
	});

/****W3C HIDDEN STYLES****/
document.write('<style type="text/css">');
document.write('HTML {overflow:-moz-scrollbars-vertical}');
document.write('TEXTAREA {resize: none}');
//document.write('DIV, IMG, A {behavior: url("css/iepngfix.htc");}');
document.write('</style>');

/**/
$(document).ready(function() {
	$('.ShowLayer').click(function() {
  		$(".LightView").slideDown();
	});
	$('.LightView .Close').click(function() {
  		$(".LightView").fadeOut();
	});
	
	$('.ShowLayer2').click(function() {
  		$(".LightView2").slideDown();
	});
	$('.LightView2 .Close').click(function() {
  		$(".LightView2").fadeOut();
	});
	
	$('.ShowLayer3').click(function() {
  		$(".LightView3").slideDown();
	});
	$('.LightView3 .Close').click(function() {
  		$(".LightView3").fadeOut();
	});
	
	$('.ShowLayer4').click(function() {
  		$(".LightView4").slideDown();
	});
	$('.LightView4 .Close').click(function() {
  		$(".LightView4").fadeOut();
	});
	
	$('.ShowLayer5').click(function() {
  		$(".LightView5").slideDown();
	});
	$('.LightView5 .Close').click(function() {
  		$(".LightView5").fadeOut();
	});
	
	$('.ShowLayer6').click(function() {
  		$(".LightView6").slideDown();
	});
	$('.LightView6 .Close').click(function() {
  		$(".LightView6").fadeOut();
	});
	
	$('.ShowLayer7').click(function() {
  		$(".LightView7").slideDown();
	});
	$('.LightView7 .Close').click(function() {
  		$(".LightView7").fadeOut();
	});
	
	$('.ShowLayer8').click(function() {
  		$(".LightView8").slideDown();
	});
	$('.LightView8 .Close').click(function() {
  		$(".LightView8").fadeOut();
	});
	
	$('.ShowLayer9').click(function() {
  		$(".LightView9").slideDown();
	});
	$('.LightView9 .Close').click(function() {
  		$(".LightView9").fadeOut();
	});
});

$(window).load(function() {
	$('#Slider').nivoSlider({
		effect:'fade', //Specify sets like: 'fold,fade,sliceDown'
		slices:15,
		animSpeed:300, //Slide transition speed
		pauseTime:4500,
		startSlide:0, //Set starting Slide (0 index)
		directionNav:false, //Next & Prev
		directionNavHide:true, //Only show on hover
		controlNav:false, //1,2,3...
		controlNavThumbs:false, //Use thumbnails for Control Nav
      	controlNavThumbsFromRel:false, //Use image rel for thumbs
		controlNavThumbsSearch: '.jpg', //Replace this with...
		controlNavThumbsReplace: '_thumb.jpg', //...this in thumb Image src
		keyboardNav:true, //Use left & right arrows
		pauseOnHover:true, //Stop animation while hovering
		manualAdvance:false, //Force manual transitions
		captionOpacity:0.8, //Universal caption opacity
		beforeChange: function(){},
		afterChange: function(){},
		slideshowEnd: function(){} //Triggers after all slides have been shown
	});
	$('#Slider2').nivoSlider({
		effect:'fade', //Specify sets like: 'fold,fade,sliceDown'
		slices:15,
		animSpeed:300, //Slide transition speed
		pauseTime:4500,
		startSlide:0, //Set starting Slide (0 index)
		directionNav:false, //Next & Prev
		directionNavHide:true, //Only show on hover
		controlNav:false, //1,2,3...
		controlNavThumbs:false, //Use thumbnails for Control Nav
      	controlNavThumbsFromRel:false, //Use image rel for thumbs
		controlNavThumbsSearch: '.jpg', //Replace this with...
		controlNavThumbsReplace: '_thumb.jpg', //...this in thumb Image src
		keyboardNav:true, //Use left & right arrows
		pauseOnHover:true, //Stop animation while hovering
		manualAdvance:false, //Force manual transitions
		captionOpacity:0.8, //Universal caption opacity
		beforeChange: function(){},
		afterChange: function(){},
		slideshowEnd: function(){} //Triggers after all slides have been shown
	});
});
