jQuery.fn.delayPopup = function(options) {
	var options = jQuery.extend({ delaytime: 3800 }, options);
 	timer();
	function timer() {
		if(jQuery.cookie('sst_newsletter') != 1) {
   			if(jQuery.browser.msie){
			}
			else{
			setTimeout(showLightbox, options.delaytime);
			}
		}
	}
	function showLightbox() {		
		
		
				
		jQuery('#Enewsletter').jqm({trigger: '#EnewsletterPopup', overlay: 80}); 
		jQuery('#Enewsletter').jqmShow();
		jQuery.cookie('sst_newsletter', '1', { expires: 60, path: '/' });	

	}
};


jQuery(document).ready(function(){
	
	jQuery('#slides').cycle({ 
		fx: 'fade',
        speed: 1500,
		timeout: 8000,
		pager:  '#slidenav',
		pagerAnchorBuilder: function(idx, slide) { 
	        return '<a href="#"></a>'; 
	    }
    });
    jQuery('#goto1').click(function() { 
        jQuery('#slides').cycle(0); 
        return false; 
    });
    jQuery('#goto2').click(function() { 
        jQuery('#slides').cycle(1); 
        return false; 
    });
    jQuery('#goto3').click(function() { 
        jQuery('#slides').cycle(2); 
        return false; 
    });
    jQuery('#goto4').click(function() { 
        jQuery('#slides').cycle(3); 
        return false; 
    });
});


jQuery.fn.cycle.updateActivePagerLink = function(pager, currSlideIndex) {
    jQuery(pager).find('li').removeClass('activeLI')
        .filter('li:eq('+currSlideIndex+')').addClass('activeLI');
};


jQuery(function() {
	
	jQuery('#EnewsletterTrigger').delayPopup({delaytime: 3800});

});


jQuery(document).ready(function(){
	jQuery('#TLoveNotesWrapper').cycle({ 
		fx: 'fade',
		random: 'true',
		next:'.seenextnote',
		speed: 500,
		timeout: 0
    });

	jQuery('.productslideshow').cycle({ 
		fx: 'fade',
		speed: 2000,
		timeout: 100
    });

	jQuery('.pureteasampler').click(function() {
		  jQuery('.extendedpure').slideToggle('fast', function() {
		  });
		});
	jQuery('.greenteasampler').click(function() {
		  jQuery('.extendedgreen').slideToggle('fast', function() {
		  });
		});
	jQuery('.sanctuarysampler').click(function() {
		  jQuery('.extendedsanctuary').slideToggle('fast', function() {
		  });
		});
		
	jQuery('.recipeslideshow').cycle({ 
		fx: 'fade',
		speed: 2000,
		timeout: 100
    });

	jQuery("#2371340227").validate();
});

