
var genolve_divEffect = function(key,vpr,$){
        var PAR = String(genolve_gen_sel_hash[key].par);
        var VAL = String(genolve_gen_sel_hash[key].val);
				var rsvg=null;
        vpr.vprint("gwpt","genolve-getsvg: replac "+kk+"["+key+"]: par:"+PAR+" with:"+VAL);
        //
        // coverNshow JSON data
        //
        paramO=null;
        if(PAR.indexOf("{")===0){
          // parseJSON
          try{
          	paramO = JSON.parse(String(PAR).replace(/\\"/g,'"') );
          if(paramO.selector && $(paramO.selector).length >=1){
            //alert("found selector:"+PAR);
            }
          } catch (e) {  
          	vpr.vprint("gwpt", "JSON parse error on["+key+"]:"+e);
          };
          } // end had params
        if(true) {
          if(key=="#falling-snow"){//SNOW   - need to make div
						//limit num times shown
						if(typeof(Storage) == "undefined")
							console.log("browser has no storage");
						else{
							nsnow = sessionStorage.gnlv_fallingsnow_nn;
							maxshow = (paramO.slide && paramO.slide.maxTimes2Show)?paramO.slide.maxTimes2Show:1;
							if(!nsnow){
								sessionStorage.gnlv_fallingsnow_nn=1;
								}
							else if(parseInt(nsnow)>maxshow)
								return;
							else
								sessionStorage.gnlv_fallingsnow_nn=parseInt(nsnow)+1;
							}
            $('body').prepend('<div id="falling-snow" class="gnlv-falling"/>'); 
            $(key).css({'background-image':'url( \''+VAL+'\')'});
            if(paramO.slide){
                slideO=paramO.slide;
              if(slideO.animateOut=="fadeOut" && slideO.duration<99){// add duration
                $(key).css({'animation':'gnlv-opacity-fade 1s  linear  '+slideO.duration+'s forwards normal'});
                }
              else if(slideO.animateOut.match(/(zoomIn|zoomOut)/) && slideO.duration<99){// add duration
                $(key).css({'animation':'gnlv-scale-'+slideO.animateOut+' 2s  linear  '+slideO.duration+'s forwards normal,gnlv-opacity-fade 0.1s  linear  '+(slideO.duration+2)+'s forwards normal'});
                }
              else if(slideO.animateOut=="none" && slideO.duration<99){//
                $(key).css({'animation':'gnlv-scale-grow 1s  linear  '+slideO.duration+'s forwards normal'});
                }
              else if(slideO.animateOut=="move2background" ){// 
                bodyz = $('body').css('z-index');
                bodyz = (bodyz == null || isNaN(bodyz))?0:bodyz;
                document.fallingtimeout = window.setTimeout(function(){
                            // no effect a lot of themes, could also replace the body background
                            $('#falling-snow').css({'z-index':bodyz});
                            },(slideO.duration+2)*1000);
                }
              // removal needed for firefox, 
              if(slideO.animateOut.match(/(zoomIn|zoomOut|fadeOut)/) && $('#falling-snow').length==1)
                //clearTimeout(document.fallingtimeout);
                document.fallingtimeout = window.setTimeout(function(){
                            //alert("remove:falling-snow in time:"+(slideO.duration+2)*1000);
                            $('#falling-snow').remove();
                            },(slideO.duration+2)*1000);
              }
            }//end snow
          else if (paramO!=null && paramO.origarea=="coverNshow"){//CoverNshow
            vpr.vprint("gwpt",'coverNshow mode: '+paramO.origarea+" all params:"+JSON.stringify(paramO));
            // load all divs in body
            $('body').append(String(VAL).replace(/\\"/g,'"') );
            bb=1;
            $(paramO.selector).each(function() {// reposition each buttonset
                  el=$(this);
                  vpr.vprint("gwpt",'coverNshow NUM['+bb+'] el:'+el.length+' id:'+el.prop('id')+' class:'+this.className+' w:'+el.width()+' h:'+el.height()+' x:"'+el.offset().left+' y:'+el.offset().top);
                    // set all of class gnlv-todo[bb] top left to this el 
                    $("."+paramO.coverclass+bb).css({left:el.offset().left+"px",top:el.offset().top+"px"});
                  bb++;
                  });
            // end reposition
            }
          else {// STANDARD divbackground
            $(key).css({'background-image':'url( \''+VAL+'\')'});
            if(paramO && typeof(paramO.divstyle)=="object"){// add duration
              vpr.vprint("gwpt",'divbackground['+key+'] apply additional styles:'+vpr.dumpvar(paramO.divstyle));
              $(key).css(paramO.divstyle);
              }
          }
          } // end true
				}// end genolve_divEffect
var genolve_checkcustomize = function(){
	setTimeout(function(){	
		if(typeof(genolve_customize)=="object")
			genolve_customize.startupGenolve('block-widgetai','gnlv-aigen');
		else{
			jQuery('#gnlv-tmpdiv').html('<b>The AI widget failed to load! <a href="#" onClick="genolve_customize.startupGenolve(\'block-widgetai\',\'gnlv-aigen\')">Try again</a> or you may not be logged in.</b>');
			genolve_checkcustomize();
			}
	},700);
	}// end checkcustomize
	
jQuery(document).ready(function ($) {
  vv=true;//production true
  if(typeof eloop=='undefined'){
    eloop={version:'stub',actionhost:"../.."};
		document.eloop = eloop;
		}
  /*
	functions:
	checkbrowser
	isMobile
	isSafari
	*/
  genolve_getsvg_class = function() {
    var self=this;
    var batchFetch={};
    var batchFetchel={};
    var myparamO = {CMD:'GETSVG',returnMode:'JSONPHENO',param2:'NL',redir:'JSON'};
    var paramO = null;
    this.verbose=false;//production
		// This stub just for prints, better stub in gnlv-scroll once created dont document.vpr = vpr;
    var vpr={name:'getsvg-vpr-stub',vprint:function(tag,stuff){if(self.verbose)console.log(tag+" "+stuff);} ,
		dumpvar:function(inval){return JSON.stringify(inval)}
      };
		
    if(typeof eloop!='undefined' && eloop.version!='stub'){// NOTE  MOSTLY eloop is not defined!  do not use eloop 
      vpr=eloop.pvpr;
      vpr.vprint("gwpt","genolve eloop defined!, membership:"+eloop.Membership);
      }
    this.actionhost="https://www.genolve.com"; 
    //this.actionhost="http://localhost/widget"; 
    this.action= this.actionhost+"/athena/en/ZlistControl.php";
    this.useJSONP=true;
    this.wpAjaxUrl = genolveO.wpajaxurl;
		this.playbtn= this.wpAjaxUrl.replace(/wp-admin.*/,"wp-content/plugins/genolve-toolkit/img/playbtn.svg");
    this.beyonce_getsvg = genolveO.beyonce_getsvg;
    this.fallingtimeout=null;
    //alert("starting genolve-getsvg with genolve_img_sel type:"+typeof(genolve_img_sel_hash)+" dump:"+vpr.dumpvar(genolve_img_sel_hash));
    //alert("starting genolve-getsvg with genolve_gen_sel type:"+typeof(genolve_gen_sel_hash)+" dump:"+vpr.dumpvar(genolve_gen_sel_hash));
    vpr.vprint("gwpt","genolve-getsvg have genolve enabled?"+genolveO.genolve_enabled+" membership?"+genolveO.genolve_membership);
    // 
    //  H E L P E R    F U N C T I O N S
    //
    this.checkbrowser = function(){
      ret_val=true;
      var uA = window.navigator.userAgent,
      isIE = /msie\s|trident\/|edge\//i.test(uA) && !!(document.uniqueID || document.documentMode || window.ActiveXObject || window.MSInputMethodContext),
      checkVersion = (isIE && +(/(edge\/|rv:|msie\s)([\d.]+)/i.exec(uA)[2])) || NaN;
      if(isIE) ret_val =  false;
      if(!ret_val)
        vpr.vprint("gwpt","genolve-getsvg is not running because this browser does not support SVG!");
      return ret_val;
      } // end  checkbrowser
    this.isMobile =  String(window.navigator.userAgent).match(/(iPod|iPhone|iPad|Android)/)?true:false;
    this.isSafari =  String(window.navigator.userAgent).match(/(Safari)/)?true:false; // new ipads claim they are desktop
		
    // 
    //  S T A R T     C O D E    
    //
    //  C H E C K    I F    E N A B L E D
    if ( genolveO.genolve_enabled === 'TRUE' ) {
    //  C H E C K    B R O W S E R 
    if ( self.checkbrowser()) {
      //
      // GENERAL TAG BACKGTOUND/FALLING SNOW replacements
      //
      if(genolveO.genolve_membership=="BasicPlus" && false){// moved to a hook
        $('body').append('<a class="gnlv-logo-lr" id="genolve-powered-by" href="https://www.genolve.com" target="_blank">animations by genolve</a>'); 
        }
      if(genolveO.genolve_membership=="BasicPlus" && self.isMobile){//move to footer
        $('.site-info').append($('#genolve-powered-by').removeClass('gnlv-logo-lr')); 
        }  
      kk=0;
      for(key in genolve_gen_sel_hash){
        kk++;
				genolve_divEffect(key,vpr,$);
				
        } // end all gen keys
      //
      // IMAGE TAG replacements    I M A G E
      // Find all  img on page names containing genolve
      var PAR ;
      var VAL ;
      kk=0;
      batchFetch={},batchFetchel={};
      $('img').each(function() {
          // match?
          // typical wordpress image with a name like genolve20180520111333-1024x538.jpg  NEW 2022/05/genolve-Happy-Mom-Day-1024x548.jpg
          vpr.vprint("gwpt","genolve-getsvg id:"+$(this).prop('id'));
          thename = $(this).prop('src');
          if(thename!=null)// grab genolve20180520111333
            //thename = thename.replace(/.*\//,"").replace(/-.*/,"").replace(/\..*/,"");
						thename = thename.replace(/.*\//,"").replace(/-\d+x\d+\.jpg/,"").replace(/\..*/,"");
          
          if ( thename!=null && thename!='' && genolve_img_sel_hash[thename] !=null ) {
            kk++;
            PAR = genolve_img_sel_hash[thename].par;
            VAL = genolve_img_sel_hash[thename].val;
						vpr.vprint("gwpt","genolve-getsvg found img match - = [ "+kk+":"+thename+" val:"+VAL+"] "+typeof($(this) )+" = -");
						// find first section parent
						sec_par = $(this).closest("section");
						if(sec_par.length==1 && sec_par.hasClass("widget_top-posts"))
							vpr.vprint("gwpt","genolve-getsvg IGNORE img match in top posts:"+thename);
            else if(batchFetch[VAL]==null){
              batchFetch  [ VAL ] = 'nada';  // filled in later, svg code
              batchFetchel[ VAL ] = $(this); // save for later
              }
            else // could do a use here?
              vpr.vprint("gwpt","genolve-getsvg IGNORE 2nd img match for:"+thename);
          }
        });
      //
      // VIDEO TAG replacements   V I D E O
      // Find all  .wp_video on page with <video> containing genolve
      if(false) //X X X disable
      $('.wp-video').each(function() {
          // match?
          // find a video element
          thevideowrapper = $(this);
          vpr.vprint("gwpt","genolve-getsvg: found wp-video div width:"+thevideowrapper.width());
          thevideo = $(this).find('video');
          if(thevideo==null || thevideo.length!=1)
            vpr.vprint("gwpt","genolve-getsvg: did not find video tag or more than one:"+thevideo.length);
          else{
            thename = $(this).attr('src');
            if(thename==null) {// try <source tag
              thename = thevideo.find('source:first');
              if(thename != null)
                thename=thename.attr('src');
              }
            if(thename==null )
              vpr.vprint("gwpt","genolve-getsvg: found video tag but no source");
            else {
              // typical wordpress image with a name like genolve20180520111333-1024x538.jpg
              // dubug: not finding it? if a new extenstion was it stripped in genolve_addHeaderCode
              thename = thename.replace(/.*\//,"").replace(/-.*/,"").replace(/\..*/,"");
              vpr.vprint("gwpt","genolve-getsvg: found video looking for name:"+thename);
              if ( genolve_img_sel_hash[thename] !=null ) {
                vpr.vprint("gwpt","genolve-getsvg found vid match:"+thename);
                PAR = genolve_img_sel_hash[thename].par;
                VAL = genolve_img_sel_hash[thename].val;
                batchFetch  [ VAL ] = 'nada';  // filled in later, svg code
                batchFetchel[ VAL ] = thevideowrapper; // save for later
                }
              }
            }
            
        }); // end each video
    //
    // check background for specific themes
    if(genolveO.wptheme=="Twenty Seventeen"){// see what is in the background style for .panel-image
      backgroundtarget = $('.panel-image:first');
      thename = backgroundtarget.css('background-image');
      if(thename==null || backgroundtarget.length !=1)
        vpr.vprint("gwpt","Twenty Seventeen:genolve-getsvg: select .panel-image:first not found:"+backgroundtarget.length+" OR no background source");
      else {
        // typical wordpress image with a name like genolve20180520111333-1024x538.jpg
        // dubug: not finding it? if a new extenstion was it stripped in genolve_addHeaderCode
        thename = thename.replace(/.*\//,"").replace(/-.*/,"").replace(/\..*/,"");
        vpr.vprint("gwpt","Twenty Seventeen:genolve-getsvg: found background, looking for name:"+thename);
        if ( genolve_img_sel_hash[thename] !=null  ) {
          vpr.vprint("gwpt","Twenty Seventeen:genolve-getsvg found background match:"+thename);
          PAR = genolve_img_sel_hash[thename].par;
          VAL = genolve_img_sel_hash[thename].val;
          batchFetch  [ VAL ] = 'nada';  // filled in later, svg code
          batchFetchel[ VAL ] = backgroundtarget; // save for later
          }
        }
      } // end specific theme hack

    var imgA=[];
    for(key in batchFetch)
      imgA.push(key);
    myparamO.byRedit = imgA.toString();
    myparamO.beyonce_getsvg = self.beyonce_getsvg;
    var keyA=[];
    for(key in myparamO)
      keyA.push(key);
    myparamO.faction = "control";
    myparamO.keylist = keyA.toString();
    myparamO.action = 'genolve_proxy';
    if(imgA.length==0)
      vpr.vprint("gwpt","genolve-getsvg: found no images to swap on this page!");
    else  {
      document.gnlvSound = gnlvSound  = new GenolveSound({ vpr:null,usemode:'minimal', actionhost:self.actionhost});
      gnlvScroll = new GenolveScroll({ vpr:null,usemode:'minimal'});
      
      // FETCH  IMAGE VIA AJAX
      // FETCH  IMAGE VIA AJAX
      vpr.vprint("gwpt","genolve-getsvg: AJAX to:"+self.wpAjaxUrl+ " data:"+vpr.dumpvar(myparamO));
      thecurreq =    $.ajax({
            url : self.wpAjaxUrl,
            type : 'post',
            // BAD REQUEST firefox with this        contentType: "application/json; charset=utf-8", 
            // BAD REQUEST firefox                  contentType:"application/json",
            // BAD REQUEST works firefox not chrome contentType: "application/x-www-form-urlencoded; charset=utf-8",
            // BAD REQUEST works firefoc not chrome NO contentType
            //async: false,
            //timeout: 3000,  // expect 3 sec max
            dataType : 'json',
            //// BAD REQUEST JSON.stringify(
            data :myparamO,
            //                                              C O N N E C T E D
            success :function(response,textStatus, thecurreq) { 
                    // modal dialog must have div called "message"
                    var payload,thisel,myclasses,imgsrc,imgw,imgh,mypclasses,el,key;
										var newdiv,themusic={};
                    vpr.vprint("gwpt","genolve-getsvg: = = = CALLBACK = = =had reponse?["+response+"]");
                    payload=response;
                    if(payload != null && payload.number>0){
                      // unpack payload
                      for(var ii=0; ii<payload.number; ii++){
                        thisel=payload.shapes[ii];
                        if(thisel==null)
                          vpr.vprint("gwpt","genolve-getsvg: = = = CALLBACK["+ii+"]null");
                        else{
                          uuid = String(thisel.uuid);// keep case .toLowerCase()
                          thesvg = thisel.pheno;
                          if(thisel.music!=null && thisel.music.indexOf('{')===0){
                                try{
                                  themusic =  JSON.parse(thisel.music);
                                }catch (e) {  
                                  console.warn( "JSON parse error on["+thisel.music+"]:"+e);
                                  themusic = thisel.music;
                                }
                            }
                          vpr.vprint("gwpt","genolve-getsvg: = = = CALLBACK["+ii+"] packed up:"+uuid+" anitype:"+thisel.anitype+" music?"+typeof(themusic)+" pheno:"+thesvg );
                          batchFetch[ uuid ] = {svg:thesvg,anitype:thisel.anitype,music:themusic};
                          }
                        }
                      // NOW revisit the images 
                      for(key in batchFetch){
                        $img=batchFetchel[key];
                        
                        myclasses = $img.prop('class');
                        imgsrc = $img.prop('src');
												imgw   = $img.width();
												imgh   = $img.height();
                        mypclasses = "";
                        //mystyles  = $img.css();
                        el=$img.get(0);
                        mystyles = window.getComputedStyle ? getComputedStyle(el, null) : el.currentStyle;
                        mystyles = $.extend({},mystyles);
												//20210913 div id cannot start with number
												if(key.match(/^[0-9].*/)){
													divid = "aaa"+key;
													vpr.vprint("warn","genolve-getsvg bad ID["+key+"]!!!! renaming:"+divid);
													}
												else
													divid = key;
                        propO={id:divid};
                        if(myclasses==null || myclasses==""){
                          propO.width=$img.width();
                          propO.height='auto';//$img.height();
                          }
                        rsvg= batchFetch[key].svg;
                        if($img!=null && $img.length==1 && rsvg!=null && rsvg!="nada"){
                          vpr.vprint("gwpt","genolve-getsvg: = = = CALLBACK = = =doing replace on key["+key+"] el:"+el.tagName+" id:"+$img.id+" width:"+$img.width()+" height:"+$img.height()+" anitype:"+batchFetch[key].anitype+" mp3?"+(batchFetch[key].music?batchFetch[key].music.mp3:'none'));
                          //transform FONTS for html
                          // have verifyied the <? is intact comming out of GETSVG but transformed somewhere: guessing putting it in html itself does it
                          // NOT  <!--?xml-stylesheet type="text/css"
                          // BUT  <?xml-stylesheet
                          rsvg = rsvg.replace(/repeatDur="\d+s"/g,'repeatDur="indefinite"');
                          rsvg = rsvg.replace(/xMinYMin meet/,'xMidYMid slice');  // most useful for all sizes
                          //svg = svg.replace(/<svg /,'<svg class="gnlv-svg" ');  // animation speed hack
                          myp = $img.parent();
                          if(myp){
                            mypclasses = myp.prop('class');
                            if($img.css('display')=='none' && myclasses=="")
                              myclasses = mypclasses;
                            }
                          vpr.vprint("gwpt","genolve-getsvg: on["+el.tagName+"] id:"+$img.prop('id')+" width/h!"+$img.css('width')+","+$img.css('height')+" display:"+$img.css('display') +" parent:"+myp.prop('id')+" classes:"+mypclasses);
                          if(el.tagName.toLowerCase()=="div" && false){// NOT img, Div use bg, abandon: fonts/images go missing and no way to load 
                            rsvg = rsvg.replace(/\n/g,"").replace(/.*<svg/g,"<svg");
                            $img.css('background-image', 'url(\'data:image/svg+xml;base64,' + btoa(rsvg)+'\')' );
                            }
                          else{
                            rsvg = rsvg.replace(/<.xml-stylesheet type=.text.css./,"<link rel='stylesheet' ").replace(/ \?>/,">");
                            batchFetch[key].svg=rsvg;
                            newdiv = $('<div ></div>').prop(propO).addClass(myclasses);
                            //hover/click to play
                            playmode="idle2play";
                            if(newdiv.hasClass('gnlv-gone-hov')||myp.hasClass('gnlv-gone-hov')
                              ){
                              newdiv.css({'background-image':'url( \''+self.playbtn+'\'),url( \''+imgsrc+'\')','background-size':'contain,cover','background-position':'center center,center center','background-repeat':'no-repeat,no-repeat'});
                              playmode="static2play";
                              } // end play button
                            // if > MUSIC <  music-driven
                            if(batchFetch[key].anitype=="music"){
                              vpr.vprint("gwpt","genolve-getsvg: MUZ place div ["+playmode+"], preloading mp3: "+batchFetch[key].music.mp3+" gnlvSound:"+typeof(gnlvSound)+" GenolveSound:"+typeof(GenolveSound));
                              //20210528 disable, ref: bV,p28
															//newdiv.css({'width':$img.width()+'px','height':'auto'});// becuase div empty set exact w/h as image$img.height()
                              vpr.vprint("gwpt","genolve-getsvg: MUZ place div with width/h!"+newdiv.css('width')+","+newdiv.css('height')+" class list:"+myclasses+" theme:"+genolveO.wptheme+":");
                              //gnlvSound.preload({batchFetch[key].music.mp3});
                              // if(static2play)
                              if(playmode=="static2play"){
                                $img.replaceWith(newdiv);
                                newdiv.on('click',function(){
                                  myid=$(this).prop('id');
                                  vpr.vprint("gwpt","genolve-getsvg["+key+"]: show SVG *click* on:"+myid+" scroll?"+typeof(gnlvScroll));
                                  if(batchFetch[myid].svg!=null){//first click
                                    $(this).html(batchFetch[myid].svg);
                                    batchFetch[myid].svg=null;
                                    gnlvSound.registerVol();
                                    gnlvSound.showVol();//TODO transform may be off however imgclick now functions as
																		//20210913
                                    gnlvScroll.doSetup({div:divid}); // setup 1 of 3
                                    newdiv.css({'background-image':'none','background-color':'black'}); 
                                    }
                                  gnlvSound.toggleVol();
                                  }); 
                                }// end static2play
                              else { //idle2play
                                vpr.vprint("gwpt","genolve-getsvg["+key+"]: MUZ place div ["+playmode+"], preloading mp3: "+batchFetch[key].music.mp3+" gnlvSound:"+typeof(gnlvSound)+" GenolveSound:"+typeof(GenolveSound));
                                newdiv.html(rsvg);
                                $img.replaceWith(newdiv);
                                gnlvScroll.doSetup({fromdiv:divid,usemode:'idle2play'}); // setup 2 of 3
                                } // end idle2play
                            // not music, load svg and replace image
                            }else{
                              newdiv.html(rsvg);
                              $img.replaceWith(newdiv);// < <  --  replace image with svg
                              vpr.vprint("gwpt","genolve-getsvg["+key+"]: STD place div with width/h!"+newdiv.css('width')+","+newdiv.css('height')+" class list:"+myclasses+" theme:"+genolveO.wptheme+": anitype:"+batchFetch[key].anitype);
															if( parseInt(newdiv.css('height')) > imgh
                              	&& genolveO.wptheme=="I Am One Pro")
																newdiv.css('height',imgh);
                              // if > SCROLL <
                              if(batchFetch[key].anitype=="scroll" || batchFetch[key].anitype=="mouse"){
																gnlvScroll.doSetup({fromdiv:divid,usemode:'normal'}); // setup 2 of 3
                                /*if(self.isSafari &&false)
                                  window.setTimeout(function(){      
                                  alert("doing setup for :"+window.navigator.userAgent+" scroller:"+typeof(gnlvScroll)+typeof(document.gnlvScroll)+" scrollerclass:"+typeof(GenolveScroll));
                                if(typeof(GenolveScroll)!="undefined")
                                  gnlvScroll = new GenolveScroll();          
                                gnlvScroll.doSetup();                  },3000); */
                                }// end scroll
                              }// end reg image
                            //$('#'+propO.id).parent().append('<textarea  id="mylog" style="width:1000px;height:400px;"></textarea>');
                            }
                          
                          if(newdiv!=null && 
                                (parseInt(newdiv.css('width')) <parseInt($img.css('width')) 
                              || parseInt(newdiv.css('height'))<parseInt($img.css('height'))
                              || genolveO.wptheme=="Twenty Nineteen")
                              ){// try the styles
                            vpr.vprint("gwpt","genolve-getsvg: X div smaller than image X, trying computed styles:"+mystyles+" for div:"+newdiv.prop('id'));
                            newdiv.removeClass(myclasses);//.css(mystyles);
                            Object.assign(newdiv.get(0),mystyles);// < not working
                            for(prop in mystyles){
                              if(mystyles[prop]!==null && mystyles[prop]!=""){
                                //vpr.vprint("gwpt","genolve-getsvg:["+prop+"]="+mystyles[prop]);
                                newdiv.get(0).style[prop]=mystyles[prop];
                                }
                              }
                            }// end newdiv
                          if(newdiv!=null){// 20210529 new firefox glitch ref: bVp27
														window.setTimeout(function(){newdiv.css({overflow:'hidden'})},700);
														}
                          //$img.replaceWith(svg);
                          }// end EXACTLY one img
                        else {
                          vpr.vprint("warn","genolve-getsvg get key["+key+"] * FAIL * because img lost:"+$img.length+" or no svg:"+rsvg+" have keys:"+Object.keys(batchFetchel)+" and "+Object.keys(batchFetch)); // no longer have iteratevpr.iterate(batchFetchel,null,"getkeys")
                          if($img.length>1)
                            vpr.vprint("gwpt","genolve-getsvg: dump:"+vpr.dumpvar($img));
                          }
                        } // end loop images
      $.event.trigger({ // event no longer needed, switched to per div init
          type: "svgready",
          message: "all svg is ready for action",
          time: new Date()
          });
                      }// end response not null
                    else
                      vpr.vprint("gwpt","genolve-getsvg empty response or no images returned!");
                    } // end success
              , // end loadCards xhr success
            error: function(xhr, result, status){
                  console.error("genolve-getsvg  CALLBACK:Error "+status+","+result+","+vpr.dumpvar(xhr));
                  }
              }); // end ajax
    }
    }// end checkbrowser
    }// end genolve_enabled

  } // end class
  genolve_getsvg =  new genolve_getsvg_class(); // Execute immediately

});
