/* -------------------------------------------------------------------------------- / Magentech jQuery Created by Magentech v1.0 - 20.9.2016 All rights reserved. / -------------------------------------------------------------------------------- */ // Cart add remove functions var cart = { 'add': function(product_id, quantity) { addProductNotice('Product added to Cart', '', '

Apple Cinema 30" added to shopping cart!

', 'success'); } } var wishlist = { 'add': function(product_id) { addProductNotice('Product added to Wishlist', '', '

You must login to save Apple Cinema 30" to your wish list!

', 'success'); } } var compare = { 'add': function(product_id) { addProductNotice('Product added to compare', '', '

Success: You have added Apple Cinema 30" to your product comparison!

', 'success'); } } /* --------------------------------------------------- jGrowl – jQuery alerts and message box -------------------------------------------------- */ function addProductNotice(title, thumb, text, type) { $.jGrowl.defaults.closer = false; //Stop jGrowl //$.jGrowl.defaults.sticky = true; var tpl = '

'+text+'

'; $.jGrowl(tpl, { life: 4000, header: title, speed: 'slow', theme: type }); }