// JavaScript Document
$(function() {
		 
$("a[rel='gallery']").lightBox();		 

$(".inp_leveradres").click(function() { 
	if ($(this).val()=="Ander") { 
		$("#form-leveradres").show();									  
	} else { 
		$("#form-leveradres").hide();									  
	}
});
		 
var bc = $('#buttonContainer'); 
 
var $container = $('#slideshow').cycle({ 
    fx:     'fade', 
    speed:   300, 
    timeout: 0 
}); 
 
$container.children().each(function(i) { 
    // create input 
    $('<input type="button" value="'+(i+1)+'" />') 
        // append it to button container 
        .appendTo(bc) 
        // bind click handler 
        .click(function() { 
            // cycle to the corresponding slide 
            $container.cycle(i); 
            return false; 
        }); 
});
});

function getCheckedValue(radioObj) {
	if(!radioObj)
		return "";
	var radioLength = radioObj.length;
	if(radioLength == undefined)
		if(radioObj.checked)
			return radioObj.value;
		else
			return "";
	for(var i = 0; i < radioLength; i++) {
		if(radioObj[i].checked) {
			return radioObj[i].value;
		}
	}
	return "";
}
