function show(id) {
      if (document.getElementById(id).style.display == '') {                               
   		  document.getElementById(id).style.display = 'none';		     
              }                         
   	 else {	        	
   		  document.getElementById(id).style.display = '';		 
              }                                          
}

$(document).ready(function() {
			
			$("#1").toggle(function() {
									
				$("#show_1").animate({ height: 'show', opacity: 'show'}, 'fast');
				 },function(){
				$("#show_1").animate({ height: 'hide', opacity: 'hide'}, 'fast'); 
			
			});
			
			$("#2").toggle(function() {
									
				$("#show_2").animate({ height: 'show', opacity: 'show'}, 'fast');
				 },function(){
				$("#show_2").animate({ height: 'hide', opacity: 'hide'}, 'fast'); 
			
			});
			
			$("#3").toggle(function() {
									
				$("#show_3").animate({ height: 'show', opacity: 'show'}, 'fast');
				 },function(){
				$("#show_3").animate({ height: 'hide', opacity: 'hide'}, 'fast'); 
			
			});
			
			$("#4").toggle(function() {
									
				$("#villa_agave").animate({ height: 'show', opacity: 'show'}, 'fast');
				 },function(){
				$("#villa_agave").animate({ height: 'hide', opacity: 'hide'}, 'fast'); 
			
			});
			
			$("#5").toggle(function() {
									
				$("#villa_elita").animate({ height: 'show', opacity: 'show'}, 'fast');
				 },function(){
				$("#villa_elita").animate({ height: 'hide', opacity: 'hide'}, 'fast'); 
			
			});
			
			$("#6").toggle(function() {
									
				$("#villa_ivanino").animate({ height: 'show', opacity: 'show'}, 'fast');
				 },function(){
				$("#villa_ivanino").animate({ height: 'hide', opacity: 'hide'}, 'fast'); 
			
			});
			
			$("#7").toggle(function() {
									
				$("#villa_skiper").animate({ height: 'show', opacity: 'show'}, 'fast');
				 },function(){
				$("#villa_skiper").animate({ height: 'hide', opacity: 'hide'}, 'fast'); 
			
			});
			
			$("#8").toggle(function() {
									
				$("#stancija_meneghetti").animate({ height: 'show', opacity: 'show'}, 'fast');
				 },function(){
				$("#stancija_meneghetti").animate({ height: 'hide', opacity: 'hide'}, 'fast'); 
			
			});
			
			$.init_slide('imgstore','header_img',0,0,2000,1,5000,0,'_blank');
			
			
			 $('#contact').submit(function() {
          // now we're going to capture *all* the fields in the
          // form and submit it via ajax.
          
          // :input is a macro that grabs all input types, select boxes
          // textarea, etc.  Then I'm using the context of the form from 
          // the initial '#contactForm' to narrow down our selector
          var inputs = [];
          $(':input', this).each(function() {
            inputs.push(this.name + '=' + this.value);
          })
          
          // now if I join our inputs using '&' we'll have a query string
		  
		  $("#cont").addClass('ajax-loading');
		  
          jQuery.ajax({
			scriptCharset: "utf-8" , 
            encoding:"utf-8", 		  
            data: inputs.join('&'),
            url: this.action,
            timeout: 0,
           
            success: function(r) {
			  $("#cont").removeClass('ajax-loading');	
              $('#cont').attr('innerHTML',r);

            }
          }) // checkout http://jquery.com/api for more syntax and options on this method.
          
          // re-test...
          // by default - we'll always return false so it doesn't redirect the user.
          return false;
        })

			
});


