$(function(){
	$('.navigation li:first').addClass('first');
});

function stopRightClick(e){
	if (!e) e = window.event;

	var rightclick = null;
	//check for right click
	if (e.which) rightclick = (e.which == 3);
	else if (e.button) rightclick = (e.button == 2);

	if(rightclick===false)
		return;

	if($(e.target).is('img')){
		e.cancelBubble = true;
		if (e.stopPropagation)
			e.stopPropagation();
		e.preventDefault();
	}
}

function validFile(fileName, fileTypes){
	fileName = fileName.toLowerCase();
	var parts = fileName.split(".");
	var fileType = "." + parts[parts.length-1];
	return (('.'+fileTypes.join(".")).indexOf(fileType) != -1);
}

function isInt(s){
	return parseInt(s,10)===s;
}

function changeColor(newColor){
	if(!newColor) newColor = '#000';
	$('.wp-ajax-gallery-content').animate({ backgroundColor: newColor }, 800);
//	$('.navigation a').animate({ color: newColor }, 800);
}