(function ( $ ) {
    $.priceBox = function(options) {
        var pPrice = eaPrice = pDeeplink = eaDeeplink = iff = null;
        var url = options.url;
        delete options.url;

        //url bauen
        var params = $.extend({}, options, {split: 4});
        jQuery.ajax({
            url : url,
            type: 'GET',
            data: params
        }).success(function(data) {
            var priceBox = jQuery('#boxHotelPriceInfo');
            priceBox.html(data);
            if (options.tab == 3 && data.length > 0) {
                priceBox.parents('.boxGlance').show();
                var map = jQuery('#map');
                var atGlanceBoxHeight = jQuery('.atGlanceTextGroup').height();
                if (map.height() > 235) {
                    map.css('height', atGlanceBoxHeight);
                }
            } else if ((options.tab == 2 || options.tab == 1)) {
                var videoBox = jQuery('.boxVideo');
                if (videoBox.length > 0 && data.length > 0) {
                    videoBox.addClass('boxVideoWithBoxPrice');
                } else if (videoBox.length > 0 && data.length == 0) {
                    videoBox.removeClass('boxVideoWithBoxPrice');
                }
            }
        });
    };
}( jQuery ));