$(document).ready(function() {

	$('#head-search-form #search').bind('focus', function() {
		if ($(this).val() == 'Что ищем?')
			$(this).val('');
	}).bind('blur', function() {
		if ($(this).val() == '')
			$(this).val('Что ищем?');
	});
	
	$('#search-btn').bind('mouseover', function(){
		$(this).attr('src','/themes/main/images/im/search-btn-a.gif');
	}).bind('mouseout', function(){
		$(this).attr('src','/themes/main/images/im/search-btn.gif');
	});
	
	// всплывающее окно со списком городов,стран
	$('#head-search-form #where').bind('keydown', function() { return false; });
	
	$('#head-search-form #where').bind('click', function() {
		$.fancybox({
			centerOnScroll: true,
			overlayColor: '#333',
			type: 'inline',
			href: '#chlocation-modal',
			titleShow: false,
			autoDimensions: false,
			width: 300,
			height: 150,
			onClosed: function() {
				$('#chlocation-modal').unwrap();
			}			
		});
	});
	$('.location-notify').click(function() { 
		$('.location-notify').hide ();
	});
	
	$('.panel-left','.content-block').bind('mouseover', function() {
		$('.panel-left','.content-block').removeClass('disable-panel');
		$('.panel-right','.content-block').addClass('disable-panel');
	});
	$('.panel-right','.content-block').bind('mouseover', function() {
		$('.panel-right','.content-block').removeClass('disable-panel');
		$('.panel-left','.content-block').addClass('disable-panel');
	});
});

