$(document).ready(function(){

	jQuery("#galleryImagE").click(function(){
		jQuery(".GalleryVideo").hide();
		jQuery(".GalleryImage").show();
	});
	jQuery("#galleryVideO").click(function(){
		jQuery(".GalleryVideo").show();
		jQuery(".GalleryImage").hide();
	});
	
$(".openDetails").click(function(){
	/*if ($(".detailsPanel").is(":visible") && $(".detailedMap").is(":visible")) {
		$(".detailsPanel").slideToggle("fast")
		$(".detailedMap").slideToggle("fast");
		$(".PageContent").css({ opacity: 1 });
		moveButtonUp();
	}
	else if ($(".detailsPanel").is(":visible") && $(".detailedMap").is(":hidden")){		
		$(".detailsPanel").slideToggle("fast")
		$(".PageContent").css({ opacity: 1 });		
		moveButtonUp();	
	}
	else {
		$(".detailsPanel").slideToggle("fast");
		$(".PageContent").css({ opacity: 1 });		
		moveButtonDown();
	}*/
	openDetailedmap();
  });
});

/*   Detailed Map - JQuery   */ 

function hideAdditionalMaps(){
	$(".SevernoPoberejie").fadeOut('fast');
	$(".UjnoPoberejie").fadeOut('fast');
	$(".Gorah").fadeOut('fast');
	moveButtonUp();
};

