// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults

function hideCanadianProvince(recordId, canadaCountryConstant){
	if(document.getElementById('record_country_' + recordId).value == canadaCountryConstant){
		document.getElementById('canadianProvinceDiv_' + recordId).style.visibility = "visible";
	}else{
		document.getElementById('canadianProvinceDiv_' + recordId).style.visibility = "hidden";
	}
}

/*Blog rating mouse over*/	
function mouse_over_star(rating, blogPost){
	var i = 1;
	for (i ; i <= rating; i++) {
		if (document.getElementById('a_' + i + '_star_off_' + blogPost) != null) {
			document.getElementById('a_' + i + '_star_off_' + blogPost).className = 'star_on';

		}
	}
}
	/*Blog rating mouse out*/		
function mouse_out_star(rating, blogPost){
	for (var i = 1; i <= rating; i++) {
		if (document.getElementById('a_' + i + '_star_off_' + blogPost) != null) {
			document.getElementById('a_' + i + '_star_off_' + blogPost).className = 'star_off';
		}else{
			document.getElementById('a_' + i + '_star_on_' + blogPost).className = 'star_on';
		}
	}
}


function swap_classes(div_id1, class1, div_id2, class2) {
	document.getElementById(div_id1).className = class1;
	document.getElementById(div_id2).className = class2;
}

