﻿$(document).ready(function() {
   $('.slideshow').cycle({ 
    fx:     'fade', 
    speed:  1000, 
    timeout: 6000, 
    next:   '#next', 
    prev:   '#prev'
});

 $('.slideshow2').cycle({ 
    fx:     'fade', 
    speed:  1500, 
    timeout: 6000, 
    next:   '#next', 
    prev:   '#prev'
});
});

function contactForm(){
	
	jQuery('#ajaxOdp').css({ "display": "none" });
	var $mailUrl = jQuery('#contactForm').attr("action");
    var paraTag = jQuery('#contactForm input#submit').parent('div');

    jQuery('#contactForm input#submit').click(function() {

        var name = jQuery('input#name').val();
        var email = jQuery('input#email').val();
        var comments = jQuery('textarea#message').val();

        jQuery.ajax({
            type: 'post',
            url: $mailUrl,
            data: 'name=' + name + '&email=' + email + '&comments=' + comments,

            success: function(results) {
				jQuery('#ajaxOdp').hide(200, function(){
					jQuery('#loaderIcon2').remove();
					jQuery('#ajaxOdp').html(results).show("400");
					}					
				);				
            }
        });
    });
};

function menu() {
$(".page_item").mouseover(function(){
  $(".page_item").animate({"margin-top": "-5px"}, "slow");
});

$(".page_item").mouseleave(function(){
  $(".page_item").animate({"margin-top": "0"}, "slow");
});
};

jQuery(document).ready(function(){
	contactForm();
	
	/*menu();*/
});


 
