/**
 * The script shows hidden box with info about difference between unique and no unique prices.
 * Is called when hoverd "?" in "Price (?):" or "Unique Price(?):" strings
 * Works togather with "JQUERY.price-info.css".
 * The script was written in base of "pice_info.js" of "default" by Ujeen.
 * 
 * @author andrew
 */

$(document).ready(function() {
    $('.price').hover(
    function(e) {
        
        box_w = $('#priceTitle').width();
        box_h = $('#priceTitle').height();

        x= e.pageX+20;
        y= e.pageY;

        if((e.clientY+box_h) > $(window).height()){
            y-=(e.clientY+box_h)-$(window).height();
        }
        
        y-= ($('#page').offset()).top;
        x-= ($('#page').offset()).left;
        $('#priceTitle').css({
            left:(x+"px"),
            top:(y+"px")
        });
        $('#priceTitle').slideDown(1);
    },
    function() {
        $('#priceTitle').slideUp(1);
    });
    $('.price').click(function() {
        return false;
    });
});


