var Global = {

	init: function() {
		Global.activateBtns();
		$("#gcalwrap").hide();
	},

	activateBtns: function() {
		$("a#gcalbtn").bind("click", function() {
			Global.popinGcal();
		});
	},

	popinGcal: function() {
		$("#gcalwrap").append('<div style="width:100%;text-align:right;"><img alt="Stäng" style="cursor:pointer;" src="http://www.svenshog.burlov.se/images/closebtn.jpg" id="gcalclosebtn" /></div>');
		$("img#gcalclosebtn").bind("click", function() {
			Global.closeGcal();
		});
		$.ajax({
		  url: "gcal.html",
		  cache: false,
		  success: function(html){
		    $("#gcalwrap").append(html);
		  }
		});
		$("#gcalwrap").show(500);
		//$("#contentsBoxTitle").fadeTo("fast", 0.10);
		//$("#contentsBox_Wrap").animate({ width: 'hide' });
		//$("#btnSlideIn").show(500);
	},
	closeGcal: function() {
		$("#gcalwrap").html("");
		$("img#gcalclosebtn").unbind("click");
		$("#gcalwrap").hide(500);
	},

/*
	slideOut: function() {
		$("#contentsBoxTitle").fadeTo("fast", 0.10);
		$("#contentsBox_Wrap").animate({ width: 'hide' });
		$("#btnSlideIn").show(500);
	},

	slideIn: function() {
		$("#contentsBox_Wrap").animate({ width: 'show' });
		$("#btnSlideIn").hide(100);
		$("#contentsBoxTitle").fadeTo(2000, 1.00);
	},
	
	slideIn: function() {
		$("#contentsBox_Wrap").animate({ width: 'show' });
		$("#btnSlideIn").hide(100);
		$("#contentsBoxTitle").fadeTo(2000, 1.00);
	},
*/	
	roll: function() {
		
	}
}

$(document).ready(function(){
	Global.init();
});

function pop(url) {
	window.open(url, "Ext", "width=680, height=480, location=no, menubar=no, resizable=no, scrollbars=1, status=0, titlebar=0, toolbar=0");
}
