/*
 * 
 * 
 * responsive Order
 *
 *
 */


//	Response.create({ mode: 'markup', prefix: 'r', breakpoints: [0,320,481,641,961,1025,1281] });

var responsive = {
		
  init: function () { 
		var $body = $('body');
 		
    var asideLeft = $body.find("aside").first();

    if (asideLeft.length) {
      changeOrder();
      $(window).resize(function() {
        changeOrder();
      });
    }
		
    function changeOrder() {
		
      if (Response.band(0,680) ) {
        if($body.find("aside").first()) {
          $body.prepend($body.find("section"));
        }
      }	
      if (Response.band(681) ) {
        if($body.find("section").first()) {
          $body.prepend($body.find("aside"));
        }
      }	
    }    
	}
}

$(document).ready(responsive.init);
