HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux ns3133907 6.8.0-86-generic #87-Ubuntu SMP PREEMPT_DYNAMIC Mon Sep 22 18:03:36 UTC 2025 x86_64
User: cssnetorguk (1024)
PHP: 8.2.28
Disabled: NONE
Upload Files
File: /home/shastd.org.uk/public_html/wp-content/themes/exoplanet/js/exoplanet-custom-ver-20160520.js
/**
 * Exoplanet Custom JS
 *
 * @package Exoplanet
 *
 * Distributed under the MIT license - http://opensource.org/licenses/MIT
 */
jQuery(document).ready(function($){
 // Defining a function to set size for .slide and page title padding if we have a very large primary menu
    function fullscreen(){

        var footerheight = parseInt( $('#colophon').height() );
        footerheight = footerheight - 1;
        jQuery('#page.exoplanet-sticky-footer').css({
            'padding-bottom' : footerheight + 'px'
        });

        var exoplanetwidth = jQuery(window).width();
        var exoplanetheight = jQuery(window).height();
        exoplanetwidth = parseInt(exoplanetwidth);
        exoplanetheight = parseInt(exoplanetheight);

        if ( exoplanetheight > 460 ) {
            var exoplanetheight2 = exoplanetheight;
        } else {
            var exoplanetheight2 = 460;
        }

        var masthead = $('#masthead').height();
        var headertitle = $('.header-title').height();
        masthead = parseInt(masthead);
        headertitle = parseInt(headertitle);

        var headerheight = masthead + headertitle + 135;

        jQuery('.slide').css({
            width: exoplanetwidth + 'px',
            height: exoplanetheight2 + 'px'
        });

        if( $('.main-header').length ) {
            jQuery('.main-header').css({
                'padding-top' : masthead + 'px',
                'min-height' : headerheight + 'px'
            });
        } else {
            if ( $('#home-slider-section').length ) {

            } else {
                jQuery('.custom-post-type-header').css({
                    'padding-top' : masthead + 'px',
                    'display' : 'block'
                });
            }
        }

        var menuheight = exoplanetheight - masthead;
        jQuery('#site-navigation').css({
            'max-height' : menuheight + 'px'
        });

    }
  
    fullscreen();

  // Run the function in case of window resize
  jQuery(window).resize(function() {
       fullscreen();         
    });

});


jQuery(function($){

	$('#bx-slider').bxSlider({
		'pager':false,
		'auto' : true,
		'mode' : 'fade',
		'pause' : 5000,
		'prevText' : '<i class="fa fa-angle-left"></i>',
		'nextText' : '<i class="fa fa-angle-right"></i>',
		'adaptiveHeight' : true
	});

    $(window).scroll(function(){
    	var scrollTop = $(window).scrollTop();
    	if( scrollTop > 0 ){
    		$('#masthead').addClass('scrolled');
    	}else{
    		$('#masthead').removeClass('scrolled');
    	}
        $('.main-header').css('background-position', 'center ' + (scrollTop / 2) + 'px');
        $('#bx-slider').css({top: (scrollTop / 2.6)});
        if ( scrollTop > $(window).height() ) {
            $('#bx-slider').addClass('sticky');
        } else {
            $('#bx-slider').removeClass('sticky');
        }
    });

    $('.menu > ul').superfish({
		delay:       500,                            
		animation:   {opacity:'show',height:'show'},  
		speed:       'fast'                         
	});

    $('.toggle-nav').click(function(){
    	$('#site-navigation').slideToggle();
    });

});