﻿function setcontenttopitem() {
    // get top content item change class
    $('.contentlistitem').first().removeClass("contentlistitem").addClass("contenttoplistitem");
    $('.imageholder').first().removeClass("imageholder").addClass("imageholdertop");
    $('.contentlistitemtop').first().removeClass("contentlistitemtop").addClass("contenttoplistitemtop");

    // set height of the top item
    $('.contenthoverholder').css({'height':'240px'});
}

function setcontentlinks() {
    $('.contenthoverholder').click(function () {
        var routedUrl = $(this).attr("id");
        $(location).attr('href', routedUrl);
    });
}

function setcontenthover() {
    $('.contenthoverholder').mouseenter(function () {
        $(this).addClass('contenthover');
    }).mouseleave(function () {
        $(this).removeClass('contenthover');
    });
}

function setrating() {
    var RatingID = "<%=contentRating.ClientID %>";
    if ($find("RatingBehaviour") != null) {
        for (i = 0; i < $find("RatingBehaviour").get_MaxRating(); i++) {
            switch (i) {
                case 0: $get(RatingID + "_Star_" + (i + 1).toString()).title = "Matig"; break;
                case 1: $get(RatingID + "_Star_" + (i + 1).toString()).title = "Aardig"; break;
                case 2: $get(RatingID + "_Star_" + (i + 1).toString()).title = "Leuk"; break;
                case 3: $get(RatingID + "_Star_" + (i + 1).toString()).title = "Goed"; break;
                case 4: $get(RatingID + "_Star_" + (i + 1).toString()).title = "Fantastisch"; break;
                default: break;
            }
        }
    }
}

function setheader() {
    if ($("#crumbpath").length > 0) {
        $('#content').css({ 'margin-top': '-100px' });
        $('#adverts').css({ 'top': '285px' });
    }
    else {
        $('#content').css({ 'margin-top': '-70px' });
        $('#adverts').css({ 'top': '370px' });        
    }
}




