//$(document).ready(function() {
jQuery.fn.centerScreen = function(loaded) {
                var obj = this;
                if(!loaded) {
                        obj.css('top', $(window).height()/2-
this.height()/2);
                        obj.css('left', $(window).width()/2-
this.width()/2);
                        $(window).resize(function()
{ obj.centerScreen(!loaded); });
                } else {
                        obj.stop();
                        obj.animate({ top: $(window).height()/2-
this.height()/2, left: $
(window).width()/2-this.width()/2}, 200, 'linear');
                }
        }

//}); 



$(document).ready(function() {
//		alert($(document.body).height())
        $(document.body).prepend('<div class="modalOverLay"></div>');
        $('.modalOverLay').css({ opacity: 0.7, width: '100%', height: '2000px', 'z-index': 50 });

        $('#testclick').click(function() {
            $('.modalOverLay').fadeIn('slow');
            $('.testimonial').css({
				'z-index': '60',				  
                position: 'absolute',
                left: ($(document).width() - $('.testimonial').width()) / 2,
                top: $(document).scrollTop() + 20// - $('.testimonial').height()) / 2
            });
            $('.testimonial').fadeIn(500); 
        });
		
		
    });
