/*--------------------------------------------------------------------------*
 *
 *	Image Rollover
 *
 *	Author : http://www.yomotsu.net
 *	created: 2007/03/13
 *	update : 2008/01/21
 *	Licensed under the GNU Lesser General Public License version 2.1
 *
 *--------------------------------------------------------------------------*/

var imageRollover = {
	
	main : function() {
		var img = document.images, ipt = document.getElementsByTagName('input'), i, preLoadImg = [];
		// img elements
		for (i = 0; i <img.length; i++) {
			if ((img[i].src.match(/.*_off\./))||(img[i].style.filter)){
				preLoadImg[preLoadImg.length] = new Image;
				preLoadImg[preLoadImg.length-1].src = img[i].src.replace('_off.', '_on.');

				img[i].onmouseover = imageRollover.over;
				img[i].onmouseout  = imageRollover.out;
				try {img[i].addEventListener('click', imageRollover.click, false);}
				catch(e){img[i].attachEvent('onclick', (function(el){return function(){imageRollover.click.call(el);};})(img[i]));}
			}
		}
		// input[image] elements
		for (i = 0; i <ipt.length; i++) {
			if ((ipt[i].src.match(/.*_off\./))&&(ipt[i].getAttribute('type')=='image')){
				preLoadImg[preLoadImg.length] = new Image;
				preLoadImg[preLoadImg.length-1].src = img[i].src.replace('_off.', '_no.');

				ipt[i].onmouseover = imageRollover.over;
				ipt[i].onmouseout  = imageRollover.out;
				try {ipt[i].addEventListener('click', imageRollover.click, false);}
				catch(e){ipt[i].attachEvent('onclick', (function(el){return function(){imageRollover.click.call(el);};})(ipt[i]));}
			}
		}
	}
	,
	
	over : function() {
		var imgSrc, preLoadImgSrc;
		if((this.style.filter)&&(this.style.filter.match(/_off\.png/)))//(IE5.5-6 && png)
			this.style.filter = this.style.filter.replace('_off.png', '_on.png');
		else
			this.src = this.src.replace('_off.', '_on.');
	},

	out : function(){
		if((this.style.filter)&&(this.style.filter.match(/_on\.png/)))//(IE5.5-6 && png)
			this.style.filter = this.style.filter.replace('_on.png', '_off.png');
		else
			this.src = this.src.replace('_on.', '_off.');
	},
	
	click : function(){
		if((this.style.filter)&&(this.style.filter.match(/_on\.png/)))//(IE5.5-6 && png)
			this.style.filter = this.style.filter.replace('_on.png', '_off.png');
		else
			this.src = this.src.replace('_on.', '_off.');
	},

	addEvent : function(){
		try {
			window.addEventListener('load', this.main, false);
		} catch (e) {
			window.attachEvent('onload', this.main);
		}
	}
}

imageRollover.addEvent();


/*--------------------------------------------------------------------------*
 *
 *	jQuery EtCetera
 *
 *--------------------------------------------------------------------------*/

$(document).ready(function() {
						   
    $(".zebra tr:nth-child(even), .news_list02 li:nth-child(even)").addClass("even");
						   
	$('a[href*=#]').click(function() {
		if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
			var target = $(this.hash);
			target = target.length && target;
			if (target.length) {
				var scspeed = 1200;
				var targetOffset = target.offset().top;
				$('html,body').animate({
					scrollTop: targetOffset}, {duration: scspeed, easing: "easeOutExpo"
				});
				return false;
			}
		}
	});
});




