var _____WB$wombat$assign$function_____=function(name){return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name))||self[name];};if(!self.__WB_pmw){self.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{ let window = _____WB$wombat$assign$function_____("window"); let self = _____WB$wombat$assign$function_____("self"); let document = _____WB$wombat$assign$function_____("document"); let location = _____WB$wombat$assign$function_____("location"); let top = _____WB$wombat$assign$function_____("top"); let parent = _____WB$wombat$assign$function_____("parent"); let frames = _____WB$wombat$assign$function_____("frames"); let opens = _____WB$wombat$assign$function_____("opens"); $(document).ready (function() { $( window ).resize( function() { on_neucart_resize(); } ); $(".fancybox").fancybox({ openEffect : 'fade', closeEffect : 'fade', openSpeed : 'fast', closeSpeed : 'fast', nextEffect : 'fade', prevEffect : 'fade', beforeShow : function() { var alt = $(this.element).attr( 'fb_alt' ); var ttl = $(this.element).attr( 'fb_title' ); $( ".fancybox-image" ).attr( 'title', ttl ); $( ".fancybox-image" ).attr( 'alt', alt ); this.title = ""; } /*, helpers : { title : { type : 'over' } } */ }); // need to use each and break into javaScript? odd, but this is the way it works. $( "audio" ).each( function ( index ) { var aud_id = $(this).attr( 'id' ); if ( aud_id != null ) document.getElementById( aud_id ).volume = 1; } ); $( "#shoppingcart" ).sticky( { topSpacing:15 } ); //this is what allows a product to be draggable. $(".productblock").draggable({ opacity: 0.5, helper: 'clone' }); $(".drop").droppable({ accept: ".draggablediv", activeClass: 'droppable-active', tolerance: 'touch', over: function() { $("#shoppingcarticon").fadeTo("fast", 0.6); }, out: function() { $("#shoppingcarticon").fadeTo("fast", 1); }, drop: function(ev, ui) { drop_product( ev, ui ); } }); // custom fields that we may need to set if ( $( "#neucart_cart_value_custom" ).length ) { if ( $( "#carttotal" ).length ) $( "#neucart_cart_value_custom" ).text( $( "#carttotal" ).text() ); else custom_carttotal_absent(); } // custom fields that we may need to set if ( $( "#neucart_cart_qty_custom" ).length ) { if ( $( "#cartqty" ).length ) $( "#neucart_cart_qty_custom" ).text( $( "#cartqty" ).text() ); else custom_cartqty_absent(); } if( $( ".focusme" ).length && get_screen_type() != "MOBILE" ) $( ".focusme" ).focus(); custom_neucart_pageload(); }); function detailsClicked( cartkey ) { var elemId = "#celldetails" + cartkey; var showHideId = "#showhide" + cartkey; var expand = $( elemId ).html() == ""; var detailText = expand ? $( elemId ).attr( "dtext" ) : ""; $( elemId ).html( detailText ); $( showHideId ).html( expand ? neucart_hide_details : neucart_show_details ); } function checkoutQuantityChange( cartkey, count ) { $.get( "includes/ajax/updatecart.php", { action: 'chk_change_quantity', id: cartkey, quantity: count }, function ( data ) { if ( data == "false" ) return false; // cart price, item total var qpk = data.split( "|" ); $( "#summary_carttotal" ).text( qpk[ 0 ] ); var itemtotal = qpk[ 1 ]; $( "#totalprice_" + cartkey ).text( neucart_currency_symbol + itemtotal ); } ); return true; } function checkoutSpecInstrChange( cartkey, instructions ) { $.get( "includes/ajax/updatecart.php", { action: 'chk_change_spec_inst', id: cartkey, inst: instructions } ); } function checkoutCartMemoChange( instructions ) { $.get( "includes/ajax/updatecart.php", { action: 'chk_change_cart_memo', inst: instructions } ); } function checkoutOptionChanged( itemkey, optionkey, optionvalue ) { $.get( "includes/ajax/updatecart.php", { action: "chk_option_changed", id: itemkey, op: optionkey, val: optionvalue }, function ( data ) { // it is blank when the price of the options didn't change. if ( data == "" ) return; var arr = data.split( "|" ); var iprice = prettifyNumber( arr[ 0 ] ); var tprice = prettifyNumber( arr[ 1 ] ); var cprice = prettifyNumber( arr[ 2 ] ); $( "#unitprice_" + itemkey ).text( neucart_currency_symbol + iprice ); $( "#totalprice_" + itemkey).text( neucart_currency_symbol + tprice ); $( "#summary_carttotal" ).text( cprice ); } ); } function drop_product( ev, ui ) { var pid = ui.draggable.attr( "p_id" ); add_product_to_cart( pid, '', '' ); } function vote_for_review( isHelpful, id ) { isHelpful = isHelpful ? 1 : 0; $.get( "includes/ajax/cust_review.php", { action: "vote_for_review", id: id, helpful: isHelpful } ); $( "#helpful_review_" + id ).fadeOut( 100, function() { document.getElementById( 'helpful_review_' + id ).innerHTML = neucart_thanks_for_review; // update the counts to show the customer just reviewed. it's AJAX so we don't really know if // the update occurred (and it may fail if this is from an IP address that already voted) // but just update this anyway without returning a result. it's not critical. cur_val = document.getElementById( 'number_of_helpful_' + id ).innerHTML; document.getElementById( 'number_of_helpful_' + id ).innerHTML = parseInt( cur_val ) + isHelpful; cur_val = document.getElementById( 'number_of_total_' + id ).innerHTML; document.getElementById( 'number_of_total_' + id ).innerHTML = parseInt( cur_val ) + 1; $( "#helpful_review_" + id ).fadeIn( 400 ); }); } function join_mailing_list() { var em = document.getElementById( 'neucart_jml_address' ).value; $.post( "handlers/mailing_list_handler.php", { action: "add", email: em }, function( data ) { switch ( data ) { case "success": case "already": case "updated": var msg = ""; if ( data == "success" ) msg = neucart_jml_success; else if ( data == "already" ) msg = neucart_jml_already; else if ( data == "updated" ) msg = neucart_jml_updated; $( "#neucart_jml_result" ).fadeOut( 300, function() { $( "#neucart_jml_result" ).html( msg ); $( "#neucart_jml_result" ).fadeIn( 400 ); }); break; case "invalid": alert( neucart_jml_invalid ); break; default: alert( neucart_jml_error ); break; } } ) .error( function() { alert( neucart_server_error ); }); } function unset_notify_cache() { $.post( "handlers/notify_signup_handler.php", { action: "unset_cache" } ); document.getElementById( 'pre_order_fn' ).value = ''; document.getElementById( 'pre_order_ln' ).value = ''; document.getElementById( 'pre_order_em' ).value = ''; $( "#pre_order_unset" ).fadeOut( 300 ); } function get_unnotified_for_product( guid, prodid ) { $.post( "handlers/notify_signup_handler.php", { action: "get_unadded", product: prodid, customer: guid }, function( data ) { switch ( data ) { case "success": msg = neucart_prenotify_removed; $( "#pre_order_notify" ).fadeOut( 300, function() { $( "#pre_order_notify" ).html( msg ); $( "#pre_order_notify" ).fadeIn( 400 ); }); break; default: alert( neucart_prenotify_remove_error ); break; } } ); } function get_notified_for_product( prodid ) { var fn = document.getElementById( 'pre_order_fn' ).value; var ln = document.getElementById( 'pre_order_ln' ).value; var em = document.getElementById( 'pre_order_em' ).value; $.post( "handlers/notify_signup_handler.php", { action: "get_added", product: prodid, email: em, first: fn, last: ln }, function( data ) { if ( data.indexOf( "~already~" ) == 0 ) { msg = data.substring( 9 ); $( "#pre_order_notify" ).fadeOut( 300, function() { $( "#pre_order_notify" ).html( msg ); $( "#pre_order_notify" ).fadeIn( 400 ); }); return; } switch ( data ) { case "success": case "updated": msg = ""; if ( data == "success" ) msg = neucart_prenotify_success; else if ( data == "already" ) msg = neucart_prenotify_already; else if ( data == "updated" ) msg = neucart_prenotify_updated; $( "#pre_order_notify" ).fadeOut( 300, function() { $( "#pre_order_notify" ).html( msg ); $( "#pre_order_notify" ).fadeIn( 400 ); }); break; case "invalid names": alert( neucart_prenotify_blanks ); break; case "invalid email": alert( neucart_prenotify_invalid ); break; case "invalid params": alert( neucart_prenotify_bad ); break; default: alert( neucart_prenotify_error ); break; } } ); } function submit_review( showImmediately, prodid ) { var stars = document.getElementById( 'review_stars' ).value; var title = document.getElementById( 'review_title' ).value; var text = document.getElementById( 'review_text' ).value; var name = document.getElementById( 'reviewer_name' ).value; var loca = document.getElementById( 'reviewer_location' ).value; var crid = 'new'; if ( jQuery.trim( title ).length == 0 ) { alert( neucart_review_blank_title ); return; } if ( jQuery.trim( text ).length == 0 ) { alert( neucart_review_blank_text ); return; } if ( jQuery.trim( name ).length == 0 ) { alert( neucart_review_blank_name ); return; } if ( jQuery.trim( loca ).length == 0 ) { alert( neucart_review_blank_loca ); return; } if ( document.getElementById( 'edit_your_review' ) != null ) crid = $( "#edit_your_review" ).attr( 'crid' ); $.get( "includes/ajax/cust_review.php", { action: "submit_review", pid: prodid, rstars: stars, rtitle: title, rtext: text, rname: name, rloca: loca, revid: crid } ); $( "#your_review" ).fadeOut( 300, function() { $( "#your_review_submitted" ).fadeIn( 400 ); $( "#your_review" ).remove(); }); } function update_custom_totals( qty, total ) { // if these fields exist, update them. this is for customers who // have added custom fields on their pages that must be updated if ( document.getElementById( 'neucart_cart_value_custom' ) != null ) $( "#neucart_cart_value_custom" ).text( total ); if ( document.getElementById( 'neucart_cart_qty_custom' ) != null ) $( "#neucart_cart_qty_custom" ).text( qty ); $( "#cart_toggle_link_and_totals #sb_cart_q" ).text( qty ); $( "#cart_toggle_link_and_totals #sb_cart_v" ).text( total ); } function showWorking( text ) { var topRow = "#toplistrow"; var orig = $( topRow ).html(); var newHtml = '
' + text + '
'; $( topRow ).html( newHtml ); $( topRow ).css( "background", "yellow" ); return orig; } function showWorkingLink( atc_link ) { if ( atc_link == null ) return null; atc_orig = atc_link.innerHTML; atc_link.innerHTML = neucart_adding_product; return atc_orig; } function restoreLink( text, atc_link ) { if ( atc_link == null ) return; $( atc_link ).fadeTo( 500, 0, function() { $( atc_link ).html( neucart_click_to_add_another ); $( atc_link ).fadeTo( 500, 1 ); } ); } function restoreCart( topRowOrigText ) { $("#addhowto").css( "display", "none"); $("#parentlist").css( "display", "none"); $("#parentlist").fadeIn( "fast" ); $("#shoppingcarticon").fadeTo( "fast", 1 ); $( "#toplistrow" ).css( "background", "#ccc" ); $( "#toplistrow" ).html( topRowOrigText ); } function prettifyNumber( number ) { var splits = number.split( '.' ); var digits = splits[ 0 ]; if ( digits.length > 3 ) { var thou = digits.substr( 0, digits.length - 3 ) digits = thou.concat( ",", digits.substr( digits.length - 3 ) ); } if ( splits.length > 1 ) return digits.concat( ".", splits[ 1 ] ); else return digits.concat( ".", "00" ); } function are_quantities_valid() { toReturn = false; $.ajax( "includes/ajax/validate_quantity.php", { async: false, data: { }, success: function ( data ) { if ( data == "true" ) toReturn = true; else alert( data ); } }); return toReturn; } } /* FILE ARCHIVED ON 15:32:49 Oct 24, 2016 AND RETRIEVED FROM THE INTERNET ARCHIVE ON 00:55:47 Nov 23, 2025. JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). */ /* playback timings (ms): captures_list: 0.552 exclusion.robots: 0.017 exclusion.robots.policy: 0.008 esindex: 0.015 cdx.remote: 13.044 LoadShardBlock: 91.052 (3) PetaboxLoader3.datanode: 186.963 (5) load_resource: 455.276 (2) PetaboxLoader3.resolve: 281.488 (2) */