$(document).ready(function() {
	if (doSlides) {
		$('#homeslides').cycle({ 
		    delay:  5000, 
		    speed:  1000
		});
	}
	
	if ($('a.news-image-thumb').length) {
	    $('a.news-image-thumb').colorbox({photo:true, opacity:0.5});
	}
});

function toggleSearch() {	
	if ($('#searchbox').css('display') == 'none') {
		$('#searchbox').css('display', 'block');
	}
	else {
		$('#searchbox').css('display', 'none');
	}
}

function openWindow(url, name, w, h) {
	w += 32;
	h += 96;
	 var win = window.open(url,
	  name, 
	  'width=' + w + ', height=' + h + ', ' +
	  'location=no, menubar=no, ' +
	  'status=no, toolbar=no, scrollbars=yes, resizable=yes');
	 win.resizeTo(w, h);
	 win.focus();
}

var RecaptchaOptions = {
	theme: 'custom',
    lang: 'en',
	custom_theme_widget: 'recaptcha_widget'
};
