$.fn.toggleSlide = function(s){
	return this.each(function(){
		var d = $.css(this,"display");
		if ( d == "none" || d == '' )
			$(this).slideDown(s);
		else
			$(this).slideUp(s);
	});
}

$.fn.toggleFade = function(s){
	return this.each(function(){
		var d = $.css(this,"display");
		if ( d == "none" || d == '' )
			$(this).fadeIn(s);
		else
			$(this).fadeOut(s);
	});
}

function basename (path) { return path.replace( /.*\//, "" ); }
var winimg=null;

function ps_imagemanager_popup(imgurl,title,w,h) {
	lpos=(screen.width)?(screen.width-w)/2:100;
	tpos=(screen.height)?(screen.height-h)/2:100;
	settings='width='+w+',height='+h+',top='+tpos+',left='+lpos+',scrollbars=no,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes';
	winimg=window.open('about:blank','imagemanagerpopup',settings);
	var doc = '';
	doc += '<html><head>';
	doc += '<title>' + title + ' - ' + basename(imgurl) + '(' + w + 'x' + h +')</title>';
	doc += '<style type="text/css"><!-- body { margin:0px; padding:0px; } --></style>';
	doc += '</head>';
	doc += '<body onload="self.focus();">';
	doc += '<img style="cursor:pointer;" src="' + imgurl + '" title="' + title + '" onclick="self.close();"/>';
	doc += '</body></html>';
	
	winimg.document.writeln(doc);
	winimg.document.close();
}	

function init_item_fix(){
	$("#items a:contains('linkmore')").remove();
}

$(document).ready(function(){
	init_item_fix();
});