var $j = jQuery.noConflict();

$j(document).ready(function(){
	
	// =EQUAL CONTENT AND SIDEBAR HEIGHT
		if ($j('aside').height() > $j('#content').height()) {
			$j('#content').height($j('aside').height());
		}
	
	// =DROPDOWN MENU
		$j('.header-menu > li > a').mouseenter(function(){
			$j(this).css({
				'background': '#212121',
				'color': '#FFF'
			});
			$j(this).siblings('ul').slideDown(400);
		});
		$j('.header-menu > li').mouseleave(function(){
			if ($j(this).children().is('ul')) {
				$j(this).children('ul').slideUp(200, function(){
					$j(this).siblings('a').css({
						'background': 'none',
						'color': '#212121'
					});
				});
			} else {
				$j(this).children('a').css({
					'background': 'none',
					'color': '#212121'
				});
			}
			
		});
		// -Events Modifications
			$j('.post-type-archive-event .header-menu .page-item-13').removeClass('current_page_parent');
			$j('.single-event .header-menu .page-item-13').removeClass('current_page_parent');
			$j('.post-type-archive-event .header-menu .page-item-5').addClass('current_page_parent');
			$j('.single-event .header-menu .page-item-5').addClass('current_page_parent');
			$j('.post-type-archive-event .aside-menu .page-item-262').addClass('current_page_item');
			$j('.single-event .aside-menu .page-item-262').addClass('current_page_item');
	
	// =EVENTS CYCLE
		$j('aside .event-list').cycle({
			fx: 'scrollHorz',
			timeout: 5000,
			speed: 1000,
			pause: 1,
			prev: '.event-prev',
			next: '.event-next'
		});
	
});
