function first_load_amount()
{
	var counter = 0, 
		limit = 15, 
		ms = 500,
		check = function()
		{
			var new_total = jQuery('.cart_dropdown .dropdown_widget_cart:eq(0) .total .amount');
			
			if(new_total.length)
			{
				update_cart_dropdown();
			}
			else
			{
				counter++;
				if(counter < limit)
				{
					setTimeout(check, ms);
				}
			}
		};
		
		check();
		
		//display the cart for a short moment on page load if a product was added but no notice was delivered (eg template builder page)
		if (jQuery('.av-display-cart-on-load').length && jQuery('.woocommerce-message').length == 0)
		{
			var dropdown = jQuery('.cart_dropdown');
			setTimeout( function(){dropdown.trigger('mouseenter'); }, 500);
			setTimeout( function(){dropdown.trigger('mouseleave'); }, 2500);
		}
}
//function that pre fills the amount value of the cart
function that pre fills the amount value of the cart
function that pre fills the amount value of the cart
function first_load_amount()
{
	var counter = 0, 
		limit = 15, 
		ms = 500,
		check = function()
		{
			var new_total = jQuery('.cart_dropdown .dropdown_widget_cart:eq(0) .total .amount');
			if(new_total.length)
			{
				update_cart_dropdown();
			}
			else
			{
				counter++;
				if(counter < limit)
				{
					setTimeout(check, ms);
				}
			}
		};
		check();
		if (jQuery('.av-display-cart-on-load').length && jQuery('.woocommerce-message').length == 0)
		{
			var dropdown = jQuery('.cart_dropdown');
			setTimeout( function(){dropdown.trigger('mouseenter'); }, 500);
			setTimeout( function(){dropdown.trigger('mouseleave'); }, 2500);
		}
}
function first_load_amount ( ) { var counter = 0 , limit = 15 , ms = 500 , check = function ( ) { var new_total = jQuery ( '.cart_dropdown .dropdown_widget_cart:eq(0) .total .amount' ) ; if ( new_total . length ) { update_cart_dropdown ( ) ; } else { counter ++ ; if ( counter < limit ) { setTimeout ( check , ms ) ; } } } ; check ( ) ; if ( jQuery ( '.av-display-cart-on-load' ) . length && jQuery ( '.woocommerce-message' ) . length == 0 ) { var dropdown = jQuery ( '.cart_dropdown' ) ; setTimeout ( function ( ) { dropdown . trigger ( 'mouseenter' ) ; } , 500 ) ; setTimeout ( function ( ) { dropdown . trigger ( 'mouseleave' ) ; } , 2500 ) ; } }
function that pre fills the amount value of the cart
function that pre fills the amount value of the cart
//display the cart for a short moment on page load if a product was added but no notice was delivered (eg template builder page)