	//yonis jquery stuff for socialink	
	//yoni@social-ink.net	
	
	
	var $j = jQuery.noConflict(); //declare this cause of problems with WP	
	
	
	$j(function(){			
	
		//FOOTER TABS
		
		$j(".module_image img").hover(function() {
			$j(this).fadeTo("fast", 0.8);	
		}, function() {
			$j(this).fadeTo("fast", 1);
		});		
		
		$j(".module_footer_nav img").hover(function() {
				var src = $j(this).attr("src").replace(".png", "_active.png");
				$j(this).attr("src", src);					
			}, function() {
				var src = $j(this).attr("src").replace("_active.png", ".png");
				if(!$j(this).hasClass('current_page'))
					$j(this).attr("src", src);								
		});
	
	
		//cycle frontpage
		$j('#fp_slideshow').cycle({
			fx:       	'fade',
			speed: 500,
			timeout:   	6000,
			pause:   	1 		,
			//pager:  '#fp_slideshow_nav'
		});	
		
			//frontpage dots
				$j('#fp_slideshow').children().each(function(index) {
					$j('<a id="fplink' + index + '" href="#">&#8226;</a>')
					//append
					.appendTo('#fp_slideshow_nav')
					//click function
					.click(function() { 
						// cycle to the corresponding slide 
						$j('#fp_slideshow').cycle(index); 
						$j('#fp_slideshow_nav a').removeClass('activeslide');
						$j(this).addClass('activeslide');
						return false; 
					}); 
					  
				  }); 
		  
		  
		//MENU BAR
		
		$j("#menubar img").hover(function() {
				var src = $j(this).attr("src").replace("_normal", "_active");
				$j(this).attr("src", src);					
			}, function() {
				var src = $j(this).attr("src").replace("_active", "_normal");
				if(!$j(this).hasClass('current_page'))
					$j(this).attr("src", src);								
		}); 	

		
		//cycle innerspages
		$j('.page_slideshow').cycle({
			fx:       	'fade',
			delay: 2000,
			speed: 500,
			timeout:   	7000,
			pause:   	1 		
		});	
		
		var currentpage = $j(".current_page").attr("src").replace("_normal", "_active");		
		$j(".current_page").attr("src", currentpage);				
	

	
	}); 							
	
	
