///**
// * Created by Artem Krachulov
// */
//
//    $(function(){
//
//        // fadeIn interval
//        setInterval(loop, 5000);
//
//        // var
//        var numLow = 2;
//        var numHigh = $('.model-row').length;
//        var height = $('.model-row').outerHeight();
//        var tempdiv_height = height;
//
//        // add new styles to #tempdiv
//        $('#tempdiv').css({
//            'overflow' : 'hidden' ,
//            'position' : 'relative',
//            'height': '80px',
//			//'width': '650px',
//        });
//
//        // wrap each .model-row
//        $('.model-row').wrap('<div class="show-model"></div>');
//
//        // main loop function
//        function loop () {
//            random_number ();
//
//            var rand = $("#tempdiv").attr('number');
//
//            $('.show-model').eq(0).before("<div class='show-model'></div>");
//            var content = $('.show-model').eq(rand).html();
//                $('.show-model').eq(0).animate({height:height},function(){
//                    $(this).css({'opacity': 0}).append(content).animate({opacity: 1},500);
//                    $('.show-model').eq(rand).remove();
//                });
//        }
//
//        // random numbers validation function
//        function IsNumeric(n){
//            return !isNaN(n);
//        }
//        // generate random numbers function
//        function random_number (){
//                var adjustedHigh = (parseFloat(numHigh) - parseFloat(numLow)) + 1;
//                var numRand = Math.floor(Math.random()*adjustedHigh) + parseFloat(numLow);
//
//                if ((IsNumeric(numLow)) && (IsNumeric(numHigh)) && (parseFloat(numLow) <= parseFloat(numHigh)) && (numLow != '') && (numHigh != '')) {
//                    $("#tempdiv").attr('number',numRand);
//                } else {
//                    $("#tempdiv").attr('number',numRand);
//                }
//                return false;
//        }
//    });
//    
