jQuery(function($) {ServicesModuleInitialize();});function ServicesModuleInitialize() {$( document ).on( 's123.page.ready', function( event ) {var $section = $('section.s123-module-services');$section.each(function( index ) {var $sectionThis = $(this);var categories = new ModuleLayoutCategories({$items :  $sectionThis.find('.services-category'),$categoriesContainer : $sectionThis.find('.categories-panel'),$filterButton : $sectionThis.find('.items-responsive-filter'),$categories : $sectionThis.find('.items-categories-container li')});if ( $sectionThis.hasClass('layout-10') ) {$sectionThis.find('.service-item-description').each(function() {const $paragraph = $(this);const lineHeight = parseFloat($paragraph.css('font-size')) * 1.5;const maxLines = 4;const actualHeight = $paragraph.height();const numberOfLines = actualHeight / lineHeight;if (numberOfLines > maxLines) {$paragraph.addClass('show-more');$paragraph.attr('data-rel', 'tooltip');$paragraph.css('height', lineHeight * maxLines);$paragraph.on('click', function() {var _this = $(this);bootbox.alert({title: _this.data('title'),message: _this.html(),backdrop: true});});}});}
ServicesModuleMobileViewCarouselInit($sectionThis);});});}
function ServicesModuleMobileViewCarouselInit( $section ) {let sectionID = $section.get(0).id.replace('section-','');let $sectionItemsContainer = $section.find('.service-grid');let mobileViewTypeNUM = $section.data('mobile-view-type');ServicesModuleMobileViewCarouselInitResizeHandler();if ( $sectionItemsContainer.hasClass('slick-initialized') ) {$sectionItemsContainer.css('visibility','none');$sectionItemsContainer.slick('unslick');$sectionItemsContainer.parent().find('.custom-arrow-container').remove();}
if ( findBootstrapEnvironment() != 'xs' || mobileViewTypeNUM != '2' ) {$sectionItemsContainer.css('visibility','visible');return;}
$sectionItemsContainer.on('init', function(event) {$sectionItemsContainer.css('visibility','visible');});$sectionItemsContainer.slick({dots: false,infinite: true,vertical: false,verticalSwiping: false,slidesToShow: 1,slidesToScroll: 1,adaptiveHeight: true,swipeToSlide: true,rtl: $('html').attr('dir') === 'rtl' ? true : false,centerMode: true,centerPadding: '8%',arrows: false});function ServicesModuleMobileViewCarouselInitResizeHandler() {$(window).off('resize.ServicesModuleMobileViewCarouselInit').on('resize.ServicesModuleMobileViewCarouselInit', function( event ) {clearTimeout(window.ServicesModuleMobileViewCarouselInit_Delay);window.ServicesModuleMobileViewCarouselInit_Delay = setTimeout( function() {var $sections = $('section.s123-module-services');$sections.each(function( index ) {ServicesModuleMobileViewCarouselInit($(this));});},50);});}}
function Comments_Initialize( settings ) {var that = this;var $s123CommentsContainer = $('#'+settings.id);var $commentsForm = $s123CommentsContainer.find('.commentsForm');var $commentsContainer;var Rating = {};var submitMessage = {};var hasRating = false;that.onLoad = settings.onLoad;that.onFormSubmit = settings.onFormSubmit;that.customLabels = settings.customLabels ? settings.customLabels : {};switch( settings.type ) {case 0:$commentsContainer 	= $s123CommentsContainer.find('#commentsContainer');submitMessage.title = translations.sent;submitMessage.message = translations.blogReviewMessage;break;case 1:$commentsContainer 	= $s123CommentsContainer.find('#commentsContainer');hasRating = true;break;default:return;break;}
that.init = function() {that.loadComments(false);};that.showSubcomments = function ( subComments, $commentsContainer ) {$.each(subComments,function( index, comment ) {var $parentComments = $commentsContainer.find('.commentBox');$.each($parentComments,function( index, parentComment ) {if ($(this).data('comment-id') == comment.parentID ) {$(parentComment).find('.sub-comments-div').append(that.comment_HTML(comment.title,comment.time,comment.message));}});});};that.comment_HTML = function ( title, time, message ) {var html ='';html += '<div class="sub-comments-div-box">';html += '<h4 class="title">'+title+'</h4>';html += '<small class="time">'+time+'</small><br/>';html += '<div class="message">'+message+'</div>';html += '</div>';return html;};that.submitHandler = function ( $form ) {var forms_GoogleRecaptcha = new Forms_GoogleRecaptcha();forms_GoogleRecaptcha.init($form);$form.validate({errorElement: 'div',errorClass: 'help-block',focusInvalid: true,ignore: "",highlight: function (e) {$(e).closest('.form-group').removeClass('has-info').addClass('has-error');},success: function (e) {$(e).closest('.form-group').removeClass('has-error');$(e).remove();}});$form.off('submit.commentsForm').off('submit.commentsForm').on('submit.commentsForm', function( event ) {event.preventDefault();if ( hasRating ) {var formValid = $form.valid();var ratingValid = Rating.valid();if ( !formValid || !ratingValid ) return;} else {if ( !$form.valid() ) return;}
if ( forms_GoogleRecaptcha.isActive && !forms_GoogleRecaptcha.isGotToken ) {forms_GoogleRecaptcha.getToken();return false;}
$form.find('.blogSubmitButton').prop('disabled', true);$form.find('.blogSubmitButton').html(S123.s123IconToSvg.getHtml('spinner','fa-spin',''));$.ajax({type: "POST",url: "/versions/2/wizard/comments/addShowComments.php",data: $form.serialize(),success: function( data ) {var dataObj = tryParseJSON(data);if ( dataObj.blockComment  == '1' ) {that.showManagerApproveMessage();}
that.loadComments(data.commentsHtml);$form.trigger('reset');forms_GoogleRecaptcha.reset();$form.find('.blogSubmitButton').prop('disabled', false);$form.find('.blogSubmitButton').html($form.find('.blogSubmitButton').data('text'));WizardNotificationUpdate();if ( that.onFormSubmit ) that.onFormSubmit.call(this,dataObj.newCommentID,dataObj.blockComment);}});return false;});};that.showManagerApproveMessage = function () {if ( !submitMessage.message ) return;bootbox.alert({title: submitMessage.title,message: submitMessage.message,className: 'contactUsConfirm',buttons: {ok: {label: translations.Ok}},backdrop: true});};that.showReplyModal = function (t,childForm) {var x = '';x += '<form class="row" method="post" style="margin:0px;">';x += '<div class="col-xs-12 col-sm-12">';x += '<div class="form-group">';x += '<textarea class="form-control comment_message" name="comment_message" placeholder="'+(that.customLabels.commentResponseText ? that.customLabels.commentResponseText : t.data('tran-comment'))+'" style="min-height: 150px;" required data-msg-required="'+t.data('tran-this-field-is-required')+'"></textarea>';x += '</div>';x += '<div class="row">';x += '<div class="col-xs-12 col-sm-6">';x += '<div class="form-group">';x += '<input type="text" name="contact_name" placeholder="'+(that.customLabels.commentName ? that.customLabels.commentName : t.data('tran-name'))+'" class="form-control" required data-msg-required="'+t.data('tran-this-field-is-required')+'">';x += '</div>';x += '</div>';x += '<div class="col-xs-12 col-sm-6">';x += '<div class="form-group">';x += '<input type="text" name="contact_email" placeholder="'+(that.customLabels.commentEmail ? that.customLabels.commentEmail : t.data('tran-email-address'))+'" class="form-control" required data-msg-required="'+t.data('tran-this-field-is-required')+'" data-rule-email="true" data-msg-email="'+t.data('tran-please-enter-valid-email')+'">';x += '</div>';x += '</div>';x += '</div>';x += '<div class="text-center">';x += '<button type="submit" class="btn btn-primary blogSubmitButton" data-text="'+t.data('tran-post-reply')+'">'+(that.customLabels.replyButtonText ? that.customLabels.replyButtonText : t.data('tran-post-reply'))+'</button>';x += '</div>';x += '<div class="text-center comments-message-text">';x += '<small>* '+(that.customLabels.commentMessage ? that.customLabels.commentMessage : t.data('tran-the-email-will-not-be-published-on-the-website'))+'</small>';x += '</div>';x += '</div>';x += '<input type="hidden" name="w" value="'+t.data('hidden-w')+'">';x += '<input type="hidden" name="websiteID" value="'+t.data('hidden-website-id')+'">';x += '<input type="hidden" name="uniquePageID" value="'+t.data('hidden-unique-page-id')+'">';x += '<input type="hidden" name="moduleID" value="'+t.data('module-id')+'">';x += '<input type="hidden" name="moduleTypeNUM" value="'+t.data('module-type')+'">';x += '<input type="hidden" name="tranW" value="'+websiteLanguageCountryFullCode+'">';x += '<input type="hidden" class="commentTo" name="commentTo" value="'+t.data('hidden-comment-to')+'">';x += '<input type="hidden" name="act" value="addShow">';x += '</form>';childForm.html(x);that.submitHandler(childForm.find('form'));};Rating = new function() {var R = this;R.init = function( settings ) {if ( !settings.hasRating ) return;R.$form = settings.$form;R.$input = settings.$input;R.$json = settings.$json;if ( R.$form.length === 0 ) return;R.$raty = R.$form.find('.rating-plugin');R.$raty.raty({starType: 'i',cancel: false,number: 5,hints: R.getHints(),starHalf: (IsIE11() ? 'fa fa-star-half star-half' : 'star-half svg-m'),starOff: (IsIE11() ? 'fa fa-star-o star-o' : 'star-o svg-m'),starOn: (IsIE11() ? 'fa fa-star star' : 'star svg-m'),click: function( rating ,event ) {R.$input.val(rating);R.valid();}});};R.getHints = function() {var json = tryParseJSON(R.$json.val());if ( !json ) {return hints = [translations.reviewBad,translations.reviewPoor,translations.reviewRegular,translations.reviewGood,translations.reviewGorgeous];} else {return hints = json.hints;}};R.valid = function() {var valid = $.isNumeric(R.$input.val()) && parseInt(R.$input.val()) > 0;var $parent = R.$raty.closest('.form-group');$parent.removeClass('.has-error');$parent.find('#ratingError').remove();if ( !valid ) {$parent.addClass('has-error');$parent.append('<div id="ratingError" class="text-center help-block">'+R.$raty.data('msg-required')+'</div>');}
return valid;};};that.loadComments = function( commentsHtml ) {if ( !commentsHtml ) {loadCommentsByAjax();} else {addCommentsToPage(commentsHtml);}
$commentsForm.find('.blogCommentsBox #comment_message').focus(function() {$commentsForm.find('.blogCommentsBox').addClass('active');});that.submitHandler($commentsForm);Rating.init({$form: $commentsForm,$input: $commentsForm.find('.rating'),$json: $commentsForm.find('.rating-plugin-data'),hasRating: hasRating});};function loadCommentsByAjax() {$.ajax({type: "POST",url: '/versions/2/wizard/comments/addShowComments.php',data: {w: $('#w').val(),websiteID: $('#websiteID').val(),disableCssFiles: 1,moduleID: $commentsContainer.data('module-id'),moduleTypeNUM: $commentsContainer.data('module-type-num'),uniquePageID: $commentsContainer.data('unique-page-id'),tranW: $commentsContainer.data('tran-w'),act: $commentsContainer.data('action')},success: function( data ) {data = tryParseJSON(data);if ( !data ) return;addCommentsToPage(data.commentsHtml);}});}
function addCommentsToPage( commentsHtml ) {$commentsContainer.html(commentsHtml);$commentsContainer.find('.blog-reply-to').each(function( index, replyLink ) {$(replyLink).off('click').on('click',function() {$childForm = $(this).closest('.commentBox').find('.blogReplyForm');if ($childForm.hasClass('hidden')) {that.showReplyModal($(this),$childForm);$('.blogReplyForm').addClass('hidden');$('.blog-reply-to').html($(this).data('text-reply'));$(this).html($(this).data('text-hide'));$childForm.removeClass('hidden');} else {$childForm.addClass('hidden');$(this).html($(this).data('text-reply'));}
$childForm.find('.comment_message').select();});});var subComments = tryParseJSON($commentsContainer.find('.sub-comments').html());that.showSubcomments(subComments,$commentsContainer);if ( hasRating) {if ( that.onLoad ) that.onLoad.call(this,$commentsContainer.find('.commentBox').length,$commentsContainer.find('#reviewAvg').val(),false);}}
that.init();}
jQuery(function($) {RichPageModuleInitialize();});function RichPageModuleInitialize() {$( document ).on( 's123.page.ready', function( event ) {if ( !IsWizard() ) {RichPagePromosHandler.init();}});var RichPagePromosHandler = function() {var _ = {fixColors: false};_.init = function() {_.$section = $('section.s123-module-rich-page');if ( _.$section.length === 0 ) return;_.$sections = _.$section.siblings();_.$sections.each(function( index, section ) {var $thisSection = $(this);if ( $thisSection.attr('class').indexOf('s123-promo-module') != -1 ) {$thisSection.remove();_.fixColors = true;} else if ( !(whatScreen.any() == 'mobile' && $thisSection.hasClass('h-s-f-hm') ) ) {return false;}});if ( _.fixColors ) {fixModuleColors();}};function fixModuleColors() {_.$sections.filter(':visible').each( function( index, module ) {var $module = $(this);if ( index % 2 == 0 ) {$module.addClass('bg-primary');} else {$module.removeClass('bg-primary');}});}
return _;}();}
jQuery(function($) {fileManagerModuleInitialize_Layouts();});function fileManagerModuleInitialize_Layouts() {$( document ).on( "s123.page.ready", function( event ) {var $sections = $('.s123-module-fileManager');$sections.each(function( index ) {var $s = $(this);var $categories = $s.find('.fileManager-category');var categories = new ModuleLayoutCategories({$items :  $s.find('.fileManager-category'),$categoriesContainer : $s.find('.categories-panel'),$filterButton : $s.find('.items-responsive-filter'),$categories : $s.find('.items-categories-container li')});});});}
