// Default JS Content - Do Not Delete




jQuery.flvlightbox = function(options){
        
    var c = '';
    if(typeof(options)=='string')c=options;
    
    var o = {
        height: '400',
        width: '600',
        content: c,
        modalcss: {
            background:'#000000',
            filter: 'alpha(opacity=70)',
            opacity: .7
        },
        wincss: {
            background: '#FFFFFF',
            border: '1px solid #000000',
            zIndex: '9999'
        }
    };
    $.extend(o,options);
    
    $(document.body).css('overflow','hidden');
    var removeIt = function(){
        $(modal).remove();
        $(win).remove();
        $(window).unbind('resize scroll',moveIt);
        $(document.body).css('overflow','');
    };
    var modal = document.createElement('div');
    $(modal).css($.extend(o.modalcss,{
        position:	'absolute',
        top: $(document).scrollTop()+'px',
        left: $(document).scrollLeft()+'px',
        height: $(window).height()+'px',
        width: $(window).width()+'px'
    })).click(removeIt).appendTo(document.body);
    
    var closebox = document.createElement('div');
    $(closebox).css({
        position: 'absolute',
        cursor: 'pointer',
        top: '-12px',
        left:  (o.width-8)+'px'
    }).html('<img src="/i/SITE_090210_09180337_N8I1W/templates/btn_close.gif"').click(removeIt);
    
    var win = document.createElement('div');
    $(win).css($.extend(o.wincss,{
        position: 'absolute',
        top: ($(document).scrollTop()+($(window).height()-o.height)/2)+'px',
        left: ($(document).scrollLeft()+($(window).width()-o.width)/2)+'px',
        height: o.height+'px',
        width: o.width+'px'
    })).html(o.content).prepend(closebox).appendTo(document.body).animate({
    },500,'linear',function(){
        $(this).animate({
        },500,'linear',function(){
            $(window).bind('resize scroll',moveIt);
        });
    });
    var moveIt = function(){
        $(win).css({
            top: ($(document).scrollTop()+($(this).height()-o.height)/2)+'px',
            left: ($(document).scrollLeft()+($(this).width()-o.width)/2)+'px'
        });
        $(modal).css({
            top: $(document).scrollTop()+'px',
            left: $(document).scrollLeft()+'px',
            height: $(this).height()+'px',
            width: $(this).width()+'px'
        });
    };
};