var QQ = {
	
	menuover_dur : Number,
	menuout_dur : Number,
	slideshow_duration : Number,
	slideshow_int : Number,
    
	
	init : function()
	{
		QQ.menuover_dur = 150;
		QQ.menuout_dur = 100;
		$('li.sign:not(.active)').bind('mouseover', QQ.menuover).bind('mouseout', QQ.menuout);
		$('.topmenu:not(.active)').bind('mouseover', QQ.topover).bind('mouseout', QQ.topout);
		
		QQ.slideshow_duration = 5000;
		if ($('#slideshow').length>0) QQ.slideshow_int = setInterval(QQ.transition_slideshow, QQ.slideshow_duration);
		
		$('a.lightbox').lightBox({fixedNavigation:true});
        
		$(document).pngFix();
	},
	
	transition_slideshow : function()
	{
	   //alert('slideshow');
	   $('#slideshow div:last').fadeOut(400, function()
	   {
            $('#slideshow').prepend($(this));
            $(this).fadeIn(400);
	   });
	},
	
	topover : function()
	{
	   var name = $(this).attr('src').split('.')[0];
	   $(this).attr('src',name+'_over.gif');
	},
	
	topout : function()
	{
	   var name = $(this).attr('src').split('_')[0];
	   $(this).attr('src',name+'.gif');
	},
	
	menuover : function()
	{
		$(this).stop().animate({ 
			paddingTop:'0',
			paddingBottom:'15px'
		}, QQ.menuover_dur);
	},
	
	menuout : function()
	{
		$(this).stop().animate({ 
			paddingTop:'15px',
			paddingBottom:'0'
		}, QQ.menuout_dur);
	}
	
}

$(document).ready(function() {
	QQ.init();
});
