﻿String.prototype.trim = function() { return this.replace(/^\s+|\s+$/, ''); };

/* -------------------------- via 2018 ------------------------------- */

$(document).ready(function() {
 
   $(".contentPnl, .contentPnlR").hover(function() { 
        $(this).stop().animate(
            { borderLeftColor: "#F00"}, 3900);
   }, function() { 
        $(this).stop().animate(
            { borderLeftColor: "#AAA"}, 700);
   });
   
   $(".contentTopPnl").hover(function() { 
        $(this).stop().animate(
            { borderBottomColor: "#F00"}, 3900);
   }, function() { 
        $(this).stop().animate(
            { borderBottomColor: "#DDD"}, 700);
   });
   
});

/* -------------------------- Postings ------------------------------- */

function sePostingOpenClose(postingId, imgId) {
    height = $("#" + postingId).css("height");
    if (height != "38px") {
        $("#" + postingId).stop().animate(
            { height: "38px"
            }, 200);
        $("#" + imgId).attr("src", "/images/se/postings/pClose.gif");
    } else {
        $("#" + imgId).attr("src", "/images/se/postings/pOpen.gif");
        $("#" + postingId).stop().animate(
                { height: "200px"
                }, 100, function () { sePostingAutoHeight(postingId) } );
    }
}

function sePostingAutoHeight(postingId) {
    $("#" + postingId).stop();
    $("#" + postingId).css("height", "auto"); 
}

/* -------------------------- Einde Postings ------------------------- */