// JavaScript Document

$(document).ready(function() {
 
			$("#pop2").click(function(){
				$("#pop1").animate({width: "toggle"}, 1000);
				});
			
			
			$("#contactable").click(function(){
										
				$("#pop1").animate({width: "toggle"}, 1000);
				
				
			});
			var valu	= $("#image_flag").val();
			
			if($("#image_flag").val()=='1')
			{ 
				$("#pop1").animate({width: "toggle"}, 1000);
			}
			
				
			
		
			$("a[rel^='prettyPhoto']").prettyPhoto(			
			{
				animationSpeed: 'normal', /* fast/slow/normal */
				opacity: 0.60, /* Value between 0 and 1 */
				showTitle: true, /* true/false */
				allowresize: false, /* true/false */
				default_width: 500,
				default_height: 344,
				counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */
				theme: 'facebook' /* light_rounded / dark_rounded / light_square / dark_square / facebook */	
			}
			);
			
			
			$("#login_btn_img").click(function(){

				login_validation();
			});
			
			$("#news_ltr_id").click(function(){
			
			  	send_newsletter();
			  			  
	 		 });	
			/* 	1st example	*/

			/// wrap inner content of each anchor with first layer and append background layer
			$("#menu li a").wrapInner( '<span class="out"></span>' ).append( '<span class="bg"></span>' );

			// loop each anchor and add copy of text content
			$("#menu li a").each(function() {
				$( '<span class="over">' +  $(this).text() + '</span>' ).appendTo( this );
			});

			$("#menu li a").hover(function() {
				// this function is fired when the mouse is moved over
				$(".out",	this).stop().animate({'top':	'45px'},	250); // move down - hide
				$(".over",	this).stop().animate({'top':	'0px'},		250); // move down - show
				$(".bg",	this).stop().animate({'top':	'0px'},		120); // move down - show

			}, function() {
				// this function is fired when the mouse is moved off
				$(".out",	this).stop().animate({'top':	'0px'},		250); // move up - show
				$(".over",	this).stop().animate({'top':	'-45px'},	250); // move up - hide
				$(".bg",	this).stop().animate({'top':	'-45px'},	120); // move up - hide
			});
					

			/*	2nd example	*/
			
			$("#menu2 li a").wrapInner( '<span class="out"></span>' );
			
			$("#menu2 li a").each(function() {
				$( '<span class="over">' +  $(this).text() + '</span>' ).appendTo( this );
			});

			$("#menu2 li a").hover(function() {
				$(".out",	this).stop().animate({'top':	'45px'},	200); // move down - hide
				$(".over",	this).stop().animate({'top':	'0px'},		200); // move down - show

			}, function() {
				$(".out",	this).stop().animate({'top':	'0px'},		200); // move up - show
				$(".over",	this).stop().animate({'top':	'-45px'},	200); // move up - hide
			});
			
			

});
