//Chosen Select
$(".chosen-select").chosen();
//End Chosen Select

$(document).ready(function(){

  //Areas de Texto
  tinymce.init({
      selector: ".IncEditor",
      theme: "modern",
      height: 300,
      force_br_newlines : true,
      force_p_newlines : false,
      forced_root_block : '',
      plugins: "paste",
      paste_as_text: true,
      plugins: [
          "advlist autolink link image lists charmap print preview hr anchor pagebreak spellchecker",
          "searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking",
          "save table contextmenu directionality emoticons template paste textcolor"
      ],
      toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | l      ink image | print preview media fullpage | forecolor backcolor emoticons",
  });
  //End Areas de Texto

  $(window).resize(function(){

    //Ajusta Boxes
      Ancho = $( ".BoxA" ).width();
      Ancho = Ancho * .5;
      $(".BoxA").css("height", Ancho);
    //End Ajusta Boxes

    AnchoScreen = $( window ).width();
    if( $( 'body' ).hasClass( "mini-sidebar" ) ){
      Ancho = AnchoScreen - 91;
    }else{
      Ancho = AnchoScreen - 271;
    }
    console.log(Ancho);
    $('.page-titles-fixed').width(Ancho);

  }).resize();

});
