$(document).ready(function() {
	$("a#editmode").fancybox({
		'titleShow'		: false,
		'transitionIn'	: 'elastic',
		'transitionOut'	: 'elastic'
	});
	$("a#picshowmode").fancybox({
		'titleShow'		: false,
		'transitionIn'	: 'elastic',
		'transitionOut'	: 'elastic'
	});
	$("a#picsgroup").fancybox({
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'titlePosition' 	: 'over'
	});
});

$(document).ready(function() {
    $('.slideshow').cycle({
		fx: 'fade', // choose your transition type, ex: fade, scrollUp, shuffle, etc...
		timeout: 6000,
                prev:   '#prev',
    	next:   '#next',
		pager: '#nav',
		pagerAnchorBuilder: function(idx, slide) {
			return '#nav td#navi:eq(' + (idx+1) + ') a';
		} 
	});
});

function white_on(id,image)
{
	var ie=document.all&&!window.opera? document.all : 0;
	var toElement=ie? ie[id] : document.getElementById(id);
	toElement.style.background = "#fcfcfc";
	if (image!='') toElement.style.background = "url(/cms/tpl/img/"+image+") no-repeat"; 
}

function white_off(id,image)
{
	var ie=document.all&&!window.opera? document.all : 0;
	var toElement=ie? ie[id] : document.getElementById(id);
	toElement.style.background = "transparent";
	if (image!='') toElement.style.background = "url(/cms/tpl/img/"+image+") no-repeat"; 
}
