HEX
Server: Apache
System: Linux msm5694.mjhst.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: camjab_ssh (1000)
PHP: 5.3.29
Disabled: NONE
Upload Files
File: /home/httpd/html/hotvidstv.com/wp-content/plugins/wp-postratings/postratings-js.dev.js
/*
+----------------------------------------------------------------+
|																							|
|	WordPress 2.8 Plugin: WP-PostRatings 1.50								|
|	Copyright (c) 2009 Lester "GaMerZ" Chan									|
|																							|
|	File Written By:																	|
|	- Lester "GaMerZ" Chan															|
|	- http://lesterchan.net															|
|																							|
|	File Information:																	|
|	- Post Ratings Javascript File													|
|	- wp-content/plugins/wp-postratings/postratings-js.php				|
|																							|
+----------------------------------------------------------------+
*/


// Variables
var post_id = 0;
var post_rating = 0;
var is_being_rated = false;
ratingsL10n.custom = parseInt(ratingsL10n.custom);
ratingsL10n.max = parseInt(ratingsL10n.max);
ratingsL10n.show_loading = parseInt(ratingsL10n.show_loading);
ratingsL10n.show_fading = parseInt(ratingsL10n.show_fading);

// When User Mouse Over Ratings
function current_rating(id, rating, rating_text) {
	if(!is_being_rated) {
		post_id = id;
		post_rating = rating;
		if(ratingsL10n.custom && ratingsL10n.max == 2) {
			jQuery('#rating_' + post_id + '_' + rating).attr('src', eval('ratings_' + rating + '_mouseover_image.src'));
		} else {
			for(i = 1; i <= rating; i++) {
				if(ratingsL10n.custom) {
					jQuery('#rating_' + post_id + '_' + i).attr('src', eval('ratings_' + i + '_mouseover_image.src'));
				} else {
					jQuery('#rating_' + post_id + '_' + i).attr('src', ratings_mouseover_image.src);
				}
			}
		}
		if(jQuery('#ratings_' + post_id + '_text').length) {
			jQuery('#ratings_' + post_id + '_text').show();
			jQuery('#ratings_' + post_id + '_text').html(rating_text);
		}
	}
}


// When User Mouse Out Ratings
function ratings_off(rating_score, insert_half, half_rtl) {
	if(!is_being_rated) {
		for(i = 1; i <= ratingsL10n.max; i++) {
			if(i <= rating_score) {
				if(ratingsL10n.custom) {
					jQuery('#rating_' + post_id + '_' + i).attr('src', ratingsL10n.plugin_url + '/images/' + ratingsL10n.image + '/rating_' + i + '_on.' + ratingsL10n.image_ext);
				} else {
					jQuery('#rating_' + post_id + '_' + i).attr('src', ratingsL10n.plugin_url + '/images/' + ratingsL10n.image + '/rating_on.' + ratingsL10n.image_ext);
				}
			} else if(i == insert_half) {
				if(ratingsL10n.custom) {
					jQuery('#rating_' + post_id + '_' + i).attr('src',  ratingsL10n.plugin_url + '/images/' + ratingsL10n.image + '/rating_' + i + '_half' + (half_rtl ? '-rtl' : '') + '.' + ratingsL10n.image_ext);
				} else {
					jQuery('#rating_' + post_id + '_' + i).attr('src', ratingsL10n.plugin_url + '/images/' + ratingsL10n.image + '/rating_half' + (half_rtl ? '-rtl' : '') + '.' + ratingsL10n.image_ext);
				}
			} else {
				if(ratingsL10n.custom) {
					jQuery('#rating_' + post_id + '_' + i).attr('src', ratingsL10n.plugin_url + '/images/' + ratingsL10n.image + '/rating_' + i + '_off.' + ratingsL10n.image_ext);
				} else {
					jQuery('#rating_' + post_id + '_' + i).attr('src', ratingsL10n.plugin_url + '/images/' + ratingsL10n.image + '/rating_off.' + ratingsL10n.image_ext);
				}
			}
		}
		if(jQuery('#ratings_' + post_id + '_text').length) {
			jQuery('#ratings_' + post_id + '_text').hide();
			jQuery('#ratings_' + post_id + '_text').empty();
		}
	}
}

// Set is_being_rated Status
function set_is_being_rated(rated_status) {
	is_being_rated = rated_status;
}

// Process Post Ratings Success
function rate_post_success(data) {
	jQuery('#post-ratings-' + post_id).html(data);
	if(ratingsL10n.show_loading) {
		jQuery('#post-ratings-' + post_id + '-loading').hide();
	}
	if(ratingsL10n.show_fading) {
		jQuery('#post-ratings-' + post_id).fadeTo('def', 1, function () {
			set_is_being_rated(false);	
		});
	} else {
		set_is_being_rated(false);	
	}
}

// Process Post Ratings
function rate_post() {
	if(!is_being_rated) {
		set_is_being_rated(true);
		if(ratingsL10n.show_fading) {
			jQuery('#post-ratings-' + post_id).fadeTo('def', 0, function () {
				if(ratingsL10n.show_loading) {
					jQuery('#post-ratings-' + post_id + '-loading').show();
				}
				jQuery.ajax({type: 'GET', url: ratingsL10n.ajax_url, data: 'pid=' + post_id + '&rate=' + post_rating, cache: false, success: rate_post_success});
			});
		} else {
			if(ratingsL10n.show_loading) {
				jQuery('#post-ratings-' + post_id + '-loading').show();
			}
			jQuery.ajax({type: 'GET', url: ratingsL10n.ajax_url, data: 'pid=' + post_id + '&rate=' + post_rating, cache: false, success: rate_post_success});
		}
	} else {
		alert(ratingsL10n.text_wait);
	}
}