/*
 * Teleporter v1.0
 * jQuery-Based Squarespace (V5) Extension
 *
 * Copyright (c) 2011 Nollind Whachell
 * Licensed under the CC-GNU LGPL licence.
 * http://creativecommons.org/licenses/LGPL/2.1/
 *
 * Date: 24 June 2011
 */


$(document).ready(function() {

$('.canvas-top:visible').parents('.sectionWrapper').removeClass('structure-draggable-element');
$('.canvas-top:visible').parents('.sectionWrapper').prependTo(('#canvas'));
$('.canvas-bottom:visible').parents('.sectionWrapper').removeClass('structure-draggable-element');
$('.canvas-bottom:visible').parents('.sectionWrapper').appendTo($('#canvas'));
$('.header-top:visible').parents('.sectionWrapper').removeClass('structure-draggable-element');
$('.header-top:visible').parents('.sectionWrapper').prependTo(('#pageHeader'));
$('.header-bottom:visible').parents('.sectionWrapper').removeClass('structure-draggable-element');
$('.header-bottom:visible').parents('.sectionWrapper').appendTo($('#pageHeader'));
$('.body-top-two:visible').parents('.sectionWrapper').removeClass('structure-draggable-element');
$('.body-top-two:visible').parents('.sectionWrapper').insertAfter('#sidebar1Wrapper');
$('.body-top:visible').parents('.sectionWrapper').removeClass('structure-draggable-element');
$('.body-top:visible').parents('.sectionWrapper').insertBefore('#sidebar1Wrapper');
$('.content-top:visible').parents('.sectionWrapper').removeClass('structure-draggable-element');
$('.content-top:visible').parents('.sectionWrapper').prependTo($('#content'));
$('.content-bottom:visible').parents('.sectionWrapper').removeClass('structure-draggable-element');
$('.content-bottom:visible').parents('.sectionWrapper').appendTo($('#content'));
$('.footer-top:visible').parents('.sectionWrapper').removeClass('structure-draggable-element');
$('.footer-top:visible').parents('.sectionWrapper').prependTo($('#pageFooter'));
$('.footer-bottom:visible').parents('.sectionWrapper').removeClass('structure-draggable-element');
$('.footer-bottom:visible').parents('.sectionWrapper').appendTo($('#pageFooter'));
$('.entry-insert:visible').parents('.sectionWrapper').removeClass('structure-draggable-element');
$('.entry-insert:visible').parents('.sectionWrapper').prependTo($('.journal-comment-area-wrapper'));
$('.verticalNavigationBar .entry-insert:visible').parents('.sectionWrapper').hide();

$('.prebody1-insert').parents('.sectionWrapper').removeClass('structure-draggable-element');
$('.prebody1-insert').parents('.sectionWrapper').prependTo($('#prebody1'));
$('.prebody2-insert').parents('.sectionWrapper').removeClass('structure-draggable-element');
$('.prebody2-insert').parents('.sectionWrapper').prependTo($('#prebody2'));
$('.prebody3-insert').parents('.sectionWrapper').removeClass('structure-draggable-element');
$('.prebody3-insert').parents('.sectionWrapper').prependTo($('#prebody3'));
$('.prebody4-insert').parents('.sectionWrapper').removeClass('structure-draggable-element');
$('.prebody4-insert').parents('.sectionWrapper').prependTo($('#prebody4'));
$('.prebody5-insert').parents('.sectionWrapper').removeClass('structure-draggable-element');
$('.prebody5-insert').parents('.sectionWrapper').prependTo($('#prebody5'));
$('.prebody6-insert').parents('.sectionWrapper').removeClass('structure-draggable-element');
$('.prebody6-insert').parents('.sectionWrapper').prependTo($('#prebody6'));
$('.prebody7-insert').parents('.sectionWrapper').removeClass('structure-draggable-element');
$('.prebody7-insert').parents('.sectionWrapper').prependTo($('#prebody7'));
$('.prebody8-insert').parents('.sectionWrapper').removeClass('structure-draggable-element');
$('.prebody8-insert').parents('.sectionWrapper').prependTo($('#prebody8'));
$('.prebody9-insert').parents('.sectionWrapper').removeClass('structure-draggable-element');
$('.prebody9-insert').parents('.sectionWrapper').prependTo($('#prebody9'));

$('.contentbody1-insert').parents('.sectionWrapper').removeClass('structure-draggable-element');
$('.contentbody1-insert').parents('.sectionWrapper').prependTo($('#contentbody1'));
$('.contentbody2-insert').parents('.sectionWrapper').removeClass('structure-draggable-element');
$('.contentbody2-insert').parents('.sectionWrapper').prependTo($('#contentbody2'));
$('.contentbody3-insert').parents('.sectionWrapper').removeClass('structure-draggable-element');
$('.contentbody3-insert').parents('.sectionWrapper').prependTo($('#contentbody3'));
$('.contentbody4-insert').parents('.sectionWrapper').removeClass('structure-draggable-element');
$('.contentbody4-insert').parents('.sectionWrapper').prependTo($('#contentbody4'));
$('.contentbody5-insert').parents('.sectionWrapper').removeClass('structure-draggable-element');
$('.contentbody5-insert').parents('.sectionWrapper').prependTo($('#contentbody5'));
$('.contentbody6-insert').parents('.sectionWrapper').removeClass('structure-draggable-element');
$('.contentbody6-insert').parents('.sectionWrapper').prependTo($('#contentbody6'));
$('.contentbody7-insert').parents('.sectionWrapper').removeClass('structure-draggable-element');
$('.contentbody7-insert').parents('.sectionWrapper').prependTo($('#contentbody7'));
$('.contentbody8-insert').parents('.sectionWrapper').removeClass('structure-draggable-element');
$('.contentbody8-insert').parents('.sectionWrapper').prependTo($('#contentbody8'));
$('.contentbody9-insert').parents('.sectionWrapper').removeClass('structure-draggable-element');
$('.contentbody9-insert').parents('.sectionWrapper').prependTo($('#contentbody9'));

$('.postbody1-insert').parents('.sectionWrapper').removeClass('structure-draggable-element');
$('.postbody1-insert').parents('.sectionWrapper').prependTo($('#postbody1'));
$('.postbody2-insert').parents('.sectionWrapper').removeClass('structure-draggable-element');
$('.postbody2-insert').parents('.sectionWrapper').prependTo($('#postbody2'));
$('.postbody3-insert').parents('.sectionWrapper').removeClass('structure-draggable-element');
$('.postbody3-insert').parents('.sectionWrapper').prependTo($('#postbody3'));
$('.postbody4-insert').parents('.sectionWrapper').removeClass('structure-draggable-element');
$('.postbody4-insert').parents('.sectionWrapper').prependTo($('#postbody4'));
$('.postbody5-insert').parents('.sectionWrapper').removeClass('structure-draggable-element');
$('.postbody5-insert').parents('.sectionWrapper').prependTo($('#postbody5'));
$('.postbody6-insert').parents('.sectionWrapper').removeClass('structure-draggable-element');
$('.postbody6-insert').parents('.sectionWrapper').prependTo($('#postbody6'));
$('.postbody7-insert').parents('.sectionWrapper').removeClass('structure-draggable-element');
$('.postbody7-insert').parents('.sectionWrapper').prependTo($('#postbody7'));
$('.postbody8-insert').parents('.sectionWrapper').removeClass('structure-draggable-element');
$('.postbody8-insert').parents('.sectionWrapper').prependTo($('#postbody8'));
$('.postbody9-insert').parents('.sectionWrapper').removeClass('structure-draggable-element');
$('.postbody9-insert').parents('.sectionWrapper').prependTo($('#postbody9'));

});

