
sub wordOfTheDayHandler
{
   $html = shift;
   my( @rValue ) = ();
   my ( $title, $url, $blurb );

   $html =~ s/&amp;/&/gixs;
   #print "fffffffff: $html"; 
   #exit;

   $word_block = zUtil::getNthItemNew( 1, $html, "<div class=\"word-header\">", "</div>" );
   #print "word: $word_block\n\n";
   
   $attributes_block = zUtil::getNthItemNew( 1, $html, "<div class=\"word-attributes\"", "</div>" );
   #print "attr: $attributes_block\n\n";
   
   $definition_block = zUtil::getNthItemNew( 1, $html, "<div class=\"wod-definition-container\"", "</div>" );
   #print "def: $definition_block\n\n";

   if ( $word_block =~ /<h1>(.*?)<\/h1>/ ) {
       $name = $1;
   }

   $attributes_block =~ s/<!--.*?-->//g;
   if ( $attributes_block =~ /<span class=\"main-attr\">(.*?)<\/span>/ ) {
       $description = "$1 ";
   }
   if ( $attributes_block =~ /<span class=\"word-syllables\">(.*?)<\/span>/ ) {
       $description .= "($1)";
   }

   #$simple_def = zUtil::getNthItemNew( 1, $word_block, "<p>", "</p>" );
   $simple_def = $definition_block;
   $simple_def =~ s/<div class=\"did\-you\-know\-wrapper\">.*<\/div>//sm;
   $simple_def =~ s/<h2>.*?<\/h2>//gsm;
   $simple_def =~ s/<span.*?>.*?<\/span>//gsm;
   $simple_def =~ s/<div.*?>.*?$//gsm;
   #print "simple def: $simple_def\n";

   $description .= "$simple_def";   

   print "description: $description\n";

   push @rValue, {
       'simple'         => $name,
       'pronunc'        => $description,
       'date'           => $date,
   };   

   return @rValue;

   while( $html =~ s/
      <item>.*?
         <title>(.*?)<\/title>.*?
         <link>(.*?)<\/link>.*?
         <description>(.*?)<\/description>.*?
      <\/item>//six )
   {
      $name          = $1;
      $link          = $2;
      $description   = $3;
      $date          = $4;
      #$description =~ s/&lt;.*?&gt;//gsix;

      $name =~ s/\<\!\[CDATA\[//gsix;
      $name =~ s/\]\]\>//gsix;
      $description =~ s/\<\!\[CDATA\[//gsix;
      $description =~ s/\]\]\>//gsix;
      #$description =~ s/&lt;.*?&gt;//gsix;  

      $temp = zUtil::getNthItemNew( 2, $description, "<p", "</p>" );
      $temp2 = zUtil::getNthItemNew( 3, $description, "<p", "</p>" );
      $description = $temp . $temp2;

      #print STDERR "\nname          => $name\n";
      #print STDERR "poster        => $poster\n";
      #print STDERR "date          => $date\n";
      #print STDERR "department    => $department\n";
      #print STDERR "description   => $description\n";
      #print STDERR "url           => $url\n";
      #print STDERR "icon          => $icon\n";
      #print STDERR "comments      => $comments\n";
      #print STDERR "category      => $category\n";
      #print STDERR "caturl        => $catUrl\n";
      push @rValue, {
         'simple'         => $name,
         'pronunc'        => $description,
         'date'           => $date,
       };
      # clean up after ourselves.
      undef($name);        undef($icon);
      undef($poster);      undef($date);
      undef($department);  undef($description);
      undef($url);         undef($comments);
      undef($cmntsAll);    undef($cmntsGood);
      undef($category);    undef($catUrl);
   }


   exit 1;

   return @rValue;
}

return 1;

