﻿/// <reference path="../../js/jquery-1.4.1.js" />


function changeImage(index, filePath) {
    var controlName;

    switch (index) {
        case 1:
            controlName = box1_ClientID;
            break;
        case 2:
            controlName = box2_ClientID;
            break;
        case 3:
            controlName = box3_ClientID;
            break;
    }

    $('#' + controlName).attr("src", filePath);
}

$(document).ready(function() {
    $('#' + remeberBackground_ClientID + ', #' + box1_ClientID).mouseenter(function() {
        changeImage(1, box1_on);
    });

    $('#' + remeberBackground_ClientID + ', #' + box1_ClientID).mouseout(function() {
        changeImage(1, box1_off);
    });

    $('#' + reflectBackground_ClientID + ', #' + box2_ClientID).mouseenter(function() {
        changeImage(2, box2_on);
    });

    $('#' + reflectBackground_ClientID + ', #' + box2_ClientID).mouseout(function() {
        changeImage(2, box2_off);
    });

    $('#' + renewBackground_ClientID + ', #' + box3_ClientID).mouseenter(function() {
        changeImage(3, box3_on);
    });

    $('#' + renewBackground_ClientID + ', #' + box3_ClientID).mouseout(function() {
        changeImage(3, box3_off);
    });        
});