// JavaScript Document



function curtainUp(){
	function clear_curtain(){
	document.getElementById("curtain_logo").style.visibility = "hidden";
	document.getElementById("curtain_bot").style.visibility = "hidden";
	document.getElementById("curtain_top").style.visibility = "hidden";	
	}
	function onlyLogo(){document.getElementById("curtain_logo").style.visibility = "hidden";}
	
	$("#curtain_top").delay(600).animate({height:"0px"},2000, clear_curtain);
	$("#curtain_bot").delay(600).animate({height:"0px"},2000);
	$("#curtain_logo").delay(500).animate({opacity:0},1000,onlyLogo);
	
	
	if(window.location.hash) {
    var hash = window.location.hash.substring(1); //Puts hash in variable, and removes the # character
     // alert (hash);
	if(hash == "/Artists"){
		hp_grid_on();	
	}
	else if(hash == "/Artists/Aurora-Andrews"){hp_grid_on();gallery_setUp("artists/andrews/andrews.html","normal");}
	else if(hash == "/Artists/Martin-Blanco"){hp_grid_on();gallery_setUp("artists/blanco/blanco.html","normal");}
	else if(hash == "/Artists/Danijela-Caran"){hp_grid_on();gallery_setUp("artists/caran/caran.html","normal");}
	else if(hash == "/Artists/Tracy-Dockray"){hp_grid_on();gallery_setUp("artists/dockray/dockray.html","normal");}
	else if(hash == "/Artists/Glen-Hanson"){hp_grid_on();gallery_setUp("artists/hanson/hanson.html","normal");}
	else if(hash == "/Artists/Kerrie-Hess"){hp_grid_on();gallery_setUp("artists/hess/hess.html","normal");}
	else if(hash == "/Artists/Annie-K-Higgins"){hp_grid_on();gallery_setUp("artists/higgins/higgins.html","normal");}
	else if(hash == "/Artists/Holly-Houk"){hp_grid_on();gallery_setUp("artists/houk/houk.html","normal");}
	else if(hash == "/Artists/Shellie-K"){hp_grid_on();gallery_setUp("artists/k/k.html","normal");}
	else if(hash == "/Artists/Frank-Montagna"){hp_grid_on();gallery_setUp("artists/montagna/montagna.html","normal");}
	else if(hash == "/Artists/Luisa-Montalto"){hp_grid_on();gallery_setUp("artists/montalto/montalto.html","normal");}
	else if(hash == "/Artists/Steve-Moors"){hp_grid_on();gallery_setUp("artists/moors/moors.html","normal");}
	else if(hash == "/Artists/Stefan-Page"){hp_grid_on();gallery_setUp("artists/page/page.html","normal");}
	else if(hash == "/Artists/Neryl-Walker"){hp_grid_on();gallery_setUp("artists/neryl/neryl.html","normal");}
	else if(hash == "/Artists/Michael-Weldon"){hp_grid_on();gallery_setUp("artists/weldon/weldon.html","normal");}
	else if(hash == "/Artists/Erin-Flett"){hp_grid_on();gallery_setUp("artists/flett/flett.html","normal");}
	
	else if(hash == "/Surface-Design"){
		sur_grid_on();
		
	}
	else if(hash == "/Surface-Design/Danijela-Caran"){sur_grid_on();gallery_setUp("artists/caran/caran_sur.html","surface");}
	else if(hash == "/Surface-Design/Annie-K-Higgins"){sur_grid_on();gallery_setUp("artists/higgins/higgins_sur.html","surface");}
	else if(hash == "/Surface-Design/Frank-Montagna"){sur_grid_on();gallery_setUp("artists/montagna/montagna_sur.html","surface");}
	else if(hash == "/Surface-Design/Neryl-Walker"){sur_grid_on();gallery_setUp("artists/neryl/neryl_sur.html","surface");}
	else if(hash == "/Surface-Design/Shellie-K"){sur_grid_on();gallery_setUp("artists/k/k_sur.html","surface");}
	else if(hash == "/Surface-Design/Stefan-Page"){sur_grid_on();gallery_setUp("artists/page/page_sur.html","surface");}
	else if(hash == "/Surface-Design/Erin-Flett"){sur_grid_on();gallery_setUp("artists/flett/flett_sur.html","surface");}
	
	else if(hash == "/Kidzone"){
		kid_grid_on();
		
	}
	else if(hash == "/Kidzone/Annie-K-Higgins"){kid_grid_on();gallery_setUp("artists/higgins/higgins_kids.html","kid");}
	else if(hash == "/Kidzone/Frank-Montagna"){kid_grid_on();gallery_setUp("artists/montagna/montagna_kids.html","kid");}
	else if(hash == "/Kidzone/Luisa-Montalto"){kid_grid_on();gallery_setUp("artists/montalto/montalto_kids.html","kid");}
	else if(hash == "/Kidzone/Shellie-K"){kid_grid_on();gallery_setUp("artists/k/k_kids.html","kid");}
	else if(hash == "/Kidzone/Tracy-Dockray"){kid_grid_on();gallery_setUp("artists/dockray/dockray_kids.html","kid");}
	
	else if(hash == "/Projects"){
		hp_grid_off();
		sur_grid_off();
		kid_grid_off();
		projects_page();
		document.getElementById("trans_cover").style.visibility = "hidden";
		document.getElementById("trans_cover_r").style.visibility = "hidden";
	}
	else if(hash == "/From-The-Surface"){
		hp_grid_off();
		sur_grid_off();
		kid_grid_off();
		blog_page();
		document.getElementById("trans_cover").style.visibility = "hidden";
		document.getElementById("trans_cover_r").style.visibility = "hidden";
	}
	
	//
      
  } else {
      hp_grid_on();
	  
  }	
	
	
	
	
	
}


