/*  ==============================================================
    Utils Object
    ============================================================== */

var Utils = new Object();

Utils.extLinks = function(docReady) {
  if(docReady==true) {
  $(document).ready(function(){
    $('a.blank').click(function(e){
      e.preventDefault();
      window.open(this.href);
    });
  });
  } else {
    $('a.blank').click(function(e){
      e.preventDefault();
      window.open(this.href);
    });
  }
};

Utils.getScripts = function(str) {
  var scriptArr = str.split(' ');
  for(var i=0; i<scriptArr.length; i++) {
    $.getScript(scriptArr[i]);
  }
};

Utils.getCss = function(str) {
  var cssArr = str.split(' ');
  for(var i=0; i<cssArr.length; i++) {
    var myCss = document.createElement('link');
    myCss.rel = 'stylesheet';
    myCss.type = 'text/css';
    myCss.href = cssArr[i];
    document.getElementsByTagName('head')[0].appendChild(myCss);
  }
};


/*  ==============================================================
    New jQeury functions
    ============================================================== */
 
$.getDocHeight = function(){
  return Math.max(
    $(document).height(),
    $(window).height(),
    document.documentElement.clientHeight
  );
};


/*  ==============================================================
    New native prototypes
    ============================================================== */

String.prototype.isNotEmpty = function(){
  if(this==null || this=='') {
    return false;
  } else {
    return true;
  }
};

