var moreInfoPopup;
jQuery( window ).on( 'elementor/frontend/init', function() {
moreInfoPopup = {
popupsItemData:{
tech_talk: {
heading: '1 On 1 Dev Talk',
image: 'https://elementor.com/pages/wp-content/uploads/sites/5/2019/11/Ohad.png',
description: '30 min. Skype/Zoom consultation regarding the development challenges for your Elementor Site. Performance, integrations, plugins, themes, etc. With Ohad Raz - Lead Developer at Elementor',
},
wacom: {
heading: 'Wacom Intuos Wireless',
image: 'https://elementor.com/pages/wp-content/uploads/sites/5/2019/11/Wacom.png',
description: 'A professional drawing tablet for digital art, photo editing, and animation. Its slim design, compact size, and USB or wireless connection makes the Intuos perfect for your desktop area.',
},
how_to_build_talk: {
heading: '1 On 1 Site Design Talk',
image: 'https://elementor.com/pages/wp-content/uploads/sites/5/2019/11/ZIV-2.png',
description: '30 min. Skype/Zoom consultation about your Elementor site design. Including a review, constructive feedback and some helpful tips. With Ziv Geurts - Educator & Designer at Elementor',
},
ipad_air: {
heading: 'Apple iPad Air',
image: 'https://elementor.com/pages/wp-content/uploads/sites/5/2019/11/Tablet.png',
description: 'Take your projects anywhere with ease and comfort with Apple\'s amazing tablet. Enjoy it\'s thin, light design, fast and powerful performance and a beautiful immersive display. Work like a Pro everywhere you go.',
},
home_theater: {
heading: 'HD LED Android Smart Home Theater',
image: 'https://elementor.com/pages/wp-content/uploads/sites/5/2019/11/Projector.png',
description: 'Be prepared for every event and client presentation, with this portable projector. Wirelessly sync and cast movies/ games/ photos / videos / music / slides from your device to the large screen via WiFi. Easy to use and install.',
},
marketing_talk: {
heading: '1 On 1 Marketing Talk',
image: 'https://elementor.com/pages/wp-content/uploads/sites/5/2019/11/BEN-2.png',
description: '30 min. Skype/Zoom consultation about building a successful marketing strategy for the specific needs and challenges of your Elementor site. With Ben Pines - Elementor Evangelist',
},
sony_headphones: {
heading: 'Sony Wireless Noise Canceling Headphones WH-1000XM3',
image: 'https://elementor.com/pages/wp-content/uploads/sites/5/2019/11/Headphones.png',
description: 'Whether in an office or on the go, the WH-1000XM3 is the Pro\'s choice for perfect focus. With active & automatic noise canceling, and wireless connectivity these headphones will change the way you work.',
},
site_audit: {
heading: 'Expert Site Audit',
image: 'https://elementor.com/pages/wp-content/uploads/sites/5/2019/11/Saar-4.png',
description: 'A Doc review & analysis of up to 3 web pages from your Elementor site, giving you feedback and detailed notes for improvement. With Saar Kedem - Head of Education at Elementor & Education team members.',
}
},
itemID: 0,
updatePopup: function() {
setTimeout( function() {
var key = moreInfoPopup.itemID;
var $image = jQuery( '#more-info-image' ).find('img');
$image.attr( 'src', moreInfoPopup.popupsItemData[ key ].image ).attr( 'srcset', '' );
jQuery( '#more-info-heading' ).find('h2').html( moreInfoPopup.popupsItemData[ key ].heading );
jQuery( '#more-info-description .elementor-text-editor ' ).html( moreInfoPopup.popupsItemData[ key ].description );
}, 300 );
},
init: function(){
var $imageChoices = jQuery( '.image-choices-choice' );
if ( $imageChoices.find( '.form-read-more' ).length ) {
return;
}
// Add Read more
$imageChoices.append( 'More Info' );
// handle click on more info
jQuery('.form-read-more').on( 'click', function() {
moreInfoPopup.itemID = jQuery( this ).parent().find( 'input' )[0].value;
elementorFrontend.documentsManager.documents[4840].showModal();
} );
}
};
// bind popup onShow
elementorFrontend.on( 'components:init', function(){
elementorFrontend.documentsManager.documents[4840].getModal().on( 'show', ( event ) => { moreInfoPopup.updatePopup(); } );
} );
// reInit on form reset/error
jQuery(document).bind( 'gform_post_render' ,function() {
moreInfoPopup.init();
} );
moreInfoPopup.init();
} );