var thumb_set = "";
function navCover_off(){
	document.getElementById("trans_cover").style.visibility = "hidden";
	document.getElementById("trans_cover_r").style.visibility = "hidden";
	
	}
function hp_grid_on()
{
	thumb_set = "home";
	
	$("#footer").animate({opacity: .65},800);
	document.getElementById("external_content").style.height = "0%";
	reps_off();
	document.getElementById("hp_thumbs").style.visibility = "visible";
	document.getElementById("trans_cover").style.visibility = "visible";
	document.getElementById("trans_cover_r").style.visibility = "visible";
	
	document.getElementById("header_top").style.backgroundImage = "url('images/header_red.png')";
	document.getElementById("header_bot").style.backgroundImage = "url('images/grid.png')";

	
	$("#hp_1").delay(1000).animate({left:"0px",top:"0px",opacity: 1},500);
	$("#hp_2").delay(600).animate({left:"0px",top:"0px",opacity: 1},500);
	$("#hp_3").delay(300).animate({left:"0px",top:"0px",opacity: 1},500);
	
	$("#hp_7").delay(1300).animate({right:"0px",top:"0px",opacity: 1},500);
	$("#hp_6").delay(1000).animate({right:"0px",top:"0px",opacity: 1},500);
	$("#hp_5").delay(700).animate({right:"0px",top:"0px",opacity: 1},500);
	$("#hp_4").delay(400).animate({right:"0px",top:"0px",opacity: 1},500);
	
	$("#hp_8").delay(1400).animate({left:"0px",top:"0px",opacity: 1},500);
	$("#hp_9").delay(900).animate({left:"0px",top:"0px",opacity: 1},500);
	$("#hp_10").delay(500).animate({left:"0px",top:"0px",opacity: 1},500);
	
	$("#hp_14").delay(1400).animate({right:"0px",top:"0px",opacity: 1},500,navCover_off);
	$("#hp_13").delay(1100).animate({right:"0px",top:"0px",opacity: 1},500);
	$("#hp_12").delay(800).animate({right:"0px",opacity: 1},500);
	$("#hp_11").delay(500).animate({right:"0px",top:"0px",opacity: 1},500);
	
	$("#hp_15").delay(1200).animate({left:"0px",top:"0px",opacity: 1},500);
	$("#hp_16").delay(1000).animate({right:"0px",top:"0px",opacity: 1},500);
	

	
}


function kid_grid_on()
{
	thumb_set = "kid";
	$("#footer").animate({opacity: .65},800);
	document.getElementById("external_content").style.height = "0%";
	reps_off();
	document.getElementById("kid_thumbs").style.visibility = "visible";
	document.getElementById("trans_cover").style.visibility = "visible";
	document.getElementById("trans_cover_r").style.visibility = "visible";
	
	document.getElementById("header_top").style.backgroundImage = "url('images/header_green.png')";
	document.getElementById("header_bot").style.backgroundImage = "url('images/grid_green.png')";
	
	//$("#kid_1").delay(1000).animate({left:"0px",opacity: 1},500);
	$("#kid_2").delay(600).animate({left:"0px",opacity: 1},500);
	$("#kid_3").delay(300).animate({left:"0px",opacity: 1},500);
	
	$("#kid_7").delay(1300).animate({right:"0px",opacity: 1},500);
	$("#kid_6").delay(1000).animate({right:"0px",opacity: 1},500);
	$("#kid_5").delay(700).animate({right:"0px",opacity: 1},500);
	$("#kid_4").delay(400).animate({right:"0px",opacity: 1},500);
	
	//$("#kid_8").delay(1400).animate({left:"0px",opacity: 1},500);
	$("#kid_9").delay(1100).animate({left:"0px",opacity: 1},500);
	$("#kid_10").delay(800).animate({left:"0px",opacity: 1},500);
	$("#kid_11").delay(500).animate({left:"0px",opacity: 1},500);
	
	$("#kid_14").delay(1400).animate({right:"0px",opacity: 1},500,navCover_off);
	$("#kid_13").delay(1100).animate({right:"0px",opacity: 1},500);
	$("#kid_12").delay(800).animate({right:"0px",opacity: 1},500);
	
}

function sur_grid_on()
{
	thumb_set = "surface";
	$("#footer").animate({opacity: .65},800);
	document.getElementById("external_content").style.height = "0%";
	reps_off();
	document.getElementById("sur_thumbs").style.visibility = "visible";
	document.getElementById("trans_cover").style.visibility = "visible";
	document.getElementById("trans_cover_r").style.visibility = "visible";
	
	document.getElementById("header_top").style.backgroundImage = "url('images/header_brown.png')";
	document.getElementById("header_bot").style.backgroundImage = "url('images/grid_brown.png')";
	
	$("#sur_3").delay(1000).animate({right:"0px",opacity: 1},500);
	$("#sur_2").delay(600).animate({right:"0px",opacity: 1},500);
	$("#sur_1").delay(300).animate({right:"0px",opacity: 1},500);
	
	$("#sur_4").delay(1300).animate({left:"0px",opacity: 1},500);
	$("#sur_5").delay(1000).animate({left:"0px",opacity: 1},500);
	$("#sur_6").delay(700).animate({left:"0px",opacity: 1},500);
	$("#sur_7").delay(400).animate({left:"0px",opacity: 1},500);
	
	$("#sur_11").delay(1400).animate({right:"0px",opacity: 1},500,navCover_off);
	$("#sur_10").delay(1100).animate({right:"0px",opacity: 1},500);
	$("#sur_9").delay(800).animate({right:"0px",opacity: 1},500);
	$("#sur_8").delay(500).animate({right:"0px",opacity: 1},500);
	
	$("#sur_12").delay(1400).animate({left:"0px",opacity: 1},500);
	$("#sur_13").delay(1100).animate({left:"0px",opacity: 1},500);
	$("#sur_14").delay(800).animate({left:"0px",opacity: 1},500);
	$("#sur_15").delay(800).animate({left:"0px",opacity: 1},500);
	
	//alert("what");

}