function loadObjectInTown(var1,var2,var3,var4,var5,var6,var7,var8,var9,var10,var11){
	$.get("/search/getDevCountByCities/"+var1+"/"+var2+"/"+var3+"/"+var4+"/"+var5+"/"+var6+"/"+var7+"/"+var8+"/"+var9+"/"+var10+"/"+var11+"/", function(data){
			$('.t_Varna').html((data.city1 == undefined) ? 0 : data.city1);
			$('.t_Sofia').html((data.city34 == undefined) ? 0 : data.city34);
			$('.t_Burgas').html((data.city7 == undefined) ? 0 : data.city7);
			$('.t_StaraZagora').html((data.city35 == undefined) ? 0 : data.city35);
			$('.t_Plovdiv').html((data.city24 == undefined) ? 0 : data.city24);
			$('#t_Konstantin_i_elena').html((data.city30 == undefined) ? 0 : data.city30);
			$('#t_slatniPqsuci').html(data.city10);
			$('#t_Kranevo').html((data.city15 == undefined) ? 0 : data.city15);
			$('#t_Kavarna').html((data.city14 == undefined) ? 0 : data.city14);
			$('#t_Burgas').html((data.city7 == undefined) ? 0 : data.city7);
			$('#t_Chernomorec').html((data.city42 == undefined) ? 0 : data.city42);
			$('#t_Primorsko').html((data.city23 == undefined) ? 0 : data.city23);
			$('#t_Lozenec').html((data.city17 == undefined) ? 0 : data.city17);
			$('#t_Carevo').html((data.city41 == undefined) ? 0 : data.city41);
			$('#t_Sinemorec').html((data.city31 == undefined) ? 0 : data.city31);
			$('#t_Pomorie').html((data.city25 == undefined) ? 0 : data.city25);
			$('#t_Ravda').html((data.city11 == undefined) ? 0 : data.city11);
			$('#t_Aheloi').html((data.city44 == undefined) ? 0 : data.city44);
			$('#t_Nesebyr').html((data.city27 == undefined) ? 0 : data.city27);
			$('#t_Kosharica').html((data.city19 == undefined) ? 0 : data.city19);
			$('#t_SunnyBeach').html((data.city33 == undefined) ? 0 : data.city33);
			$('#t_Emona').html((data.city45 == undefined) ? 0 : data.city45);
			$('#t_Gorica').html((data.city5 == undefined) ? 0 : data.city5);
			$('#t_SvetiVlas').html((data.city29 == undefined) ? 0 : data.city29);
			$('#t_Bqla').html((data.city9 == undefined) ? 0 : data.city9);
			$('.t_StaraZagora').html((data.city35 == undefined) ? 0 : data.city35);
			$('#t_Plovdiv').html((data.city24 == undefined) ? 0 : data.city24);
			$('#sp_Varna').html((data.city1 == undefined) ? 0 : data.city1);
			$('#sp_ZlatniPqsuci').html((data.city10 == undefined) ? 0 : data.city10);
			$('#sp_kavarna').html((data.city14 == undefined) ? 0 : data.city14);
			$('#sp_kranevo').html((data.city15 == undefined) ? 0 : data.city15);
			$('#sp_konstantiElena').html((data.city30 == undefined) ? 0 : data.city30);
			$('#up_Gorica').html((data.city5 == undefined) ? 0 : data.city5);
			$('#up_Burgas').html((data.city7 == undefined) ? 0 : data.city7);
			$('#up_Bqla').html((data.city9 == undefined) ? 0 : data.city9);
			$('#up_Ravda').html((data.city11 == undefined) ? 0 : data.city11);
			$('#up_Lozenec').html((data.city17 == undefined) ? 0 : data.city17);
			$('#up_Kosharica').html((data.city19 == undefined) ? 0 : data.city19);
			$('#up_Primorsko').html((data.city23 == undefined) ? 0 : data.city23);
			$('#up_Pomorie').html((data.city25 == undefined) ? 0 : data.city25);
			$('#up_Nesebur').html((data.city27 == undefined) ? 0 : data.city27);
			$('#up_SvetiVlas').html((data.city29 == undefined) ? 0 : data.city29);
			$('#up_Sinemorec').html((data.city31 == undefined) ? 0 : data.city31);
			$('#up_SlunchevBriag').html((data.city33 == undefined) ? 0 : data.city33);
			$('#up_Carevo').html((data.city41 == undefined) ? 0 : data.city41);
			$('#up_Chernomorec').html((data.city42 == undefined) ? 0 : data.city42);
			$('#up_Aheloi').html((data.city44 == undefined) ? 0 : data.city44);
			$('#up_Emona').html((data.city45 == undefined) ? 0 : data.city45);
		}, "json");
}
$(document).ready(function(){
			
			$('.t_Varna').click(function(){  window.location = '/search/byMapCriteria/1/'+setUrlToOpen;}); 
			$('.t_Sofia').click(function(){  window.location = '/search/byMapCriteria/34/'+setUrlToOpen;});  
			$('.t_Burgas').click(function(){  window.location = '/search/byMapCriteria/7/'+setUrlToOpen;});
			$('.t_StaraZagora').click(function(){  window.location = '/search/byMapCriteria/35/'+setUrlToOpen;});
			$('.t_Plovdiv').click(function(){  window.location = '/search/byMapCriteria/24/'+setUrlToOpen;});
			$('.t_Konstantin_i_elena').click(function(){  window.location = '/search/byMapCriteria/30/'+setUrlToOpen;});
			$('.t_slatniPqsuci').click(function(){  window.location = '/search/byMapCriteria/10/'+setUrlToOpen;});
			$('.t_Kranevo').click(function(){  window.location = '/search/byMapCriteria/15/'+setUrlToOpen;});
			$('.t_Kavarna').click(function(){  window.location = '/search/byMapCriteria/14/'+setUrlToOpen;});
			$('.t_Burgas').click(function(){  window.location = '/search/byMapCriteria/7/'+setUrlToOpen;});
			$('.t_Chernomorec').click(function(){  window.location = '/search/byMapCriteria/42/'+setUrlToOpen;});
			$('.t_Primorsko').click(function(){  window.location = '/search/byMapCriteria/23/'+setUrlToOpen;});
			$('.t_Lozenec').click(function(){  window.location = '/search/byMapCriteria/17/'+setUrlToOpen;});
			$('.t_Carevo').click(function(){  window.location = '/search/byMapCriteria/41/'+setUrlToOpen;});
			$('.t_Sinemorec').click(function(){  window.location = '/search/byMapCriteria/31/'+setUrlToOpen;});
			$('.t_Pomorie').click(function(){  window.location = '/search/byMapCriteria/25/'+setUrlToOpen;});
			$('.t_Ravda').click(function(){  window.location = '/search/byMapCriteria/11/'+setUrlToOpen;});
			$('.t_Aheloi').click(function(){  window.location = '/search/byMapCriteria/44/'+setUrlToOpen;});
			$('.t_Nesebyr').click(function(){  window.location = '/search/byMapCriteria/27/'+setUrlToOpen;});
			$('.t_Kosharica').click(function(){  window.location = '/search/byMapCriteria/19/'+setUrlToOpen;});
			$('.t_SunnyBeach').click(function(){  window.location = '/search/byMapCriteria/33/'+setUrlToOpen;});
			$('.t_Emona').click(function(){  window.location = '/search/byMapCriteria/45/'+setUrlToOpen;});
			$('.t_Gorica').click(function(){  window.location = '/search/byMapCriteria/5/'+setUrlToOpen;});
			$('.t_SvetiVlas').click(function(){  window.location = '/search/byMapCriteria/29/'+setUrlToOpen;});
			$('.t_Bqla').click(function(){  window.location = '/search/byMapCriteria/9/'+setUrlToOpen;});
			$('.t_StaraZagora').click(function(){  window.location = '/search/byMapCriteria/35/'+setUrlToOpen;});
			$('.t_Plovdiv').click(function(){  window.location = '/search/byMapCriteria/24/'+setUrlToOpen;});
			$('.sp_Varna').click(function(){  window.location = '/search/byMapCriteria/1/'+setUrlToOpen;});
			$('.sp_ZlatniPqsuci').click(function(){  window.location = '/search/byMapCriteria/10/'+setUrlToOpen;});
			$('.sp_kavarna').click(function(){  window.location = '/search/byMapCriteria/14/'+setUrlToOpen;});
			$('.sp_kranevo').click(function(){  window.location = '/search/byMapCriteria/15/'+setUrlToOpen;});
			$('.sp_konstantiElena').click(function(){  window.location = '/search/byMapCriteria/30/'+setUrlToOpen;});
			$('.up_Gorica').click(function(){  window.location = '/search/byMapCriteria/5/'+setUrlToOpen;});
			$('.up_Burgas').click(function(){  window.location = '/search/byMapCriteria/7/'+setUrlToOpen;});
			$('.up_Bqla').click(function(){  window.location = '/search/byMapCriteria/9/'+setUrlToOpen;});
			$('.up_Ravda').click(function(){  window.location = '/search/byMapCriteria/11/'+setUrlToOpen;});
			$('.up_Lozenec').click(function(){  window.location = '/search/byMapCriteria/17/'+setUrlToOpen;});
			$('.up_Kosharica').click(function(){  window.location = '/search/byMapCriteria/19/'+setUrlToOpen;});
			$('.up_Primorsko').click(function(){  window.location = '/search/byMapCriteria/23/'+setUrlToOpen;});
			$('.up_Pomorie').click(function(){  window.location = '/search/byMapCriteria/25/'+setUrlToOpen;});
			$('.up_Nesebur').click(function(){  window.location = '/search/byMapCriteria/27/'+setUrlToOpen;});
			$('.up_SvetiVlas').click(function(){  window.location = '/search/byMapCriteria/29/'+setUrlToOpen;});
			$('.up_Sinemorec').click(function(){  window.location = '/search/byMapCriteria/31/'+setUrlToOpen;});
			$('.up_SlunchevBriag').click(function(){  window.location = '/search/byMapCriteria/33/'+setUrlToOpen;});
			$('.up_Carevo').click(function(){  window.location = '/search/byMapCriteria/41/'+setUrlToOpen;});
			$('.up_Chernomorec').click(function(){  window.location = '/search/byMapCriteria/42/'+setUrlToOpen;});
			$('.up_Aheloi').click(function(){  window.location = '/search/byMapCriteria/44/'+setUrlToOpen;});
			$('.up_Emona').click(function(){  window.location = '/search/byMapCriteria/45/'+setUrlToOpen;});
			
var setUrlToOpen = "0/0/0/0/0/0/0/0/0/0/0/";
function getSearchOptions(){
	if ($(".cbx1").attr('checked')) {
		var iFurniture = 1;
	}
	else {
	 	var iFurniture = 0;
    };
	if ($(".cbx2").attr('checked')) {
		var iCompleted = 1;
	}
	else {
	 	var iCompleted = 0;
    };
	if ($(".cbx3").attr('checked')) {
		var iParking = 1;
	}
	else {
	 	var iParking = 0;
    };
	if ($(".cbx4").attr('checked')) {
		var iArenda = 1;
	}
	else {
	 	var iArenda = 0;
    };
	if ($(".cbx5").attr('checked')) {
		var iSpa = 1;
	}
	else {
	 	var iSpa = 0;
    };
	if ($(".cbx6").attr('checked')) {
		var iLeasing = 1;
	}
	else {
	 	var iLeasing = 0;
    };
	if ($(".cbx7").attr('checked')) {
		var iFullYear = 1;
	}
	else {
	 	var iFullYear = 0;
    };
	if ($(".cbx8").attr('checked')) {
		var iFirstLine = 1;
	}
	else {
	 	var iFirstLine = 0;
    };
	
	var iCategoryId = $(".selectedCatID").val();
	var iApTypeId = $(".iAptypeId").val();
	var iPriceRangeId = $(".priceRange").val();
	
	setUrlToOpen = iFurniture+"/"+iCompleted+"/"+iParking+"/"+iArenda+"/"+iSpa+"/"+iLeasing+"/"+iFullYear+"/"+iFirstLine+"/"+iCategoryId+"/"+iApTypeId+"/"+iPriceRangeId+"/";
	loadObjectInTown(iFurniture,iCompleted,iParking,iArenda,iSpa,iLeasing,iFullYear,iFirstLine,iCategoryId,iApTypeId,iPriceRangeId);
}

$(".cbx1").click(function(){getSearchOptions();});
$(".cbx2").click(function(){getSearchOptions();});
$(".cbx3").click(function(){getSearchOptions();});
$(".cbx4").click(function(){getSearchOptions();});
$(".cbx5").click(function(){getSearchOptions();});
$(".cbx6").click(function(){getSearchOptions();});
$(".cbx7").click(function(){getSearchOptions();});
$(".cbx8").click(function(){getSearchOptions();});
$(".cbx8").click(function(){getSearchOptions();});
$("select").change(function(){getSearchOptions();});



$(".openDetailedMap").click(function(){
	openDetailedmap();
  });  
});

