
  // define the values for the bedroom slides :)
  var bedroomsSliderValues = [
    'Studio',
    'Alcove Studio',
    '1 Bed',
    '2 Beds',
    '3 Beds',
    '4 Beds',
    '5 Beds',
    '6 Beds',
    '7 Beds',
    '8 or more'
  ];
  
  // define the values for the prices slides :)
  var pricesSliderValues = [
    '$1000',
    '$1250',
    '$1500',
    '$1750',
    '$2000',
    '$2250',
    '$2500',
    '$2750',
    '$3000',
    '$3250',
    '$3500',
    '$3750',
    '$4000',
    '$4250',
    '$4500',
    '$4750',
    '$5000',
    '$5250',
    '$5500',
    '$5750',
    '$6000',
    '$6250',
    '$6500',
    '$6750',
    '$7000',
    '$7250',
    '$7500',
    '$7750',
    '$8000',
    '$8250',
    '$8500',
    '$8750',
    '$9000',
    '$9250',
    '$9500',
    '$9750',
    '$10,000',
    '$10,500',
    '$11,000',
    '$11,500',
    '$12,000',
    '$12,500',
    '$13,000',
    '$13,500',
    '$14,000',
    '$14,500',
    '$15,000',
    '$15,500',
    '$16,000',
    '$16,500',
    '$17,000',
    '$17,500',
    '$18,000',
    '$18,500',
    '$19,000',
    '$19,500',
    '$20,000',
    'No maximum'
  ];
  
  // define the values for the prices VALUES :)
  var pricesSliderValues2 = [
    '1000',
    '1250',
    '1500',
    '1750',
    '2000',
    '2250',
    '2500',
    '2750',
    '3000',
    '3250',
    '3500',
    '3750',
    '4000',
    '4250',
    '4500',
    '4750',
    '5000',
    '5250',
    '5500',
    '5750',
    '6000',
    '6250',
    '6500',
    '6750',
    '7000',
    '7250',
    '7500',
    '7750',
    '8000',
    '8250',
    '8500',
    '8750',
    '9000',
    '9250',
    '9500',
    '9750',
    '10000',
    '10500',
    '11000',
    '11500',
    '12000',
    '12500',
    '13000',
    '13500',
    '14000',
    '14500',
    '15000',
    '15500',
    '16000',
    '16500',
    '17000',
    '17500',
    '18000',
    '18500',
    '19000',
    '19500',
    '20000',
    '0'
  ];
  
  // define the values for the prices slides :)
  var pricesSliderValues3 = [
    '$250,000',
    '$300,000',
    '$350,000',
    '$400,000',
    '$450,000',
    '$500,000',
    '$550,000',
    '$600,000',
    '$650,000',
    '$700,000',
    '$750,000',
    '$800,000',
    '$850,000',
    '$900,000',
    '$950,000',
    '$1,000,000',
    '$1,050,000',
    '$1,100,000',
    '$1,150,000',
    '$1,200,000',
    '$1,250,000',
    '$1,300,000',
    '$1,350,000',
    '$1,400,000',
    '$1,450,000',
    'No maximum'
  ];
  
  // define the values for the prices VALUES :)
  var pricesSliderValues4 = [
    '250000',
    '300000',
    '350000',
    '400000',
    '450000',
    '500000',
    '550000',
    '600000',
    '650000',
    '700000',
    '750000',
    '800000',
    '850000',
    '900000',
    '950000',
    '1050000',
    '1100000',
    '1150000',
    '1200000',
    '1250000',
    '1300000',
    '1350000',
    '1400000',
    '1450000',
    '0'
  ];
  
  $(document).ready( function() {
    
    // init the marquee functionality, with the events in it :)
    $('#marqueeDiv').marquee().mouseover( function () {
        $(this).trigger('stop');
    } ).mouseout( function () {
        $(this).trigger('start');
    } ).mousemove( function (event) {
      if ($(this).data('drag') == true) {
        this.scrollLeft = $(this).data('scrollX') + ($(this).data('x') - event.clientX);
      }
    } );
    
    /*
    // define the clicks functionslity on the top menu :)
    $('#colTwoBody ul li a').click( function() {
      var number = this.id.substring( 12 );
      $('.colTwoBodyContent').css( 'display', 'none' );
      $('#colTwoBodyContent' + number).css( 'display', 'block' );
      $('#colTwoBody ul li a').css( 'color', '#8E8FA3' );
      $('#bigimagelink'+number).css( 'color', '#020129' );
    });
    */
    
    // define the clicks functionslity on the bottom menu :)
    $('#colTwoSubBody ul li a').click( function() {
      var string = this.id.substring( 19 );
      $('#colTwoSubBody ul li a').removeClass( 'current' );
      $('#coltwosubbody_link_'+string).addClass( 'current' );
      $('.colTwoSubBodyContent').css( 'display', 'none' );
      $('#' + string + '_div').css( 'display', 'block' );
    });
    
    // define the clicks that change the background of the form :)
    $('#colOneBody ul li a').click( function() {
      var type = this.id.substring( 10 );
      if( type == 'rent' ) {
        $('#colOneBody').addClass( 'colOneBody1' );
        $('#colOneBody').removeClass( 'colOneBody' );
				$('#searchType').val(2);
				$('.rentalPrices').show();
				$('.salesPrices').hide();
      } else {
        $('#colOneBody').addClass( 'colOneBody' );
        $('#colOneBody').removeClass( 'colOneBody1' );
				$('#searchType').val(1);
				$('.rentalPrices').hide();
				$('.salesPrices').show();
      }
    } );
    
    // init the prices slider functionality :)
    $('#slider1').slider( {
			range:true,
      min:0,
			max:510,
 			values:[0,510],
      slide: function( event, ui ) {
				var keyOfPricesValues1 = Math.round( ui.values[0] / 9 );
				var keyOfPricesValues2 = Math.round( ui.values[1] / 9 );
					$('#prices_values_div1').html( pricesSliderValues[ keyOfPricesValues1 ] );
					$('#prices_values_div2').html( pricesSliderValues[ keyOfPricesValues2 ] );
					$('#priceRange_MIN').val(pricesSliderValues2[ keyOfPricesValues1 ] );
					$('#priceRange_MAX').val(pricesSliderValues2[ keyOfPricesValues2 ] );
      },
      animate: true
    } );
    
    // init the prices slider functionality :)
    $('#slider3').slider( {
			range:true,
      min:0,
			max:230,
 			values:[0,230],
      slide: function( event, ui ) {
				var keyOfPricesValues1 = Math.round( ui.values[0] / 9 );
				var keyOfPricesValues2 = Math.round( ui.values[1] / 9 );
				
					$('#prices_values_div3').html( pricesSliderValues3[ keyOfPricesValues1 ] );
					$('#prices_values_div4').html( pricesSliderValues3[ keyOfPricesValues2 ] );
					$('#priceRange_MIN2').val(pricesSliderValues4[ keyOfPricesValues1 ] );
					$('#priceRange_MAX2').val(pricesSliderValues4[ keyOfPricesValues2 ] );
				
      },
      animate: true
    } );
    
    // init the bedrooms slider functionality :)
    $('#slider2').slider( {
			range:true,
      min:0,
			max:100,
 			values:[0,100],
      slide: function( event, ui ) {
        var keyOfBedroomsValues1 = Math.round( ui.values[0] / 11 );
        var keyOfBedroomsValues2 = Math.round( ui.values[1] / 11 );
        $('#bedrooms_values_div1').html( bedroomsSliderValues[ keyOfBedroomsValues1 ] );
        $('#bedrooms_values_div2').html( bedroomsSliderValues[ keyOfBedroomsValues2 ] );
				$('#beds_MIN').val(bedroomsSliderValues[ keyOfBedroomsValues1 ] );
				$('#beds_MAX').val(bedroomsSliderValues[ keyOfBedroomsValues2 ] );
      },
      animate: true
    });
    
  } );
  

