$(function(){

// scroll top

	$('.pagetop a').click(function() {
			$(this).blur();
			$('html ,body').animate({ scrollTop: 0 }, 'slow');
			return false;
	});
	
// pattern on
	$('#pattern li p.photo a').mouseover(function(){
			$(this).parent().parent().addClass('on');
	});
	$('#pattern li p.photo a').mouseout(function(){
			$(this).parent().parent().removeClass('on');
	});

});

// popup
function openWindow(theURL, width, height, features, winName) { //v2.0
	if(typeof(width) == "undefined" || width == 0){
		width = 500;
	}
	
	if(typeof(height) == "undefined" || height == 0){
		height = 500;
	}
	
	if(typeof(features) == "undefined" || features == ""){
		features = "status=yes,menubar=no,scrollbars=yes,resizable=no";
	}
	
	features = features + ', width = ' + width + ', height = ' + height;
  window.open(theURL,winName,features);
}

function MM_openBrWindow(theURL, winName, features){
	openWindow(theURL, '', '', features, winName);
}