function openDetailedmap(){
	if ($(".detailsPanel").is(":hidden")){
		
		loadObjectInTown(0,0,0,0,0,0,0,0);
		
		$(".detailsPanel").slideToggle("fast")
		$(".detailedMap").slideToggle("fast");
		$(".PageContent").css({ opacity: 0.3 });
		moveButtonDown();
  		
	}
	else if ($(".detailsPanel").is(":visible") && $(".detailedMap").is(":visible")) {
		$(".detailsPanel").slideToggle("fast")
		$(".detailedMap").slideToggle("fast");
		$(".PageContent").css({ opacity: 1 });
		moveButtonUp();
	}
	else {
		$(".detailedMap").slideToggle("fast");
	};
	hideAdditionalMaps();
	moveButtonUp();
}
/* on outside click hide map and details bar  - JQuery */
var mouse_is_inside = false;

$(document).ready(function()
{
    
	$('.SearchBoxItems').hover(function(){ 
        mouse_is_inside=true; 
    }, function(){ 
        mouse_is_inside=false; 
    });
	$('.detailsPanel').hover(function(){ 
        mouse_is_inside=true; 
    }, function(){ 
        mouse_is_inside=false; 
    });
	$('.openDetails').hover(function(){ 
        mouse_is_inside=true; 
    }, function(){ 
        mouse_is_inside=false; 
    });
	$('.openDetailedMap').hover(function(){ 
        mouse_is_inside=true; 
    }, function(){ 
        mouse_is_inside=false; 
    });
	$('.detailsPanel').hover(function(){ 
        mouse_is_inside=true; 
    }, function(){ 
        mouse_is_inside=false; 
    });
	$('.detailedMap').hover(function(){ 
        mouse_is_inside=true; 
    }, function(){ 
        mouse_is_inside=false; 
    });

    $("html").mouseup(function(){ 
        if(! mouse_is_inside) $(".detailsPanel").slideUp("fast") 
			&& $(".detailedMap").slideUp("fast") 
			&& $(".PageContent").css({ opacity: 1 })
			&& hideAdditionalMaps();
    });
});

