/*------------------------------------------------------------------------ # BIT Vituemart Product Badges # ------------------------------------------------------------------------ # author: Barg-IT # copyright: Copyright (C) 2013 Barg-IT # @license: http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL # Website: http://www.barg-it.de -------------------------------------------------------------------------*/ function new_product_on_page(badge_div,badge_relevant,badge_img_new,badge_new_pos,badge_img_sale,badge_sale_pos,badge_img_discount,badge_discount_pos,badge_img_hot,badge_hot_pos, badge_img_product1,badge_img_product2,badge_img_product3,badge_img_product4,badge_img_product5,badge_product_pos,badge_img_category,badge_category_pos ) { var badge_id=badge_div.attr('id'); var product_id_arr=badge_id.split("_bvmpb"); var product_id=product_id_arr[0]; var found=badge_relevant[product_id]; if(found){ var inhalt = ""; badge_div.css('display','block'); if (found.search('new')!= -1 ) {inhalt = '
badge_new
'; } if (found.search('sale')!= -1) {inhalt += '
badge_featured
'; } if (found.search('discount')!= -1) {inhalt += '
badge_discount
'; } if (found.search('hot')!= -1) {inhalt += '
badge_hot
'; } if (found.search('product1')!= -1) {inhalt += '
badge_product
'; } if (found.search('product2')!= -1) {inhalt += '
badge_product
'; } if (found.search('product3')!= -1) {inhalt += '
badge_product
'; } if (found.search('product4')!= -1) {inhalt += '
badge_product
'; } if (found.search('product5')!= -1) {inhalt += '
badge_product
'; } if (found.search('category')!= -1) {inhalt += '
badge_category
'; } badge_div.html(inhalt); } }