$(document).ready(function() {
	

 /*$('#menu-top > ul > li').hover(function(){						   
		$(this).find('ul:first').slideDown(400).css({visibility: 'visible',display: 'none'}).stop(false,true);//
		$(this).addClass('libg');
		},
		function(){
		$(this).find('ul:first').slideUp(200).stop(false,true);//.css({visibility: 'hidden'});
		$(this).removeClass('libg');
		});
*/
/*$('#top-nav ul > li > ul').hover(function(){
		$(this).prev('a').addClass('jqtop'); // use prev for <ul> bcoz after <a> tag , <ul> has start tag and end tag
		$(this).parent('li').addClass('libg');
		},
		function(){
		$(this).prev('a').removeClass('jqtop');
		$(this).parent('li').removeClass('libg');
		});


$('#top-nav > ul > li').hover(function(){
	if ($(this).find('ul:first').length > 0) // as I use If statement then I have to use .length > 0
	{
		$(this).children('a').addClass('jqtop');
	};

	},
	function(){
		$(this).children('a').removeClass('jqtop');
	}
);*/


$('.right-contact input[type="text"], textarea')
       .focus(function(){ //click
		if($(this).val() == this.defaultValue ){ // if($(this).val() !== ''
			    $(this).val(''); 
				             }
			$(this).addClass('jqadd');
			})
      .blur(function(){
		if($(this).val() == ''){
			$(this).val(this.defaultValue);
			}
		$(this).removeClass('jqadd');
	});


$('.jCarouselLite img').fadeTo('fast', 0.7); // This sets the opacity of the thumbs to fade down to 60% when the page loads
        
		$('.jCarouselLite  img').hover(function(){
			$(this).fadeTo('fast', 1.0); // This should set the opacity to 100% on hover
			},function(){
			$(this).fadeTo('fast', 0.7); // This should set the opacity back to 60% on mouseout
		                     });

  
                      // Select all thumb links
            $('.jCarouselLite  a').click(function() {
         
			var largeImagegPath = $(this).attr('href');//get a href from Thumb image for Image path of Large image 
			var largeAlt = $(this).attr('title'); //get the Title from Thumb image for Alt tag of Large image .children('b')
           
			
			
           $('#imageContainer img').attr({ src: largeImagegPath, alt: largeAlt });//.attr('src', imagepath ); //give new large image path of src and Alt tag, which I get from href and Title of href
			     
				$(".output").html(largeAlt); 

					  return false; // mention it when use clcik event specially for src
			
					}
            );



	



// Proload Front Image
/*
jQuery.preloadImages = function()
{
  for(var i = 0; i<arguments.length; i++)
  {
    jQuery("<img>").attr("src", arguments[i]);
  }
}

$.preloadImages("images/gallery-main.jpg", "images/map.png", "images/Andaluz_028.jpg", "images/Andaluz_082.jpg", "images/gallery-5.jpg", "images/gallery-1.jpg", "images/gallery-2.jpg","images/Andaluz_028.jpg", "images/Andaluz_082.jpg", "images/gallery-5.jpg");
*/

	$('body').focus();

});
