// var g_menu_sel=0;
jQuery(document).ready(function($){
	// $('#header .top-menu UL LI:eq('+g_menu_sel+') div').addClass('active');
	// $('#header .top-menu UL').children('LI:eq('+g_menu_sel+')').children().addClass('active');
	
	
	if( $('.rotator').length > 0 ) {
			$('.rotator UL').cycle({ 
				fx:      'fade', 
				speed:    1500, 
				timeout:  5000,	
				auto: true,
				pager:  '#slider-nav'
			
			})		
		}
		
	$("#footer UL LI.slider-up").click(function () {
   		$('.slider').slideToggle();		
	});	
	
	$("#footer UL LI.last A").click(function () {
   		$('.title').slideDown();		
	});	
		
	$('.top-menu UL LI .separator').hover(
		function() {
			$(this).parent().parent().addClass('is_active_menu');
		},
		function() {			
			$(this).parent().parent().removeClass('is_active_menu');			
		}
	);
	$('#footer UL LI').hover(function(){		
		if($(this).hasClass('first')) {$(this).addClass('first-hover');}
		if($(this).hasClass('last')) {$(this).addClass('last-hover');}
		$(this).addClass('li-hover');
	},
	function(){		
		if($(this).hasClass('first-hover')) {$(this).removeClass('first-hover');}
		if($(this).hasClass('last-hover')) {$(this).removeClass('last-hover');}
		$(this).removeClass('li-hover');
	}
	);
	
	$(".video").click(function() {
		$.fancybox({
			'padding'		: 0,
			'autoScale'		: false,
			'transitionIn'	: 'none',
			'transitionOut'	: 'none',
			'title'			: 'Test',
			'titleShow'		: false,
			'width'			: 640,
			'height'		: 385,
			'href'			: this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
			'type'			: 'swf',
			'swf'			: {
			'wmode'				: 'transparent',
			'allowfullscreen'	: 'true'
			}
		});

		return false;
	});	
	
	$('#content .sub-pages').pngFix();
	$('#content #head H1').pngFix();
	
	// $('#content .posts').pngFix();	
});



