/* function Rollover with jQuery
--------------------------------------------------------------- */
function initRollOverImages() {
	var image_cache = new Object();
		$("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);
		image_cache[this.src] = new Image();
		image_cache[this.src].src = imgsrc_on;
		$(this).hover(
		function() { 
		this.src = imgsrc_on; 
		},		// onmouseover
		function() { 
		this.src = imgsrc; 
		});			// onmouseout
	});
}

$(document).ready(initRollOverImages);


/* function Rollover fade with jQuery
--------------------------------------------------------------- */
$(function() {
	$('.fade')
		.hover(
			function(){
				$(this).stop()
				.animate({
					'opacity': 0
				}, 450);
			},
			function(){
				$(this).stop()
				.animate({
					'opacity': 1
				}, 450);
			}
		);
});


/* function brightover with jQuery (same image groupingset)
--------------------------------------------------------------- */
$(function() {
	$(".brightover").fadeTo(1,1.0);
		$(".brightover").hover( 
			function(){ // onmouseover
				var title = $(this).attr("title");
				$(".brightover").each(function(i,v){
//				console.log(v,i);
//				console.log($(v).attr("title"));
					if($(v).attr("title") == title){
						$(v).stop().fadeTo(200, 0.7);
					}
				});
			},
			function(){ // onmouseout
				var title = $(this).attr("title");
				$(".brightover").each(function(i,v){
//				console.log(v,i);
//				console.log($(v).attr("title"));
					if($(v).attr("title") == title){
						$(v).stop().fadeTo(500, 1.0);
					}
				});
			}
		);
});


/* function adjustIE
--------------------------------------------------------------- */
$(function() {
	$('div.section:last')
	.css('margin-bottom','0px')
})


