// JavaScript Document
/**
 * TP24
 *   Main
 *   Locale
 *   Tracker
 *   Util
 *   Common
 *   Voucher
 *   UI
 *   Print
 *   Newsletter
 *   Confirmation
 */

var TP24 = {};

/**
 * Main
 */

TP24.Main = function() {
	var parent = null;

	function setup() {
		// navigation
		setupNavigation();

		// input.image rollover
		bindInputImageRollover();

		//facebook widget
		setupFacebookWidget();
	}

	function setupNavigation() {
		// remove seperator onLoad
		$('#navigation ul.main li.current').prev('li').addClass('no-sep');

		// remove seperator onMouseOver
		$('#navigation ul.main li').hover( function(){
			$(this).prev('li').addClass('no-sep');
		},
		// on mouseout revert seperator
		function(){
			$(this).prev('li').removeClass('no-sep');
			$('#navigation ul.main li.current').prev('li').addClass('no-sep');
		}
		);
	}

	function setupFacebookWidget() {

	    $("#facebook_widget").hover(function(){
		    $("#facebook_widget").stop(true, false).animate({right:"0px"},"medium");
	    },function(){
		    $("#facebook_widget").stop(true, false).animate({right:"-261px"},"medium");
	    },500);

	}

	// page

	function isPageHome(url) {
		url = determinePageURL(url);

		return !!url.match(/^\/gr$/);
	}

	function isPageFlights(url) {
		url = determinePageURL(url);

		return !!url.match(/^\/gr\/flights$/);
	}

	function determinePageURL(url) {
		if (url === undefined) {
			return location.pathname;
		}

		return url;
	}

	// misc

	function bindInputImageRollover() {
		$('body').find('input[type="image"]').unbind('mouseover.Main').bind('mouseover.Main', function(e){
			$(e.target).attr('src', $(e.target).attr('src').replace(/_n\.gif/, '_o.gif'));
		}).unbind('mouseout.Main').bind('mouseout.Main', function(e){
			$(e.target).attr('src', $(e.target).attr('src').replace(/_o\.gif/, '_n.gif'));
		});
	}

	function init(p) {
		parent = p;

		$(function(){
			setup();
		});

		return this;
	}

	return {
		init: init,
		isPageHome: isPageHome,
		isPageFlights: isPageFlights,
		bindInputImageRollover: bindInputImageRollover
	};
}().init();

/**
 * Locale
 */

TP24.Locale = function() {
	var parent = null;

	var data = {};

	function translate(key, params) {
		var str = key;

		if (data[key] !== undefined) {
			str = data[key];
		} else {
			console.warn('TP24.Locale.translate() key not found -> ' + key);
		}

		if (params !== undefined) {
			for (var i = 0; i < params.length; i++) {
				str = str.replace(new RegExp('%' + (i + 1)), params[i]);
			}
		}

		return str;
	}

	function initData(obj) {
		data = obj;
	}

	function init(p) {
		parent = p;

		return this;
	}

	return {
		init: init,
		initData: initData,
		t: translate
	};
}().init();

/**
 * Tracker
 */

TP24.Tracker = function() {
	var parent = null;

	// const
	var Category = { FLIGHTS: 'Flights', HOTELS: 'Hotels', CARS: 'Cars' };

	function track(category, action, label, value) {
		if (typeof pageTracker === 'undefined') {
			return;
		}

		if (category === '') {
			return;
		}

		if (label !== undefined && value !== undefined) {
			pageTracker._trackEvent(category, action, label, value);
		} else if (label !== undefined) {
			pageTracker._trackEvent(category, action, label);
		} else {
			pageTracker._trackEvent(category, action);
		}
	}

	function init(p) {
		parent = p;

		return this;
	}

	return {
		Category: Category,
		init: init,
		track: track
	};
}().init();

/**
 * Util
 *
 * http://code.google.com/p/js-methods/
 */

