// JavaScript Document

$(document).ready(function(){ 
   
   $("#work input").click(function() 
    { 
        if ($(this).val() == "commercial") {
				$("#company").show(); 
				$("#type").show();
		} else if ($(this).val() == "residential") {
				$("#type").show();
				$("#company").hide(); 
		}
	});
   
   $("#type input").click(function() 
    { 
        if ($(this).val() == "carpet") {
				$("#details").show(); 
				$("#carpets").show();
				$("#contact_info").show();
				$("#upholstery").hide();
				$("#mattress").hide();
		} else if ($(this).val() == "upholstery") {
				$("#details").show();
				$("#upholstery").show();
				$("#contact_info").show();
				$("#carpets").hide();
				$("#mattress").hide();
		} else if ($(this).val() == "mattress") {
				$("#details").show();
				$("#mattress").show();
				$("#contact_info").show();
				$("#carpets").hide();
				$("#upholstery").hide();
		} else if ($(this).val() == "carpet_upholstery_mattress") {
				$("#details").show();
				$("#upholstery").show();
				$("#contact_info").show();
				$("#carpets").show();
				$("#mattress").show();
		}
	});
   
   /*	$("a.group").fancybox({
		'zoomSpeedIn':	300, 
		'zoomSpeedOut':	300, 
		'overlayShow':	false
	}); */
	
  $('ul.sf-menu').superfish();
    	
	if($('#banners').length > 0){
    	$('#banner-wrap').crossSlide(
    	{
        sleep: 8,
        fade: 1
      },[
          { src: 'images/content/banner-07.jpg' },
          { src: 'images/content/banner-01.jpg' },
          { src: 'images/content/banner-02.jpg'   },
          { src: 'images/content/banner-03.jpg'  },
          { src: 'images/content/banner-04.jpg' },
          { src: 'images/content/banner-05.jpg' },
          { src: 'images/content/banner-06.jpg' }
        ]);
    };
    
   $("a#single_image").fancybox();
   
   $("a.grouped_elements").fancybox({
    'titlePosition' : 'over',
    'titleFormat' : function(title, currentArray, currentIndex, currentOpts) {
      return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + '</span>';} 
   });
   
   var params ={
    wmode:"opaque",
    menu:"false"
   };
   
   swfobject.embedSWF("/images/content/6_steps_v2.swf", "flash-div", "344", "433", "9.0.0", "js/expressInstall.swf", false, params);
  
   swfobject.embedSWF("/images/content/animated-van.swf", "van-flash-div", "290", "160", "9.0.0", "js/expressInstall.swf", false, params);

  var testimonialArray = [];
  

  testimonialArray.push('Bensons Cleaning has been working for LJ Hooker Kensington for over three years now. We have always found them to be extremely reliable and professional with an outstanding final product in both carpet cleaning and also general cleaning. We strongly recommend their business for work required in their field <br /><i>- LJ Hooker Kensington</i>');

  testimonialArray.push('I have used Scott Hermsen from Bensons Cleaning Services regularly to clean both our Business premises and investment properties. I have always found him courteous, efficient and reliable and without fail, does an excellent job. I would have no hesitation in recommending him to any prospective customer. <br /><i>- Smart Money Financial Services</i>');
  
  testimonialArray.push('Great service is hard to come by these days so I would like to congratulate Bensons Cleaning Services on providing us with the most exceptional service. They are always professional, reliable and very thorough and our expectations are always met. I am very happy to recommend their services to any prospective customer.<br /><i>- Marina Dearsley - Practice Manager, Orthopaedics SA</i>');
  
  testimonialArray.push('Scott Hermsen has cleaned our somewhat worn and shabby carpets in readiness to sell our home. He has brought new life to them and is both professional and thorough in his work. I can highly recommend him.<br /><i>- Elspeth Cooper</i>');
  
  testimonialArray.push('Hi Scott, Just wanted to say thanks for the great job you did on my carpet on Friday morning. I was absolutely stoked when I got home on Friday after work, the lounge room came up great and I&#39;m really happy with the stairs. I would be happy to recommend your services to others, and will make sure I contact you when I need future work done at my place.<br /><i>- Andrea Chamberlain</i>');
  
  testimonialArray.push('Thanks Scott, the carpets look great!!!! You are the master stain remover. <br /><i>- Jessica Rendell  - Assistant Manager, Cruiseabout</i>');
  
  testimonialArray.push('Bensons Carpet Cleaning did my carpets in my city house. we had lots of stains / marks and had an inspection coming up! scott came around and gave the carpets the best clean they have ever had. they looked brand new!!! I was stoked! I would recommend bensons to anyone for both there Quality carpet cleaning service and also there competitive prices!<br/><i>DJ Dan</i>');
  
  testimonialArray.push('Bensons have been providing carpet cleaning to one of our clients in South Australia for the last two years and the feedback from the client has always been very positive.  They are very happy with the service and the standard of cleaning and will definitely continue to use Bensons.<br/><i>Kelly Thistlewaite, Bayton Group</i>');
  
  testimonialArray.push('Hi Scott, meant to thank you sooner, fantastic job on the carpet cleaning and tiles, grout came up like new - saved me a few weekends scrubbing!!<br/><i>Damian</i>');
    
  if($('#testimonial-block').length > 0){
  
    setInterval(function()
                  {
                    $('#testimonial-block').fadeOut("slow",
                      function()
                        {
                          
                          $(this).html(testimonialArray[Math.floor(Math.random()*(testimonialArray.length))]);
                          $('#testimonial-block').fadeIn("slow");
                        });
                
                  }, 5000);
    
  }
  
  

 
});