function sur_grid_off()
{
	function sur_reset(){document.getElementById("sur_thumbs").style.visibility = "hidden";}
	$("#sur_1").delay(1000).animate({right:"-200px",opacity: 0},500);
	$("#sur_2").delay(600).animate({right:"-200px",opacity: 0},500);
	$("#sur_3").delay(300).animate({right:"-200px",opacity: 0},500);
	
	$("#sur_7").delay(1300).animate({left:"-800px",opacity: 0},500);
	$("#sur_6").delay(1000).animate({left:"-800px",opacity: 0},500);
	$("#sur_5").delay(700).animate({left:"-800px",opacity: 0},500);
	$("#sur_4").delay(400).animate({left:"-800px",opacity: 0},500);
	
	$("#sur_8").delay(1400).animate({right:"-200px",opacity: 0},500,sur_reset);
	
	
	
	$("#sur_9").delay(1100).animate({right:"-200px",opacity: 0},500);
	$("#sur_10").delay(800).animate({right:"-200px",opacity: 0},500);
	$("#sur_11").delay(500).animate({right:"-200px",opacity: 0},500);
	
	$("#sur_15").delay(1400).animate({left:"-800px",opacity: 0},500);
	$("#sur_14").delay(1400).animate({left:"-800px",opacity: 0},500);
	$("#sur_13").delay(1100).animate({left:"-800px",opacity: 0},500);
	$("#sur_12").delay(800).animate({left:"-800px",opacity: 0},500);

}

function kid_grid_off()
{
	function kid_reset(){document.getElementById("kid_thumbs").style.visibility = "hidden";}
	
	//$("#kid_1").delay(1000).animate({left:"-800px",opacity: 0},500);
	$("#kid_2").delay(600).animate({left:"-800px",opacity: 0},500);
	$("#kid_3").delay(300).animate({left:"-800px",opacity: 0},500);
	
	$("#kid_7").delay(1300).animate({right:"-200px",opacity: 0},500);
	$("#kid_6").delay(1000).animate({right:"-200px",opacity: 0},500);
	$("#kid_5").delay(700).animate({right:"-200px",opacity: 0},500);
	$("#kid_4").delay(400).animate({right:"-200px",opacity: 0},500);
	
	//$("#kid_8").delay(1400).animate({left:"-800px",opacity: 0},500);
	$("#kid_9").delay(1100).animate({left:"-800px",opacity: 0},500);
	$("#kid_10").delay(800).animate({left:"-800px",opacity: 0},500);
	$("#kid_11").delay(500).animate({left:"-800px",opacity: 0},500);
	
	$("#kid_14").delay(1400).animate({right:"-200px",opacity: 0},500,kid_reset);
	$("#kid_13").delay(1100).animate({right:"-200px",opacity: 0},500);
	$("#kid_12").delay(800).animate({right:"-200px",opacity: 0},500);
}

function hp_grid_off()
{
	function hp_reset(){document.getElementById("hp_thumbs").style.visibility = "hidden";}
	
	$("#hp_3").delay(1000).animate({left:"-800px",opacity: 0},500);
	$("#hp_2").delay(600).animate({left:"-800px",opacity: 0},500);
	$("#hp_1").delay(300).animate({left:"-800px",opacity: 0},500);
	
	$("#hp_4").delay(1300).animate({right:"-200px",opacity: 0},500);
	$("#hp_5").delay(1000).animate({right:"-200px",opacity: 0},500);
	$("#hp_6").delay(700).animate({right:"-200px",opacity: 0},500);
	$("#hp_7").delay(400).animate({right:"-200px",opacity: 0},500);
	
	$("#hp_10").delay(1400).animate({left:"-800px",opacity: 0},500);
	$("#hp_9").delay(900).animate({left:"-800px",opacity: 0},500);
	$("#hp_8").delay(500).animate({left:"-800px",opacity: 0},500);
	
	$("#hp_11").delay(1400).animate({right:"-200px",opacity: 0},500,hp_reset);
	$("#hp_12").delay(1100).animate({right:"-200px",opacity: 0},500);
	$("#hp_13").delay(800).animate({right:"-200px",opacity: 0},500);
	$("#hp_14").delay(500).animate({right:"-200px",opacity: 0},500);
	
	//$("#hp_17").delay(1200).animate({left:"-800px",opacity: 0},500);
	$("#hp_16").delay(1000).animate({right:"-200px",opacity: 0},500);
	$("#hp_15").delay(800).animate({left:"-800px",opacity: 0},500);
}

