﻿
$(document).ready(function () {

    $('.apartViewTxt').each(function () {

        //If there is no header then we set specific height on the container
        var s = $(this).find('h1 a');
        if (s.length == 0) {
            $(this).children('.viewTxt').css('margin-bottom', '10px');
            $(this).css('height', '90px');
            $(this).css('min-height', '90px');
        }

        //TODO: If long strings are allowed (> approx 13 characters) then a regular expression is required
        //to find any words greater than the allowed length. If there are some then a width: auto will need to be
        //set on the '.apartViewTxt'

//        else {
//            var alphaExp = /^[a-zA-Z]+$/;

//            if (match(alphaExp)) {
//                //Do something 
//            } else {
//                //Do something else
//            }
//        }
    });

    $('#loopedSlider').loopedSlider({
        autoStart: 8000,
        slides: '.slides-small',
        pagination: 'small-pagin',
        slidespeed: 500,
        restart: 2000,
        slidesWidth: 630,
        addPagination: false
    });
});
	


