// tweets
showTweetLinks='all';
// fonts
Cufon.replace('.nsp_500', { fontFamily: 'Neo Sans Pro 500' });
Cufon.replace('.nsp_400', { fontFamily: 'Neo Sans Pro 400' });
Cufon.replace('.nsp_500-grey', { fontFamily: 'Neo Sans Pro 500' });
Cufon.replace('.nsp_400-grey', { fontFamily: 'Neo Sans Pro 400' });
Cufon.replace('.nsp_500-green', { fontFamily: 'Neo Sans Pro 500' });
Cufon.replace('.nsp_400-green', { fontFamily: 'Neo Sans Pro 400' });
Cufon.replace('#menu-hoofdmenu li', { fontFamily: 'Neo Sans Pro 400' });
Cufon.replace('.mijncijfer', { fontFamily: 'Neo Sans Pro 500' });
Cufon.replace('.icons ul li a', { fontFamily: 'Neo Sans Pro 500' });
Cufon.replace('.voordelen', { fontFamily: 'Neo Sans Pro 400' });
Cufon.replace('.w-arrow a .w-h', { fontFamily: 'Neo Sans Pro 400' });

$(document).ready(function() {
	// load the big ones
	jQuery.preLoadImages("/wp-content/themes/base/images/kampen2.jpg","/wp-content/themes/base/images/kaart-hetonderdijks-overview-big.jpg", "/wp-content/themes/base/images/kaart-hetonderdijks-overview.jpg");
	// small survey
	clicked_state = getCookie('clicked');
	if(clicked_state!='true') {
		$('.jaikkom').click(function () {
			clicked_state2 = getCookie('clicked');
			if(clicked_state2!='true') {
				clicked = true;
				var id = $(this).attr('id');
				$.getJSON('/wp-content/themes/base/ikkom.php', {'id':id}, getInfo);
			}
		});
	} else {
		$('.melding_0').hide();
		$('.jaikkom').css({backgroundPosition:'0px -50px'});
	}
	//iphone
	chk = isiPhone();
	if(chk==true) {
		//$('ul.element li').css({border:"solid 1px red",textIndent:"0px"});
		//$('ul.element').css({width:"1000px"});
		//$('ul.element').css({backgroundPosition:"100px 0px"});
	}
	//date
	setClock();
});
// cookie jar
function setCookie(name,value,days) {
    if (days) {
        var date = new Date();
        date.setTime(date.getTime()+(days*24*60*60*1000));
        var expires = "; expires="+date.toGMTString();
    }
    else var expires = "";
    document.cookie = name+"="+value+expires+"; path=/";
}
function getCookie(name) {
    var nameEQ = name + "=";
    var ca = document.cookie.split(';');
    for(var i=0;i < ca.length;i++) {
        var c = ca[i];
        while (c.charAt(0)==' ') c = c.substring(1,c.length);
        if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
    }
    return null;
}
// device check
function isiPhone(){
    return (
        (navigator.platform.indexOf("iPhone") != -1) ||
        (navigator.platform.indexOf("iPad") != -1)
    );
}
// set status
function getInfo(data) {
	// hide
	$('.melding_0').hide();
	$('.jaikkom').css({backgroundPosition:'0px -50px'});
	// show
	if(data.status>0) {
		setCookie('clicked', 'true', 999);
		$('.melding_0').show();
	}
}
// clock
function setClock() {
	var d = new Date();
	mDate = new Date("April 2, 2011 23:59:00");
	$('.jclock').countdown({until: mDate, compact: true, layout: '<div class="c_1">0{dn}</div>'});
}
/*$(function () {});*/