TP24.Util = {
	// string

	trim: function(str) {
		// Faster JavaScript Trim: http://blog.stevenlevithan.com/archives/faster-trim-javascript
		return str.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
	},

	capitalize: function(str) {
		return str.replace(/\w+/g, function(str){
			return str.charAt(0).toUpperCase() + str.substr(1).toLowerCase();
		});
	},

	encodeHTML: function(str) {
		return str.replace(/&/g, '&amp;').replace(/"/g, '&quot;').replace(/'/g, '&#039;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/\n/g, '<br />');
	},

	pad: function(str, length, letter, direction) {
		length    = length || 10;
		direction = direction || 0;
		letter    = letter || '0';
		while (str.length < length) {
			str = (direction === 1) ? str += letter : letter + str;
		}
		return str;
	},

	convertDate: function(str) {
		return new Date((str || '').replace(/-/g, '/').replace(/[TZ]/g, ' '));
	},

	getDateFromDateText: function(str) {
		var array = str.split('/');

		var date = new Date();
		date.setDate(array[0]);
		date.setMonth(array[1] - 1);
		date.setFullYear(array[2]);

		return date;
	},

	numberFormat: function(a, b, c, d) {
		a = Math.round(a * Math.pow(10, b)) / Math.pow(10, b);
		e = a + '';
		f = e.split('.');

		if (!f[0]) {
			f[0] = '0';
		}

		if (!f[1]) {
			f[1] = '';
		}

		if (f[1].length < b) {
			g = f[1];
			for (i=f[1].length + 1; i <= b; i++) {
				g += '0';
			}
			f[1] = g;
		}

		if (d !== '' && f[0].length > 3) {
			h = f[0];
			f[0] = '';
			for(j = 3; j < h.length; j+=3) {
				i = h.slice(h.length - j, h.length - j + 3);
				f[0] = d + i + f[0] + '';
			}
			j = h.substr(0, (h.length % 3 === 0) ? 3 : (h.length % 3));
			f[0] = j + f[0];
		}

		c = (b <= 0) ? '' : c;

		return f[0] + c + f[1];
	},

	// array

	exists: function(arr, item) {
		for (var i = 0; i < arr.length; i++) {
			if (arr[i] === item) {
				return i;
			}
		}
		return false;
	}
};

/**
 * Common
 */

TP24.Common = {
	formatPrice: function(price, decimals) {
		if (decimals === undefined) {
			decimals = 2;
		}

		return TP24.Util.numberFormat(price, decimals, ',', '.') + '&nbsp;ß?¬';
	}
};

/**
 * Voucher
 */

TP24.Voucher = function() {
	var parent = null;

	function setup() {
		waiting = false;

//		$('#payment-voucherCode').inputHint();

		$('#payment-voucherButton').click(function(){
			if (!waiting) {
				waiting = true;
				verify();
			}
			return false;
		});
	}

	function verify() {
		voucherCodeInput = $('#payment-voucherCode');

		function startWait() {
			voucherCodeInput.attr('disabled', 'disabled').removeClass('error')
				.removeClass('success').addClass('waitIcon');
		}

		function endWait() {
			voucherCodeInput.removeAttr('disabled').removeClass('waitIcon');
			waiting = false;
		}

		startWait();

		$.ajax({
			cache: false,
			dataType: 'json',
			type: 'GET',
			url: '/gr/verify-voucher?format=json&code=' + $('#payment-voucherCode').val(),
			error: function(obj, msg, e){
				endWait();
				console.error(obj, msg, e);
			},
			success: function(json){
				var voucherDiscount = (json.discount !== undefined ? json.discount : 0);

				// trigger voucher verify event
				$(document).trigger('voucherVerify', [voucherDiscount]);

				endWait();

				// feedback
				if (voucherDiscount > 0) {
					voucherCodeInput.removeClass('error').addClass('success');
					$('#voucher-error-message').removeClass('voucher-error-show').addClass('voucher-error-hide');
				} else {
					voucherCodeInput.removeClass('success').addClass('error');
					$('#voucher-error-message').removeClass('voucher-error-hide').addClass('voucher-error-show');
				}
			}
		});
	}

	function init(p) {
		parent = p;

		$(function(){
			setup();
		});

		return this;
	}

	return {
		init: init,
		verify: verify
	};
}();

/**
 * UI
 */

TP24.UI = function() {
	function setupDatepicker(obDateInput, ibDateInput, trackerCategory) {
		if (!$.datepicker) {
			return;
		}

		if (obDateInput.length === 0 || ibDateInput.length === 0) {
			return;
		}

		if (trackerCategory === undefined) {
			trackerCategory = '';
		}

		$.datepicker.regional.el = {
			closeText:       "???»????????????",
			prevText:        "? ?????·?³?????????½????",
			nextText:        "???????????½????",
			currentText:     "?€???­?????½ ?????½?±??",
			monthNames:      ["???±?½?????¬????????", "?¦???²???????¬????????", "???¬??????????", "?????????»??????", "???¬??????", "???????½??????", "???????»??????", "?????³????????????", "?£???????­???²????????", "?????????²????????", "?????­???²????????", "???????­???²????????"],
			monthNamesShort: ["???±?½", "?¦???²", "???±??", "??????", "???±??", "???????½", "???????»", "?????³", "?£????", "??????", "??????", "??????"],
			dayNames:        ["?????????±????", "?????????­???±", "?€???????·", "?€?????¬?????·", "? ?­???????·", "? ?±???±??????????", "?£?¬?²?²?±????"],
			dayNamesShort:   ["??????", "??????", "?€????", "?€????", "? ????", "? ?±??", "?£?±?²"],
			dayNamesMin:     ["????", "????", "?€??", "?€??", "? ??", "? ?±", "?£?±"],
			dateFormat:      "dd/mm/yy",
			firstDay:        1,
			isRTL:           false
		};

		var defaults = $.extend({
			buttonImage:     '/img/icon_calendar.gif',
			buttonImageOnly: true,
			duration:        '',
			maxDate:         '1y',
			minDate:         new Date(),
			numberOfMonths:  2,
			showOn:          'both'
		}, $.datepicker.regional.el);

		$.datepicker.setDefaults(defaults);

		obDateInput.datepicker({
			beforeShow: function(input){
				TP24.Tracker.track(trackerCategory, 'openCalenderSearch');
			},
			onSelect: function(dateText, inst){
				var outboundDate = obDateInput.datepicker('getDate');
				var inboundDate  = ibDateInput.datepicker('getDate');

				if (outboundDate > inboundDate) {
					outboundDate.setDate(outboundDate.getDate() + 2);
					ibDateInput.datepicker('setDate', outboundDate);
				}
			}
		});

		ibDateInput.datepicker({
			beforeShow: function(input){
				TP24.Tracker.track(trackerCategory, 'openCalenderSearch');
			},
			beforeShowDay: function(date){
				if ('' + date === '' + obDateInput.datepicker('getDate')) {
					return [true, 'ob-date'];
				}

				return [true, ''];
			},
			onSelect: function(dateText, inst){
				var outboundDate = obDateInput.datepicker('getDate');
				var inboundDate  = ibDateInput.datepicker('getDate');

				if (outboundDate > inboundDate) {
					inboundDate.setDate(inboundDate.getDate() - 2);
					obDateInput.datepicker('setDate', inboundDate);
				}
			}
		});
	}

	function setupSlideshow() {
		// jQuery cycle plugin is used
		if ($('#slider-nav').empty() && $('#slider').length > 0) {
			$('#slider')
			.before('<div id="slider-nav">')
			.cycle({
				pause: 1,
				timeout: 8000,
				speed:  700,
				pager:  '#slider-nav'
			});
		}
	}

	return {
		setupDatepicker: setupDatepicker,
		setupSlideshow: setupSlideshow
	};
}();

/**
 * Print
 */

TP24.Print = function() {
	function setupPrint(click, printable) {
		$(click).click(function() {
			$(printable).jqprint();
		});
	}

	return {
		setupPrint: setupPrint
	};
}();


/**
 * jQuery Plugins
 */

(function($){
	$.fn.inputHint = function() {
		return this.each(function(){
			var input = $(this);
			var label = $('label[for=' + input.attr('id') + ']');
			var text  = '';
			if (label.length > 0) {
				text = label.text();
			} else {
				text = input.attr('title');
			}
			input.unbind('.inputHint');
			input.bind('focus.inputHint', function(){
				if (input.val() === text) {
					input.val('').removeClass('hint');
				}
			}).bind('blur.inputHint', function(){
				if (input.val() === '' || input.val() === text) {
					input.val(text).addClass('hint');
				}
			});
			if (input.val() === '' || input.val() === text) {
				input.val(text).addClass('hint');
			}
			label.hide();
			label.next('br').hide();
		});
	};
})(jQuery);

(function($){
	$.fn.inputHintClear = function() {
		return this.each(function(){
			var input = $(this);
			var label = $('label[for=' + input.attr('id') + ']');
			var text  = '';
			if (label.length > 0) {
				text = label.text();
			} else {
				text = input.attr('title');
			}
			if (input.val() === text) {
				input.val('').removeClass('hint');
			}
		});
	};
})(jQuery);

/**
 * Firebug
 */

(function(){
	if (!('console' in window) || !('firebug' in console)) {
		var names = ['log', 'debug', 'info', 'warn', 'error', 'assert', 'dir', 'dirxml', 'group', 'groupEnd', 'time', 'timeEnd', 'count', 'trace', 'profile', 'profileEnd'];
		var nothing = function(){};

		window.console = {};
		for (var i = 0; i < names.length; ++i) {
			window.console[names[i]] = nothing;
		}
	}
})();

TP24.Main.hotelRooms = function(){

	function init(){
		$('#roomsNumber').bind('change', function(e){
			var roomInfo = [];
			for (var i = 0; i < parseInt($(this).val(), 10); i++) {
			roomInfo.push({ 'adults': 1, 'childs': 0, 'childAges': [] });
			}
			TP24.Main.hotelRooms.updateRooms(roomInfo);
		});

		$('#roomsNumber').change();
	}

	function populateRooms(rooms){

		if (rooms === undefined || rooms.length === 0) {
		rooms = [{ 'adults': 1, 'childs': 0, 'childAges': [] }];
		}

		var roomsContent = '';
		for (var roomIndex = 0; roomIndex < rooms.length; roomIndex++) {
			roomsContent += [
			'<div class="room clearfix">',
				'<p><span>???????¬??????: ' + (roomIndex + 1) + '<\/span><\/p>',
				'<p>',
					'<label class="text" for="adults-' + roomIndex + '">???½???»????????<\/label>',
						'<select id="adults-' + roomIndex + '" name="roomInfo[' + roomIndex + '][adultsNum]">',
							'<option value="1"' + (rooms[roomIndex].adults === 1 ? ' selected="selected"' : '') + '>1<\/option>',
							'<option value="2"' + (rooms[roomIndex].adults === 2 ? ' selected="selected"' : '') + '>2<\/option>',
							'<option value="3"' + (rooms[roomIndex].adults === 3 ? ' selected="selected"' : '') + '>3<\/option>',
							'<option value="4"' + (rooms[roomIndex].adults === 4 ? ' selected="selected"' : '') + '>4<\/option>',
						'<\/select>',
				'</p>',
					'<p>',
						'<label class="text" for="Room-' + roomIndex + '-ChildNum">? ?±???????¬<\/label>',
						'<select id="Room-' + roomIndex + '-ChildNum" name="roomInfo[' + roomIndex + '][childNum]" class="child">',
							'<option value="0"' + (rooms[roomIndex].childs === 0 ? ' selected="selected"' : '') + '>0<\/option>',
							'<option value="1"' + (rooms[roomIndex].childs === 1 ? ' selected="selected"' : '') + '>1<\/option>',
							'<option value="2"' + (rooms[roomIndex].childs === 2 ? ' selected="selected"' : '') + '>2<\/option>',
						'<\/select>',
					'<\/p>',
			'<\/div>'
			].join('');
		}

		$('#Rooms').html(roomsContent);

		$('#Rooms select.child').bind('change', function(e){
			$(this).parent().parent().find('.child-age').remove();
			var matches = $(this).attr('id').match(/Room-([0-9]+)-ChildNum/);
			var roomIndex = parseInt(matches[1], 10);

			var childrenNumber = parseInt($(this).val(), 10);
			var childrenContent = '';

			for (var childIndex = 0; childIndex < childrenNumber; childIndex++) {
			childrenContent += [
					'<label class="child-age" for="Room-' + roomIndex + '-Child-' + childIndex + '-Age">&nbsp;???»???????± ? ?±??????????<\/label>',
					'<select class="child-age" id="Room-' + roomIndex + '-Child-' + childIndex + '-Age" name="roomInfo[' + roomIndex + '][childAges][childAge][' + childIndex + ']">',
						'<option value="1">1<\/option>',
						'<option value="2">2<\/option>',
						'<option value="3">3<\/option>',
						'<option value="4">4<\/option>',
						'<option value="5">5<\/option>',
						'<option value="6">6<\/option>',
						'<option value="7">7<\/option>',
						'<option value="8">8<\/option>',
						'<option value="9">9<\/option>',
						'<option value="10">10<\/option>',
						'<option value="11">11<\/option>',
						'<option value="12">12<\/option>',
					'<\/select>'
				].join('');
			}

			$(this).parent().parent().append(childrenContent);
		});
	}//~populateRooms

	function updateRooms(rooms) {
		if (rooms === undefined || rooms.length === 0) {
			rooms = [{ 'adults': 1, 'childs': 0, 'childAges': [] }];
		}

		var roomsContent = '';
		var childrenContent = '';
		for (var roomIndex = 0; roomIndex < rooms.length; roomIndex++) {

			childrenContent = '';
		for (var childIndex = 0; childIndex < rooms[roomIndex].childAges.length; childIndex++) {
			childrenContent += [
				'<div style="display:block;clear:both;"><label class="child-age" for="Room-' + roomIndex + '-Child-' + childIndex + '-Age">???»???????± ? ?±??????????:<\/label>',
				'<select class="child-age" id="Room-' + roomIndex + '-Child-' + childIndex + '-Age" name="roomInfo[' + roomIndex + '][childAges][childAge][' + childIndex + ']">',
						'<option value="1"' + (rooms[roomIndex].childAges[childIndex] === 1 ? ' selected="selected"' : '') + '>1<\/option>',
						'<option value="2"' + (rooms[roomIndex].childAges[childIndex] === 2 ? ' selected="selected"' : '') + '>2<\/option>',
						'<option value="3"' + (rooms[roomIndex].childAges[childIndex] === 3 ? ' selected="selected"' : '') + '>3<\/option>',
						'<option value="4"' + (rooms[roomIndex].childAges[childIndex] === 4 ? ' selected="selected"' : '') + '>4<\/option>',
						'<option value="5"' + (rooms[roomIndex].childAges[childIndex] === 5 ? ' selected="selected"' : '') + '>5<\/option>',
						'<option value="6"' + (rooms[roomIndex].childAges[childIndex] === 6 ? ' selected="selected"' : '') + '>6<\/option>',
						'<option value="7"' + (rooms[roomIndex].childAges[childIndex] === 7 ? ' selected="selected"' : '') + '>7<\/option>',
						'<option value="8"' + (rooms[roomIndex].childAges[childIndex] === 8 ? ' selected="selected"' : '') + '>8<\/option>',
						'<option value="9"' + (rooms[roomIndex].childAges[childIndex] === 9 ? ' selected="selected"' : '') + '>9<\/option>',
						'<option value="10"' + (rooms[roomIndex].childAges[childIndex] === 10 ? ' selected="selected"' : '') + '>10<\/option>',
						'<option value="11"' + (rooms[roomIndex].childAges[childIndex] === 11 ? ' selected="selected"' : '') + '>11<\/option>',
						'<option value="12"' + (rooms[roomIndex].childAges[childIndex] === 12 ? ' selected="selected"' : '') + '>12<\/option>',
					'<\/select></div>'
			].join('');
		}

		roomsContent += [
		' <div class="room-number">',
			'<p class="float room-number-title strong" id="Room-' + roomIndex + '">???????¬??????: ' + (roomIndex + 1) + '<\/p>',
			'<p class="float pad15b">',
				'<label for="Room-' + roomIndex + '-AdultsNum">???½???»????????<\/label>',
					'<select id="Room-' + roomIndex + '-AdultsNum" name="roomInfo[' + roomIndex + '][adultsNum]">',
						'<option value="1"' + (rooms[roomIndex].adults === 1 ? ' selected="selected"' : '') + '>1<\/option>',
						'<option value="2"' + (rooms[roomIndex].adults === 2 ? ' selected="selected"' : '') + '>2<\/option>',
						'<option value="3"' + (rooms[roomIndex].adults === 3 ? ' selected="selected"' : '') + '>3<\/option>',
						'<option value="4"' + (rooms[roomIndex].adults === 4 ? ' selected="selected"' : '') + '>4<\/option>',
					'<\/select>',
			'</p>',
				'<p class="float">',
					'<label for="Room-' + roomIndex + '-ChildNum">? ?±???????¬<\/label>',
					'<select id="Room-' + roomIndex + '-ChildNum" name="roomInfo[' + roomIndex + '][childNum]" class="child select">',
						'<option value="0"' + (rooms[roomIndex].childs === 0 ? ' selected="selected"' : '') + '>0<\/option>',
						'<option value="1"' + (rooms[roomIndex].childs === 1 ? ' selected="selected"' : '') + '>1<\/option>',
						'<option value="2"' + (rooms[roomIndex].childs === 2 ? ' selected="selected"' : '') + '>2<\/option>',
					'<\/select>',
				'<\/p>',
					childrenContent,
		'<\/div>'
		].join('');
		}

		$('#Rooms').html(roomsContent);
		$('#Rooms p.float select.child').bind('change', function(e){
		$(this).parent().parent().find('.child-age').remove();

		var matches = $(this).attr('id').match(/Room-([0-9]+)-ChildNum/);
		var roomIndex = parseInt(matches[1], 10);

		var childrenNumber = parseInt($(this).val(), 10);
		var childrenContent = '';

		for (var childIndex = 0; childIndex < childrenNumber; childIndex++) {
			childrenContent += [
				'<div style="display:block;clear:both;"><label class="child-age" for="Room-' + roomIndex + '-Child-' + childIndex + '-Age">&nbsp;???»???????± ? ?±??????????<\/label>',
				'<select class="child-age" id="Room-' + roomIndex + '-Child-' + childIndex + '-Age" name="roomInfo[' + roomIndex + '][childAges][childAge][' + childIndex + ']">',
					'<option value="1">1<\/option>',
					'<option value="2">2<\/option>',
					'<option value="3">3<\/option>',
					'<option value="4">4<\/option>',
					'<option value="5">5<\/option>',
					'<option value="6">6<\/option>',
					'<option value="7">7<\/option>',
					'<option value="8">8<\/option>',
					'<option value="9">9<\/option>',
					'<option value="10">10<\/option>',
					'<option value="11">11<\/option>',
					'<option value="12">12<\/option>',
				'<\/select></div>'
			].join('');
		}
		$(this).parent().parent().append(childrenContent);

		});
	}//~updateRooms

	return {
		init: init,
		populateRooms: populateRooms,
		updateRooms: updateRooms
	};
}();


TP24.Main.hotelDestination = function(){

	var animCount = 0;
	var interVal = 0;
	var destinationInput = null;

	function set(locationName){

		if((locationName !== undefined) && (locationName !== '')) {
			var input = $('input#destinationInput').get(0);
			if (input) {
				input.value = locationName;
				destinationInput = input;
				//interVal = setInterval('TP24.Main.hotelDestination.blink()',400);
				interVal = setInterval(TP24.Main.hotelDestination.blink, 400);
			}
		}
	}

	function blink(){

		animCount++;
		if((animCount % 2) !==0) {
			$(destinationInput).css({'border-color':'red'});
		} else {
			$(destinationInput).css({'border-color':'white'});
		}

		//$(destinationInput).css('border-color') == 'red' ? $(destinationInput).css({'border-color':'white'}) : $(destinationInput).css({'border-color':'red'});
		if (animCount > 5) {
			clearInterval(interVal);
			animCount = 0;
			$(destinationInput).css({'border-color' : 'white'});
		}
	}

	return {
		set: set,
		blink:blink
	};
}();

TP24.Main.hotelDestinationList = function(){

	function show(){
		 $.nyroModalManual({
			'bgColor': '#ffffff',
			'url' : '/gr/hotels/destinationlist',
			'minWidth': 550, // Minimum width
			'minHeight': 500, // Minimum height
			'autoSizable': true
		});
		TP24.Tracker.track(TP24.Tracker.Category.HOTELS, 'openDestinationList');
		return false;
	}
	return {
		show:show
	};
		
}();


	


//locale.gr

TP24.Locale.initData({
	"airportsListHead": "?????????± ?????????????????????½",
	"airportsListSelectRegion": "???????³???±???????? ??????????????",
	"airportsListSelectCountry": "?§?????±",
	"airportsListCity": "? ???»?·",
	"airportsListAirportName": "????????????????????",
	"airportsListAirportCode": "??????. A????????????????????",
	"waitBookText": "?????????????³?±???????±?????? ???± ???????????????± ?³???± ???·?½ ???????²???²?±???????· ???·?? ?????¬???·?????? ???±??. ???????? ?· ?????±???????±?????± ???????????? ?½?± ?????±?????­?????? ???????????¬ ?»???????¬.<br>???­?????? ???·?½ ???????¬?½?????· ?????½ ?±?????????»???????¬?????½ ???·?½ ?????­???????? ???±?½?­?½?± ???»??????????.",
	"Show less information": "?????³???????????? ???»?·????????????????",
	"Show more information": "? ?????????????????????? ???»?·????????????????",
	"Choose language": "???????»?­?????? ?³?»???????±"
});


// TpModal + Gallery
var loaded = false;


