﻿var imgDir = "/_repository/_gui/default/";
function gotoPage(url) {
    window.location.href = url;
}

function reset(cntx, selector, imgArr) {
    cntx.each(function() {
        if(imgArr)
            setImg($(selector, $(this)), imgArr[$(this).attr("id")][0]);
        else
            $(selector, $(this)).removeClass("select");
    });

    if (imgArr) {
        cntx.hover(function() {
            setImg($(selector, $(this)), imgArr[$(this).attr("id")][1]);
        },
        function() {
            setImg($(selector, $(this)), imgArr[$(this).attr("id")][0]);
        }
        );
    }
}
function select(cntx, selector, imgArr) {

    cntx.each(function() {
        if (imgArr) {
            cntx.each(function() {
                setImg($(selector, $(this)), imgArr[$(this).attr("id")][1]);
            });

            cntx.hover(function() {
                setImg($(selector, $(this)), imgArr[$(this).attr("id")][1]);
            },
            function() {
                setImg($(selector, $(this)), imgArr[$(this).attr("id")][1]);
            });
        }
        else
            $(selector, $(this)).addClass("select");
    });

}
function ReadMoreExpand(obj) {
    if (obj.parent().height() == "18") {
        obj.parent().css("height", "110px");
        obj.empty().append('hide');
    } else {
        obj.parent().css("height", "18px");
        obj.empty().append('read more');
    }
}
$(document).ready(function() {
    var h1 = $("body h1.title");
    if (h1 != null)
        h1.remove();
    $("div#readmore a").click(function() { ReadMoreExpand($(this)); });
});