/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////
function gallery_setUp(gal_id,cat_gal)
{
	
	reps_off();
	if(cat_gal == "normal"){document.getElementById("uncer_cover").style.backgroundColor = "#2a1540";hp_grid_on();}
	else if(cat_gal == "kid"){document.getElementById("uncer_cover").style.backgroundColor = "#869a45";}
	else if(cat_gal == "surface"){document.getElementById("uncer_cover").style.backgroundColor = "#9b883c";}
	else if(cat_gal == ""){document.getElementById("uncer_cover").style.backgroundColor = "#2a1540";}
	
	document.getElementById("preloading").style.visibility = "visible";
	$("#preloading").animate({opacity: 1},300);
	//$("#mid_open").animate({height: "80px"},300);
	document.getElementById("uncer_cover").style.visibility = "visible";
	document.getElementById("portfolio_frame").style.visibility = "visible";
	
	document.getElementById("portfolio_frame").src = gal_id;//"swf/turkey.html";
	
	$("#uncer_cover").animate({opacity: .88},500);
	$("#portfolio_frame").animate({opacity: 1},500);
	
	
}


function imageSpread(spread){
	document.getElementById("preloading").style.visibility = "hidden";
	if(spread == "normal"){
		document.getElementById("hpl").style.visibility = "visible";
		document.getElementById("hpr").style.visibility = "visible";
		$("#hpl").delay(800).animate({opacity: 1, left:"0px"},800);
		$("#hpr").delay(800).animate({opacity: 1, right:"0px"},800);	
	}
	else if(spread == "surface"){
		document.getElementById("srl").style.visibility = "visible";
		document.getElementById("srr").style.visibility = "visible";
		$("#srl").delay(800).animate({opacity: 1, left:"0px"},800);
		$("#srr").delay(800).animate({opacity: 1, right:"0px"},800);
	}
	else if(spread == "kid"){
		document.getElementById("kdl").style.visibility = "visible";
		document.getElementById("kdr").style.visibility = "visible";
		$("#kdl").delay(800).animate({opacity: 1, left:"0px"},800);
		$("#kdr").delay(800).animate({opacity: 1, right:"0px"},800);
	}
	if(spread == ""){
		document.getElementById("hpl").style.visibility = "visible";
		document.getElementById("hpr").style.visibility = "visible";
		$("#hpl").delay(800).animate({opacity: 1, left:"0px"},800);
		$("#hpr").delay(800).animate({opacity: 1, right:"0px"},800);	
	}
}



function videoDown(){
	//$("#mid_open").animate({height: "0px"},800);
	//document.getElementById("preloading").style.visibility = "visible";
	$("#preloading").animate({opacity: 0},300).css({"visibility":"hidden"});
	if(thumb_set == "home"){$("#portfolio_frame").animate({top:"0px"},800,imageSpread('normal'));}
	else if(thumb_set == ""){$("#portfolio_frame").animate({top:"0px"},800,imageSpread('normal'));}
	else if(thumb_set == "surface"){$("#portfolio_frame").animate({top:"0px"},800,imageSpread('surface'));}
	else if(thumb_set == "kid"){$("#portfolio_frame").animate({top:"0px"},800,imageSpread('kid'));}
	
}



function thumb_check(gridOn)
{
		function ex_content(){document.getElementById("external_content").style.visibility = "hidden";}
		$("#external_content").delay(0).animate({opacity: 0},800,ex_content);
		
	
		if(thumb_set == "home"){
			if(gridOn == "hp"){}
			else if(gridOn != "hp")
			{
				hp_grid_off();
				if(gridOn == "sur"){sur_grid_on();}
				else if(gridOn == "kid"){kid_grid_on();}
			}
			}
			
		if(thumb_set == "surface"){
			if(gridOn == "sur"){}
			else if(gridOn != "sur"){
				sur_grid_off();
				if(gridOn == "hp"){hp_grid_on();}
				else if(gridOn == "kid"){kid_grid_on();}
				}
			}
		
		if(thumb_set == "kid"){
			if(gridOn == "kid"){}
			else if(gridOn != "kid"){
				kid_grid_off();
				if(gridOn == "sur"){sur_grid_on();}
				else if(gridOn == "hp"){hp_grid_on();}
				}
			}

		if(thumb_set == ""){
			if(gridOn == "hp"){hp_grid_on();};
			if(gridOn == "sur"){sur_grid_on();};
			if(gridOn == "kid"){kid_grid_on();};
		}
	
	
}
///nav from gallery//
function gal_out(from_what){
	spread_resetted();
	function clear_portfolio(){
	document.getElementById("uncer_cover").style.visibility = "hidden";
	//document.getElementById("portfolio_frame").style.visibility = "hidden";
	document.getElementById("portfolio_frame").src = "";
	
	}
	if(from_what == "artist"){
		window.location.hash = "/Artists";
		thumb_check('hp');
	}
	
	
	else if(from_what == "surface"){
		window.location.hash = "/Surface-Design";
		thumb_check('sur');
	}
	else if(from_what == "kid"){
		window.location.hash = "/Kidzone";
		thumb_check('kid');
		
	}
	else if(from_what == "projects"){
		window.location.hash = "/Projects";
		projects_page();
		//thumb_check('');
		
	}
	else if(from_what == "blog"){
		window.location.hash = "/From-The-Surface";
		blog_page();
		//thumb_check('');
		
	}
	
	
	$("#portfolio_frame").delay(200).animate({top: "-2000px"},800);
	$("#uncer_cover").delay(200).animate({opacity: 0},800,clear_portfolio);
	
	
	
	
	//));
}
function spread_resetted(){
	function spread_done(){
		document.getElementById("hpl").style.visibility = "hidden";
		document.getElementById("hpr").style.visibility = "hidden";
		document.getElementById("kdl").style.visibility = "hidden";
		document.getElementById("kdr").style.visibility = "hidden";
		document.getElementById("srl").style.visibility = "hidden";
		document.getElementById("srr").style.visibility = "hidden";
		
		}
		$("#hpl").animate({opacity: 0, left:"0px"},300);
		$("#hpr").animate({opacity: 0, right:"0px"},300,spread_done);
		$("#kdl").animate({opacity: 0, left:"0px"},300);
		$("#kdr").animate({opacity: 0, right:"0px"},300);
		$("#srl").animate({opacity: 0, left:"0px"},300);
		$("#srr").animate({opacity: 0, right:"0px"},300);	
	

	
}



