$(document).ready(function()
{


// CUFON
Cufon.replace('h1');
Cufon.replace('h2');
Cufon.replace('h3');
Cufon.replace('h4');


   /*$("#street-container").draggable({ axis: 'x'});*/



   
    $(".shop").hover(function() {
      //$(this).find(".bwimg").fadeOut("1000");
	  $(this).find(".descr").stop().animate({
         bottom: "0px"
      }, 300);		  
   }, function() {
      //$(this).find(".bwimg").fadeIn("200"); 	 
	  $(this).find(".descr").stop().animate({
         bottom: "-100px"
      }, 300); 	
   });
   
   
	$('#contactform').ajaxForm(function(data) {
				if (data==1){
					$('#success').fadeIn("slow");
					$('#bademail').fadeOut("slow");
					$('#badserver').fadeOut("slow");
					$('#contactform').resetForm();
				}
				else if (data==2){
					$('#badserver').fadeIn("slow");
				}
				else if (data==3)
				{
					$('#bademail').fadeIn("slow");
				}
		});		
   
});	

$(document).mousemove(function(e){
   move_around.mouse_x = e.pageX;
   move_around.mouse_y = e.pageY;
   move_around.screen_width = $(window).width();
   move_around.mouse_position();
}); 


var move_around = {

   init_margin: 220,
   total_width: 2000,
   screen_width: 0,
   mouse_x: 0,
   mouse_y: 0,
   
   mouse_position: function() {
      var percent = (move_around.mouse_x / move_around.screen_width);
      
      var margin = (((move_around.total_width - move_around.screen_width) * percent) ) * -1;
      $("#street-container").css("marginLeft", margin + "px");
   }
   
}
