$(document).ready(function(){ 
	$(document).pngFix();
    flashembed('logo', '/flash/logo.swf');
    $('#menu a img').hover(
        function(){
            var i = $(this).attr('id');
            $(this).attr('src','/images/layout/' + i + '_over.gif');
        },
        function(){
            var i = $(this).attr('id');
            $(this).attr('src','/images/layout/' + i + '.gif');
        }
    );
	setInterval( "slideSwitch()", 5000 );
	/*$('.webform').validate({
		rules: {
			errorPlacement: function(error, element) {
				if(element.is(":radio"))
					error.appendTo(element.parent().next().next());
				else if(element.is(":checkbox"))
					error.appendTo (element.next());
				else
					error.appendTo(element.parent().next());
			},
			success: function(label) {
				label.html("&nbsp;").addClass("checked");
			}
		}
	});
	$("#accordion").accordion({
		autoHeight: false,
		navigation: true
	});*/
});
function slideSwitch() {	
	var $active = $('.slideshow span.active');
	if ( $active.length == 0 ) $active = $('#slideshow span:last');
	
	var $next =  $active.next().length ? $active.next()
		: $('.slideshow span:first');

	$active.addClass('last-active');

	$next.css({opacity: 0.0})
		.addClass('active')
		.animate({opacity: 1.0}, 1000, function() {
			$active.removeClass('active last-active');
	});
};
//Palatino_Linotype_400.font
//Palace_Script_MT_italic_400.font
Cufon.replace('h1', { fontFamily: 'Palace Script MT' });
Cufon.replace('h2,h3,h4,h5,h6', { fontFamily: 'Palatino Linotype' });
Cufon.replace('h3.spec', { fontFamily: 'Palatino Linotype', fontSize: '20', color:'#8F2D14' });
Cufon.replace('span.spec', { fontFamily: 'Palatino Linotype', fontSize: '20', color:'#8F2D14' });
