// JavaScript Document

Cufon.replace('h2')('h3')('h4', {textShadow: '#000 1px 1px'})('#naviAdd', {hover:true})('#navi > li > a', {hover:true,textShadow: '#000 1px 1px'});

function tableCMSButtons(cycle,tbody){
	var tbody = document.getElementById(tbody);
	var trs = tbody.getElementsByTagName('tr');
	var maxChildren = trs.length;
		
	for(var i=0;i<maxChildren;i++){
		var buttonID = cycle+(i+1);
		var button = document.getElementById(buttonID);
		var buttonTags = button.innerHTML.replace('<','|<');
		buttonTags = buttonTags.split('|');
		buttonTags = buttonTags[1];
		var newTableRow = document.createElement('td');
		newTableRow.innerHTML = buttonTags;
		newTableRow.style.width = '80px';
		newTableRow.style.display = 'block';
		trs[i].appendChild(newTableRow);
		var sp = document.getElementById(button.id);
		sp.parentNode.removeChild(sp);
	};
};

jQuery(document).ready(function(){
	jQuery("a[rel='colorbox']").colorbox();
	jQuery("a[rel='lightbox']").colorbox();
	jQuery('a img','#content').css('opacity','0.7');
	jQuery('a img','#content').hover(function() {
		jQuery(this).stop(true,true).fadeTo(300,1);
	}, function() {
		jQuery(this).stop(true,true).fadeTo(300,0.7);
	});
	jQuery('#slideshow').nivoSlider({
		effect:'fade', //Specify sets like: 'fold,fade,sliceDown'
		animSpeed:500,
		pauseTime:3000,
		startSlide:0, //Set starting Slide (0 index)
		directionNav:false, //Next & Prev
		controlNav:false, //1,2,3...
		keyboardNav:false, //Use left & right arrows
		pauseOnHover:true, //Stop animation while hovering
		manualAdvance:false, //Force manual transitions
		captionOpacity:0.85 //Universal caption opacity
	});
	jQuery("table tbody tr:even:not(.bgNone)").addClass("bgGrey");
});


