|
Server : Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/1.0.0-fips mod_auth_passthrough/2.1 mod_bwlimited/1.4 System : Linux server.jackjohnson.com 2.6.32-279.5.2.el6.x86_64 #1 SMP Fri Aug 24 01:07:11 UTC 2012 x86_64 User : jackjohn ( 502) PHP Version : 5.3.17 Disable Function : NONE Directory : /home/jackjohn/public_html/cgi-bin/sc/templates/includes/ |
Upload File : |
[-- IF AJAX_Add_To_Cart --]
<style type="text/css">body.modal-open header {position: absolute !important; z-index: -1}.modal-open {overflow: hidden}div#cart-popup, div#giftModal, div#contactModal {background: #FFF none repeat scroll 0 0; border-radius: 8px; bottom: auto; margin: auto; max-width: 500px; top: 5%; width: 90%; text-align: left}.modal-open .modal {overflow-x: hidden; overflow-y: auto}.fade.in {opacity: 0.5}.modal-backdrop.fade.in {opacity: 0.5}.modal {bottom: 0; display: none; left: 0; outline: 0 none; overflow: hidden; position: fixed; right: 0; top: 0; z-index: 1050}.fade {opacity: 0; transition: opacity 0.15s linear 0s}.modal-header {border-bottom: 1px solid #e5e5e5; min-height: 16.43px; padding: 15px}.modal-header .close {margin-top: -2px}span#cart-popup-prod-price {float: right}button.close {background: rgba(0, 0, 0, 0) none repeat scroll 0 0; border: 0 none; cursor: pointer; padding: 0}.close {color: #000; float: right; font-size: 21px; font-weight: 700; line-height: 1; opacity: 0.2; text-shadow: 0 1px 0 #fff}.modal-title {background: transparent; line-height: 1.42857; margin: 0}.modal-body {padding: 15px; position: relative}.modal-body div.warning {background: #FFF; border: 0px}div#messages {clear: both; padding: 0; text-align: center}div#messages > table, div#messages > div {margin-bottom: 15px !important}div#cart-popup-prod-img {clear: none; display: inline-block; float: left; text-align: center; width: 50%}div#cart-popup-prod-img img {max-width: 100%}div#cart-popup-prod-info {clear: none; display: inline-block; float: right; width: 48%}div#cart-popup-prod-info > span {display: block}span#cart-popup-name-price {clear: both; display: block}div#cart-popup-prod-info > span#cart-popup-prod-sku {font-size: 90%; font-style: italic}.text-muted {color: #777}.modal-footer {line-height: 100%;border-top: 1px solid #e5e5e5; padding: 15px; text-align: right}div#cart-popup-totals {padding: 0 2px 15px 0}div#cart-popup-totals {text-align: right}span#cart-popup-total-quantity {clear: none; display: inline-block; float: left; font-weight: bold}.modal-backdrop.in {opacity: 0.5}.modal-backdrop.fade {opacity: 0}.fade.in {opacity: 1}.modal-backdrop {background-color: #000; bottom: 0; left: 0; position: fixed; right: 0; top: 0; z-index: 1040}.fade {opacity: 0; transition: opacity 0.15s linear 0s}a.btn, a.btn:link, a.btn:visited, a.btn:active, button {background: #[-- STORE.LinkColor --]; border-radius: 4px; -moz-border-radius: 4px; -webkit-border-radius: 4px; border: 0px; color: #fff; cursor: pointer; display: inline-block; font-family: [-- STORE.Font --]; font-size: [-- STORE.FontSize --]; margin: 2px; padding: 5px 14px !important; text-decoration: none; width: auto; height: auto; line-height: 1.4em; float: none}button {padding: 4px; 13px}.clear {clear: both}</style>
<script type="text/javascript">var $ = ss_jQuery, jQuery = ss_jQuery;</script>
<script>
/* Bootstrap: modal.js v3.3.5 - http://getbootstrap.com/javascript/#modals
* Copyright 2011-2015 Twitter, Inc. - Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) == */
+function($){'use strict';var Modal=function(element,options){this.options=options
this.$body=$(document.body)
this.$element=$(element)
this.$dialog=this.$element.find('.modal-dialog')
this.$backdrop=null
this.isShown=null
this.originalBodyPad=null
this.scrollbarWidth=0
this.ignoreBackdropClick=false
if(this.options.remote){this.$element.find('.modal-content').load(this.options.remote,$.proxy(function(){this.$element.trigger('loaded.bs.modal')},this))}}
Modal.VERSION='3.3.5'
Modal.TRANSITION_DURATION=300
Modal.BACKDROP_TRANSITION_DURATION=150
Modal.DEFAULTS={backdrop:true,keyboard:true,show:true}
Modal.prototype.toggle=function(_relatedTarget){return this.isShown?this.hide():this.show(_relatedTarget)}
Modal.prototype.show=function(_relatedTarget){var that=this
var e=$.Event('show.bs.modal',{relatedTarget:_relatedTarget})
this.$element.trigger(e)
if(this.isShown||e.isDefaultPrevented())return
this.isShown=true
this.checkScrollbar()
this.setScrollbar()
this.$body.addClass('modal-open')
this.escape()
this.resize()
this.$element.on('click.dismiss.bs.modal','[data-dismiss="modal"]',$.proxy(this.hide,this))
this.$dialog.on('mousedown.dismiss.bs.modal',function(){that.$element.one('mouseup.dismiss.bs.modal',function(e){if($(e.target).is(that.$element))that.ignoreBackdropClick=true})})
this.backdrop(function(){var transition=$.support.transition&&that.$element.hasClass('fade')
if(!that.$element.parent().length){that.$element.appendTo(that.$body)}
that.$element.show().scrollTop(0)
that.adjustDialog()
if(transition){that.$element[0].offsetWidth}
that.$element.addClass('in')
that.enforceFocus()
var e=$.Event('shown.bs.modal',{relatedTarget:_relatedTarget})
transition?that.$dialog.one('bsTransitionEnd',function(){that.$element.trigger('focus').trigger(e)}).emulateTransitionEnd(Modal.TRANSITION_DURATION):that.$element.trigger('focus').trigger(e)})}
Modal.prototype.hide=function(e){if(e)e.preventDefault()
e=$.Event('hide.bs.modal')
this.$element.trigger(e)
if(!this.isShown||e.isDefaultPrevented())return
this.isShown=false
this.escape()
this.resize()
$(document).off('focusin.bs.modal')
this.$element.removeClass('in').off('click.dismiss.bs.modal').off('mouseup.dismiss.bs.modal')
this.$dialog.off('mousedown.dismiss.bs.modal')
$.support.transition&&this.$element.hasClass('fade')?this.$element.one('bsTransitionEnd',$.proxy(this.hideModal,this)).emulateTransitionEnd(Modal.TRANSITION_DURATION):this.hideModal()}
Modal.prototype.enforceFocus=function(){$(document).off('focusin.bs.modal').on('focusin.bs.modal',$.proxy(function(e){if(this.$element[0]!==e.target&&!this.$element.has(e.target).length){this.$element.trigger('focus')}},this))}
Modal.prototype.escape=function(){if(this.isShown&&this.options.keyboard){this.$element.on('keydown.dismiss.bs.modal',$.proxy(function(e){e.which==27&&this.hide()},this))}else if(!this.isShown){this.$element.off('keydown.dismiss.bs.modal')}}
Modal.prototype.resize=function(){if(this.isShown){$(window).on('resize.bs.modal',$.proxy(this.handleUpdate,this))}else{$(window).off('resize.bs.modal')}}
Modal.prototype.hideModal=function(){var that=this
this.$element.hide()
this.backdrop(function(){that.$body.removeClass('modal-open')
that.resetAdjustments()
that.resetScrollbar()
that.$element.trigger('hidden.bs.modal')})}
Modal.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove()
this.$backdrop=null}
Modal.prototype.backdrop=function(callback){var that=this
var animate=this.$element.hasClass('fade')?'fade':''
if(this.isShown&&this.options.backdrop){var doAnimate=$.support.transition&&animate
this.$backdrop=$(document.createElement('div')).addClass('modal-backdrop '+animate).appendTo(this.$body)
this.$element.on('click.dismiss.bs.modal',$.proxy(function(e){if(this.ignoreBackdropClick){this.ignoreBackdropClick=false
return}
if(e.target!==e.currentTarget)return
this.options.backdrop=='static'?this.$element[0].focus():this.hide()},this))
if(doAnimate)this.$backdrop[0].offsetWidth
this.$backdrop.addClass('in')
if(!callback)return
doAnimate?this.$backdrop.one('bsTransitionEnd',callback).emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION):callback()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass('in')
var callbackRemove=function(){that.removeBackdrop()
callback&&callback()}
$.support.transition&&this.$element.hasClass('fade')?this.$backdrop.one('bsTransitionEnd',callbackRemove).emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION):callbackRemove()}else if(callback){callback()}}
Modal.prototype.handleUpdate=function(){this.adjustDialog()}
Modal.prototype.adjustDialog=function(){var modalIsOverflowing=this.$element[0].scrollHeight>document.documentElement.clientHeight
this.$element.css({paddingLeft:!this.bodyIsOverflowing&&modalIsOverflowing?this.scrollbarWidth:'',paddingRight:this.bodyIsOverflowing&&!modalIsOverflowing?this.scrollbarWidth:''})}
Modal.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:'',paddingRight:''})}
Modal.prototype.checkScrollbar=function(){var fullWindowWidth=window.innerWidth
if(!fullWindowWidth){var documentElementRect=document.documentElement.getBoundingClientRect()
fullWindowWidth=documentElementRect.right-Math.abs(documentElementRect.left)}
this.bodyIsOverflowing=document.body.clientWidth<fullWindowWidth
this.scrollbarWidth=this.measureScrollbar()}
Modal.prototype.setScrollbar=function(){var bodyPad=parseInt((this.$body.css('padding-right')||0),10)
this.originalBodyPad=document.body.style.paddingRight||''
if(this.bodyIsOverflowing)this.$body.css('padding-right',bodyPad+this.scrollbarWidth)}
Modal.prototype.resetScrollbar=function(){this.$body.css('padding-right',this.originalBodyPad)}
Modal.prototype.measureScrollbar=function(){var scrollDiv=document.createElement('div')
scrollDiv.className='modal-scrollbar-measure'
this.$body.append(scrollDiv)
var scrollbarWidth=scrollDiv.offsetWidth-scrollDiv.clientWidth
this.$body[0].removeChild(scrollDiv)
return scrollbarWidth}
function Plugin(option,_relatedTarget){return this.each(function(){var $this=$(this)
var data=$this.data('bs.modal')
var options=$.extend({},Modal.DEFAULTS,$this.data(),typeof option=='object'&&option)
if(!data)$this.data('bs.modal',(data=new Modal(this,options)))
if(typeof option=='string')data[option](_relatedTarget)
else if(options.show)data.show(_relatedTarget)})}
var old=$.fn.modal
$.fn.modal=Plugin
$.fn.modal.Constructor=Modal
$.fn.modal.noConflict=function(){$.fn.modal=old
return this}
$(document).on('click.bs.modal.data-api','[data-toggle="modal"]',function(e){var $this=$(this)
var href=$this.attr('href')
var $target=$($this.attr('data-target')||(href&&href.replace(/.*(?=#[^\s]+$)/,'')))
var option=$target.data('bs.modal')?'toggle':$.extend({remote:!/#/.test(href)&&href},$target.data(),$this.data())
if($this.is('a'))e.preventDefault()
$target.one('show.bs.modal',function(showEvent){if(showEvent.isDefaultPrevented())return
$target.one('hidden.bs.modal',function(){$this.is(':visible')&&$this.trigger('focus')})})
Plugin.call($target,option,this)})}(jQuery);</script>
<script type="text/javascript">(function($){$.ssAddToCart = function(op) {var settings=$.extend(true,{},op),displayPopUpFunc = settings.displayPopUp,preAJAXfunc = settings.beforeAddToCart,ssAJAXCartCall = function(url, data) { if(typeof(preAJAXfunc) == 'function') preAJAXfunc(data);$.ajax({url:url,data:data,async:true,crossDomain:true,dataType:'jsonp',jsonp:'show_jsoncart',success:displayPopUpFunc});};if(typeof(displayPopUpFunc ) == 'function') {$("form[action*='order.cgi']").each(function () {if($("input[name='function']").val().toLowerCase() != 'add') return true;var f = $(this);f.submit(function(event){var error=false;$('[name*=":finopt:"]',f).each(function(){if(/;n/.test($(this).val())){$(this).addClass('field_warn').change(function(){$(this).removeClass('field_warn')});error="[-- STORE.RequiredMenuSelection --]";}});if(error){if(typeof(ss_handleResponse)=='undefined'){alert(error)}return false;}event.preventDefault();var data='';$(f.serializeArray()).each(function(){var t=$(this)[0];data+='&'+ escape(t.name)+'='+escape(t.value).replace(/\+/g,'%2B');});ssAJAXCartCall(f.attr('action'),data.substr(1));});});$("a[href*='order.cgi'][href*='function=add']").click(function (event) {var f = $(this),href=f.attr('href').split('?');event.preventDefault();ssAJAXCartCall(href[0],href[1]);});}}})(jQuery);</script>
<script type="text/javascript">(function($){$.ssAddToCart({displayPopUp : function(data){$('span.miniCount').html(''+data.quantity);if(data.product_info != undefined){var p=data.product_info;if(p.graphic != undefined)$('#cart-popup-prod-img').html($('<img>').attr('src',p.graphic));else $('#cart-popup-prod-img img').remove();$('#cart-popup-prod-name').html(p.name);$('#cart-popup-prod-sku').html(p.sku);$('#cart-popup-prod-price').html(p.price);$('#cart-popup-prod-quantity').html('[-- STORE.Qty --]: ' + p.quantity); if(p.options != undefined)$('#cart-popup-prod-options').html(p.options); else $('#cart-popup-prod-options').html(''); if(p.customer_text != undefined)$('#cart-popup-prod-customer_text').html(p.customer_text); else $('#cart-popup-prod-customer_text').html('');}$('#cart-popup-total').html(data.ordertotal);if(data.quantity > 1){$('#cart-popup-total-quantity').html(data.quantity + ' [-- STORE.Items --]')}else{$('#cart-popup-total-quantity').html(data.quantity + ' [-- STORE.Item --]')}if(data.error_messages.length > 0)$('#cart-popup-messages').html(data.error_messages.join('<br><br>')).addClass('warning_text');else $('#cart-popup-messages').html('').removeClass('warning_text');$('#cart-popup').modal({backdrop: 'static', keyboard: false,show:true});},beforeAddToCart:function(){}})})(jQuery);</script>
<div id="cart-popup" class="modal fade" role="dialog">
<div class="modal-header"><button type="button" class="close" data-dismiss="modal">×</button><h4 class="modal-title">[-- STORE.SC_YourShoppingCart --]</h4></div>
<div class="modal-body"><div id="messages" class="warning"><div id="cart-popup-messages"></div></div><div id="cart-popup-prod-img"></div><div id="cart-popup-prod-info"><span id="cart-popup-name-price"><span id="cart-popup-prod-price"></span><span id="cart-popup-prod-name"></span></span><span id="cart-popup-prod-sku" class="text-muted padb"></span><span id="cart-popup-prod-options"></span><span id="cart-popup-prod-customer_text"></span><span id="cart-popup-prod-quantity"></span></div><div class="clear"></div></div>
<div class="modal-footer"><div id="cart-popup-totals"><span id="cart-popup-total-quantity"></span><span class="bold">[-- STORE.Total --]: <span id="cart-popup-total"></span></span></div><div class="clear"></div><button type="button" class="btn btn-default" data-dismiss="modal">[-- STORE.ContinueShoppingText --]</button><a class="btn btn-primary" href="[-- SHOPPING_CART_URL --]">[-- STORE.ViewCartText --]</a></div>
</div>
[-- END_IF --]