/*
function slideToggle(sender){
	sender.siblings(".openContent").slideToggle("fast");
	sender.parent().toggleClass("open");
}
*/
function view_adress(id){
	var address_to_replace=document.getElementById(id);	
	if (address_to_replace!=null){
		var address_to_replace2 = address_to_replace.firstChild;
		var real_address=address_to_replace2.nodeValue.replace("[s2]", "@");	
		address_to_replace2.nodeValue=real_address; 	
		address_to_replace2.parentNode.setAttribute("href", "mailto:"+real_address);
	}
}
function hideLink(){
	view_adress("footer");
	view_adress("contact");
}

/* for paging */
// example: lino "349 Laurens" - li.id="art820" - URL="http://willembeerman.nl/linos.asp?i=820"

$(document).ready(function() {
    // defining default values
    var options = {
        pageSize: 9,
        currentPage: 1
    };
    
    // get thumbnail number from URL, losing "?i="
    thisThumbID = window.location.search.substr(3);
    
    listPos = null;
    listLength = $("ul.thumbList").children("li").length;
    // calculate pager page of chosen thumbnail
    for(var i=0; i < listLength; i++) {
        listItem = $("ul.thumbList").children("li")[i].id;
        if ( listItem == ("art"+thisThumbID) ) {
            listPos = i+1;
        }
    }
    if (listPos) {
        options.currentPage = Math.ceil(listPos/options.pageSize);
    }

    // execute pager with thumbnail list
	$("ul.thumbList").quickPager(options);
});

