/* PROPRIETARY - reuse prohibited without written permission by Brooks-Jeffrey Marketing, Inc. */ /* ghbfv2hms4mvop9qan2h2th3o0 */ var bif_js = {}; bif_js.init = function(key) { $('.bif').first().parent().append(''); // count how many total + pass # of ## $('.bif').each(function() { $.ajax({ type: 'post', url: '/plugins/bif/bif_listener.php', data: { 'bif_function': 'data_items', value: $(this).attr("name"), nonce: key }, success: function(data) { console.log(data); }}); }); // watch what is done $('.bif').blur(function() { console.log($(this).attr("id") + " blur"); $.ajax({ type: 'post', url: '/plugins/bif/bif_listener.php', data: { 'bif_function': 'data', id: $(this).attr("name"), value: $(this).val(), nonce: key }, success: function(data) { console.log(data); }}); }); }; bif_js.rated = false; bif_js.rate = function(key) { $('#bif_box').empty().append(''); $.ajax({ type: 'post', url: '/plugins/bif/bif_listener.php', data: { bif_function: 'rate', bif_key: key }, success: function(data) { console.log(data); if(parseInt(data) == 0) { $('.bif_toggle').show(); $('.bif_toggle input[type=submit]').removeAttr('disabled'); $('.bif_toggle input[type=submit]').css('opacity','1'); if($('.bif_toggle button').length > 0){ $('.bif_toggle button').removeAttr('disabled'); $('.bif_toggle button').css('opacity','1'); } $('#bif_box').slideUp(250); console.log('Enable (outside)'); } else { $('#bif_box').empty().append('Please try again. You need to reload the page.'); } bif_js.rated = data; } }); return bif_js.rated; }; $(document).ready(function() { bif_js.init("f0d9c22927eb51e46ce34dbc9ba565d45bea8eec"); // this is the click to unlock code $('input[type="text"]').attr('autocomplete','off'); $('.bif_toggle input[type=submit]').attr('disabled','disabled'); $('.bif_toggle input[type=submit]').css('opacity','0.6'); if($('.bif_toggle button').length > 0){ $('.bif_toggle button').attr('disabled','disabled'); $('.bif_toggle button').css('opacity','0.6'); } $('#bif_box').append(''); $('.bif_button').click(function(){ bif_js.rate("f0d9c22927eb51e46ce34dbc9ba565d45bea8eec");}); });