var scroller = null;
var scroller1 = null;
var scroller2 = null;
var scroller5 = null;
var scroller6 = null;
var scroller7 = null;
window.onload = function () {
    var el = document.getElementById("Scroller-1");
    scroller = new jsScroller(el, 400, 200);
    var el1 = document.getElementById("Scroller-2");
    scroller1 = new jsScroller(el1, 400, 200);
    var el2 = document.getElementById("Scroller-3");
    scroller2 = new jsScroller(el2, 500, 200);
    var el3 = document.getElementById("Scroller-5");
    scroller5 = new jsScroller(el3, 500, 200);
    var el5 = document.getElementById("Scroller-6");
    scroller7 = new jsScroller(el5, 500, 200);
    var el4 = document.getElementById("Scroller-4");
    scroller6 = new jsScroller(el4, 500, 200);

}
$(function() {
    $("#img1").mouseover(function() {
        $("#img1div").css("width", 220)
        $("#img1div").css("height", 150)
        $(this).animate({
            width: "200px",
            height: "135px"
        }, 200 );
    }).mouseout(function(){
        $("#img1div").css("width", 220)
        $("#img1div").css("height", 75)
        $(this).animate({
            width: "110px",
            height: "75px"
        }, 200 );
    });
    $("#img2").mouseover(function() {
        $("#img2div").css("width", 220)
        $("#img2div").css("height", 150)
        $(this).animate({
            width: "200px",
            height: "135px"
        }, 200 );
    }).mouseout(function(){
        $("#img2div").css("width", 220)
        $("#img2div").css("height", 75)
        $(this).animate({
            width: "110px",
            height: "75px"
        }, 200 );
    });
    $("#img3").mouseover(function() {
        $("#img3div").css("width", 220)
        $("#img3div").css("height", 150)
        $(this).animate({
            width: "200px",
            height: "135px"
        }, 200 );
    }).mouseout(function(){
        $("#img3div").css("width", 220)
        $("#img3div").css("height", 75)
        $(this).animate({
            width: "110px",
            height: "75px"
        }, 200 );
    });
    $("#img4").mouseover(function() {
        $("#img4div").css("width", 220)
        $("#img4div").css("height", 150)
        $(this).animate({
            width: "200px",
            height: "135px"
        }, 200 );
    }).mouseout(function(){
        $("#img4div").css("width", 220)
        $("#img4div").css("height", 75)
        $(this).animate({
            width: "110px",
            height: "75px"
        }, 200 );
    });
    $("#img5").mouseover(function() {
        $("#img5div").css("width", 220)
        $("#img5div").css("height", 150)
        $(this).animate({
            width: "200px",
            height: "135px"
        }, 200 );
    }).mouseout(function(){
        $("#img5div").css("width", 220)
        $("#img5div").css("height", 75)
        $(this).animate({
            width: "110px",
            height: "75px"
        }, 200 );
    });
    $("#img6").mouseover(function() {
        $("#img6div").css("width", 220)
        $("#img6div").css("height", 150)
        $(this).animate({
            width: "200px",
            height: "135px"
        }, 200 );
    }).mouseout(function(){
        $("#img6div").css("width", 220)
        $("#img6div").css("height", 75)
        $(this).animate({
            width: "110px",
            height: "75px"
        }, 200 );
    });
    // Use this example, or...
    $('#gallery a').lightBox(); // Select all links that contains lightbox in the attribute rel

});
function openWindow(id) {
    document.getElementById(id).style.visibility='visible';
    if (id == 'con') {
        document.getElementById(id).style.width='400px';
        document.getElementById(id).style.height='200px';
        $('#' + id).show();
    //ajaxpage('Biography.html', 'con');
    } else {
        document.getElementById(id).style.width='0px';
        document.getElementById(id).style.height='0px';
        closeWindow('con');
    }
    if (id == 'con1') {
        document.getElementById(id).style.width='400px';
        document.getElementById(id).style.height='200px';
        $('#' + id).show();
    } else {
        document.getElementById(id).style.width='0px';
        document.getElementById(id).style.height='0px';
        closeWindow('con1');
    }
    if (id == 'con2') {
        document.getElementById(id).style.width='500px';
        document.getElementById(id).style.height='200px';
        $('#' + id).show();
    } else {
        document.getElementById(id).style.width='0px';
        document.getElementById(id).style.height='0px';
        closeWindow('con2');
    }
    if (id == 'con3') {
        document.getElementById(id).style.width='450px';
        document.getElementById(id).style.height='394px';
        $('#' + id).show();
    } else {
        document.getElementById(id).style.width='0px';
        document.getElementById(id).style.height='0px';
        closeWindow('con3');
    }
    if (id == 'con4') {
        document.getElementById(id).style.width='250px';
        document.getElementById(id).style.height='394px';
        $('#' + id).show();
    } else {
        document.getElementById(id).style.width='0px';
        document.getElementById(id).style.height='0px';
        closeWindow('con4');
    }
    if (id == 'con5') {
        document.getElementById(id).style.width='250px';
        document.getElementById(id).style.height='394px';
        $('#' + id).show();
    } else {
        document.getElementById(id).style.width='0px';
        document.getElementById(id).style.height='0px';
        closeWindow('con5');
    }
    if (id == 'con' || id == 'con1' || id == 'con2' || id == 'con3' || id == 'con4' || id == 'con5') {
        closeNews();
    } else {
        openNews();
    }
}
function openNews() {
    document.getElementById('con5').style.display='inline';
}
function closeNews() {
    document.getElementById('con5').style.display='none';
}
function closeWindow(id){
    $('#' + id).hide();
//document.getElementById(id).style.visibility='hidden';
}
