define([
    'backbone',
    'underscore',
    'jquery',
    'i18n!find/nls/bundle',
    'find/app/vent',
    'find/app/util/view-server-client',
    'find/app/model/document-model',
    'find/app/configuration',
    'text!find/templates/app/page/search/document/preview-mode-view.html',
    'text!find/templates/app/page/search/document/preview-mode-metadata.html',
    'text!find/templates/app/page/search/document/preview-mode-document.html',
    'text!find/templates/app/page/view/media-player.html'
], function(Backbone, _, $, i18n, vent, viewClient, DocumentModel, configuration, template, metaDataTemplate, documentTemplate, mediaTemplate) {
    'use strict';

    function scrollFollow() {
        if (this.$el.offsetParent().offset().top < 0) {
            this.$el.css('margin-top', Math.abs(this.$el.offsetParent().offset().top) + 15);
        } else {
            this.$el.css('margin-top', 0);
        }

        if(this.$iframe) {
            this.$iframe.css('height', $(window).height() - this.$iframe.offset().top - 30 - this.$('.preview-mode-metadata').height());
        }
    }

    return Backbone.View.extend({
        template: _.template(template),
        metaDataTemplate: _.template(metaDataTemplate),
        documentTemplate: _.template(documentTemplate),
        mediaTemplate: _.template(mediaTemplate),

        events: {
            'click .preview-mode-open-detail-button': 'openDocumentDetail',
            'click .close-preview-mode': function() {
                this.pauseMedia();
                this.trigger('close-preview');
            }
        },

        $iframe: null,

        initialize: function() {
            this.scrollFollow = _.bind(scrollFollow, this);
        },

        render: function() {
            this.$el.html(this.template({
                i18n:i18n,
                mmapBaseUrl: configuration().mmapBaseUrl,
                mmapUrl: this.model.get('mmapUrl')
            }));

            this.$('.preview-mode-document-title').text(this.model.get('title'));

            this.$('.preview-mode-metadata').html(this.metaDataTemplate({
                i18n:i18n,
                model: this.model
            }));

            var $preview = this.$('.preview-mode-document');

            if (this.model.isMedia()) {
                $preview.html(this.mediaTemplate({
                    i18n: i18n,
                    model: this.model
                }));
            } else {
                $preview.html(this.documentTemplate({
                    i18n: i18n
                }));

                this.$iframe = this.$('.preview-document-frame');

                this.$iframe.on('load', _.bind(function() {
                    this.$('.view-server-loading-indicator').addClass('hidden');
                    this.$iframe.removeClass('hidden');
                    this.$iframe.css('height', $(window).height() - this.$iframe.offset().top - 30 - this.$('.preview-mode-metadata').height())
                }, this));

                // The src attribute has to be added retrospectively to avoid a race condition
                var src = viewClient.getHref(this.model.get('reference'), this.model);
                this.$iframe.attr('src', src);
                this.$iframe.css('height', $(window).height() - $preview.offset().top - 30 - this.$('.preview-mode-metadata').height());
            }

            this.scrollFollow();

            $('.main-content').scroll(this.scrollFollow);
        },

        remove: function() {
            Backbone.View.prototype.remove.call(this);

            $('.main-content').off('scroll', this.scrollFollow);
        },

        pauseMedia: function () {
            if (this.model.get('media') === 'video' || this.model.get('media') === 'audio') {
                this.$('.preview-media-player').get(0).pause();
            }
        },

        openDocumentDetail: function () {
            this.pauseMedia();
            vent.navigateToDetailRoute(this.model);
        }
    });

});

@@ -687,24 +687,292 @@
 lFollow() %7B%0A
+        // Check to see if the window has scrolled to the bottom, if it has dont move the preview down. (fix for BIFHI-197)%0A        var scrollPos = this.el.scrollHeight + this.$el.offset().top - $(window).height();%0A%0A        if (scrollPos %3C -50 %7C%7C scrollPos %3E 0) %7B%0A    
         if (
@@ -1019,32 +1019,36 @@
 ) %7B%0A            
+  
+  
 this.$el.css('ma
@@ -1067,16 +1067,17 @@
 ath.abs(
++
 this.$el
@@ -1113,32 +1113,36 @@
  + 15);%0A        
+  
+  
 %7D else %7B%0A       
@@ -1138,32 +1138,36 @@
 e %7B%0A            
+   
+ 
 this.$el.css('ma
@@ -1181,35 +1181,43 @@
 p', 0);%0A        
-%7D%0A%0A
+    %7D%0A%0A    
         if(this.
@@ -1210,16 +1210,17 @@
       if
+ 
 (this.$i
@@ -1224,24 +1224,28 @@
 .$iframe) %7B%0A
+    
             
@@ -1361,32 +1361,46 @@
 ta').height());%0A
+            %7D%0A
         %7D%0A    %7D%0A

Add check to ensure the margin-top of the preview pane doesnt grow when at the bottom of the page [rev Alex Scown]