/**
 * Calling Locations:
 * /assets/templates/header.php
 */
$(function(){
  //flag for css that javascript is working
  $('body').addClass('js');
});

//use anonymous jQuery call to extend jQuery
(function ($){
  
  /**
   * extend to add log function
   * for debug and error use these patterns

if (window.console && console.debug) console.debug(varname);
if (window.console && console.error) console.error(varname);

   * this will prevent an error from occurring when a console is not open
   */
  $.consoleData = { 'logCount':0 };
  $.log = function ()
  {
    if (window.console && console.log)
    {
      console.log.apply(console, $.merge([$.consoleData.logCount + ': '], arguments));
      $.consoleData.logCount++;
    }
  };
  
  $.datepicker.setDefaults({
    'dateFormat': 'dd-M-yy',
    'hideIfNoPrevNext': true,
    'nextText': '&raquo;',
    'prevText': '&laquo;'
  });
})(jQuery);
