      <div class="mob">
        <h3>Dicas</h3>


<?php

$i = 0;



if(isset($id_cidade)){


$sel_noti = mysql_query("SELECT * FROM noticias WHERE id_cidade='$id_cidade' ORDER BY destaque DESC, rand() LIMIT 3");


}else{

  $sel_noti = mysql_query("SELECT * FROM noticias WHERE nacional=1  ORDER BY destaque DESC, rand() LIMIT 3");


}


?>


        <div class="dicas">
          <div class="row">
            <?php
            while($not = mysql_fetch_assoc($sel_noti)){

            ?>

            <div class="col-xs-12 col-sm-4 col-md-4 col-lg-4">
              <div class="box animate">
                <a href="<?php echo sti("urlbase") ?>dica/<?php echo $not['slug'];  ?>"><img class="img-responsive" src="<?php echo sti("urlbase");  ?>assets/uploads/noticias/<?php echo $not['imagem'];  ?>" alt="<?php echo $not['titulo_pt'];  ?>"/></a>
                <h4><a href="<?php echo sti("urlbase") ?>dica/<?php echo $not['slug'];  ?>"><?php echo $not['titulo_pt'];  ?></a></h4>
              </div>
            </div>

            <?php  $i++; } 


            if($i<3){


              $tot = 3 - $i;



              if(isset($id_cidade)){

$sel_noti = mysql_query("SELECT * FROM noticias WHERE id_cidade!='$id_cidade' AND nacional=1 ORDER BY rand() LIMIT $tot");


}else{

  $sel_noti = mysql_query("SELECT * FROM noticias WHERE nacional=1 ORDER BY rand() LIMIT $tot");


}



               while($not = mysql_fetch_assoc($sel_noti)){

            ?>
            <div class="col-xs-12 col-sm-4 col-md-4 col-lg-4">
              <div class="box animate">
                <a href="<?php echo sti("urlbase") ?>dica/<?php echo $not['slug'];  ?>"><img class="img-responsive" src="<?php echo sti("urlbase");  ?>assets/uploads/noticias/<?php echo $not['imagem'];  ?>" alt="<?php echo $not['titulo_pt'];  ?>"/></a>
                <h4><a href="<?php echo sti("urlbase") ?>dica/<?php echo $not['slug'];  ?>"><?php echo $not['titulo_pt'];  ?></a></h4>
              </div>
            </div>

            <?php  }}  ?>

          </div>
        </div>
        </div>