
$(document).ready(function(){
		
	$(".block-foto-item #pic_0").rotate(-2);
	$(".block-foto-item #pic_1").rotate(3);
			
	$("div.carousel").carousel({ autoSlide: true, loop: true, autoSlideInterval: 7000, delayAutoSlide: 1000});


	$("#header_menu li:last").css("backgroundImage","none");

	$(".success-message").fadeOut(3000);

});

function insert_smiley(text)
{


	var target 			  = document.getElementById('message');

	var Start			  = target.selectionStart;
	var End 	 		  = target.selectionEnd;
	
	target.value		  = target.value.substr(0, Start) + text + target.value.substr(End, target.value.length); 
	target.selectionStart = (Start == End)? Start + text.length:Start;
	target.selectionEnd   = Start + text.length;
	
	target.focus();
}

function emptyField(veld, checkValue)
{
	var veldValue = document.getElementById(veld).value;
		
	if(veldValue == checkValue)
	{
		document.getElementById(veld).value = '';	
	}
}

function fillField(veld, checkValue)
{
	var veldValue = document.getElementById(veld).value;
		
	if(veldValue == '')
	{
		document.getElementById(veld).value = checkValue;	
	}
}

function checkHeight()
{
	var version = navigator.appVersion;
	if(version.match('MSIE 7.0'))
	{
		contentHeight = document.getElementById('content').offsetHeight;
	}
	else
	{
		contentHeight = document.getElementById('content').offsetHeight + 3;
	}
	document.getElementById('content_repeat').style.height = contentHeight + "px"; 	
}

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);

