/* function adjust css + require jQuery
------------------------------------------------------------------------------------------------- */
$(function() {
	$('div.section:last').css('margin-bottom','0px');
	$('div.body:last').css('margin-bottom','0px');
});


/* function rollover + require jQuery
------------------------------------------------------------------------------------------------- */
$(function(rolloverimage) {
	$("a.rollover img, img.rollover, input.rollover").each(function(i) {
		var imgsrc = this.src;
		var dot = this.src.lastIndexOf('.');
		var imgsrc_on = this.src.substr(0, dot) + '_on' + this.src.substr(dot, 4);
	$(this).hover(
		function() {	// onmouseover
			this.src = imgsrc_on;
		},
		function() {	// onmouseout
			this.src = imgsrc; 
		});
	});
});


/* function smooth scroll + require jQuery
------------------------------------------------------------------------------------------------- */
$(function() {
	$('a[href*=#] , area[href*=#]').click(function() {
		if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
		&& location.hostname == this.hostname) {
		var $target = $(this.hash);
		$target = $target.length && $target
		|| $('[name=' + this.hash.slice(1) +']');
		if ($target.length) {
		var targetOffset = $target.offset().top - 20;
		$('html,body')
		.animate({scrollTop: targetOffset}, 1100);
		return false;
		}
	}
	});
});


/* function openwindow
------------------------------------------------------------------------------------------------- */
function openwindow(url, name) {
	window.open(url,name,"width=800,height=700,menubar=0,scrollbars=1,resizable=1");
}

