$(document).ready(function() {

    //if ($.browser.msie) {
        
    //} else {
        $(".testimonial .inner").cycle({
            fx: 'fade',
            timeout: 8000,
            speed: 2000,
            cleartypeNoBg:true,
            delay:    -2000,
            before: function(curr, next, opts) {
                opts.animOut.opacity = 0;
            }
        });
    //}

   if ($("#slides").length > 0) {
      $('#slides').nivoSlider({
            effect: 'fade',
            //effect: 'fold,fade,slideInRight,slideInLeft,boxRandom,boxRain,boxRainReverse,boxRainGrow,boxRainGrowReverse',
		animSpeed: 1000, // Slide transition speed
            pauseTime: 5000,
		directionNavHide:false

	});
      var controls = $(".nivo-controlNav").width();
      $(".nivo-controlNav").css("margin-left","-"+(controls/2)+"px");
   }

   // ensure about us page columns are the same height
   var highestCol = Math.max($('.page-menu').height(),$('.page-body').height(),$('.page-image').height(),$('.price-list').height());
   $('.page-menu, .page-body, .page-image').height(highestCol);

   if ($("#bars").length) {
       var highestCol2 = Math.max($('.content').height(),$('.additional-info').height());
       $('.content, .additional-info').height(highestCol2);
   }
   if ($("#gallery").length) {
       var highestCol2 = Math.max($('.page-menu').height(),$('.gallery').height());
       $('.page-menu, .gallery').height(highestCol2);
   }

   // trigger equipment hire categories
   $(".price-cat a").bind("click", function(e) {
        e.preventDefault();
        $(".prices.open").removeClass("open").slideUp();
        $(".price-cat a").removeClass("active");
        $(this).parent().next(".prices").addClass("open").slideToggle();
        $(this).addClass("active");
   });

   if ($(".contact-form.weddings, .contact-form").length) {
       $("#contact-name").DefaultValue('Name');
       $("#contact-email").DefaultValue('Email Address');
       $("#contact-telno").DefaultValue('Telephone / Mobile No');
       $("#contact-address").DefaultValue('Address');
       $("#contact-eventtype").DefaultValue('What type of event are you planning?');
       $("#contact-eventdate").DefaultValue('What date is the event likely to be taking place?');
       $("#contact-eventvenue").DefaultValue('Where is the event likely to be taking place?');
       $("#contact-eventguests").DefaultValue('How many guests are you expecting?');
       $("#contact-eventmenus").DefaultValue('What type of menus are you looking to see?');
       $("#contact-addinfo").DefaultValue('Any further information?');
   }

});

