var debug=1;
function SCS_init() {
	SCS_BindItems();
}
function SCS_BindItems() {
	if(debug==1) {
		console.log('try SCS BindQtips');
	}
	try{
		SCS_BindQtips();
	} 
	catch(err) {
		console.log('error');
	}
	

	SCS_BindMore();
}

function SCS_BindQtips() {
	if(debug==1) {
		console.log('SCS_BindQtips');
	}
	$('#pBlock,.scS_container').find('[title]').qtip()
	
}

//pBlock_more

function SCS_BindMore() {
	$('.pBlock_more').unbind().click(function(){
		sdiv='.'+$(this).attr('name')+'_outer .'+$(this).attr('name')+'_inner';
		ch=$(sdiv).height();
		ph=$(sdiv).parent().height();
		data_h=$(sdiv).parent().data('oheight');
		if(data_h) {} else {data_h='';}
		if(data_h > 0) {} else {
			$(sdiv).parent().data('oheight',ph);
		}
		$(sdiv).parent().animate({height:ch});
		$(this).removeClass('pBlock_more').addClass('pBlock_less');
		$(this).text('less');
		SCS_BindMore();
	})
	$('.pBlock_less').unbind().click(function(){
		sdiv='.'+$(this).attr('name')+'_outer .'+$(this).attr('name')+'_inner';
		ph=$(sdiv).parent().data('oheight');
		$(sdiv).parent().animate({height:ph});
		$(this).removeClass('pBlock_less').addClass('pBlock_more');
		$(this).text('more');
		SCS_BindMore();
	})
}