/////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////
 $(document).ready(function(){
	 		var opts = {
  lines: 16, // The number of lines to draw
  length: 18, // The length of each line
  width: 5, // The line thickness
  radius: 20, // The radius of the inner circle
  color: '#fff', // #rgb or #rrggbb
  speed: 1, // Rounds per second
  trail: 60, // Afterglow percentage
  shadow: true // Whether to render a shadow
};
var target = document.getElementById('preloading');
var spinner = new Spinner(opts).spin(target);


	
	

   $("#rAndrews").click(function(event){repped('andrews');});
   $("#rBlanco").click(function(event){repped('blanco');});
   $("#rDockray").click(function(event){repped('dockray');});
   $("#rHanson").click(function(event){repped('hanson');});
   $("#rHess").click(function(event){repped('hess');});
   $("#rHiggins").click(function(event){repped('higgins');});
   $("#rHouk").click(function(event){repped('houk');});
   $("#rK").click(function(event){repped('k');});
   $("#rMontagna").click(function(event){repped('montagna');});
   $("#rMontalto").click(function(event){repped('montalto');});
   $("#rMoors").click(function(event){repped('moors');});
   $("#rPage").click(function(event){repped('page');});
   $("#rSiegelbaum").click(function(event){repped('siegelbaum');});
   $("#rNeryl").click(function(event){repped('neryl');});
   $("#rWeldon").click(function(event){repped('weldon');});
   $("#rLalaska").click(function(event){repped('lalaska');});
   $("#rFlett").click(function(event){repped('flett');});
  
 
	
	 
   $("#hp_1").click(function(event){
	gallery_setUp("artists/andrews/andrews.html","normal");
	window.location.hash = "/Artists/Aurora-Andrews";
	}).mouseenter(function() {
	thumb_onRollover("hp_1",1);}).mouseleave(function() {
	thumb_onRollOut("hp_1",1)});
   $("#hp_2").click(function(event){
	gallery_setUp("artists/blanco/blanco.html","normal");
	window.location.hash = "/Artists/Martin-Blanco";
	}).mouseenter(function() {
	thumb_onRollover("hp_2",2);}).mouseleave(function() {
	thumb_onRollOut("hp_2",2)});
   $("#hp_3").click(function(event){
	gallery_setUp("artists/caran/caran.html","normal");
	window.location.hash = "/Artists/Danijela-Caran";
   }).mouseenter(function() {thumb_onRollover("hp_3",3);
   }).mouseleave(function() {thumb_onRollOut("hp_3",3)});
   $("#hp_4").click(function(event){
	 gallery_setUp("artists/dockray/dockray.html","normal");
	 window.location.hash = "/Artists/Tracy-Dockray";
	 }).mouseenter(function() {thumb_onRollover("hp_4",4);
	 }).mouseleave(function() {thumb_onRollOut("hp_4",4)});
   $("#hp_5").click(function(event){
	   gallery_setUp("artists/hanson/hanson.html","normal");
	   window.location.hash = "/Artists/Glen-Hanson";
	   }).mouseenter(function() {thumb_onRollover("hp_5",5);
	   }).mouseleave(function() {thumb_onRollOut("hp_5",5)});
   $("#hp_6").click(function(event){
	   gallery_setUp("artists/hess/hess.html","normal");
	   window.location.hash = "/Artists/Kerrie-Hess";
	   }).mouseenter(function() {thumb_onRollover("hp_6",6);
	   }).mouseleave(function() {thumb_onRollOut("hp_6",6)});
   $("#hp_7").click(function(event){
	   gallery_setUp("artists/higgins/higgins.html","normal");
	   window.location.hash = "/Artists/Annie-K-Higgins";
	   }).mouseenter(function() {thumb_onRollover("hp_7",7);
	   }).mouseleave(function() {thumb_onRollOut("hp_7",7)});
   $("#hp_8").click(function(event){
	   gallery_setUp("artists/houk/houk.html","normal");
	   window.location.hash = "/Artists/Holly-Houk";
	   }).mouseenter(function() {thumb_onRollover("hp_8",8);
	   }).mouseleave(function() {thumb_onRollOut("hp_8",8)});
   $("#hp_9").click(function(event){
	   gallery_setUp("artists/k/k.html","normal");
	   window.location.hash = "/Artists/Shellie-K";
	   }).mouseenter(function() {thumb_onRollover("hp_9",9);
	   }).mouseleave(function() {thumb_onRollOut("hp_9",9)});
   $("#hp_10").click(function(event){
	   gallery_setUp("artists/montagna/montagna.html","normal");
	   window.location.hash = "/Artists/Frank-Montagna";
	   }).mouseenter(function() {thumb_onRollover("hp_10",10);
	   }).mouseleave(function() {thumb_onRollOut("hp_10",10)});
   $("#hp_11").click(function(event){
	   gallery_setUp("artists/montalto/montalto.html","normal");
	   window.location.hash = "/Artists/Luisa-Montalto";
	   }).mouseenter(function() {thumb_onRollover("hp_11",11);
	   }).mouseleave(function() {thumb_onRollOut("hp_11",11)});
   $("#hp_12").click(function(event){
	   gallery_setUp("artists/moors/moors.html","normal");
	   window.location.hash = "/Artists/Steve-Moors";
	   }).mouseenter(function() {thumb_onRollover("hp_12",12);
	   }).mouseleave(function() {thumb_onRollOut("hp_12",12)});
   $("#hp_13").click(function(event){
	   gallery_setUp("artists/page/page.html","normal");
	   window.location.hash = "/Artists/Stefan-Page";
	   }).mouseenter(function() {thumb_onRollover("hp_13",13);
	   }).mouseleave(function() {thumb_onRollOut("hp_13",13)});
   
   $("#hp_14").click(function(event){
	   gallery_setUp("artists/neryl/neryl.html","normal");
	   window.location.hash = "/Artists/Neryl-Walker";
	   }).mouseenter(function() {thumb_onRollover("hp_14",14);
	   }).mouseleave(function() {thumb_onRollOut("hp_14",14)});
   $("#hp_15").click(function(event){
	   gallery_setUp("artists/weldon/weldon.html","normal");
	   window.location.hash = "/Artists/Michael-Weldon";
	   }).mouseenter(function() {thumb_onRollover("hp_15",15);
	   }).mouseleave(function() {thumb_onRollOut("hp_15",15)});
 $("#hp_16").click(function(event){
	 gallery_setUp("artists/flett/flett.html","normal");
	 window.location.hash = "/Artists/Erin-Flett";
	 }).mouseenter(function() {thumb_onRollover("hp_16",16);
	 }).mouseleave(function() {thumb_onRollOut("hp_16",16)});
   
   
   
//$("#kid_1").click(function(event){gallery_setUp("artists/hanson/hanson_kids.html","kid");}).mouseenter(function() {kthumb_onRollover("kid_1",1);}).mouseleave(function() {kthumb_onRollOut("kid_1",1)});
$("#kid_2").click(function(event){
	gallery_setUp("artists/higgins/higgins_kids.html","kid");
	window.location.hash = "/Kidzone/Annie-K-Higgins";
	//alert(window.location.hash);
	}).mouseenter(function() {kthumb_onRollover("kid_2",2);
	}).mouseleave(function() {kthumb_onRollOut("kid_2",2)});
$("#kid_3").click(function(event){///this is not active///
	gallery_setUp("artists/lalaska/lalaska_kids.html","kid");
	}).mouseenter(function() {kthumb_onRollover("kid_3",3);
	}).mouseleave(function() {kthumb_onRollOut("kid_3",3)});	
$("#kid_4").click(function(event){
	gallery_setUp("artists/montagna/montagna_kids.html","kid");
	window.location.hash = "/Kidzone/Frank-Montagna";
	}).mouseenter(function() {kthumb_onRollover("kid_4",4);
	}).mouseleave(function() {kthumb_onRollOut("kid_4",4)});
$("#kid_5").click(function(event){
	gallery_setUp("artists/montalto/montalto_kids.html","kid");
	window.location.hash = "/Kidzone/Luisa-Montalto";
	}).mouseenter(function() {kthumb_onRollover("kid_5",5);
	}).mouseleave(function() {kthumb_onRollOut("kid_5",5)});
$("#kid_6").click(function(event){
	gallery_setUp("artists/k/k_kids.html","kid");
	window.location.hash = "/Kidzone/Shellie-K";
	}).mouseenter(function() {kthumb_onRollover("kid_6",6);
	}).mouseleave(function() {kthumb_onRollOut("kid_6",6)});
$("#kid_7").click(function(event){
	gallery_setUp("artists/dockray/dockray_kids.html","kid");
	window.location.hash = "/Kidzone/Tracy-Dockray";
	}).mouseenter(function() {kthumb_onRollover("kid_7",7);
	}).mouseleave(function() {kthumb_onRollOut("kid_7",7)});
//$("#kid_8").click(function(event){gallery_setUp("artists/hanson/hanson_kids.html","kid");}).mouseenter(function() {kthumb_onRollover("kid_8",8);}).mouseleave(function() {kthumb_onRollOut("kid_8",8)});
$("#kid_9").click(function(event){
	gallery_setUp("artists/higgins/higgins_kids.html","kid");
	window.location.hash = "/Kidzone/Annie-K-Higgins";
	}).mouseenter(function() {kthumb_onRollover("kid_9",9);
	}).mouseleave(function() {kthumb_onRollOut("kid_9",9)});
$("#kid_10").click(function(event){//not active
	gallery_setUp("artists/lalaska/lalaska_kids.html","kid");
	}).mouseenter(function() {kthumb_onRollover("kid_10",10);
	}).mouseleave(function() {kthumb_onRollOut("kid_10",10)});
$("#kid_11").click(function(event){
	gallery_setUp("artists/montagna/montagna_kids.html","kid");
	window.location.hash = "/Kidzone/Frank-Montagna";
	}).mouseenter(function() {kthumb_onRollover("kid_11",11);
	}).mouseleave(function() {kthumb_onRollOut("kid_11",11)});
$("#kid_12").click(function(event){
	gallery_setUp("artists/montalto/montalto_kids.html","kid");
	window.location.hash = "/Kidzone/Luisa-Montalto";
	}).mouseenter(function() {kthumb_onRollover("kid_12",12);
	}).mouseleave(function() {kthumb_onRollOut("kid_12",12)});
$("#kid_13").click(function(event){
	gallery_setUp("artists/k/k_kids.html","kid");
	window.location.hash = "/Kidzone/Shellie-K";
	}).mouseenter(function() {kthumb_onRollover("kid_13",13);
	}).mouseleave(function() {kthumb_onRollOut("kid_13",13)});
$("#kid_14").click(function(event){
	gallery_setUp("artists/dockray/dockray_kids.html","kid");
	window.location.hash = "/Kidzone/Tracy-Dockray";
	}).mouseenter(function() {kthumb_onRollover("kid_14",14);
	}).mouseleave(function() {kthumb_onRollOut("kid_14",14)});

   
$("#sur_1").click(function(event){
	gallery_setUp("artists/caran/caran_sur.html","surface");
	window.location.hash = "/Surface-Design/Danijela-Caran";
	}).mouseenter(function() {sthumb_onRollover("sur_1",1);
	}).mouseleave(function() {sthumb_onRollOut("sur_1",1)});
$("#sur_2").click(function(event){
	gallery_setUp("artists/higgins/higgins_sur.html","surface");
	window.location.hash = "/Surface-Design/Annie-K-Higgins";
	}).mouseenter(function() {sthumb_onRollover("sur_2",2);
	}).mouseleave(function() {sthumb_onRollOut("sur_2",2)});
$("#sur_3").click(function(event){
	gallery_setUp("artists/montagna/montagna_sur.html","surface");
	window.location.hash = "/Surface-Design/Frank-Montagna";
	}).mouseenter(function() {sthumb_onRollover("sur_3",3);
	}).mouseleave(function() {sthumb_onRollOut("sur_3",3)});
$("#sur_4").click(function(event){
	gallery_setUp("artists/neryl/neryl_sur.html","surface");
	window.location.hash = "/Surface-Design/Neryl-Walker";
	}).mouseenter(function() {sthumb_onRollover("sur_4",4);
	}).mouseleave(function() {sthumb_onRollOut("sur_4",4)});
$("#sur_5").click(function(event){
	gallery_setUp("artists/k/k_sur.html","surface");
	window.location.hash = "/Surface-Design/Shellie-K";
	}).mouseenter(function() {sthumb_onRollover("sur_5",5);
	}).mouseleave(function() {sthumb_onRollOut("sur_5",5)});
$("#sur_6").click(function(event){///not active
	gallery_setUp("artists/siegelbaum/siegelbaum_sur.html","surface");
	}).mouseenter(function() {sthumb_onRollover("sur_6",6);
	}).mouseleave(function() {sthumb_onRollOut("sur_6",6)});
$("#sur_7").click(function(event){
	gallery_setUp("artists/page/page_sur.html","surface");
	window.location.hash = "/Surface-Design/Stefan-Page";
	}).mouseenter(function() {sthumb_onRollover("sur_7",7);
	}).mouseleave(function() {sthumb_onRollOut("sur_7",7)});
$("#sur_8").click(function(event){
	gallery_setUp("artists/caran/caran_sur.html","surface");
	window.location.hash = "/Surface-Design/Danijela-Caran";
	}).mouseenter(function() {sthumb_onRollover("sur_8",8);
	}).mouseleave(function() {sthumb_onRollOut("sur_8",8)});
$("#sur_9").click(function(event){
	gallery_setUp("artists/higgins/higgins_sur.html","surface");
	window.location.hash = "/Surface-Design/Annie-K-Higgins";
	}).mouseenter(function() {sthumb_onRollover("sur_9",9);
	}).mouseleave(function() {sthumb_onRollOut("sur_9",9)});
$("#sur_10").click(function(event){
	gallery_setUp("artists/montagna/montagna_sur.html","surface");
	window.location.hash = "/Surface-Design/Frank-Montagna";
	}).mouseenter(function() {sthumb_onRollover("sur_10",10);
	}).mouseleave(function() {sthumb_onRollOut("sur_10",10)});
$("#sur_11").click(function(event){
	gallery_setUp("artists/neryl/neryl_sur.html","surface");
	window.location.hash = "/Surface-Design/Neryl-Walker";
	}).mouseenter(function() {sthumb_onRollover("sur_11",11);
	}).mouseleave(function() {sthumb_onRollOut("sur_11",11)});
$("#sur_12").click(function(event){
	gallery_setUp("artists/k/k_sur.html","surface");
	window.location.hash = "/Surface-Design/Shellie-K";
	}).mouseenter(function() {sthumb_onRollover("sur_12",12);
	}).mouseleave(function() {sthumb_onRollOut("sur_12",12)});
$("#sur_13").click(function(event){//not active
	gallery_setUp("artists/siegelbaum/siegelbaum_sur.html","surface");
	}).mouseenter(function() {sthumb_onRollover("sur_13",13);
	}).mouseleave(function() {sthumb_onRollOut("sur_13",13)});
$("#sur_14").click(function(event){
	gallery_setUp("artists/page/page_sur.html","surface");
	window.location.hash = "/Surface-Design/Stefan-Page";
	}).mouseenter(function() {sthumb_onRollover("sur_14",14);
	}).mouseleave(function() {sthumb_onRollOut("sur_14",14)});
$("#sur_15").click(function(event){
	gallery_setUp("artists/flett/flett_sur.html","surface");
	window.location.hash = "/Surface-Design/Erin-Flett";
	}).mouseenter(function() {sthumb_onRollover("sur_15",15);
	}).mouseleave(function() {sthumb_onRollOut("sur_15",15)});
 
 
 
$("#contact").click(function(event){
	reps_off();
	$("#form_cover").animate({opacity: .4},400);
	$("#form_holder").animate({top: "0px"},600);
	$("#trans_cover").delay(100).animate({opacity: .05},400);
	$("#trans_cover_r").delay(100).animate({opacity: .05},400);
	document.getElementById("trans_cover").style.backgroundColor = "#000000";
	document.getElementById("trans_cover_r").style.backgroundColor = "#000000";
	document.getElementById("form_cover").style.visibility = "visible";
	document.getElementById("trans_cover").style.visibility = "visible";
	document.getElementById("trans_cover_r").style.visibility = "visible";

})
 

 
 });