$(document).ready(function(){
$(".o_SevernoePoberejie").click(function(){
	$(".SevernoPoberejie").fadeIn('fast');
  });
});
$(document).ready(function(){
$(".o_UjnoePoberejie").click(function(){
	$(".UjnoPoberejie").fadeIn('fast');
  });  
});
$(document).ready(function(){
$(".o_Gorah").click(function(){
	$(".Gorah").fadeIn('fast');
  });  
});
$(document).ready(function(){
$(".AdditionalMap_HIDE").click(function(){
	hideAdditionalMaps();
  });  
});



/*  JQuery Mouse Over Div */
jQuery(document).ready(function(){
   $('.t_Sofia').hover(function(e){
	   $('#status').show();
	   $('#status').html("София (" + $('.t_Sofia').html() + " объектов)");
   }); 
   $('.t_Sofia').mouseout(function(e){
	   $('#status').hide();
   });
   
   $('.t_Plovdiv').hover(function(e){
	   $('#status').show();
	   $('#status').html("Пловдив (" + $('.t_Plovdiv').html() + " объектов)");	   
   }); 
   $('.t_Plovdiv').mouseout(function(e){
	   $('#status').hide();;
   });
   
   $('.t_StaraZagora').hover(function(e){
	   $('#status').show();
	   $('#status').html("Стара Загора (" + $('.t_StaraZagora').html() + " объектов)");	 
   }); 
   $('.t_StaraZagora').mouseout(function(e){
	   $('#status').hide();;
   });
   
   $('.t_Varna').hover(function(e){
	   $('#status').show();
	   $('#status').html("Варна (" + $('.t_Varna').html() + " объектов)");	 
   }); 
   $('.t_Varna').mouseout(function(e){
	   $('#status').hide();;
   });
   
   $('.t_Burgas').hover(function(e){
	   $('#status').show();
	   $('#status').html("Бургас (" + $('.t_Burgas').html() + " объектов)");		 
   }); 
   $('.t_Burgas').mouseout(function(e){
	   $('#status').hide();;
   }); 
   
   $('.t_Pomorie').hover(function(e){
	   $('#status').show();
	   $('#status').html("Поморье (" + $('.t_Pomorie').html() + " объектов)");		 
   }); 
   $('.t_Pomorie').mouseout(function(e){
	   $('#status').hide();;
   }); 
   
   $('.t_Ravda').hover(function(e){
	   $('#status').show();
	   $('#status').html("Равда (" + $('.t_Ravda').html() + " объектов)");		 
   }); 
   $('.t_Ravda').mouseout(function(e){
	   $('#status').hide();;
   }); 
   
   $('.t_Aheloi').hover(function(e){
	   $('#status').show();
	   $('#status').html("Ахелой (" + $('.t_Aheloi').html() + " объектов)");		 
   }); 
   $('.t_Aheloi').mouseout(function(e){
	   $('#status').hide();;
   }); 
   
   $('.t_Nesebyr').hover(function(e){
	   $('#status').show();
	   $('#status').html("Несебр (" + $('.t_Nesebyr').html() + " объектов)");		 
   }); 
   $('.t_Nesebyr').mouseout(function(e){
	   $('#status').hide();;
   }); 
   
   $('.t_Kosharica').hover(function(e){
	   $('#status').show();
	   $('#status').html("Кошарица (" + $('.t_Kosharica').html() + " объектов)");		 
   }); 
   $('.t_Kosharica').mouseout(function(e){
	   $('#status').hide();;
   }); 
   
   $('.t_SunnyBeach').hover(function(e){
	   $('#status').show();
	   $('#status').html("Солнечный Берег (" + $('.t_SunnyBeach').html() + " объектов)");		 
   }); 
   $('.t_SunnyBeach').mouseout(function(e){
	   $('#status').hide();;
   }); 
   
   $('.t_Emona').hover(function(e){
	   $('#status').show();
	   $('#status').html("Емона (" + $('.t_Emona').html() + " объектов)");		 
   }); 
   $('.t_Emona').mouseout(function(e){
	   $('#status').hide();;
   }); 
   
   $('.t_Gorica').hover(function(e){
	   $('#status').show();
	   $('#status').html("Горица (" + $('.t_Gorica').html() + " объектов)");		 
   }); 
   $('.t_Gorica').mouseout(function(e){
	   $('#status').hide();;
   }); 
   
   $('.t_SvetiVlas').hover(function(e){
	   $('#status').show();
	   $('#status').html("Святой Влас (" + $('.t_SvetiVlas').html() + " объектов)");		 
   }); 
   $('.t_SvetiVlas').mouseout(function(e){
	   $('#status').hide();;
   }); 
   
   $('.t_Bqla').hover(function(e){
	   $('#status').show();
	   $('#status').html("Бяла (" + $('.t_Bqla').html() + " объектов)");		 
   }); 
   $('.t_Bqla').mouseout(function(e){
	   $('#status').hide();;
   }); 
   
   $('.t_Chernomorec').hover(function(e){
	   $('#status').show();
	   $('#status').html("Черноморец (" + $('.t_Chernomorec').html() + " объектов)");		 
   }); 
   $('.t_Chernomorec').mouseout(function(e){
	   $('#status').hide();;
   }); 
   
   $('.t_Primorsko').hover(function(e){
	   $('#status').show();
	   $('#status').html("Приморско (" + $('.t_Primorsko').html() + " объектов)");		 
   }); 
   $('.t_Primorsko').mouseout(function(e){
	   $('#status').hide();;
   }); 
   
   $('.t_Lozenec').hover(function(e){
	   $('#status').show();
	   $('#status').html("Лозенец (" + $('.t_Lozenec').html() + " объектов)");		 
   }); 
   $('.t_Lozenec').mouseout(function(e){
	   $('#status').hide();;
   }); 
   
   $('.t_Carevo').hover(function(e){
	   $('#status').show();
	   $('#status').html("Царево (" + $('.t_Carevo').html() + " объектов)");		 
   }); 
   $('.t_Carevo').mouseout(function(e){
	   $('#status').hide();;
   }); 
   
   $('.t_Sinemorec').hover(function(e){
	   $('#status').show();
	   $('#status').html("Синеморец (" + $('.t_Sinemorec').html() + " объектов)");		 
   }); 
   $('.t_Sinemorec').mouseout(function(e){
	   $('#status').hide();;
   }); 
   
   $('.t_').hover(function(e){
	   $('#status').show();
	   $('#status').html("Синеморец (" + $('.t_Sinemorec').html() + " объектов)");		 
   }); 
   $('.t_Konstantin_i_elena').mouseout(function(e){
	   $('#status').hide();;
   }); 
   
   $('.t_Konstantin_i_elena').hover(function(e){
	   $('#status').show();
	   $('#status').html("Святой Константин и Елена (" + $('.t_Konstantin_i_elena').html() + " объектов)");		 
   }); 
   
   $('.t_slatniPqsuci').hover(function(e){
	   $('#status').show();
	   $('#status').html("Золотые Пески (" + $('.t_slatniPqsuci').html() + " объектов)");		 
   }); 
   $('.t_slatniPqsuci').mouseout(function(e){
	   $('#status').hide();;
   }); 
   
   $('.t_Kranevo').hover(function(e){
	   $('#status').show();
	   $('#status').html("Кранево (" + $('.t_Kranevo').html() + " объектов)");		 
   }); 
   $('.t_Kranevo').mouseout(function(e){
	   $('#status').hide();;
   }); 
   
   $('.t_Kavarna').hover(function(e){
	   $('#status').show();
	   $('#status').html("Каварна (" + $('.t_Kavarna').html() + " объектов)");		 
   }); 
   $('.t_Kavarna').mouseout(function(e){
	   $('#status').hide();;
   }); 
   
   
   
   
   $('.o_SevernoePoberejie').hover(function(e){
	   $('#status').show();
	   $('#status').html('Северное Побережье ( объектов)');	 
   }); 
   $('.o_SevernoePoberejie').mouseout(function(e){
	   $('#status').fadeOut('fast');
   }); 
   
   $('.o_UjnoePoberejie').hover(function(e){
	   $('#status').show();
	   $('#status').html('Южоне Побережье ( объектов)');	 
   }); 
   $('.o_UjnoePoberejie').mouseout(function(e){
	   $('#status').fadeOut('fast');
   }); 
   
   $('.o_Gorah').hover(function(e){
	   $('#status').show();
	   $('#status').html('В Горах ( объектов)');	 
   }); 
   $('.o_Gorah').mouseout(function(e){
	   $('#status').fadeOut('fast');
   }); 
})

	   

jQuery(document).ready(function(){
   $(document).mousemove(function(e){
	   var x = e.pageX - 20 + "px";
	   var y = e.pageY + 20 + "px";
		$('#status').css({ top: y });
		$('#status').css({ left: x });
   }); 
})

function moveButtonDown(){
	$( ".searchbutton" ).animate( {}, { duration: 500 })
    .animate({ 'margin-top': "65px" }, 700 );
}
function moveButtonUp(){	
	$( ".searchbutton" ).animate( {}, { duration: 5 })
    .animate({ 'margin-top': "0px" }, 300 );
}

