/**
 * Javascript: Scripts
 *
 * Rapid Javascript development.
 *
 * @package WP Framework
 * @subpackage JS
 */

;(function($){

/* CALCULATE 'MAIN-INNER' HEIGHT TO SET UP SPIRAL NOTEBOOK TILING GRAPHIC */

	// use window.load instead of doc to wait for images
	$(window).load(function($){

			// store main-inner height as var
      var dh = jQuery('#main-inner').height();

      // divide dh by 27 create var (27 = height of the spiral background tile)
      var dhd = dh / 27;

      // rounds result to the nearest integer
      var dhdn = Math.ceil(dhd);

      // set heights to make spiral notebook tile fit
      jQuery('#main-inner, #main-inner-inner').height(dhdn * 27 - 10);

	});

})(jQuery);