function form_closed(){
	function formOut(){
	document.getElementById("trans_cover").style.backgroundColor = "transparent";
	document.getElementById("trans_cover_r").style.backgroundColor = "transparent";
	document.getElementById("form_cover").style.visibility = "hidden";
	document.getElementById("trans_cover").style.visibility = "hidden";
	document.getElementById("trans_cover_r").style.visibility = "hidden";	
	document.getElementById("formed").src = "form/form.html";
	}
	$("#form_cover").delay(300).animate({opacity: 0},400);
	$("#form_holder").delay(300).animate({top: "-750px"},600);
	$("#trans_cover").delay(400).animate({opacity: 0},400,formOut);
	$("#trans_cover_r").delay(400).animate({opacity: 0},400);
		
}
 

function thumb_onRollover(mage,over){document.getElementById(mage).src = "images/homePage_thumbs/hpover_"+over+".jpg";}
function thumb_onRollOut(mage,over){document.getElementById(mage).src = "images/homePage_thumbs/hp_"+over+".jpg";}

function sthumb_onRollover(mage,over){document.getElementById(mage).src = "images/sur_thumbs/surover_"+over+".jpg";}
function sthumb_onRollOut(mage,over){document.getElementById(mage).src = "images/sur_thumbs/sur_"+over+".jpg";}

