<?php

// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}






function shrk_add_pswp_to_dom() {
	?>
	<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">
			<div class="pswp__bg"></div>
			<div class="pswp__scroll-wrap">
				<div class="pswp__container">
					<div class="pswp__item"></div>
					<div class="pswp__item"></div>
					<div class="pswp__item"></div>
				</div>
				<div class="pswp__ui pswp__ui--hidden">
					<div class="pswp__top-bar">
						<div class="pswp__counter"></div>
						<button class="pswp__button pswp__button--close" title="<?php echo esc_attr_e('Close (Esc)', 'ux-shop'); ?>"></button>
						<button class="pswp__button pswp__button--share" title="<?php echo esc_attr_e('Share', 'ux-shop'); ?>"></button>
						<button class="pswp__button pswp__button--fs" title="<?php echo esc_attr_e('Toggle fullscreen', 'ux-shop'); ?>"></button>
						<button class="pswp__button pswp__button--zoom" title="<?php echo esc_attr_e('Zoom in/out', 'ux-shop'); ?>"></button>
						<div class="pswp__preloader">
							<div class="pswp__preloader__icn">
							  <div class="pswp__preloader__cut">
								<div class="pswp__preloader__donut"></div>
							  </div>
							</div>
						</div>
					</div>
					<div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
						<div class="pswp__share-tooltip"></div> 
					</div>
					<button class="pswp__button pswp__button--arrow--left" title="<?php echo esc_attr_e('Previous (arrow left)', 'ux-shop'); ?>">
					</button>
					<button class="pswp__button pswp__button--arrow--right" title="<?php echo esc_attr_e('Next (arrow right)', 'ux-shop'); ?>">
					</button>
					<div class="pswp__caption">
						<div class="pswp__caption__center"></div>
					</div>
				</div>
			</div>
		</div>
		<?php
}
add_action( 'wp_footer', 'shrk_add_pswp_to_dom' );


function shrk_photoswipe_scripts() {
	global $shrk_theme_info;
	$suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';

	if ( !function_exists( 'WC' ) || version_compare( WC()->version, '2.7.0' ) < 0 ) {
		wp_register_script( 'photoswipe' , SHRK_THEME_MODULES_URI . 'photoswipe/js/photoswipe' . $suffix . '.js', array(), '4.1.1', true );
		wp_register_script( 'photoswipe-ui-default' , SHRK_THEME_MODULES_URI . 'photoswipe/js/photoswipe-ui-default' . $suffix . '.js', array( 'photoswipe' ), '4.1.1', true );
	}
	wp_register_script( 'shrk-photoswipe' , SHRK_THEME_MODULES_URI . 'photoswipe/js/photoswipe-shrk' . $suffix . '.js', array( 'photoswipe' ), $shrk_theme_info['Version'] );
}
add_action( 'wp_enqueue_scripts', 'shrk_photoswipe_scripts', 8 );


?>