$(document).ready(function() { 

 $(".news-block .front-news-text:last").css("border","none");
 $('#carousel').jcarousel({
        auto: 5,
        wrap: 'last',
        initCallback: mycarousel_initCallback
    });

 $(".header-topmenu li:first").css("backgroundImage","none");
 
 $("#footer li:first").css("backgroundImage","none");
 
});

function mycarousel_initCallback(carousel)
{
    // Disable autoscrolling if the user clicks the prev or next button.
    carousel.buttonNext.bind('click', function() {
        carousel.startAuto(0);
    });

    carousel.buttonPrev.bind('click', function() {
        carousel.startAuto(0);
    });

    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
};


sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);




	function insert_smiley(id)
{
	//document.forms['reactie-formulier'].message.value += " " + smiley;
	
	id = ' ' + id + ' ';
    var obj = document.getElementById('message');
    if(typeof(document.selection)!='undefined') 
    {
        obj.focus();
        var range = document.selection.createRange();
        if(range.parentElement() != obj) {
            return false;
        }
        var orig = obj.value.replace(/rn/g, "n");
        range.text = id;
        var actual = tmp = obj.value.replace(/rn/g, "n");
        for(var diff = 0; diff < orig.length; diff++) {
            if(orig.charAt(diff) != actual.charAt(diff)) break;
        }
        for(var index = 0, start = 0; (tmp = tmp.replace(id, "")) && (index <= diff); index = start + id.length) {
            start = actual.indexOf(id, index);
        }
    } else {
        var startPos = obj.selectionStart;
        var endPos = obj.selectionEnd;
        obj.value = obj.value.substr(0, startPos) + id + obj.value.substr(endPos, obj.value.length);
    }

	
}


//--><!]]>
