/**
 * Westerpop 2008 common js execution 
 * @author arjen
 */


/**
 * imgreplace
 */
$('body').ImageReplace();

// anchors (external/popup)
$("a[rel='external']").click(function(){window.open(this.href); return false});
var oPopWin = null;
$("a[rel='popup']").click(function(){
	sHref = $(this).attr('href');
	if (sHref.substr(-1) != '/')
		sHref += '/';
	sHref += '?popup=true';
	if (oPopWin && oPopWin.open && !oPopWin.closed) oPopWin.close();
	oPopWin = window.open(sHref, 'winName', 'width=500, height=500'); return false
});


/**
 * swfobject
 */
if (swfobject) {
	//swfobject.registerObject("myId", "9.0.0", "/flash/expressInstall.swf");
}

// aanmeld input field
/**
 * zoekform
 */
if ($('#formNBSubscribe').length) {
	var sZoekFormVal = '';
	$('#formNBSubscribe input.text').addClass('inactive').val('e-mail adres');
	$('#formNBSubscribe input.text').focus(function(){
		$(this).val(sZoekFormVal).removeClass('inactive');
	});
	$('#formNBSubscribe input.text').blur(function(){
		sZoekFormVal = $(this).val();
		if (sZoekFormVal == '') 
			$(this).addClass('inactive').val('e-mail adres');
	});
}
