//	farrell fritz web site redesign
//	functions for home page by nick poulos
//	last modified 4.22.2009 

$(document).ready(function () {
	
	
	$("#cycle-container").cycle({
							
		//fx: 'turnDown',
		fx: 'fade',
		sync: 1,
		pause: 1,
		delay: -1000
							
	});
	
	$("#slide-mission-statement").click(function () {
		window.location="index.php?pg=about";
	});
	
	$("div[id*='slide-news-item-']").click(function () {
		
		var id_div = $(this).attr("id").toLowerCase();
		var id_news = id_div.slice(id_div.lastIndexOf("-") + 1);							  
		window.location="index.php?pg=view-news&nid=" + id_news;				  
	
	});
	
	$("div[id*='slide-article-item-']").click(function () {
		
		var id_div = $(this).attr("id").toLowerCase();
		var id_article = id_div.slice(id_div.lastIndexOf("-") + 1);							  
		window.location="index.php?pg=view-article&aid=" + id_article;				  
	
	});
	
	$("div[id*='slide-press-item-']").click(function () {
		
		var id_div = $(this).attr("id").toLowerCase();
		var id_press = id_div.slice(id_div.lastIndexOf("-") + 1);							  
		window.location="index.php?pg=view-press-release&pid=" + id_press;				  
	
	});
	  
	$("div[id*='slide-practice-area']").click(function () {
		
		var id_div = $(this).attr("id").toLowerCase();
		var id_area = id_div.slice(id_div.lastIndexOf("-") + 1);							  
		window.location="index.php?pg=practice-areas&aid=" + id_area;				  
	
	});
	
	
	
	
	
	
});