var OShotTourVars = {"getDataUrl":"https:\/\/export.otpusk.com\/api\/tours\/hot\/","getBlocksUrl":"https:\/\/export.otpusk.com\/api\/tours\/hotBlock\/","getToursUrl":"https:\/\/export.otpusk.com\/api\/tours\/hotTour\/","blockId":1346,"timestamp":1551188109};
// document.write('
');
// console.log(OShotTourVars);
/*!
* accounting.js v0.4.1, copyright 2014 Open Exchange Rates, MIT license, http://openexchangerates.github.io/accounting.js
*/
(function(p,z){function q(a){return!!(""===a||a&&a.charCodeAt&&a.substr)}function m(a){return u?u(a):"[object Array]"===v.call(a)}function r(a){return"[object Object]"===v.call(a)}function s(a,b){var d,a=a||{},b=b||{};for(d in b)b.hasOwnProperty(d)&&null==a[d]&&(a[d]=b[d]);return a}function j(a,b,d){var c=[],e,h;if(!a)return c;if(w&&a.map===w)return a.map(b,d);for(e=0,h=a.length;ea?"-":"",g=parseInt(y(Math.abs(a||0),h),10)+"",l=3a?g.neg:g.zero).replace("%s",f.symbol).replace("%v",t(Math.abs(a),n(f.precision),f.thousand,f.decimal))};c.formatColumn=function(a,b,d,i,e,h){if(!a)return[];var f=s(r(b)?b:{symbol:b,precision:d,thousand:i,decimal:e,format:h},c.settings.currency),g=x(f.format),l=g.pos.indexOf("%s")a?g.neg:g.zero).replace("%s",f.symbol).replace("%v",t(Math.abs(a),n(f.precision),f.thousand,f.decimal));if(a.length>k)k=a.length;return a});return j(a,function(a){return q(a)&&a.length135){
self.view.$.find(" .hot-otp-price-count").css({'text-align':'left'});
}else{
self.view.$.find(" .hot-otp-price-count").css({'text-align':'right'});
self.view.$.find(" .hot-price-block").width('80');
}
}
if(!self.view.$.hasClass('hot-block_string')){
//console.log(self.view.$);
if (self.view.$.width()<=410){
self.view.$.addClass(column_block).removeClass(list_block).removeClass(table_block);
}
if(self.view.$.hasClass(column_block) && self.view.$.width()>473){
self.view.$.addClass(list_block).removeClass(column_block);
self.view.$.find(tour_block).width('auto');
}
if(self.view.$.width()<600){
if(self.view.$.hasClass(table_block)){
self.view.$.addClass(list_block).removeClass(table_block);
}
}else{
if(self.view.$.hasClass(list_block)){
self.view.$.addClass(table_block).removeClass(list_block);
}
}
if(self.view.$.hasClass(column_block) || self.view.$.hasClass(table_block)){
var imgWidth = self.view.$.find(".hot-otp-img").width(),
imgHeight = self.view.$.find(".hot-otp-img").height();
if (imgWidth<200) {imgWidth = 200;}
}
if(self.view.$.hasClass(list_block) || self.view.$.hasClass(block_string)){
self.view.$.find(tour_block).width('auto');
}
self.view.$.find(tour_block).width(imgWidth);
if(self.view.$.hasClass(table_block)){
self.view.$.find(' .hot-otp-form-wrap').each(function(){
var infoHeight = $jq(this).find('.hot-otp-info_place').height(),
hotelHeight = $jq(this).find('.hot-otp-description').height(),
TopCity = (imgHeight + 30 + infoHeight),
TopCountry = (imgHeight + 55 + infoHeight);
$jq(this).find(".hot-otp-departure-city").css('top',-TopCity);
$jq(this).find(".hot-country").css('top',-TopCountry);
$jq(this).find('.hot-otp-description').css('margin-top',infoHeight+5);
$jq(this).find('.hot-otp-info_place').css('margin-top',-(hotelHeight+infoHeight+9));
$jq(this).find('.hot-price-block').css('margin-top',hotelHeight+10);
});
}
}
}
};
/**
* Run widget
*/
var startFunction = function() {
// load block data
self.getHotBlocks(function(block){
self.data = block;
var tours = [];
var $block = $jq('#otpusk_onsite_hot' + params.blockId);
$block.empty();
if (!block.error) {
if (typeof noHotStyles !== 'undefined') {
//do nothing
} else {
$block.append($jq('').append(block.css));
}
if (typeof block.block.view_type === 'undefined') {
block.block.view_type = 'string';
}
if('click_action' in block.block && block.block.click_action === 'form') {
if('undefined' === typeof window.otpHotOrder) {
$jq('head').append($jq('').attr('rel', 'stylesheet').attr('type', 'text/css').attr('href', 'https://export.otpusk.com/jsapi/order.min.css'));
$jq('head').append($jq('').attr('rel', 'stylesheet').attr('type', 'text/css').attr('href', 'https://export.otpusk.com/os/templates/css/font-awesome.css'));
$block.append($jq('