 $(function() {
  	$('.price').hover(function(e) {
    	var cur_bot_dist = $(window).height() - e.clientY;
    	var cur_lr_dist = $(window).width() - e.clientX;
    	var box_h = 300; /* slide box height in pixels */
    	var box_w = 220; /* slide box height in pixels */
    	var y;
    	var x;

    	if (cur_bot_dist < (box_h)) {
    		y = e.pageY-(box_h-cur_bot_dist)+"px";
    	} else {
    		y = e.pageY-100+"px";
    	}
    	if (cur_lr_dist < (box_w)) {
    		x = e.pageX-(box_w+15)+"px";
    	} else {
    		x = e.pageX+15+"px";
    	}
    	//console.log(x+'|'+cur_lr_dist);
      $('.priceTitle').css({left:x, top:y});

      $('.priceTitle').slideDown(1);
    }, function() {
      $('.priceTitle').slideUp(1);
    });

    $('.price').click(function() {
      return false;
    });
  });


