//APPY  FOR YOUR OWN APIKEY FOR EACH SITE. VISIT http://www.flickr.com/services/api/keys/apply/
//AND CHOOSE THE NON COMMERCIAL KEY VERSION

var myKey='2d41317c3d09f4d3190ff218eca86409';
var perPage=49;


jQuery(function(){  
  // ON PAGE LOAD FUNCTIONS
  //grab first gallery to display when page initially loads
  $('#gNav a.nav1').addClass('onState'); 
	  $('#gTitle').html('All Photos'); 
	   jQuery("#gallery").flickr({ 
	        type: "search",
			tag_mode: 'all', 
			tags:"TNDOTCOM",
			callback: liteboxCallback  
		}); 	
		
 
 // navigation functions
	 $('a.nav1').click(
	 	function() { 
			myTitle="Recently Added"
			myTags="TNDOTCOM" 
			
			gReset();$(this).addClass('onState'); $('#gTitle').html(myTitle); 
			 jQuery("#gallery").flickr({type: "search",tag_mode: 'all',tags:myTags,
				callback: liteboxCallback  
			}); 	
		}); 
		
	 $('a.nav2').click(
	 	function() { 
			myTitle="Rock 'n' Roll"
			myTags="TNDOTCOM,TNDOTCOM_RNR" 
			
			gReset();$(this).addClass('onState'); $('#gTitle').html(myTitle); 
			 jQuery("#gallery").flickr({type: "search",tag_mode: 'all',tags:myTags,
				callback: liteboxCallback  
			}); 	
		}); 

	$('a.nav3').click(
		function() { 
			myTitle="Outdoors"
			myTags="TNDOTCOM,TNDOTCOM_OUTDOORS" 
			
			gReset();$(this).addClass('onState'); $('#gTitle').html(myTitle); 
			 jQuery("#gallery").flickr({type: "search",tag_mode: 'all',tags:myTags,
				callback: liteboxCallback  
			}); 	
		}); 
	 
	$('a.nav4').click(
		function() { 
			myTitle="Events"
			myTags="TNDOTCOM,TNDOTCOM_EVENT" 
			
			gReset();$(this).addClass('onState'); $('#gTitle').html(myTitle); 
			 jQuery("#gallery").flickr({type: "search",tag_mode: 'all',tags:myTags,
				callback: liteboxCallback  
			}); 	
		});  	
	 $('a.OutSub1').click(
		function() { 
			myTitle="BloodBrothers & Sisters"
			myTags="TNDOTCOM,TNDOTCOM_MISC" 
			
			gReset();$(this).addClass('onState'); $('#gTitle').html(myTitle); 
			 jQuery("#gallery").flickr({type: "search",tag_mode: 'all',tags:myTags,
				callback: liteboxCallback  
			}); 	
		});
	$('a.OutSub2').click(
		function() { 
			myTitle="Kamp For Kids"
			gReset();$(this).addClass('onState'); $('#gTitle').html(myTitle); 
				jQuery("#gallery").flickr({     
				type:'photoset',
				photoset_id: "72157621767572897",
				callback: liteboxCallback  
			}); 	
		});	
	
	
	$('a.EventSub1').click(
		function() { 
			myTitle="02.06 - National Bowhunters Hall of Fame Induction"
			gReset();$(this).addClass('onState'); $('#gTitle').html(myTitle); 
				jQuery("#gallery").flickr({     
				type:'photoset',
				photoset_id: "72157621006199003",
				callback: liteboxCallback  
			}); 	
		}); 
		
	$('a.EventSub2').click(
		function() { 
			myTitle="2009 CMT Music Awards"
			gReset();$(this).addClass('onState'); $('#gTitle').html(myTitle); 
				jQuery("#gallery").flickr({     
				type:'photoset',
				photoset_id: "72157621006009045",
				callback: liteboxCallback  
			}); 	
		}); 
		
	$('a.RockSub1').click(
		function() { 
			myTitle="2008 Rolling Thunder - 07.04 - Detroit, MI"
			gReset();$(this).addClass('onState'); $('#gTitle').html(myTitle); 
				jQuery("#gallery").flickr({     
				type:'photoset',
				photoset_id: "72157621006113405",
				callback: liteboxCallback  
			}); 	
		}); 
		
	$('a.RockSub2').click(
		function() { 
			myTitle="2008 Rolling Thunder - 06.15 - Los Angeles, CA"
			gReset();$(this).addClass('onState'); $('#gTitle').html(myTitle); 
				jQuery("#gallery").flickr({     
				type:'photoset',
				photoset_id: "72157621006101791",
				callback: liteboxCallback  
			}); 	
		}); 
	
		$('a.RockSub3').click(
		function() { 
			myTitle="2005 Remember The Alamo - Rockout"
			gReset();$(this).addClass('onState'); $('#gTitle').html(myTitle); 
				jQuery("#gallery").flickr({     
				type:'photoset',
				photoset_id: "72157622240251140",
				callback: liteboxCallback  
			}); 	
		}); 
	 
	 	$('a.RockSub4').click(
		function() { 
			myTitle="2006 Unleash The Beast - American Rockout "
			gReset();$(this).addClass('onState'); $('#gTitle').html(myTitle); 
				jQuery("#gallery").flickr({     
				type:'photoset',
				photoset_id: "72157622240222824",
				callback: liteboxCallback  
			}); 	
		}); 
			
		$('a.RockSub5').click(
		function() { 
			myTitle="2008 Rolling Thunder"
			gReset();$(this).addClass('onState'); $('#gTitle').html(myTitle); 
				jQuery("#gallery").flickr({     
				type:'photoset',
				photoset_id: "72157622240032302",
				callback: liteboxCallback  
			}); 	
		}); 
					
		$('a.RockSub6').click(
		function() { 
			myTitle="2007 Unleash The Nuge Beast - KillerRock"
			gReset();$(this).addClass('onState'); $('#gTitle').html(myTitle); 
				jQuery("#gallery").flickr({     
				type:'photoset',
				photoset_id: "72157622239990792",
				callback: liteboxCallback  
			}); 	
		}); 
							
		$('a.RockSub7').click(
		function() { 
			myTitle=" Rock the Park 5 - 07.23.08"
			gReset();$(this).addClass('onState'); $('#gTitle').html(myTitle); 
				jQuery("#gallery").flickr({     
				type:'photoset',
				photoset_id: "72157622091129463",
				callback: liteboxCallback  
			}); 	
		}); 
	 
	  //create drop down menus navigation functions 
	$(" #gNav ul ul").css({display: "none"}); // Opera Fix
	$(" #gNav ul li").hover(function(){
			$(this).addClass('liNavHover');
			$(this).find('ul:first:hidden').css({visibility: "visible",display: "none"}).slideDown(400);
		},function(){
			$(this).find('ul:first').css({visibility: "hidden"});
			$(this).removeClass('liNavHover');
	});
	
	 
}); 
	
	
