$(document).ready(function() {
	
	$('#blog-insert').click(function(e) {
		e.preventDefault();
		var pid = $(this).attr("rel");
		$.fn.colorbox({opacity: 0.8, href:"manageblog.php", overlayClose:false, close:"", width:"600px", height:"565px", iframe:true});
	});
	
	$('.editblogbtn').click(function() {
		var pid = $(this).attr("rel");
		$.fn.colorbox({opacity: 0.8, href:"manageblog.php?pid="+pid, overlayClose:false, close:"", width:"600px", height:"600px", iframe:true});
	});
	
	$('.delblogbtn').click(function() {
		var pid = $(this).attr("rel");
		if(confirm('Click OK to delete this Blog Post\n\nWARNING: This cannot be undone')) {
			window.location = 'dashboard.html?my-blog&delete-post='+pid;
		}
	});
	
	$('#gallery-upload').click(function(e) {
		e.preventDefault();
		var pid = $(this).attr("rel");
		$.fn.colorbox({opacity: 0.8, href:"managegallery.php", overlayClose:false, close:"", width:"600px", height:"410px", iframe:true});
	});
	
	$("a[rel='drivergallery']").colorbox();
	
	$("#motivational-messages").marquee({
		showSpeed: 850,
		scrollSpeed: 1,
		fxEasingShow: "swing",
		fxEasingScroll: "linear"
	}); 

	$("#testimonial-messages").marquee({
	}); 

	$(".thumbpop").colorbox({transition:"fade"});
	
});