function kthumb_onRollover(mage,over){document.getElementById(mage).src = "images/kid_thumbs/kidover_"+over+".jpg";}
function kthumb_onRollOut(mage,over){document.getElementById(mage).src = "images/kid_thumbs/kid_"+over+".jpg";}

function repped(art_gal){
	
	
	gallery_setUp("artists/"+art_gal+"/"+art_gal+".html","normal");
	

}

function reppedS(art_gal){
	gallery_setUp("artists/"+art_gal+"/"+art_gal+"_sur.html","surface");

}

function reppedK(art_gal){
	gallery_setUp("artists/"+art_gal+"/"+art_gal+"_kids.html","kid");
}
 
 
 
function projects_page(){
	$("#footer").animate({opacity: 0},800);
	
	document.getElementById("external_content").style.height = "100%";
	//alert(thumb_set);
	reps_off();
	if(thumb_set == "home"){hp_grid_off();}
	else if(thumb_set == "surface"){sur_grid_off();}
	else if(thumb_set == "kid"){kid_grid_off();}
	
	
	document.getElementById("header_top").style.backgroundImage = "url('images/header_blue.png')";
	document.getElementById("header_bot").style.backgroundImage = "url('images/grid_blue.png')";
	
	
	document.getElementById("external_content").src = "http://illorepsprojects.tumblr.com/";
	document.getElementById("external_content").style.visibility = "visible";
	
	
	$("#external_content").delay(1000).animate({opacity: 1},800);
	
	
	
	thumb_set = "";
	//
	
}

