

	$(document).ready(function() {

			// insert top Flash

			var so = new SWFObject("images/layout/island.swf", "topflashen", 620, 280, "7", "#000");

			so.addParam("wmode","transparent");

			so.write("topflash");

			// init menu hover

			navHover();



			// insert Barrel Flash

			var so2 = new SWFObject("images/layout/barrel.swf", "barrelflash", 150, 280, "7", "#000");

			so2.addParam("wmode","transparent");

			so2.write("barrelflash");

			// init menu hover



			// insert Beachbreak Flash

			var so3 = new SWFObject("images/layout/beachbreak.swf", "beachbreakflash", 1024, 182, "7", "#000");

			so3.addParam("wmode","transparent");

			so3.write("beachbreakflash");

			// init menu hover



	});



	function navHover(){

		$("#menu li:not(.current):has(ul)")

			.hover(function () {

					$("#menu li.current ul").css("left","-5000px");

					$(this).find("ul").css("left","-5px");

				  

				}, function () {

					$(this).find("ul").css("left","-5000px");

					$("#menu li.current ul").css("left","-5px");

				});

	}

	

	$(document).ready(function(){

			$('#main_col #paragraphs').sortable({

				axis:"y",

				tolerance:"intersect",

				handle: $('div.handlebar'),

				update: function() {

						$.post("ajax_sort.php", $('#main_col #paragraphs').sortable("serialize", {attribute:"class"}));

				}

			});

	});



	$(document).ready(function(){

			$('#right_col #paragraphs').sortable({

				axis:"y",

				tolerance:"intersect",

				handle: $('div.handlebar'),

				update: function() {

						$.post("ajax_sort.php", $('#right_col #paragraphs').sortable("serialize", {attribute:"class"}));

				}

			});

	});





	

	function saveSorted(listorder) {

	

		var serial2 = [];

		$('paragraphs').getChildren().each(function(element, i){

				serial2[i] = element.getProperty('class').replace('pid_','');

			});

		var myAjax = new Ajax('ajax_sort.php?p_sort_ids='+serial2, {method: 'get'});

		myAjax.request();

	}	