$(document).ready(function(){
	$('.valign-middle').each(function(z){
		var contChannelHeight = $(this).parent().height();
		var elPHeight = $(this).height();
		var marginTop = Math.round((contChannelHeight - elPHeight) / 2);
		$(this).css({marginTop : marginTop});
	});
	
	$('.inputEnterPress').each(function(z){
		var elThis = $(this);
		var elId = $(elThis).attr('rel');
		var elTigger = $(elThis).attr('rev');
		
		$(this).keypress(function (e) {
			if(elId && elId != '' && elTigger && elTigger != ''){
				if (e.which == 13) {
					$('#' + elId).trigger(elTigger);
				}
			}
		});
	});
	
	$('a.setup_comment').click(function(){
		
		var width = 600;
	    var height = 480;
	    var left = parseInt((screen.availWidth/2) - (width/2));
	    var top = parseInt((screen.availHeight/2) - (height/2));
	    var windowFeatures = "resizable=yes,menubar=no,status=no,scrollbars=yes,titlebar=no,width=" + width + ",height=" + height + ",left=" + left + ",top=" + top + "screenX=" + left + ",screenY=" + top;
		window.open($(this).attr('href'), "setup_comment", windowFeatures);
		$(this).trigger('blur');
		
		return false;
	});
});/* end $(document).ready */



