﻿function ExtendList(containerID) {
    jQuery(document).ready(function() {
        var jItem = jQuery("#" + containerID + " .item");

        jItem.each(function() {
            anchor = jQuery(this).children('a').eq(0);
            photo = jQuery(this).children('.photo').eq(0);
            anchor.height(jQuery(this).height());
        })

        jItem.mouseover(function() {
            $(this).addClass('hover');
        });

        jItem.mouseout(function() {
            $(this).removeClass('hover');
        });
    })
}

function addHoverAndMakeClickable(containerID) {
    jQuery(document).ready(function() {
        var jItem = jQuery("#" + containerID + " li");

        jItem.click(function() {
            window.location = $(this).children('a').eq(0).attr('href');
        });

        jItem.mouseover(function() {
            $(this).addClass('hover');
        });

        jItem.mouseout(function() {
            $(this).removeClass('hover');
        });
    })
}

function addHover(containerID) {
    jQuery(document).ready(function() {
        var jItem = jQuery("#" + containerID + " li");

        jItem.mouseover(function() {
            $(this).addClass('hover');
        });

        jItem.mouseout(function() {
            $(this).removeClass('hover');
        });
    })
}

function makeClickable(containerID) {
    jQuery(document).ready(function() {
        var jItem = jQuery("#" + containerID + " li");

        jItem.click(function() {
            window.location = $(this).children('a').eq(0).attr('href');
        });
    })
}