HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: /home/mmickelson/otbproductions.org/wp-content/themes/illustratr/js/portfolio-single.js
( function( $ ) {

	/*
	 * Resize video-wrapper and portfolio-gallery for full width on small screens.
	 */
	function calc() {

		$( '.portfolio-entry .video-wrapper, .portfolio-gallery' ).each( function() {
			if( $( window ).width() < 768 ) {
	    		$( this ).css( 'width', '100%' ).css( 'width', '+=40px' );
	    		if ( $( 'body' ).hasClass( 'rtl' ) ) {
		    		$( this ).css( 'margin-right', '-20px' );
	    		} else {
		    		$( this ).css( 'margin-left', '-20px' );
	    		}
			} else if( $( window ).width() < 960 ) {
	    		$( this ).css( 'width', '100%' ).css( 'width', '+=80px' );
	    		if ( $( 'body' ).hasClass( 'rtl' ) ) {
		    		$( this ).css( 'margin-right', '-40px' );
	    		} else {
		    		$( this ).css( 'margin-left', '-40px' );
	    		}
			} else {
				$( this ).css( {
					'width': '',
					'margin-right': '',
					'margin-left': ''
				} );
			}
		} );

	}

	$( window ).load( function() {

		/*
		 * Wrap galleries in a div.
		 */
		$( '.portfolio-entry .gallery, .portfolio-entry .tiled-gallery' ).each( function() {
			$( this ).wrap( '<div class="portfolio-gallery" />' );
			// Trigger resize to make sure tiled galleries are full width.
			$( this ).trigger( 'resize' );
		} );

		calc();

	} ).resize( _.debounce( calc, 100 ) );;

} )( jQuery );