var $jnc = jQuery.noConflict();
$jnc(document).ready(function(){
	$jnc('a.box-open').click(function(){
		if(!$jnc(this).is('.active')) {
			var _rel = $jnc(this).attr('rel');
			$jnc('#'+_rel).animate({
				'height' : $jnc('#'+_rel + ' .hidden-area').height() + 'px'
			},1000);
			$jnc(this).addClass('active');
			$jnc('#on-off').html('FR:');
			document.getElementById('search_type').value = 1;
			if (document.getElementById('date_to').value == '') {
				document.getElementById('date_to').value = document.getElementById('date_from').value;
			}
		}else{
			var _rel = $jnc(this).attr('rel');
			$jnc('#'+_rel).animate({
				'height' : 0
			},1000);
			$jnc(this).removeClass('active');
			$jnc('#on-off').html('ON:');
			document.getElementById('search_type').value = 0;
			if (document.getElementById('date_to').value == '') {
				document.getElementById('date_to').value = '';
			}
		}
		return false;
	});

	$jnc('.header_kcrw .wrap div a.host-show').hover(function(){
		$jnc(this).parents('.host-show-menu-holder').addClass('active');
	},function(){
		$jnc(this).parents('.host-show-menu-holder').removeClass('active');
	});
	$jnc('.header_kcrw .wrap .host-show-menu').hover(function(){
		$jnc(this).parents('.host-show-menu-holder').addClass('active');
	},function(){
		$jnc(this).parents('.host-show-menu-holder').removeClass('active');
	});

	$jnc('#content .tabset .tab a.open').hover(function(){
		$jnc(this).parents('.drop').addClass('active');
	},function(){
		$jnc(this).parents('.drop').removeClass('active');
	});
	$jnc('#content .tabset .tab-down').hover(function(){
		$jnc(this).parents('.drop').addClass('active');
	},function(){
		$jnc(this).parents('.drop').removeClass('active');
	});
});