$(document).ready(function(){
	
	//$('form').jqTransform({imgPath:'../img/jqTransform_img'});
	
	/*$('a.jqTransformCheckbox').click(function() {
		 //$(this).parent().parent().toggleClass('checked');
		 //console.log('clicked');
	});*/
	$('a#check-all').click(function() {
		 //$(this).parent().parent().toggleClass('checked');
		 //console.log('clicked');
		  $('#StudentCertificatesForm > div.box').each(function(){
	        $(this).click();
	      });
	});
	
	$('#StudentCertificatesForm > div.box').click(function() {
		if($(this).hasClass('checked')) {
			//$(this).find('a').click();
			$(this).find('input[type=checkbox]').removeAttr('checked'); 
			$(this).removeClass('checked')
		} else {
			//$(this).find('a').click();
			$(this).find('input[type=checkbox]').attr('checked','checked');
			$(this).addClass('checked')
		}
	})
	
	/************* use with jqTransform
	 * 
	 * $('#StudentCertificateForm > div.box').click(function() {
		if($(this).hasClass('checked')) {
			//$(this).find('a').click();
			$(this).find('a').removeClass('jqTransformChecked');
			$(this).find('input[type=checkbox]').removeAttr('checked'); 
			$(this).removeClass('checked')
		} else {
			//$(this).find('a').click();
			$(this).find('a').addClass('jqTransformChecked');
			$(this).find('input[type=checkbox]').attr('checked','checked');
			$(this).addClass('checked')
		}
	});*/
	
	
});
