;
//This function will replace a series of divs with a proper menu. The purpose is to make the tao|cms jsform templates compatible with a menu-based slider.
//In the jsform, the menu should be set up with divs labeled with a .li class like so:
//<div class="li"><img src="example.png"></div>
//The function will replace div.li with an <li></li> set.
 
var replaceDivsWithMenu = function( targetMenu ){
  $.each( $(targetMenu).find('div.ul'), function(ix, va){
    $(this).replaceWith( $('<ul>' + this.innerHTML + '</ul>') );
  });
  $.each( $(targetMenu).find('div.li'), function(ix, va){
    $(this).replaceWith( $('<li>' + this.innerHTML + '</li>') );
  });
}
;
/*
Structure is supposed to be:
<ul>
  <li>
    <img>
*/

