function showPopup(e,c,b){var d=5;c=$(c);var a=c.offset();$("body").append('<img id="popup" style="position: absolute; border: 1px solid black; z-index: 999;" src="'+b+'" />');if(e){$("#popup").css("right",$(document).width()-a.left+d).css("top",a.top-150)}else{$("#popup").css("left",a.left+c.width()+d).css("top",a.top-150)}}function closePopup(){$("#popup").remove()}function onInventorySubmit(a,b){if(typeof(b)=="undefined"){b="Checking Inventory and Time..."}if(a.value=="Submit"){a.form.submit()}a.value=b}function imageLightbox(a,b){_modal=$(a);_modal.lightbox_me({closeClick:true,closeEsc:true,destroyOnClose:true,centered:true,overlayCSS:{background:"#595959",opacity:0.7},onLoad:function(){var c=new Image();$(c).load(function(){var d=$(this);d.hide();d.bind("click",closeLightBox);_modal.children().fadeOut("fast").replaceWith(this);_modal.css("left",($(window).width()-this.width)/2).css("top","5%");d.fadeIn()}).error(function(){window.alert("No Image Found\nPlease try again later.");closeLightBox()}).attr("src",b)}})}function closeLightBox(){var a=jQuery.Event("keypress");a.keyCode=27;$(window).trigger(a)};