public function __construct($cacheFileName)
 {
     $this->config = parse_ini_file("config/config.ini", true);
     $this->cacheFile = CacheFile::getInstance($cacheFileName, $this->config['tmpDir'], $this->config);
     $this->cacheFileName = $cacheFileName;
 }
    /**
     * Retrieve body html
     *
     * Retrieves markup to include in the main content body of item show pages
     *
     * @return string Html to include in the header, 
     * linking to stylesheets and javascript libraries
     */
    public function getBodyHtml($params)
    {
        $params = $this->_filterCssParams($params, array('width', 'height'));
        if (empty($params['cacheFileName'])) {
            throw new Exception('Item cannot be displayed. No cache file specified for Ohms Viewer.');
            return;
        }
        $libDir = dirname(dirname(dirname(__FILE__))) . '/libraries/ohmsviewer/';
        $config = parse_ini_file($libDir . "config/config.ini", true);
        $cachefile = isset($params['cacheFileName'][0]) ? $params['cacheFileName'][0] : $params['cacheFileName'];
        $cachefile = isset($cachefile['path']) ? $cachefile['path'] : $cachefile;
        require_once dirname(dirname(dirname(__FILE__))) . '/libraries/ohmsviewer/lib/CacheFile.class.php';
        //$plugin_dir = dirname(dirname(dirname(__FILE__)));
        $plugin_dir = dirname($_SERVER["SCRIPT_FILENAME"]) . '/plugins/MultimediaDisplay';
        $cacheFile = CacheFile::getInstance($cachefile, dirname(dirname($plugin_dir)) . '/files', $config);
        //$cacheFile = CacheFile::getInstance($cachefile,'/var/www/html/omeka/files',$config);
        //dirname(dirname(dirname(dirname(__FILE__)))).'/files'
        ob_start();
        ?>
        <script type="text/javascript">
		var jumpToTime = null;
		if(location.href.search('#segment') > -1)
		{
			var jumpToTime = parseInt(location.href.replace(/(.*)#segment/i, ""));
			if(isNaN(jumpToTime))
			{
				jumpToTime = 0;
			}
		}
	</script>
        <div id="audio-panel">
        <?php 
        //include_once dirname(dirname(dirname(__FILE__))).'/libraries/ohmsviewer/tmpl/player_'.$cacheFile->playername.'.tmpl.php';
        include_once dirname(dirname(dirname(__FILE__))) . '/libraries/ohmsviewer/tmpl/player_legacy.tmpl.php';
        ?>
        </div>
        <div id="ohms-main">
          <h2>Transcript</h2>
          <div id="ohms-main-panels">
            <div id="content-panel">
              <div id="transcript-panel">
                <?php 
        echo $cacheFile->transcript;
        ?>
              </div>
              <div id="index-panel">
                <?php 
        echo $cacheFile->index;
        ?>
              </div>
            </div>
            <div id="searchbox-panel">
              <?php 
        include_once dirname(dirname(dirname(__FILE__))) . '/libraries/ohmsviewer/tmpl/search.tmpl.php';
        ?>
</div>
            </div>
          </div>
        </div>
              
        <div style="clear:both; color:white; margin-top:30px;text-align:left;">
          <p>
<?php 
        if ($cacheFile->rights) {
            echo '<span><h3>Rights Statement:</h3>';
            echo $cacheFile->rights;
            echo '</span>';
        }
        ?>
          </p>
          <p>
<?php 
        if ($cacheFile->usage) {
            echo '<span><h3>Usage Statement:</h3>';
            echo $cacheFile->usage;
            echo '</span>';
        }
        ?>
          </p>
        </div>
            <script type="text/javascript">
            jQuery(document).ready(function() {

                jQuery('a.indexSegmentLink').on('click', function(e) {
                    var linkContainer = '#segmentLink' + jQuery(e.target).data('timestamp');

                    e.preventDefault();
                    if(jQuery(linkContainer).css("display") == "none")
                        {
                            jQuery(linkContainer).fadeIn(1000);
                        }
                    else
                        {
                            jQuery(linkContainer).fadeOut();
                        }
				
                    return false;
                });
		   
                jQuery('.segmentLinkTextBox').on('click', function() {
                    jQuery(this).select();
                });
	
                if(jumpToTime !== null)
                    {
                        jQuery('div.point').each(function(index) {
                            if(parseInt(jQuery(this).find('a.indexJumpLink').data('timestamp')) == jumpToTime)
                                {
                                    jumpLink = jQuery(this).find('a.indexJumpLink');
                                    jQuery('#accordionHolder').accordion({active: index});
                                    var interval = setInterval(function() {
						
                                        if(Math.floor(jQuery('#subjectPlayer').data('jPlayer').status.currentTime) == jumpToTime)  {
                                            clearInterval(interval);
                                        }
                                        else
                                            {
                                                jumpLink.click();
                                            }
                                    }, 500);
                                    jQuery(this).find('a.indexJumpLink').click();
                                }
                        });
                    }
        jQuery(".fancybox").fancybox();
        jQuery(".various").fancybox({
            //  maxWidth : width,
            // maxHeight : height,
            fitToView : false,
            width : '70%',
            height : '70%',
            autoSize : false,
            closeClick : false,
            openEffect : 'none',
            closeEffect : 'none'
            });
        jQuery('.fancybox-media').fancybox({
            openEffect : 'none',
            closeEffect : 'none',
            width : '80%',
            height : '80%',
            fitToView : true,
            helpers : {
      media : {}
    }
    });
        jQuery(".fancybox-button").fancybox({
      prevEffect : 'none',
            nextEffect : 'none',
            closeBtn : false,
            helpers : {
      title : { type : 'inside' },
            buttons : {}
    }
    });
    });

            var cachefile = '<?php 
        echo $cacheFile->cachefile;
        ?>
';
            jQuery('#content').find('h1').after(jQuery("#audio-panel"));
            jQuery("#audio-panel").after(jQuery('#ohms-main'));
      </script>
      <style>
        #ohms-main {
           width:<?php 
        echo $params['width'];
        ?>
;
        }
        #ohms-main #transcript-panel {
           height:<?php 
        echo $params['height'];
        ?>
;
        }

      </style>
<?php 
        return ob_get_clean();
    }