$.tools.tabs.addEffect("cfade", function(tabIndex, done) {
	// hide all panes and show the one that is clicked
	this.getPanes()
		.css('position', 'absolute')
		.css('top', '0')
		.css('left', '0')
		.fadeOut(1000)
		.find('.carouselcontent, .videocontent')
		.animate({height:'0',opacity:0}, 200);
	this.getPanes()
		.eq(tabIndex)
		.fadeIn(1000, function(){$(this).find('.videocontent').animate({height:'40px',opacity:1}, 200)})
		.fadeIn(1000, function(){$(this).find('.carouselcontent').animate({height:'50px',opacity:0.8}, 200)})
		.find('.carouselcontent, .videocontent')
		.css('height','0');
	// the supplied callback must be called after the effect has finished its job
	done.call();
});
$(document).ready(function(){ 
	$(".sf-menu").superfish({autoArrows:false,dropShadows:false});
	$(".sidetabs").tabs(".sideitem");
	$(".videotabs").tabs(".videoitem",{effect:'cfade',rotate:true}).slideshow({autoplay:true,interval:7000});
	$(".carouseltabs").tabs(".carouselitem",{effect:'cfade',rotate:true}).slideshow({autoplay:true,interval:7000});
	$('#menu-main > li > ul > li > a').click(function(){return false;});
	$("#backtop").click(function(){
		$('html,body').animate({scrollTop: 0}, 1000);
		return false;
	});
});
var newwindow;
function newsletterwindow(url)
{
	newwindow=window.open(url,'name','height=330,width=650');
	if (window.focus) {newwindow.focus()}
}
