//finding the page
var sNo = 22;
var url = document.location.href.substring(sNo);



$(document).ready(function(){
//********************* NAVIGATIONS *******************//
// ================== about ==============================  //		
	$('.about').hover(function(){
		$('.aboutSub').stop(false,true).animate({width:'show'})},
		function(){	
			$('.aboutSub').stop(false,true).animate({width:'hide'})
		}); // hover end
	

		$('.about').mouseleave(function(){
				$('.aboutImg').stop(false,true).hide("fast")
			});	
	
		
		//force img to leave	
		$('.about').mouseleave(function(){
			$('.aboutImg').stop(false,true).slideUp("fast")
		});
			
				
		// sliding about image
		$('.aboutSub').hover(function(){
			$('.aboutImg').stop(false,true).slideDown("fast")
		});
			
		$('.aboutImg').mouseleave(function(){
			$('.aboutImg').stop(false,true).slideUp("fast")
		});


//========================= mentor ==============================================//
	$('.mentor').hover(function(){
		$('.mentorSub').stop(false,true).animate({width:'show'})},
		function(){	

				$('.mentorSub').stop(false,true).animate({width:'hide'})

		}); // hover end		   
				
			$('.mentor').mouseleave(
				function(){
				  $('.mentorImg').stop(false,true).slideUp("fast")
			});
				
			// sliding image
			$('.mentorSub').mouseover(
				function(){
				  $('.mentorImg').stop(false,true).slideDown("fast")
			});
			
			$('.mentorImg').mouseleave(
				function(){
				  $('.mentorImg').stop(false,true).slideUp("fast")
			});
			
						
// ====== highlights ==== //

			$('.high').hover(function(){
				  $('.highSub').stop(false,true).animate({width:'toggle'},350);			   
			});

			
			$('.high').mouseleave(
				function(){
				  $('.highImg').stop(false,true).slideUp("fast")
			});
				
			// sliding image
			$('.highSub').mouseover(
				function(){
				  $('.highImg').stop(false,true).slideDown("fast")
			});
			
			$('.highImg').mouseleave(
				function(){
				  $('.highImg').stop(false,true).slideUp("fast")
			});


// ====== R16 ==== //
			$('.R16').hover(function(){
				  $('.R16Sub').stop(false,true).animate({width:'toggle'},350);			   
			});
				
			$('.R16').mouseleave(
				function(){
				  $('.R16Img').stop(false,true).slideUp("fast")
			});	
				
			// sliding image
			$('.R16Sub').mouseover(
				function(){
				  $('.R16Img').stop(false,true).slideDown("fast")
			});
			
			$('.R16Img').mouseleave(
				function(){
				  $('.R16Img').stop(false,true).slideUp("fast")
			});
			
			// ====== contact ==== //
			$('.contact').hover(function(){
				  $('.contactSub').stop(false,true).animate({width:'toggle'},350);			   
			});
			
			$('.contact').mouseleave(
				function(){
				  $('.contactImg').stop(false,true).slideUp("fast")
			});
				
			// sliding image
			$('.contactSub').mouseover(
				function(){
				  $('.contactImg').stop(false,true).slideDown("fast")
			});
			
			$('.contactImg').mouseleave(
				function(){
				  $('.contactImg').stop(false,true).slideUp("fast")
			});
			
		   // ====== reg ==== //
			$('.reg').hover(function(){
				  $('.regSub').stop(false,true).animate({width:'toggle'},350);			   
			});
			
			$('.reg').mouseleave(
				function(){
				  $('.regImg').stop(false,true).slideUp("fast")
			});
				
			// sliding image
			$('.regSub').mouseover(
				function(){
				  $('.regImg').stop(false,true).slideDown("fast")
			});
			
			$('.regImg').mouseleave(
				function(){
				  $('.regImg').stop(false,true).slideUp("fast")
			});
			
	        // ====== sponsers ==== //
			$('.sponsors').hover(function(){
				  $('.sponsorsSub').stop(false,true).animate({width:'toggle'},350);			   
			});
			
			$('.sponsors').mouseleave(
				function(){
				  $('.sponsorsImg').stop(false,true).slideUp("fast")
			});
				
			// sliding image
			$('.sponsorsSub').mouseover(
				function(){
				  $('.sponsorsImg').stop(false,true).slideDown("fast")
			});
			
			$('.sponsorsImg').mouseleave(
				function(){
				  $('.sponsorsImg').stop(false,true).slideUp("fast")
			});
			
			// ====== help ==== //
			$('.help').hover(function(){
				  $('.helpSub').stop(false,true).animate({width:'toggle'},350);			   
			});
			
			$('.help').mouseleave(
				function(){
				  $('.helpImg').stop(false,true).slideUp("fast")
			});
				
			// sliding image
			$('.helpSub').mouseover(
				function(){
				  $('.helpImg').stop(false,true).slideDown("fast")
			});
			
			$('.helpImg').mouseleave(
				function(){
				  $('.helpImg').stop(false,true).slideUp("fast")
			});
			
			
			
			//// display the content
			$('.button').click(function(){				 
				$('#pageContent').slideDown("slow")				 
			});
			
			$(".logoImg").click(function(){
								 
				$('#pageContent').slideUp("slow")				 
			});
			
			// ==== goin the main page keey everything
			$('#supersized').hover(function(){								
				$('.aboutSub, .mentorSub, .highSub, .R16Sub, .contactSub, .regSub, .sponsorsSub, .helpSub').stop(false,true).animate({width:'hide'})
			});
//***************** change images when roll over ******************************//

		// ================ people ===================//
		$('#patron').hover(function(){						  
			$("#my_people").attr("src","images/patron.jpg");			   
		});
		$('#founder').hover(function(){						  
			$("#my_people").attr("src","images/founder.jpg");			   
		});
		$('#ambassador').hover(function(){						  
			$("#my_people").attr("src","images/ambassador.jpg");			   
		});
		$('#bearers').hover(function(){						  
			$("#my_people").attr("src","images/bearer.jpg");			   
		});
		$('#mentor').hover(function(){						  
			$("#my_people").attr("src","images/mentor.jpg");			   
		});
		$('#leaders').hover(function(){						  
			$("#my_people").attr("src","images/leaders.jpg");			   
		});
		
		// ================ highlights =================//
		$('#shine').hover(function(){						  
			$("#my_image").attr("src","images/shine.jpg");			   
		});

		$('#wow').hover(function(){					  
			$("#my_image, ").attr("src","images/wow-logo.jpg");			   
		});
				
		$('#yoyo').hover(function(){					  
			$("#my_image").attr("src","images/yoyo-logo.jpg");			   
		});		
		
		$('#visual').hover(function(){				  
			$("#my_image").attr("src","images/street-logo.jpg");			   
		});	
		
		$('#battle').hover(function(){				  
			$("#my_image").attr("src","images/boty-logo.jpg");			   
		});	
		
		$('#dj').hover(function(){				  
			$("#my_image").attr("src","images/hightlands.jpg");			   
		});	
				
		$('#celebrate').hover(function(){				  
			$("#my_image").attr("src","images/cometgt.jpg");			   
		});	
		
		$('#bellydance').hover(function(){				  
			$("#my_image").attr("src","images/belly-logo.jpg");			   
		});	
				
		$('#muaythai').hover(function(){				  
			$("#my_image").attr("src","images/muaythai-logo.jpg");			   
		});	
		
		$('#magic').hover(function(){				  
			$("#my_image").attr("src","images/magic-logo.jpg");			   
		});	
		
		$('#bands').hover(function(){				  
			$("#my_image").attr("src","images/bands-logo.jpg");			   
		});	
		
		$('#performers').hover(function(){				  
			$("#my_image").attr("src","images/performers-logo.jpg");			   
		});	
		
		$('#football').hover(function(){				  
			$("#my_image").attr("src","images/football-logo.jpg");			   
		});	
		
		// special highlights
		$('#japan').hover(function(){				  
			$("#sh").attr("src","images/you-r-not-alone.jpg");			   
		});	
		
		$('#r16').hover(function(){				  
			$("#sh").attr("src","images/r16.jpg");			   
		});	
			
		$('#press').hover(function(){				  
			$("#sh").attr("src","images/press.jpg");			   
		});

	}); // document start end

