HEX
Server: Apache
System: Linux dinesh8149 5.15.98-grsec-sharedvalley-2.lc.el8.x86_64 #1 SMP Thu Mar 9 09:07:30 -03 2023 x86_64
User: usesambura1 (1212012)
PHP: 7.0.33
Disabled: apache_child_terminate,dl,escapeshellarg,escapeshellcmd,exec,link,mail,openlog,passthru,pcntl_alarm,pcntl_exec,pcntl_fork,pcntl_get_last_error,pcntl_getpriority,pcntl_setpriority,pcntl_signal,pcntl_signal_dispatch,pcntl_sigprocmask,pcntl_sigtimedwait,pcntl_sigwaitinfo,pcntl_strerror,pcntl_wait,pcntl_waitpid,pcntl_wexitstatus,pcntl_wifexited,pcntl_wifsignaled,pcntl_wifstopped,pcntl_wstopsig,pcntl_wtermsig,php_check_syntax,php_strip_whitespace,popen,proc_close,proc_open,shell_exec,symlink,system
Upload Files
File: /home/storage/c/63/6c/usesambura1/public_html/yr/wp-content/themes/ultra/inc/premium/js/premium.js
/**
 * (c) Greg Priday, freely distributable under the terms of the GPL 2.0 license.
 */

jQuery( function ( $ ) {
    var minPrice = Number( $('#theme-upgrade input[name=variable_pricing_custom]').attr('min') );

    // Handle clicking the play button
    $('#theme-upgrade #click-to-play').click(function(e){
        e.preventDefault();
        // Open the Vimeo video in a new window
        window.open($(this).attr('href'), 'videowindow', 'width=640,height=362,resizeable,scrollbars');
    });

    $( '#theme-upgrade .buy-button').click(function(e){
        e.preventDefault();
        $(this).closest('form').submit();
        $( '#theme-upgrade-info' ).slideDown();
        $( 'html, body' ).animate( {'scrollTop':0} );
        return false;
    });

    $('#theme-upgrade #purchase-form').submit(function(){
        window.open('', 'paymentwindow', 'width=960,height=800,resizeable,scrollbars');
        this.target = 'paymentwindow';
    });

    $('#theme-upgrade #purchase-form.supporters-pack .download a').click(function(e){
        e.preventDefault();
        window.open($(this).attr('href'), 'paymentwindow', 'width=960,height=800,resizeable,scrollbars');
    });

    $('#theme-upgrade #purchase-form .options input[type=radio]').change(function(){
        var val = $(this).val();
        if($(this).hasClass('custom-price')) {
            val = $('#theme-upgrade #purchase-form .options input[name=variable_pricing_custom]').val();
            val = parseFloat(val).toFixed(2);
            if(isNaN(val)) val = minPrice;
            val = Math.max(val,minPrice);
        }

        $('#theme-upgrade #purchase-form input[name=amount]').val(val);
        $('#theme-upgrade #purchase-form .variable-pricing-submit em').html('$'+val);

        if(val >= 15) $('#theme-upgrade .support-message').slideUp();
        else $('#theme-upgrade .support-message').slideDown();
    });

    $('#theme-upgrade #purchase-form .options input[name=variable_pricing_custom]').keyup(function(){
        var val = $(this).val().replace(/[^0-9.]/g, '');
        val = parseFloat(val).toFixed(2);
        if(isNaN(val)) val = minPrice;
        val = Math.max(val,minPrice);

        $(this).closest('form').find('.custom-price').click();

        $('#theme-upgrade #purchase-form input[name=amount]').val(val);
        $('#theme-upgrade #purchase-form .variable-pricing-submit em').html('$'+val);

        if(val >= 15) $('#theme-upgrade .support-message').slideUp();
        else $('#theme-upgrade .support-message').slideDown();
    }).change(function(){ $(this).keyup(); });


    // Display the form
    $( '#theme-upgrade-already-paid' ).click( function () {
        $( '#theme-upgrade-info' ).slideToggle();
        return false;
    } );

} );