Warning: Undefined array key "HTTP_ACCEPT_ENCODING" in /home/speedca/public_html/combine.php on line 86

Warning: Undefined array key "HTTP_ACCEPT_ENCODING" in /home/speedca/public_html/combine.php on line 87

Warning: Cannot modify header information - headers already sent by (output started at /home/speedca/public_html/combine.php:86) in /home/speedca/public_html/combine.php on line 114

Warning: Cannot modify header information - headers already sent by (output started at /home/speedca/public_html/combine.php:86) in /home/speedca/public_html/combine.php on line 115
$(document).ready(function () { // $("a[rel^='lb']").prettyPhoto({ autoplay: true, social_tools: false, allow_resize: false, slideshow: false }); $("a[rel^='prettyPhoto']").prettyPhoto({ autoplay: true, social_tools: false, allow_resize: false, slideshow: false }); // /* $('.social-likes').socialLikes({ counters: false, singleTitle: 'Share it!' }); */ // $.fn.powerTip.defaults.placement = 's'; $('[title]').not('.north,.south,.east,.west,.follow,.popup-tip').powerTip({ smartPlacement: true }); $('.north[title]').powerTip({ placement: 'n', smartPlacement: true }); $('.west[title]').powerTip({ placement: 'w', smartPlacement: true }); $('.east[title]').powerTip({ placement: 'e', smartPlacement: true }); if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) == false ) $('.follow').powerTip({ followMouse: true }); $('.popup-tip').powerTip({ placement: 's', smartPlacement: true , mouseOnToPopup: true }); /* $('[title]').on('powerTipRender', function() { $('#powerTip').addClass('powertips'); }); */ $( window ).resize(function() { if($(window).width() < 657){ $('.slider-caption-outer').hide(); } else { $('.slider-caption-outer').show(); } }); $( window ).trigger('resize'); // // //if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) == true ) // $('.has-dropdown a').attr('href','#'); // // $('.submit').click(function(){ $('#checkout').trigger('click'); }); $('.submit').click(function(){ //console.log($(this).closest('form').attr('id')); $(this).closest('form').submit(); }); // $("a[href^='#']").click(function(event){ /* event.preventDefault(); var dest = 0; if($(this).attr('href') != '#'){ if($(this.hash).offset().top > $(document).height()-$(window).height()){ dest = $(document).height() - $(window).height(); } else { dest = $(this.hash).offset().top - 130; } $('html,body').animate({scrollTop:dest}, 1000); } */ }); // $(window).scroll(function(){ if ($(this).scrollTop() > 100) { $('.scrollup').fadeIn(); } else { $('.scrollup').fadeOut(); } }); // $("a[href^='http://']").attr("target","_blank"); $("a[href^='https://']").attr("target","_blank"); $("a[href$='.pdf']").attr("target","_blank"); $("a[href^='http://']").click(function() { //console.log(window.location.pathname); _gaq.push(['_trackEvent', 'External Link', 'speedstacks.ca'+window.location.pathname, $(this).attr('href')]); }); $("a[href$='.pdf']").click(function() { _gaq.push(['_trackEvent', 'PDF', 'Click',$(this).attr('href')]); }); $(".track").click(function(e) { /* e.preventDefault(); var href = $(this).attr("href"); var target = $(this).attr("target"); var text = $(this).text(); if(text == '') text = $(this).children('img').attr('alt'); if(text == '') text = $(this).children('img').attr('src'); if(text == '') text = 'unknown'; _gaq.push(['_trackEvent', text, 'Click', href]); setTimeout(function() { window.open(href,(!target?"_self":target)); },300); */ }); // $('form.validate').each(function() {// attach to all form elements on page $(this).validate({// initialize plugin on each form submitHandler : function(form) { $('#submit').attr('disabled', 'disabled'); $('#submit').addClass('secondary'); form.submit(); }, success : function(label) { // set   as text for IE label.removeClass("error"); } }); }); /* $('form.validate').validate({ submitHandler: function(form) { $('#submit').attr('disabled', 'disabled'); $('#submit').addClass('secondary'); form.submit(); },success: function(label) { // set   as text for IE label.removeClass("error"); } }); */ $('form.validate #submit').click(function(){ if( $('form.validate').valid() == false) $('#fail-msg').show(); else $('#fail-msg').hide(); }); $('.no-enter').bind("keyup keypress", function(e) { var code = e.keyCode || e.which; if (code == 13) { e.preventDefault(); return false; } }); jQuery.validator.addClassRules({ email: { required: true, email: true }, num: { required: true, number: true }, tel: { required: true, digits: true, minlength: 10 }, zip_post: { required: true, zip_post: true }, cc: { required: true, cc: true } }); jQuery.validator.addMethod("zip_post", function(value, element) { return this.optional(element) || /\d{5}-\d{4}$|^\d{5}$|^[a-zA-Z][0-9][a-zA-Z](-| )?[0-9][a-zA-Z][0-9]$/.test(value); }); jQuery.validator.addMethod("cc", function(value, element, param) { if (/[^0-9-]+/.test(value)) { return false; } value = value.replace(/\D/g, ""); return value.length == 16; }, "Please enter a valid credit card number."); $('form.validate input').blur(function(){ $('form .validate').validate(); }) $('form.noenter').bind("keypress", function(e) { var code = e.keyCode || e.which; //console.log(code); if (code == 13) { e.preventDefault(); return false; } }); // var spinner = $('.spinner').spinner({ min: 0, number: { digits: true }, stop: function(event, ui) { $(this).delay(500).change(); } }); // $('.checked').each( function () { //$(this).prop('checked', true); }); // $('.jq-hide').each( function () { $(this).hide(); $(this).removeClass('jq-hide'); }); // $(':input[required]').each( function () { $(this).addClass('required'); }); // window.dropdown = false; $('.sub-menu').hide(); $('.dropdown').show(); $('.content,.top-bar').hover(function() { $('.sub-menu').stop(true,true).slideUp('slow'); $('.has-dropdown').removeClass('over'); $('div').remove('.over-shim'); window.dropdown = false; }); $('#nav ul li').hover( function() { var item = $(this).children('a').text(); if(item.match(/cart/gi)) item = 'cart'; if(item != undefined){ //console.log(item); item = item.toLowerCase(); $('.has-dropdown').removeClass('over'); $('.'+item+'-d').addClass('over'); $('div').remove('.over-shim'); if($(this).attr('class').match(/has-dropdown/g)){ $('.'+item+'-d').append('
'); if(!window.dropdown) { $('.'+item).siblings().stop(true,true).hide(); $('.'+item).stop(true,true).delay(200).slideDown('slow'); window.dropdown = true; } else { $('.'+item).siblings().stop(true,true).hide(); $('.'+item).stop(true,true).fadeIn('slow'); $('.'+item).css("zIndex",5000); window.dropdown = true; } } else { //console.log('ud'); window.dropdown = false; $('.sub-menu').stop(true,true).slideUp('slow'); $('.has-dropdown').removeClass('over'); $('div').remove('.over-shim'); } } }, function() { } ); // // $('#v_large').click(function(e) { e.preventDefault(); $('#hold').addClass('large-12'); $('#hold').removeClass('large-8'); $('#hold').next('div').addClass('large-12'); $('#hold').next('div').removeClass('large-4'); }); $('#v_small').click(function(e) { e.preventDefault(); $('#hold').removeClass('large-12'); $('#hold').addClass('large-8'); $('#hold').next('div').addClass('large-4'); $('#hold').next('div').removeClass('large-12'); }); // /* // build headings $(".top-nav ul li").each(function() { var link = $(this).find('a'); if(jQuery.type(link.attr("href")) != 'undefined') { if(!$(this).text().match(/cart/i)){ $("", { "id" : $(this).text(), "label" : $(this).text() }).appendTo("#nav-select"); } } }); // build main opts $(".shop .sub-opts").each(function() { var link = $(this).find('a'); if(jQuery.type(link.attr("href")) != 'undefined') { if(!$(this).text().match(/cart/i)){ $("