function blog_page(){
	//alert(thumb_set);
	$("#footer").animate({opacity: 0},800);
	document.getElementById("external_content").style.height = "100%";
	reps_off();
	
	if(thumb_set == "home"){hp_grid_off();}
	else if(thumb_set == "surface"){sur_grid_off();}
	else if(thumb_set == "kid"){kid_grid_off();}
	
	
	document.getElementById("header_top").style.backgroundImage = "url('images/header_blog.png')";
	document.getElementById("header_bot").style.backgroundImage = "url('images/grid_blog.png')";
	
	
	document.getElementById("external_content").src = "http://illorepsfromthesurface.tumblr.com/";
	document.getElementById("external_content").style.visibility = "visible";
	
	
	$("#external_content").delay(1000).animate({opacity: 1},800);
	thumb_set = "";
	//
	
}


///////////////////reps link////////////////////////////
function reps_on(){
	
	if(thumb_set == "home"){
		
		document.getElementById("represent").style.visibility = "visible";
		
	$("#represent").animate({opacity: 1, top: "24px"},800);
	
		}
	else if(thumb_set == ""){
		document.getElementById("represent").style.visibility = "visible";
	$("#represent").animate({opacity: 1, top: "24px"},800);
		}
		
	else if(thumb_set == "surface"){
		window.location.hash = "/Surface-Design";
		document.getElementById("represent_surface").style.visibility = "visible";
	$("#represent_surface").animate({opacity: 1, top: "24px"},800);
		
		}
	else if(thumb_set == "kid"){
		window.location.hash = "/Kidzone";
		document.getElementById("represent_kid").style.visibility = "visible";
	$("#represent_kid").animate({opacity: 1, top: "24px"},800);
		}
		
}

function reps_off(){
	function reps_reset(){
		document.getElementById("represent").style.visibility = "hidden";
		document.getElementById("represent_kid").style.visibility = "hidden";
		document.getElementById("represent_surface").style.visibility = "hidden";
	
	}
	$("#represent").animate({opacity: 0, top: "40px"},800,reps_reset);
	$("#represent_kid").animate({opacity: 0, top: "40px"},800);	
	$("#represent_surface").animate({opacity: 0, top: "40px"},800);	
}




