var shouldbehash = 1;

$(document).ready(function() {
	$(".ch").click(function () {
		$(this).parent().find(".coll_text").slideToggle(200);
		var pb = $(this).parent().css("padding-bottom");
		if (pb == "0px"){
			$(this).parent().css("padding-bottom","5px");
		} else {
			$(this).parent().css("padding-bottom","0px");
		}
		return false;
	});
	$('#topanimation').flash({
	    src: '/swf/d100_topbar.swf',
	    width: 925,
	    height: 175
	});
	$(".homeboxtext select").change(function () {
		var href = $(this).find("option:selected").attr("value");
		if (href != ""){
			window.location = href;
		}
	});
	$("#mainform").validate();
	$(".submit").click(function(){
		$("#mainform").submit();
		return false;
	});
	$('.slideshow').cycle({ 
	    fx:     'fade', 
	    speed:   2000, 
	    timeout: 5000
	});
	
	
});




setInterval(function() {
	var currenthash = window.location.hash;
	currenthash = currenthash.replace('#','')
    if(currenthash != "" && currenthash != shouldbehash) {
        gotoPage(currenthash);
    }        
}, 200);
