$(document).ready(function() {
 
	//ACCORDION BUTTON ACTION	
	$('div.accordionButton').click(function() {
		$('div.accordionContent').slideUp('normal');	
		$(this).next().slideDown('normal');
	});
 
	//HIDE THE DIVS ON PAGE LOAD	
	$("div.accordionContent").hide();
 
});  


var mouseOvers = new Array();
	var mouseOuts = new Array();

	function MouseOvers (section) {
		if (document.getElementById(section)) { 
			var nav = document.getElementById(section);
			var imgs = nav.getElementsByTagName("img");


		for (i = 0; i < imgs.length; i++) {

			if (imgs[i].src.search(/on.gif$/) == -1) { 
			imgs[i].onmouseover = function () {
				this.src = mouseOvers[this.number + section].src;
			}
			imgs[i].onmouseout = function () {
				this.src = mouseOuts[this.number + section].src;
			}
		}
			var suffix = imgs[i].src.substring(imgs[i].src.lastIndexOf('.'));
			mouseOuts[i + section] = new Image();
			mouseOuts[i + section].src = imgs[i].src;
			mouseOvers[i + section] = new Image();
			mouseOvers[i + section].src = imgs[i].src.substring(0, imgs[i].src.lastIndexOf('.')) + "_on" + suffix;
			imgs[i].number = i;
		}
		}
	}



	        function pageup(e) {
		        UAGENT = navigator.userAgent.toUpperCase();
		        if (UAGENT.indexOf("MSIE") >=0) { posi = event.y; }
		        else { posi = e.pageY; }
		        moveObje(posi);
	        }
		        function moveObje(position) {
		        move = position / 15;
		        point = parseInt(position - move);
		        scrollTo(0,point);
		        if (point > 0) { setTimeout("moveObje(point)",15); }
	        }




(function($){
	
	$.extend({
			 
		smoothAnchors : function(speed, easing, redirect){
				
			speed = speed || "fast";
			easing = easing || null;
			redirect = (redirect === true || redirect == null) ? true : false;
			
			$("a").each(function(i){
							
				var url = $(this).attr("href");
				
				if(url){
					if(url.indexOf("#") != -1 && url.indexOf("#") == 0){
		
						var aParts = url.split("#",2);
						var anchor = $("a[name='"+aParts[1]+"']");
						
						if(anchor){
																					
							$(this).click(function(){
												   
								if($(document).height()-anchor.offset().top >= $(window).height()
								 || anchor.offset().top > $(window).height()
								 || $(document).width()-anchor.offset().left >= $(window).width()
								 || anchor.offset().left > $(window).width()){
												   
									$('html, body').animate({
										scrollTop: anchor.offset().top,
										scrollLeft: anchor.offset().left
									}, speed, easing, function(){
										if(redirect){ 
											window.location = url 
										}
									});
								
								}
								
								return false;
																
							});
						}
					
					}
					
				}
				
			});
			
		}
	
	});
	
})(jQuery);







