var catView = 0;

function startUp() {
}

function dimDown(dv) {
	$(dv).fadeTo(100,0.6);
}
function dimUp(dv) {
	$(dv).fadeTo(200,1.0);
}
function portfolio(cat) {
	catView = cat;
	$("#content").animate({
		"opacity": 0.0 }, 300, "swing", function() {
			$.ajax({
				url: 'portfolio.php',
				type: 'POST',
				data: "cat="+cat,
				error: function() {
					alert('AJAX error!!!');
				},
				success: function(html) {
					$("#content").html(html);
					$("#content").animate({ "opacity": 1.0 }, 300, "swing");
				}
			})
		});
}
function showImage(file) {
	$("#fullImg").animate({
		"opacity": 0.0 }, 300, "swing", function() {
			$.ajax({
				url: 'view.php',
				type: 'POST',
				data: "file="+file+'&cat='+catView,
				error: function() {
					alert('AJAX error!!!');
				},
				success: function(html) {
					$("#fullImg").html(html);
					$("#fullImg").animate({ "opacity": 1.0 }, 300, "swing");
				}
			})
		});
}
function showMovie(file) {
	$("#moviePrv").animate({
		"opacity": 0.0 }, 300, "swing", function() {
			$.ajax({
				url: 'movies.php',
				type: 'POST',
				data: "file="+file,
				error: function() {
					alert('AJAX error!!!');
				},
				success: function(html) {
					$("#moviePrv").html(html);
					$("#moviePrv").animate({ "opacity": 1.0 }, 300, "swing");
				}
			})
		});
}
function newWindow(mypage,w,h) {
	winprops = "'toolbar=no,location=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width="+w+",height="+h+"'";
	window.open(mypage,'',winprops);
}
