// JavaScript Document for eZenTea.com by AtlantaWebDesignGA.com

// run all scripts when document is ready
jQuery(document).ready(function() {
// activate jQuery Cycle plug-in on any div with class Cycle
    jQuery('.slideshow').cycle({
		fx: 'fade'
	});
// show qTip if element has class show-tip
jQuery('.show-tip').qtip({
   position: {
      my: 'bottom center',  
      at: 'top center'
   }
});
// run fancybox on any element with class fancybox 
jQuery(".fancybox").fancybox();
// hide .shop-main .header if shopping cart empty 
//jQuery('.shop-main .header:contains("Shopping cart is empty")').hide();
//jQuery('.shop-main .header:contains("items")').show();
// replace alert popups with nice looking popups
 window.alert = function(message) { jQuery('#messageBox').text(message).fadeIn().delay(4000).fadeOut('slow'); }
// hide the red x in IE if image not found 
// add OnError="ImageLoadFailed()" to IMG tags in site to use this
jQuery("img").error(function () {
  jQuery(this).hide();  
  });
// hide the slideshow gallery if page URL contains online-tea-shop
if(window.location.href.indexOf("online-tea-shop") < 0 && window.location.href.indexOf("OrderRetrieve") < 0 ) {
					jQuery('div.gallery').show();
					jQuery('.header-bottom').css('height','30px');
				}
// hide shopping cart message if cart is empty
// if (document.cookie && document.cookie.indexOf("CartID") < 1) {
// document.getElementById('catCartSummary').style.display = "none";
// }
// end document ready
});
