jQuery(document).ready(function(){
jQuery("#rt-mainbody").parent().css({'margin-top':'0'});
});
(function($) {
var start = 0;
var top_menu = jQuery(".network_block").offset().top - 30 ;
jQuery(".items-leading").html('
');
jQuery("#btn_search").remove();
jQuery("#btn_search").css({'display':'none'});
var ww = parseInt(document.body.clientWidth);
if(ww < 400)
{
jQuery("#type_listing").val("2");
jQuery(".button_type_view_icon-list").addClass("button_type_view_icon-active");
jQuery(".s_block").css({"height":"10px"});
}
else
{
jQuery(".button_type_view_icon-large").addClass("button_type_view_icon-active");
jQuery("#type_listing").val("0");
jQuery(".s_block").css({"height":"20px"});
}
jQuery("#topmenu").css({'display':'block'});
jQuery("#topmenu_right").css({'display':'block' });
var w = 0,
w1 = jQuery(".menu1").outerWidth(); jQuery(".menu1").css({"width":w1+'px'});
w = w + w1;
w1 = jQuery("#topmenu_right").outerWidth(true); w1=w1+1; jQuery("#topmenu_right").css({"width":w1+'px'});
w = w + w1;
w1 = jQuery("#rt-logo").outerWidth(); jQuery("#rt-logo").css({"width":w1+'px'});
w = w + w1;
var new_w = ww-w ; //alert(new_w);
if(ww > 500)
jQuery(".menu2").css({"width":new_w+'px'});
var rotate1 = 0, dir = 0, network_open = 0, status_open = 0, dir2 = 0, dir3=0, recently_updated_open = 0;
var left_select_status = '0' ;
left_select_status = jQuery(".select_status").position().left;
/*************select tab**************/
var textForFound="TV shows";
jQuery("#tabTV").click(function (){
$("#category_param").val("TV");
$("#titleNetwork").text("TV Network");
$(".network_list_header").text("Networks");
textForFound="TV shows";
search_ajax();
load_list_channels();
;})
jQuery("#tabAnime").click(function (){
$("#category_param").val("Anime");
$("#titleNetwork").text("Studios");
$(".network_list_header").text("Studios");
textForFound="Anime";
search_ajax();
load_list_channels()
;})
/**************************************************************************************BEGIN select_network click**********************************************************************************************/
jQuery("body").on("click",".select_network", function(){
$('.fade_filter').each(function(index, value){
$(this).remove();
});
$('.fade_filter2').each(function(index, value){
$(this).remove();
});
$('.fade_filter3').each(function(index, value){
$(this).remove();
});
fade_filter3_close();
start = 0;
status_open = 0; recently_updated_open = 0;
dir = 1 - dir ;
top_menu = jQuery(".network_block").offset().top - 30 ;
if(network_open == 0)
{
jQuery("body").append(''); fade_filter2_close();
jQuery("body").on("click","#fade_filter, .close_network, .network",function(){
fade_filter_close();
});
network_open = 1;
jQuery(".network_list").css({'transform': 'translateY(0px)', "top":top_menu, "left":"-1px", "opacity":"1"});
}
else
{
jQuery(".network_list").css({'transform': 'translateY(10px)', "top":"-9999px", "left":"-1px", "opacity":"0"});
network_open = 0;
}
jQuery(".select_network_icon").css({'transform': 'rotate(' + rotate1 + 'deg)',
'-moz-transform': 'rotate(' + rotate1 + 'deg)',
'-ms-transform': 'rotate(' + rotate1 + 'deg)',
'-webkit-transform': 'rotate(' + rotate1 + 'deg)',
'-o-transform': 'rotate(' + rotate1 + 'deg)'
})
.animate({offset: dir * 180 }, {
duration: 200,
easing: 'linear',
step: function(offset) {
jQuery(".select_network_icon") .css( {
'transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-moz-transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-ms-transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-webkit-transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-o-transform': 'rotate(' + ( rotate1 + offset) + 'deg)'
} );
}
});
});
function fade_filter_close()
{
$('.fade_filter').each(function(index, value){
$(this).remove();
});
jQuery(".fade_filter").remove();
//close_menu2_search();
dir = 0;
/*close network list*/
jQuery(".select_network_icon").css({'transform': 'rotate(' + rotate1 + 'deg)',
'-moz-transform': 'rotate(' + rotate1 + 'deg)',
'-ms-transform': 'rotate(' + rotate1 + 'deg)',
'-webkit-transform': 'rotate(' + rotate1 + 'deg)',
'-o-transform': 'rotate(' + rotate1 + 'deg)'
})
.animate({offset: 0 }, {
duration: 200,
easing: 'linear',
step: function(offset) {
jQuery(".select_network_icon") .css({
'transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-moz-transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-ms-transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-webkit-transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-o-transform': 'rotate(' + ( rotate1 + offset) + 'deg)' });
jQuery(".network_list").css({'transform': 'translateY(10px)', "opacity":"0"});
network_open = 0;
},
complete: function() {
jQuery(".network_list").css({"top":"-9999px"});
}
});
}
jQuery(document).on("click",".tag_network", function(){
jQuery(".tag_network").each(function( index ) {
$( this ).removeClass('active_tag');});
//$( this ).addClass('active_tag');
$('body').scrollTo('.filter_title', 500);
jQuery(".select_network").addClass("button_active");
jQuery(".cancel_filter_params").css({'display':'block'});
var title = $(this).html(); fade_filter_close();
id = $(this).attr("id"); id = id.replace("tag", "");
if(jQuery(".filter_selected_network").length>0) {
//jQuery(".filter_selected_network").html(title);
}
else
{
//jQuery(".filter_params").append('');
}
jQuery(".filter_params").append('');
var network_param_ids = '0';
jQuery(".filter_selected_network").each(function(){
var thid_id = jQuery(this).attr("id");
thid_id = thid_id.replace("filter_selected_network","");
network_param_ids += ","+thid_id;
});
jQuery("#network_param").val(network_param_ids);
search_ajax();
load_letter_filter();
jQuery(document).on("click",".filter_selected_network", function(e){
filter_selected_network_close($(this));
});
jQuery(".filter_selected_network").each(function( index ) {
var id_tag = jQuery(this).attr('id');
id_tag = id_tag.replace('filter_selected_network', '');
jQuery( "#tag"+id_tag ).addClass('active_tag');
});
});
function load_list_channels()
{
var category_param = jQuery("#category_param").val();
var wsize = jQuery(".network_list_columns").width();
$.ajax({
type: "POST",
url: '/index.php?option=com_ncatalogues&controller=ajax&task=load_list_channels',
data: {'task': 'load_list_channels', 'option': 'com_ncatalogues', 'controller': 'ajax', 'wsize':wsize,'category_param':category_param,'start':'0'},
success: function(r){
//var data = r.split(":::");
jQuery(".network_list_columns").html( r );
}
});
}
load_list_channels();
function filter_selected_network_close(el)
{
// el.animate({'width': '0', 'opacity':'0' }, 200, function() {
el.remove();
jQuery(".select_network").removeClass("button_active");
jQuery("#network_param").val('0');
var network_param_ids = '0';
jQuery(".filter_selected_network").each(function(){
var thid_id = jQuery(this).attr("id");
thid_id = thid_id.replace("filter_selected_network","");
network_param_ids += ","+thid_id;
});
jQuery("#network_param").val(network_param_ids);
load_letter_filter();
var status_param = jQuery("#status_param").val();
if(status_param == '0') jQuery(".cancel_filter_params").css({'display':'none'});
search_ajax();
// }
//);
}
/**********************************************************************/
/*****************END select_network click*****************************/
/**********************************************************************/
/**********************************************************************/
/*****************BEGIN select_status click****************************/
/**********************************************************************/
jQuery("body").on("click",".select_status", function(){
$('.fade_filter3').each(function(index, value){
$(this).remove();
}); fade_filter3_close();
$('.fade_filter2').each(function(index, value){
$(this).remove();
});
$('.fade_filter').each(function(index, value){
$(this).remove();
});
start = 0;
network_open = 0;
recently_updated_open = 0;
dir2 = 1 - dir2 ;
if(status_open == 0)
{
status_open = 1;
jQuery("body").append(''); fade_filter_close();
jQuery("body").on("click","#fade_filter2, .close_status, .status",function(){
fade_filter2_close();
});
var top_menu = jQuery(".network_block").offset().top - 30 ;
jQuery(".status_list").css({'transform': 'translateY(0px)', "top":top_menu, "left":left_select_status+"px", "opacity":"1"});
jQuery("body").on("click",".tag_status", function(){
fade_filter2_close();
fade_filter3_close();
jQuery(".tag_status").each(function( index ) {
$( this ).removeClass('active_tag');
});
var network_param1 = jQuery("#network_param").val();
if(network_param1 == '0' && $(this).attr("id") == 'tag116')
{
return false;
}
$( this ).addClass('active_tag');
jQuery(".select_status").addClass("button_active");
jQuery(".cancel_filter_params").css({'display':'block'});
var title = $(this).html(); fade_filter_close();
id = $(this).attr("id"); id = id.replace("tag", "");
if(jQuery(".filter_selected_status").length>0) {
jQuery(".filter_selected_status").html(title);
}
else
{
jQuery(".filter_params").append('');
}
jQuery("#status_param").val(id);
search_ajax();
load_letter_filter();
jQuery("body").on("click",".filter_selected_status", function(){
jQuery("#status_param").val('0');load_letter_filter();filter_selected_status_close();
});
});
}
else
{
jQuery(".status_list").css({'transform': 'translateY(10px)', "opacity":"0"});
status_open = 0;
}
jQuery(".select_status_icon").css({'transform': 'rotate(' + rotate1 + 'deg)',
'-moz-transform': 'rotate(' + rotate1 + 'deg)',
'-ms-transform': 'rotate(' + rotate1 + 'deg)',
'-webkit-transform': 'rotate(' + rotate1 + 'deg)',
'-o-transform': 'rotate(' + rotate1 + 'deg)'
})
.animate({offset: dir2 * 180 }, {
duration: 200,
easing: 'linear',
step: function(offset) {
jQuery(".select_status_icon") .css({
'transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-moz-transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-ms-transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-webkit-transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-o-transform': 'rotate(' + ( rotate1 + offset) + 'deg)'
} );
}
});
});
function fade_filter2_close()
{
//close_menu2_search();
$('.fade_filter2').each(function(index, value){
$(this).remove();
});
jQuery("#fade_filter2").remove(); jQuery(".fade_filter2").remove();
dir2 = 0;
/*close status list*/
jQuery(".select_status_icon").css({'transform': 'rotate(' + rotate1 + 'deg)',
'-moz-transform': 'rotate(' + rotate1 + 'deg)',
'-ms-transform': 'rotate(' + rotate1 + 'deg)',
'-webkit-transform': 'rotate(' + rotate1 + 'deg)',
'-o-transform': 'rotate(' + rotate1 + 'deg)'
})
.animate({offset: 0 }, {
duration: 200,
easing: 'linear',
step: function(offset) {
jQuery(".select_status_icon") .css( {
'transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-moz-transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-ms-transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-webkit-transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-o-transform': 'rotate(' + ( rotate1 + offset) + 'deg)'
});
jQuery(".status_list").css({'transform': 'translateY(10px)', "opacity":"0"});
status_open = 0;
},
complete: function() {
jQuery(".status_list").css({"top":"-9999px"});
}
});
}
function filter_selected_status_close()
{
//jQuery(".filter_selected_status").animate({'width': '0', 'opacity':'0' }, 200,function() {
jQuery(".filter_selected_status").remove();
jQuery(".select_status").removeClass("button_active");
jQuery("#status_param").val('0');
var network_param = jQuery("#network_param").val();
if(network_param == '0') jQuery(".cancel_filter_params").css({'display':'none'});
search_ajax();
//}
//);
}
/**********************************************************************/
/*****************END select_status click******************************/
/**********************************************************************/
/**********************************************************************/
/*****************BEGIN recently_updated click*************************/
/**********************************************************************/
jQuery("body").on("click",".recently_updated", function(){
$('.fade_filter2').each(function(index, value){
$(this).remove();
});
$('.fade_filter').each(function(index, value){
$(this).remove();
});
$('.fade_filter3').each(function(index, value){
$(this).remove();
}); fade_filter2_close();
start = 0;
network_open = 0;
status_open = 0;
dir3 = 1 - dir3 ;
if(recently_updated_open == 0)
{
recently_updated_open = 1;
jQuery("body").append(''); fade_filter_close();
jQuery("body").on("click","#fade_filter3, .close_status, .status", function(){
fade_filter3_close();
});
var top_menu2 = jQuery(".filter_block").offset().top - 30 ;
var left_recently_updated = 0; if(ww < 400) left_recently_updated = jQuery(".filter_block").offset().left;
jQuery(".recently_updated_list").css({"width":jQuery(".recently_updated").width()+"px", 'transform': 'translateY(0px)', "top":top_menu2, "left":left_recently_updated+"px", "opacity":"1"});
jQuery("body").on("click",".recently_updated_value", function(){
fade_filter3_close();
jQuery(".recently_updated_value").each(function( index ) {
$( this ).removeClass('active_tag');
});
$( this ).addClass('active_tag');
jQuery(".recently_updated_title").html($( this ).html());
//jQuery(".select_status").addClass("button_active");
//jQuery(".cancel_filter_params").css({'display':'block'});
//var title = $(this).html(); fade_filter_close();
id = $(this).attr("id"); id = id.replace("recently-", "");
//if(jQuery(".filter_selected_status").length>0) {
// jQuery(".filter_selected_status").html(title);
//}
//else
//{
// jQuery(".filter_params").append('');
//}
jQuery("#recently_updated_value").val(id);
search_ajax();
//jQuery(".filter_selected_status").bind("click", function(){
// filter_selected_status_close();
//});
});
}
else
{
jQuery(".recently_updated_list").css({'transform': 'translateY(10px)', "opacity":"0"});
recently_updated_open = 0;
}
jQuery(".recently_updated_icon").css({'transform': 'rotate(' + rotate1 + 'deg)',
'-moz-transform': 'rotate(' + rotate1 + 'deg)',
'-ms-transform': 'rotate(' + rotate1 + 'deg)',
'-webkit-transform': 'rotate(' + rotate1 + 'deg)',
'-o-transform': 'rotate(' + rotate1 + 'deg)'
})
.animate({offset: dir3 * 180 }, {
duration: 200,
easing: 'linear',
step: function(offset) {
jQuery(".recently_updated_icon") .css({
'transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-moz-transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-ms-transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-webkit-transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-o-transform': 'rotate(' + ( rotate1 + offset) + 'deg)'
} );
}
});
});
function fade_filter3_close()
{
//close_menu2_search();
$('.fade_filter3').each(function(index, value){
$(this).remove();
});
jQuery("#fade_filter3").remove(); jQuery(".fade_filter3").remove();
dir3 = 0;
/*close status list*/
jQuery(".recently_updated_icon").css({'transform': 'rotate(' + rotate1 + 'deg)',
'-moz-transform': 'rotate(' + rotate1 + 'deg)',
'-ms-transform': 'rotate(' + rotate1 + 'deg)',
'-webkit-transform': 'rotate(' + rotate1 + 'deg)',
'-o-transform': 'rotate(' + rotate1 + 'deg)'
})
.animate({offset: 0 }, {
duration: 200,
easing: 'linear',
step: function(offset) {
jQuery(".recently_updated_icon") .css( {
'transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-moz-transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-ms-transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-webkit-transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-o-transform': 'rotate(' + ( rotate1 + offset) + 'deg)'
});
jQuery(".recently_updated_list").css({'transform': 'translateY(10px)', "opacity":"0"});
recently_updated_open = 0;
},
complete: function() {
jQuery(".recently_updated_list").css({"top":"-9999px"});
}
});
}
function filter_selected_status_close()
{
// jQuery(".filter_selected_status").animate({'width': '0', 'opacity':'0' }, 200,
// function() {
jQuery(".filter_selected_status").remove();
jQuery(".select_status").removeClass("button_active");
jQuery("#status_param").val('0');
var network_param = jQuery("#network_param").val();
if(network_param == '0') jQuery(".cancel_filter_params").css({'display':'none'});
search_ajax();
}
// );
// }
/**********************************************************************/
/*****************END recently_updated click******************************/
/**********************************************************************/
/**********************************************************************/
/***********************BEGIN card_large click*************************/
/**********************************************************************/
jQuery("body").on("click",".card_large", function(){
close_all_fades();
jQuery(".s_block").css({"height":"20px"});
jQuery(".button_type_view_icon-large").addClass(" button_type_view_icon-active");
jQuery(".button_type_view_icon-list").removeClass(" button_type_view_icon-active");
jQuery("#type_listing").val("1");
search_ajax();
});
/**********************************************************************/
/***********************END card_large click***************************/
/**********************************************************************/
/**********************************************************************/
/***********************BEGIN card_list click**************************/
/**********************************************************************/
jQuery("body").on("click",".card_list", function(){
close_all_fades();
jQuery(".s_block").css({"height":"10px"});
jQuery(".button_type_view_icon-list").addClass(" button_type_view_icon-active");
jQuery(".button_type_view_icon-large").removeClass(" button_type_view_icon-active");
jQuery("#type_listing").val("2");
search_ajax();
});
/**********************************************************************/
/***********************END card_list click****************************/
/**********************************************************************/
/**********************************************************************/
/***********************BEGIN letter-block click**************************/
/**********************************************************************/
function filter_selected_letter_close()
{
jQuery(".filter_selected_letter").animate({'width': '0', 'opacity':'0' }, 200,
function() {
jQuery(".filter_selected_letter").remove();
jQuery("#letter_param").val('');
search_ajax();
}
);
}
function load_letter_filter()
{
var network_param = jQuery("#network_param").val(),
status_param = jQuery("#status_param").val(),
type_listing = jQuery("#type_listing").val(),
recently_updated = jQuery("#recently_updated_value").val(),
start = 0;
jQuery.ajax({
type: "POST",
url: '/index.php?option=com_ncatalogues&controller=ajaxscript&task=load_letter_filter',
data: {'task': 'load_letter_filter', 'option': 'com_ncatalogues', 'controller': 'ajaxscript', 'value':'',
'network_param': network_param, 'status_param':status_param },
success: function(r){
jQuery(".letters-filter").html(r);
if(jQuery(".filter_selected_letter").length>0) {
var title = jQuery(".filter_selected_letter").html();
if(jQuery(".letter-"+title).hasClass('first_letter_not_active') == true)
{
filter_selected_letter_close();
}
}
jQuery("body").on("click",".letter-block", function(){
if(jQuery(this).hasClass('first_letter_not_active') == true) return false;
close_all_fades();
var title = jQuery(this).html();
if(jQuery(".filter_selected_letter").length>0) {
jQuery(".filter_selected_letter").html(title);
}
else
{
jQuery(".filter_params").append('');
}
jQuery("body").on("click",".filter_selected_letter", function(){
filter_selected_letter_close();
});
jQuery("#letter_param").val(title);
search_ajax();
});
}
});
}
load_letter_filter();
/**********************************************************************/
/***********************END letter-block click****************************/
/**********************************************************************/
function close_all_fades()
{
fade_filter_close();
fade_filter2_close();
fade_filter3_close();
}
/**********************************************************************/
/***********************BEGIN status type_listing**********************/
/**********************************************************************/
jQuery.ajax({
type: "POST",
url: '/index.php?option=com_ncatalogues&controller=ajaxscript&task=status_type_listing',
data: {'task': 'status_type_listing', 'option': 'com_ncatalogues', 'controller': 'ajaxscript' },
success: function(r){
if(r == 2)
{
jQuery(".button_type_view_icon-list").addClass("button_type_view_icon-active");
jQuery(".button_type_view_icon-large").removeClass("button_type_view_icon-active");
jQuery(".s_block").css({"height":"10px"});
jQuery("#type_listing").val("2");
}
}
});
/**********************************************************************/
/***********************END status type_listing************************/
/**********************************************************************/
/* BEGIN button_cancel_filter click */
jQuery("body").on("click",".button_cancel_filter", function(){
filter_selected_network_close();
filter_selected_status_close();
search_ajax();
});
/* END button_cancel_filter click */
jQuery(".count_items").html( '' );
/*если не залогинен и нажал на кнопку track - то предварительно записываем id материала, чтобы подписать его после логина. Автоподписка. */
function rememberForSubscribe(itemId){
jQuery.ajax({
type: "POST",
url: '/index.php?option=com_ncatalogues&controller=ajax',
data: {
'task': 'rememberForSubscribe',
'itemId': itemId
},
success: function(r){
}
});
;}
/******************************************************************************/
/*****************************search_ajax**************************************/
/******************************************************************************/
function search_ajax() {
var urlParams = new URLSearchParams(window.location.search); //get all parameters
var startP = urlParams.get('start');
var start = 0;
if (startP) {
start = startP;
}
var value = jQuery("#search-input").val(),
category_param = jQuery("#category_param").val(),
letter_param = jQuery("#letter_param").val(),
network_param = jQuery("#network_param").val(),
status_param = jQuery("#status_param").val(),
type_listing = jQuery("#type_listing").val(),
recently_updated = jQuery("#recently_updated_value").val(),
start = start;
var task = 'load_list_items';
if(jQuery("div").is("#loading")!= true)
jQuery(".items-leading").html('
');
$.ajax({
type: "POST",
url: '/index.php?option=com_ncatalogues&controller=ajax&task='+task,
data: {
'task': task,
'option': 'com_ncatalogues',
'controller': 'ajax',
'value':value,
'start':start,
'network_param': network_param,
'status_param':status_param,
'type_listing':type_listing,
'recently_updated':recently_updated,
'letter_param':letter_param,
'recently_updated':recently_updated,
'category_param':category_param
},
success: function(r){
var data = r.split(":::");
if(data[0] == '0') {
jQuery(".count_items").html( 'No TV shows match your browsing criteria.' );
jQuery(".items-leading").html('');
} else {
jQuery(".count_items").html( 'Found '+data[0]+' '+textForFound );
jQuery(".items-leading").html( data[1]);
var serial_ids = jQuery("#serial_ids").val();
jQuery("#serial_ids").val( data[2]);
/******************************* signup click *********************************/
jQuery("body").on("click",".show_remind_sign", function(e) {
var itemIdFS = jQuery(this).attr("itemId");
rememberForSubscribe(itemIdFS);
var return_url = jQuery("#return_url").val();
/*load ajax form*/
jQuery.ajax({
type: "POST",
url: '/index.php?option=com_ncatalogues&controller=ajax&task=load_login_form',
data: {'task': 'load_login_form', 'option': 'com_ncatalogues', 'controller': 'ajax', 'return':return_url},
success: function(r){
jQuery("#login_form").html(r);
jQuery("#login_form").css({"display":"block"});
jQuery("body").on("click",".icon-eye-open-password", function() {
var att = jQuery("#modlgn-passwd").attr("type");
if(att == "text")
{
jQuery("#modlgn-passwd").attr("type", "password");
jQuery(".icon-eye-open-password").removeClass("icon-eye-open").addClass("icon-eye-close");
}else
{
jQuery("#modlgn-passwd").attr("type", "text");
jQuery(".icon-eye-open-password").removeClass("icon-eye-close").addClass("icon-eye-open");
}
var att = jQuery("#jform_password1").attr("type");
if(att == "text")
jQuery("#jform_password1").attr("type", "password");
else
jQuery("#jform_password1").attr("type", "text");
});
// var scrollTop = document.getElementById("rt-page-surround").scrollTop;
// alert(scrollTop);
var doc_w = jQuery(document).width();
var doc_h = screen.height;
jQuery("#rt-page-surround").addClass('bckgrnd');
jQuery("#rt-page-surround").toggleClass('bckgrndblur');
jQuery("body").append('');
jQuery("#login_form").prepend('');
var width_block = jQuery("#login_form").width(), height_block = jQuery("#login_form").height();
if(doc_w < width_block) { width_block = doc_w-10; height_block = 170; jQuery("#login_form").css({"width":width_block+"px" }); }
var left = (doc_w - width_block)/2, left2 = left + width_block/2;
var top = (doc_h - height_block)/2 -100, top2 = top + height_block/2;
top= $(window).scrollTop()+30 ;
jQuery("#login_form").css({'display':'block', "width":width_block+"px", "height":"auto","left":left+"px", "top":top+"px", "opacity":"0" });
jQuery("#login_form").css({ "opacity":"0" });
jQuery("#login_form").animate({"opacity":"1"}, 1000);
jQuery("body").on("click","#fade_question, .close_question", function(){
jQuery("#rt-page-surround").toggleClass('bckgrndblur');
jQuery("#login_form").animate({"opacity":"0"}, 500, function(){
jQuery("#login_form").html(''); jQuery("#login_form").css({'display':'none'});
});
jQuery("#rt-page-surround").removeClass('bckgrndblur');
jQuery("#fade_question").remove();
});
/*open register form*/
jQuery("body").on("click","#open_register_form", function(e) {
jQuery("#member-registration-div").css({'display':'block'});
jQuery("#login-form").css({'display':'none'});
jQuery("#type_login").html("Sign up for");
jQuery("#type_login_comment").html("Create an account to keep track of all your favorite TV shows and release dates all in one place");
jQuery("#title_facebook").html("Sign up with Facebook");
return false;
});
/*end open register form*/
/*register form fields*/
jQuery("body").on("keyup","#jform_password1", function() {
jQuery("#jform_password2").val( jQuery("#jform_password1").val() );
});
jQuery("#jform_password1").bind("change", function() {
var password = jQuery("#jform_password1").val();
jQuery("#jform_password2").val( jQuery("#jform_password1").val() );
if(password.length>3) {
jQuery("#jform_password1_ok").css({'display':'block'});
jQuery("#jform_password1_eye").animate({right: "27px"}, 500, function(){
jQuery("#jform_password1_eye").css({'border-right':'1px solid #ccc',});
});
}
});
jQuery("#modlgn-passwd").bind("change", function() {
var password = jQuery("#modlgn-passwd").val();
if(password.length>3) {
jQuery("#modlgn-passwd_ok").css({'display':'block'});
jQuery("#modlgn-passwd-eye").animate({right: "27px"}, 500, function(){
jQuery("#modlgn-passwd-eye").css({'border-right':'1px solid #ccc',});
})
}
});
jQuery("#jform_username").bind("keyup", function() {
var username = jQuery("#jform_username").val();
jQuery("#jform_name").val( username );
});
jQuery("#jform_username").bind("change", function() {
var username = jQuery("#jform_username").val();
jQuery("#jform_name").val( username );
/*ajax validate*/
jQuery.ajax({
type: "POST",
url: '/index.php?option=com_ncatalogues&controller=ajax&task=username_valid',
data: {
'task': 'username_valid',
'option': 'com_ncatalogues',
'controller': 'ajax',
'username':username
},
success: function(r){
if(r == 1){
jQuery("#jform_username_ok").css({'display':'block'});
jQuery("#jform_username_err").css({'display':'none'});
jQuery("#jform_username_err").removeAttr("title");
jQuery("#jform_username").removeAttr("title");
}
else{
jQuery("#jform_username_err").css({'display':'block'});
jQuery("#jform_username_ok").css({'display':'none'});
jQuery("#jform_username_err").attr("title", r);
jQuery("#jform_username").attr("title", r);
jQuery("#jform_username").attr("aria-invalid", "true");
jQuery("#jform_username_err").tooltip();
}
}
});
/*end ajax validate*/
});
jQuery("#jform_email1").bind("change", function() {
var email = jQuery("#jform_email1").val();
jQuery("#jform_email2").val( email );
});
jQuery("#jform_email1").bind("keyup", function() {
var email = jQuery("#jform_email1").val();
jQuery("#jform_email2").val( email );
/*ajax validate*/
jQuery.ajax({
type: "POST",
url: '/index.php?option=com_ncatalogues&controller=ajax&task=email_valid',
data: {'task': 'email_valid', 'option': 'com_ncatalogues', 'controller': 'ajax', 'email':email},
success: function(r){
if(r == 1){
jQuery("#jform_email1_ok").css({'display':'block'});
jQuery("#jform_email1_err").css({'display':'none'});
jQuery("#jform_email1_err").removeAttr("title");
jQuery("#jform_email1").removeAttr("title");
} else{
jQuery("#jform_email1_err").css({'display':'block'});
jQuery("#jform_email1_ok").css({'display':'none'});
jQuery("#jform_email1_err").attr("title", r);
jQuery("#jform_email1").attr("title", r);
jQuery("#jform_email1").attr("aria-invalid", "true");
jQuery("#jform_email1_err").tooltip();
}
}
});
/*end ajax validate*/
});
/*end register form fields*/
/*open login form*/
jQuery("#open_login_form").bind("click", function(e) {
jQuery("#member-registration-div").css({'display':'none'});
jQuery("#login-form").css({'display':'block'});
jQuery("#type_login").html("Log in");
jQuery("#type_login_comment").html("Keep track of all your favorite TV shows and release dates all in one place.");
jQuery("#title_facebook").html("Log in with Facebook");
return false;
});
/*end open login form*/
}
});
/*end ajax form*/
});
/******************************* end signup click *****************************/
} // end else
} // end success
});
}
/******************************************************************************/
/******************************************************************************/
/*****************************End search_ajax**********************************/
/******************************************************************************/
/******************************************************************************/
function list_items(value, start)
{
var task = 'load_list_items';
var network_param = jQuery("#network_param").val(),
status_param = jQuery("#status_param").val();
$.ajax({
type: "POST",
url: '/index.php?option=com_ncatalogues&controller=ajax&task='+task,
data: {'task': task, 'option': 'com_ncatalogues', 'controller': 'ajax', 'value':value,'start':start,'network_param': network_param, 'status_param':status_param },
success: function(r){
var data = r.split(":::");
jQuery(".count_items").html( 'Found '+textForFound );
}
});
}
jQuery(function() {
jQuery('input,textarea').focus(function(){
jQuery(this).data('placeholder',jQuery(this).attr('placeholder'))
jQuery(this).attr('placeholder','');
});
jQuery('input,textarea').blur(function(){
jQuery(this).attr('placeholder',jQuery(this).data('placeholder'));
});
jQuery("#rt-main").css({'position':'relative'});
jQuery("#rt-main").append( jQuery(".network_list") );
jQuery("#rt-main").append( jQuery(".status_list") );
jQuery("#rt-main").append( jQuery(".recently_updated_list") );
jQuery(".status_list").css({"width":jQuery(".select_status").width()+"px", "left":left_select_status+"px"});
jQuery(".recently_updated_list").css({"width":jQuery(".recently_updated").width()+"px"});
// jQuery("#btn_search").before( jQuery("#signup") );
jQuery("#member-registration-div").css({'display':'none'});
var container = jQuery(".component-content");
var inProgress = false;
var ww = parseInt(document.body.clientWidth), height_diff = 200;
if(ww < 400)height_diff = 850;
//if(jQuery('*').is('.block-show-el')) {
function scrollBlok(){
$(window).scroll(function() {
setTimeout(function() {
var block_show_count = jQuery('.block-show-el').length,
bcount_items = parseInt(jQuery('#bcount_items').html());
//alert(block_show_count + ' '+ bcount_items)
var ww_ = jQuery(window).scrollTop() + jQuery(window).height(),
last_el = jQuery("div.block-show-el").last(),
last_el_bottom = last_el.offset().top;
if(ww_>1000 && $(window).scrollTop() + $(window).height() >= last_el_bottom && !inProgress) {
start = start + 20;
if(jQuery("input").is("#start_count")== true)
start = jQuery("#start_count").val();
if(jQuery("div").is("#loading")!= true)
var value = jQuery("#search-input").val(), category_param = jQuery("#category_param").val(),
letter_param = jQuery("#letter_param").val(),
network_param = jQuery("#network_param").val(),
status_param = jQuery("#status_param").val(),
type_listing = jQuery("#type_listing").val(),
recently_updated = jQuery("#recently_updated_value").val(),
serial_ids = jQuery("#serial_ids").val();
var task = 'load_list_items';
$.ajax({
type: "POST",
url: '/index.php?option=com_ncatalogues&controller=ajax&task='+task,
beforeSend: function() {inProgress = true;},
data: {
'task': task,
'option': 'com_ncatalogues',
'controller': 'ajax',
'value':value,
'start':start,
'network_param': network_param,
'status_param':status_param,
'serial_ids':serial_ids,
'type_listing':type_listing,
'recently_updated':recently_updated,
'letter_param':letter_param,
'category_param':category_param
},
success: function(r){
var data = r.split(":::");
if(jQuery("input").is("#start_count")== true) {
jQuery("#start_count").remove();
}
jQuery("#loading").remove();
jQuery(".items-leading").append(data[1]);
serial_ids = jQuery("#serial_ids").val();
jQuery("#serial_ids").val(serial_ids+','+data[2]);
inProgress = false;
/******************************* signup click *********************************/
jQuery(".show_remind_sign").bind("click", function(e) {
var return_url = jQuery("#return_url").val();
/*load ajax form*/
jQuery.ajax({
type: "POST",
url: '/index.php?option=com_ncatalogues&controller=ajax&task=load_login_form',
data: {
'task': 'load_login_form',
'option': 'com_ncatalogues',
'controller': 'ajax',
'return':return_url
},
success: function(r){
jQuery("#login_form").html(r);
jQuery("#login_form").css({"display":"block"});
jQuery(".icon-eye-open-password").bind("click", function() {
var att = jQuery("#modlgn-passwd").attr("type");
if(att == "text") {
jQuery("#modlgn-passwd").attr("type", "password");
jQuery(".icon-eye-open-password").removeClass("icon-eye-open").addClass("icon-eye-close");
} else {
jQuery("#modlgn-passwd").attr("type", "text");
jQuery(".icon-eye-open-password").removeClass("icon-eye-close").addClass("icon-eye-open");
}
var att = jQuery("#jform_password1").attr("type");
if(att == "text")
jQuery("#jform_password1").attr("type", "password");
else
jQuery("#jform_password1").attr("type", "text");
});
// var scrollTop = document.getElementById("rt-page-surround").scrollTop;
// alert(scrollTop);
var doc_w = jQuery(document).width();
var doc_h = screen.height;
jQuery("#rt-page-surround").addClass('bckgrnd');
jQuery("#rt-page-surround").toggleClass('bckgrndblur');
jQuery("body").append('');
jQuery("#login_form").prepend('');
var width_block = jQuery("#login_form").width(), height_block = jQuery("#login_form").height();
if(doc_w < width_block) { width_block = doc_w-10; height_block = 170; jQuery("#login_form").css({"width":width_block+"px" }); }
var left = (doc_w - width_block)/2, left2 = left + width_block/2;
var top = (doc_h - height_block)/2 -100, top2 = top + height_block/2;
top= $(window).scrollTop()+30 ;
jQuery("#login_form").css({'display':'block', "width":width_block+"px", "height":"auto","left":left+"px", "top":top+"px", "opacity":"0" });
jQuery("#login_form").css({ "opacity":"0" });
jQuery("#login_form").animate({"opacity":"1"}, 1000);
jQuery("#fade_question, .close_question").bind("click", function(){
jQuery("#rt-page-surround").toggleClass('bckgrndblur');
jQuery("#login_form").animate({"opacity":"0"}, 500, function(){
jQuery("#login_form").html(''); jQuery("#login_form").css({'display':'none'});
});
jQuery("#rt-page-surround").removeClass('bckgrndblur');
jQuery("#fade_question").remove();
});
/*open register form*/
jQuery("#open_register_form").bind("click", function(e) {
jQuery("#member-registration-div").css({'display':'block'});
jQuery("#login-form").css({'display':'none'});
jQuery("#type_login").html("Sign up for2");
jQuery("#type_login_comment").html("Create an account to keep track of all your favorite TV shows and release dates all in one place.2");
jQuery("#title_facebook").html("Sign up with Facebook");
return false;
});
/*end open register form*/
/*register form fields*/
jQuery("#jform_password1").bind("keyup", function() {
jQuery("#jform_password2").val( jQuery("#jform_password1").val() );
});
jQuery("#jform_password1").bind("change", function() {
var password = jQuery("#jform_password1").val();
jQuery("#jform_password2").val( jQuery("#jform_password1").val() );
if(password.length>3) {
jQuery("#jform_password1_ok").css({'display':'block'});
jQuery("#jform_password1_eye").animate({right: "27px"}, 500, function(){
jQuery("#jform_password1_eye").css({'border-right':'1px solid #ccc',});
})
}
});
jQuery("#modlgn-passwd").bind("change", function() {
var password = jQuery("#modlgn-passwd").val();
if(password.length>3) {
jQuery("#modlgn-passwd_ok").css({'display':'block'});
jQuery("#modlgn-passwd-eye").animate({right: "27px"}, 500, function(){
jQuery("#modlgn-passwd-eye").css({'border-right':'1px solid #ccc',});
})
}
});
jQuery("#jform_username").bind("keyup", function() {
var username = jQuery("#jform_username").val();
jQuery("#jform_name").val( username );
});
jQuery("#jform_username").bind("change", function(){
var username = jQuery("#jform_username").val();
jQuery("#jform_name").val( username );
/*ajax validate*/
jQuery.ajax({
type: "POST",
url: '/index.php?option=com_ncatalogues&controller=ajax&task=username_valid',
data: {'task': 'username_valid', 'option': 'com_ncatalogues', 'controller': 'ajax', '#username':username},
success: function(r){
if(r == 1){
jQuery("#jform_username_ok").css({'display':'block'});
jQuery("#jform_username_err").css({'display':'none'});
jQuery("#jform_username_err").removeAttr("title");
jQuery("#jform_username").removeAttr("title");
}
else{
jQuery("#jform_username_err").css({'display':'block'});
jQuery("#jform_username_ok").css({'display':'none'});
jQuery("#jform_username_err").attr("title", r);
jQuery("#jform_username").attr("title", r);
jQuery("#jform_username").attr("aria-invalid", "true");
jQuery("#jform_username_err").tooltip();
}
}
});
/*end ajax validate*/
});
jQuery("#jform_email1").bind("change", function() {
var email = jQuery("#jform_email1").val();
jQuery("#jform_email2").val( email );
});
jQuery("#jform_email1").bind("keyup", function(){
var email = jQuery("#jform_email1").val();
jQuery("#jform_email2").val( email );
/*ajax validate*/
jQuery.ajax({
type: "POST",
url: '/index.php?option=com_ncatalogues&controller=ajax&task=email_valid',
data: {'task': 'email_valid', 'option': 'com_ncatalogues', 'controller': 'ajax', 'email':email},
success: function(r){
if(r == 1){
jQuery("#jform_email1_ok").css({'display':'block'});
jQuery("#jform_email1_err").css({'display':'none'});
jQuery("#jform_email1_err").removeAttr("title");
jQuery("#jform_email1").removeAttr("title");
}
else{
jQuery("#jform_email1_err").css({'display':'block'});
jQuery("#jform_email1_ok").css({'display':'none'});
jQuery("#jform_email1_err").attr("title", r);
jQuery("#jform_email1").attr("title", r);
jQuery("#jform_email1").attr("aria-invalid", "true");
jQuery("#jform_email1_err").tooltip();
}
}
});
/*end ajax validate*/
});
/*end register form fields*/
/*open login form*/
jQuery("#open_login_form").bind("click", function(e) {
jQuery("#member-registration-div").css({'display':'none'});
jQuery("#login-form").css({'display':'block'});
jQuery("#type_login").html("Log in");
jQuery("#type_login_comment").html("Keep track of all your favorite TV shows and release dates all in one place.");
jQuery("#title_facebook").html("Log in with Facebook");
return false;
});
/*end open login form*/
}
});
/*end ajax form*/
});
/******************************* end signup click *****************************/
}
});
};
}, 1000);
});
}
/* if scrollBlock not this function is working */
function ssscrollBlok(){
var ready = true; //Assign the flag here
var timeout;
$(window).on('scroll', function(){
//console.log(ready && $(window).scrollTop() + $(window).height() == $(document).height());
//if ($(window).scrollTop() >= ($(document).height() - $(window).height())) {
if ($(window).scrollTop() >= $('#rt-page-surround').offset().top + $('#rt-page-surround').outerHeight() - window.innerHeight) {
//clearTimeout(timeout);
//alert('test');
ready = false; //Set the flag here
clearTimeout(timeout);
timeout = setTimeout(function() {
var block_show_count = jQuery('.block-show-el').length,
bcount_items = parseInt(jQuery('#bcount_items').html());
//alert(block_show_count + ' '+ bcount_items)
var verificaHorario = $('body').find("#start_count");
if (verificaHorario) {
start = verificaHorario.attr('value');
}
var ww_ = jQuery(window).scrollTop() + jQuery(window).height(),
last_el = jQuery("div.block-show-el").last(),
last_el_bottom = last_el.offset().top;
/*console.log($(window).scrollTop() + $(window).height()+ '>='+ parseInt(last_el_bottom));
console.log(bcount_items +'>'+ block_show_count );
console.log(inProgress);*/
//console.log(ww_+ '>'+ 1000 +' && '+ bcount_items +' > '+ block_show_count +' && '+ $(window).scrollTop() + $(window).height() +'>='+ last_el_bottom +' && '+ !inProgress +' && '+ start);
//if(ww_>1000 && bcount_items > block_show_count && $(window).scrollTop() + $(window).height() > $(document).height() - 100 && !inProgress){
//if(ww_>1000 && bcount_items > block_show_count && !inProgress){
//console.log('I am In');
//var inProgress = true;
start = start + 20;
if(jQuery("input").is("#start_count")== true)
start = jQuery("#start_count").val();
if(jQuery("div").is("#loading")!= true)
jQuery(".items-leading").append('
');
var value = jQuery("#search-input").val(), category_param = jQuery("#category_param").val(),
letter_param = jQuery("#letter_param").val(),
network_param = jQuery("#network_param").val(),
status_param = jQuery("#status_param").val(),
type_listing = jQuery("#type_listing").val(),
recently_updated = jQuery("#recently_updated_value").val(),
serial_ids = jQuery("#serial_ids").val();
var task = 'load_list_items';
//console.log('sart_count '+ start);
$.ajax({
type: "POST",
url: '/index.php?option=com_ncatalogues&controller=ajax&task='+task+'&scroll=1',
beforeSend: function() {inProgress = true;},
data: {'task': task, 'option': 'com_ncatalogues', 'controller': 'ajax', 'value':value,
'start':start, 'network_param': network_param, 'status_param':status_param, 'serial_ids':serial_ids,
'type_listing':type_listing, 'recently_updated':recently_updated, 'letter_param':letter_param,'category_param':category_param },
success: function(r,jqXHR, settings){
console.log(jqXHR);
var data = r.split(":::");
console.log(data);
if(jQuery("input").is("#start_count")== true) {
jQuery("#start_count").remove();
}
jQuery("#loading").remove();
jQuery(".items-leading").append(data[1]);
serial_ids = jQuery("#serial_ids").val();
jQuery("#serial_ids").val(serial_ids+','+data[2]);
inProgress = false;
/******************************* signup click *********************************/
jQuery(".show_remind_sign").bind("click", function(e) {
var return_url = jQuery("#return_url").val();
/*load ajax form*/
jQuery.ajax({
type: "POST",
url: '/index.php?option=com_ncatalogues&controller=ajax&task=load_login_form',
data: {'task': 'load_login_form', 'option': 'com_ncatalogues', 'controller': 'ajax', 'return':return_url},
success: function(r){
jQuery("#login_form").html(r);
jQuery("#login_form").css({"display":"block"});
jQuery(".icon-eye-open-password").bind("click", function() {
var att = jQuery("#modlgn-passwd").attr("type");
if(att == "text")
{
jQuery("#modlgn-passwd").attr("type", "password");
jQuery(".icon-eye-open-password").removeClass("icon-eye-open").addClass("icon-eye-close");
}else
{
jQuery("#modlgn-passwd").attr("type", "text");
jQuery(".icon-eye-open-password").removeClass("icon-eye-close").addClass("icon-eye-open");
}
var att = jQuery("#jform_password1").attr("type");
if(att == "text")
jQuery("#jform_password1").attr("type", "password");
else
jQuery("#jform_password1").attr("type", "text");
});
// var scrollTop = document.getElementById("rt-page-surround").scrollTop;
// alert(scrollTop);
var doc_w = jQuery(document).width();
var doc_h = screen.height;
jQuery("#rt-page-surround").addClass('bckgrnd');
jQuery("#rt-page-surround").toggleClass('bckgrndblur');
jQuery("body").append('');
jQuery("#login_form").prepend('');
var width_block = jQuery("#login_form").width(), height_block = jQuery("#login_form").height();
if(doc_w < width_block) { width_block = doc_w-10; height_block = 170; jQuery("#login_form").css({"width":width_block+"px" }); }
var left = (doc_w - width_block)/2, left2 = left + width_block/2;
var top = (doc_h - height_block)/2 -100, top2 = top + height_block/2;
top= $(window).scrollTop()+30 ;
jQuery("#login_form").css({'display':'block', "width":width_block+"px", "height":"auto","left":left+"px", "top":top+"px", "opacity":"0" });
jQuery("#login_form").css({ "opacity":"0" });
jQuery("#login_form").animate({"opacity":"1"}, 1000);
jQuery("#fade_question, .close_question").bind("click", function(){
jQuery("#rt-page-surround").toggleClass('bckgrndblur');
jQuery("#login_form").animate({"opacity":"0"}, 500, function(){
jQuery("#login_form").html(''); jQuery("#login_form").css({'display':'none'});
});
jQuery("#rt-page-surround").removeClass('bckgrndblur');
jQuery("#fade_question").remove();
});
/*open register form*/
jQuery("#open_register_form").bind("click", function(e) {
jQuery("#member-registration-div").css({'display':'block'});
jQuery("#login-form").css({'display':'none'});
jQuery("#type_login").html("Sign up for2");
jQuery("#type_login_comment").html("Create an account to keep track of all your favorite TV shows and release dates all in one place.2");
jQuery("#title_facebook").html("Sign up with Facebook");
return false;
});
/*end open register form*/
/*register form fields*/
jQuery("#jform_password1").bind("keyup", function()
{
jQuery("#jform_password2").val( jQuery("#jform_password1").val() );
});
jQuery("#jform_password1").bind("change", function()
{
var password = jQuery("#jform_password1").val();
jQuery("#jform_password2").val( jQuery("#jform_password1").val() );
if(password.length>3)
{
jQuery("#jform_password1_ok").css({'display':'block'});
jQuery("#jform_password1_eye").animate({right: "27px"}, 500, function(){
jQuery("#jform_password1_eye").css({'border-right':'1px solid #ccc',});
})
}
});
jQuery("#modlgn-passwd").bind("change", function()
{
var password = jQuery("#modlgn-passwd").val();
if(password.length>3)
{
jQuery("#modlgn-passwd_ok").css({'display':'block'});
jQuery("#modlgn-passwd-eye").animate({right: "27px"}, 500, function(){
jQuery("#modlgn-passwd-eye").css({'border-right':'1px solid #ccc',});
})
}
});
jQuery("#jform_username").bind("keyup", function(){
var username = jQuery("#jform_username").val();
jQuery("#jform_name").val( username );
});
jQuery("#jform_username").bind("change", function() {
var username = jQuery("#jform_username").val();
jQuery("#jform_name").val( username );
/*ajax validate*/
jQuery.ajax({
type: "POST",
url: '/index.php?option=com_ncatalogues&controller=ajax&task=username_valid',
data: {'task': 'username_valid', 'option': 'com_ncatalogues', 'controller': 'ajax', '#username':username},
success: function(r){
if(r == 1){
jQuery("#jform_username_ok").css({'display':'block'});
jQuery("#jform_username_err").css({'display':'none'});
jQuery("#jform_username_err").removeAttr("title");
jQuery("#jform_username").removeAttr("title");
}
else{
jQuery("#jform_username_err").css({'display':'block'});
jQuery("#jform_username_ok").css({'display':'none'});
jQuery("#jform_username_err").attr("title", r);
jQuery("#jform_username").attr("title", r);
jQuery("#jform_username").attr("aria-invalid", "true");
jQuery("#jform_username_err").tooltip();
}
}
});
/*end ajax validate*/
});
jQuery("#jform_email1").bind("change", function() {
var email = jQuery("#jform_email1").val();
jQuery("#jform_email2").val( email );
});
jQuery("#jform_email1").bind("keyup", function() {
var email = jQuery("#jform_email1").val();
jQuery("#jform_email2").val( email );
/*ajax validate*/
jQuery.ajax({
type: "POST",
url: '/index.php?option=com_ncatalogues&controller=ajax&task=email_valid',
data: {'task': 'email_valid', 'option': 'com_ncatalogues', 'controller': 'ajax', 'email':email},
success: function(r){
if(r == 1){
jQuery("#jform_email1_ok").css({'display':'block'});
jQuery("#jform_email1_err").css({'display':'none'});
jQuery("#jform_email1_err").removeAttr("title");
jQuery("#jform_email1").removeAttr("title");
}
else{
jQuery("#jform_email1_err").css({'display':'block'});
jQuery("#jform_email1_ok").css({'display':'none'});
jQuery("#jform_email1_err").attr("title", r);
jQuery("#jform_email1").attr("title", r);
jQuery("#jform_email1").attr("aria-invalid", "true");
jQuery("#jform_email1_err").tooltip();
}
}
});
/*end ajax validate*/
});
/*end register form fields*/
/*open login form*/
jQuery("#open_login_form").bind("click", function(e) {
jQuery("#member-registration-div").css({'display':'none'});
jQuery("#login-form").css({'display':'block'});
jQuery("#type_login").html("Log in");
jQuery("#type_login_comment").html("Keep track of all your favorite TV shows and release dates all in one place.");
jQuery("#title_facebook").html("Log in with Facebook");
return false;
});
/*end open login form*/
}
}).always(function(){
ready = true; //Reset the flag here
});
/*end ajax form*/
});
/******************************* end signup click *****************************/
} // end success
});
//};
}, 50);
//}
}
});
}
function mobilescroll(){
var verificaHorario = jQuery("#start_count").val();
start = start + 20;
jQuery("#start_count").remove();
var value = jQuery("#search-input").val(), category_param = jQuery("#category_param").val(),
letter_param = jQuery("#letter_param").val(),
network_param = jQuery("#network_param").val(),
status_param = jQuery("#status_param").val(),
type_listing = jQuery("#type_listing").val(),
recently_updated = jQuery("#recently_updated_value").val(),
serial_ids = jQuery("#serial_ids").val();
//console.log('sart_count '+ start);
$.ajax({
type: "POST",
url: '/index.php?option=com_ncatalogues&controller=ajax&task=load_list_items&test=1',
beforeSend: function() {inProgress = true;},
data: {'task': 'load_list_items', 'option': 'com_ncatalogues', 'controller': 'ajax', 'value':value,
'start':start, 'network_param': network_param, 'status_param':status_param, 'serial_ids':serial_ids,
'type_listing':type_listing, 'recently_updated':recently_updated, 'letter_param':letter_param,'category_param':category_param },
success: function(r,jqXHR, settings){
console.log(jqXHR);
var data = r.split(":::");
//console.log(data);
if(jQuery("input").is("#start_count")== true) {
jQuery("#start_count").remove();
}
jQuery("#loading").remove();
var items = jQuery(".items-leading").append(data[1]);
serial_ids = jQuery("#serial_ids").val();
jQuery("#start_count").remove();
var wrapper = $(".items-leading");
wrapper.after('');
//$('');
//jQuery(".items-leading").after().append();
//items.after().append();
jQuery("#serial_ids").val(serial_ids+','+data[2]);
inProgress = false;
/******************************* signup click *********************************/
jQuery(".show_remind_sign").bind("click", function(e) {
var return_url = jQuery("#return_url").val();
/*load ajax form*/
jQuery.ajax({
type: "POST",
url: '/index.php?option=com_ncatalogues&controller=ajax&task=load_login_form',
data: {
'task': 'load_login_form',
'option': 'com_ncatalogues',
'controller': 'ajax',
'return':return_url
},
success: function(r){
jQuery("#login_form").html(r);
jQuery("#login_form").css({"display":"block"});
jQuery(".icon-eye-open-password").bind("click", function() {
var att = jQuery("#modlgn-passwd").attr("type");
if(att == "text")
{
jQuery("#modlgn-passwd").attr("type", "password");
jQuery(".icon-eye-open-password").removeClass("icon-eye-open").addClass("icon-eye-close");
}else
{
jQuery("#modlgn-passwd").attr("type", "text");
jQuery(".icon-eye-open-password").removeClass("icon-eye-close").addClass("icon-eye-open");
}
var att = jQuery("#jform_password1").attr("type");
if(att == "text")
jQuery("#jform_password1").attr("type", "password");
else
jQuery("#jform_password1").attr("type", "text");
});
// var scrollTop = document.getElementById("rt-page-surround").scrollTop;
// alert(scrollTop);
var doc_w = jQuery(document).width();
var doc_h = screen.height;
jQuery("#rt-page-surround").addClass('bckgrnd');
jQuery("#rt-page-surround").toggleClass('bckgrndblur');
jQuery("body").append('');
jQuery("#login_form").prepend('');
var width_block = jQuery("#login_form").width(), height_block = jQuery("#login_form").height();
if(doc_w < width_block) { width_block = doc_w-10; height_block = 170; jQuery("#login_form").css({"width":width_block+"px" }); }
var left = (doc_w - width_block)/2, left2 = left + width_block/2;
var top = (doc_h - height_block)/2 -100, top2 = top + height_block/2;
top= $(window).scrollTop()+30 ;
jQuery("#login_form").css({'display':'block', "width":width_block+"px", "height":"auto","left":left+"px", "top":top+"px", "opacity":"0" });
jQuery("#login_form").css({ "opacity":"0" });
jQuery("#login_form").animate({"opacity":"1"}, 1000);
jQuery("#fade_question, .close_question").bind("click", function(){
jQuery("#rt-page-surround").toggleClass('bckgrndblur');
jQuery("#login_form").animate({"opacity":"0"}, 500, function(){
jQuery("#login_form").html(''); jQuery("#login_form").css({'display':'none'});
});
jQuery("#rt-page-surround").removeClass('bckgrndblur');
jQuery("#fade_question").remove();
});
/*open register form*/
jQuery("#open_register_form").bind("click", function(e) {
jQuery("#member-registration-div").css({'display':'block'});
jQuery("#login-form").css({'display':'none'});
jQuery("#type_login").html("Sign up for2");
jQuery("#type_login_comment").html("Create an account to keep track of all your favorite TV shows and release dates all in one place.2");
jQuery("#title_facebook").html("Sign up with Facebook");
return false;
});
/*end open register form*/
/*register form fields*/
jQuery("#jform_password1").bind("keyup", function()
{
jQuery("#jform_password2").val( jQuery("#jform_password1").val() );
});
jQuery("#jform_password1").bind("change", function()
{
var password = jQuery("#jform_password1").val();
jQuery("#jform_password2").val( jQuery("#jform_password1").val() );
if(password.length>3)
{
jQuery("#jform_password1_ok").css({'display':'block'});
jQuery("#jform_password1_eye").animate({right: "27px"}, 500, function(){
jQuery("#jform_password1_eye").css({'border-right':'1px solid #ccc',});
})
}
});
jQuery("#modlgn-passwd").bind("change", function()
{
var password = jQuery("#modlgn-passwd").val();
if(password.length>3)
{
jQuery("#modlgn-passwd_ok").css({'display':'block'});
jQuery("#modlgn-passwd-eye").animate({right: "27px"}, 500, function(){
jQuery("#modlgn-passwd-eye").css({'border-right':'1px solid #ccc',});
})
}
});
jQuery("#jform_username").bind("keyup", function(){
var username = jQuery("#jform_username").val();
jQuery("#jform_name").val( username );
});
jQuery("#jform_username").bind("change", function() {
var username = jQuery("#jform_username").val();
jQuery("#jform_name").val( username );
/*ajax validate*/
jQuery.ajax({
type: "POST",
url: '/index.php?option=com_ncatalogues&controller=ajax&task=username_valid',
data: {'task': 'username_valid', 'option': 'com_ncatalogues', 'controller': 'ajax', '#username':username},
success: function(r){
if(r == 1){
jQuery("#jform_username_ok").css({'display':'block'});
jQuery("#jform_username_err").css({'display':'none'});
jQuery("#jform_username_err").removeAttr("title");
jQuery("#jform_username").removeAttr("title");
}
else{
jQuery("#jform_username_err").css({'display':'block'});
jQuery("#jform_username_ok").css({'display':'none'});
jQuery("#jform_username_err").attr("title", r);
jQuery("#jform_username").attr("title", r);
jQuery("#jform_username").attr("aria-invalid", "true");
jQuery("#jform_username_err").tooltip();
}
}
});
/*end ajax validate*/
});
jQuery("#jform_email1").bind("change", function() {
var email = jQuery("#jform_email1").val();
jQuery("#jform_email2").val( email );
});
jQuery("#jform_email1").bind("keyup", function() {
var email = jQuery("#jform_email1").val();
jQuery("#jform_email2").val( email );
/*ajax validate*/
jQuery.ajax({
type: "POST",
url: '/index.php?option=com_ncatalogues&controller=ajax&task=email_valid',
data: {'task': 'email_valid', 'option': 'com_ncatalogues', 'controller': 'ajax', 'email':email},
success: function(r){
if(r == 1){
jQuery("#jform_email1_ok").css({'display':'block'});
jQuery("#jform_email1_err").css({'display':'none'});
jQuery("#jform_email1_err").removeAttr("title");
jQuery("#jform_email1").removeAttr("title");
}
else{
jQuery("#jform_email1_err").css({'display':'block'});
jQuery("#jform_email1_ok").css({'display':'none'});
jQuery("#jform_email1_err").attr("title", r);
jQuery("#jform_email1").attr("title", r);
jQuery("#jform_email1").attr("aria-invalid", "true");
jQuery("#jform_email1_err").tooltip();
}
}
});
/*end ajax validate*/
});
/*end register form fields*/
/*open login form*/
jQuery("#open_login_form").bind("click", function(e) {
jQuery("#member-registration-div").css({'display':'none'});
jQuery("#login-form").css({'display':'block'});
jQuery("#type_login").html("Log in");
jQuery("#type_login_comment").html("Keep track of all your favorite TV shows and release dates all in one place.");
jQuery("#title_facebook").html("Log in with Facebook");
return false;
});
/*end open login form*/
}
}).always(function(){
ready = true; //Reset the flag here
});
/*end ajax form*/
});
/******************************* end signup click *****************************/
} // end success
});
}
function lazy_load_article(){
var timeout;
$(window).on('scroll', function() {
if ($(window).scrollTop() >= $('#rt-page-surround').offset().top + $('#rt-page-surround').outerHeight() - window.innerHeight) {
clearTimeout(timeout);
timeout = setTimeout(function() {
}, 50);
}
});
/*$(window).scroll(function() {
var footerTop = $('#rt-footer-surround').position().top; // or .offset().top
var scrollTop = $(window).scrollTop();
var viewportHeight = $(window).height();
var timeout;
if (footerTop <= scrollTop + viewportHeight) {
timeout = setTimeout(function() {
console.log("true|" + footerTop + "|" + scrollTop + "|" + viewportHeight);//alert
}, 50);
} else {
console.log("false|" + footerTop + "|" + scrollTop + "|" + viewportHeight);//alert
}
});*/
/*var timeout;
$(window).scroll(function() {
clearTimeout(timeout);
timeout = setTimeout(function() {
var strt = 0;
var t = $(window).scrollTop() + $(window).height() >= $(document).height() - 100;
console.log(t);
if (t === true) {
}
}, 50);
});*/
/*$(window).scroll(function (e) {
e.preventDefault();
var strt = 0;
var t = $(window).scrollTop() + $(window).height() >= $(document).height() - 100;
console.log(t);
if (t === true) {
strt = strt + 20;
alert(strt);
}
//console.log($(window).scrollTop() + $(window).height() >= $(document).height() - 150);
if ($(window).scrollTop() + $(window).height() >= $(document).height() - 50) {
}
});*/
}
/*search ajax*/
jQuery("#search-input").bind("keyup", function() {
var value = jQuery("#search-input").val(),
network_param = jQuery("#network_param").val(),
status_param = jQuery("#status_param").val(),
start = 0;
if(value.length>0) {
jQuery(".icon-search-input").css({'color':'#000'});
jQuery("#search-input").css({'color':'#000'});
}
else {
jQuery(".icon-search-input").css({'color':'#999'});
jQuery("#search-input").css({'color':'#999'});
}
search_ajax();
});
/*end search ajax*/
});
})(jQuery);
function quick_remind_me(id)
{
var type_listing = jQuery("#type_listing").val();
if(jQuery('#bookmark'+id).hasClass('icon-heart-empty'))
{
jQuery('#quick_remind'+id).stop().animate({'padding-top':'20px'}, 500, function(){
jQuery('#bookmark'+id).removeClass('icon-heart-empty').toggleClass('icon-heart');
if(type_listing == '2'){jQuery('#track_text'+id).html('');}
else
jQuery('#track_text'+id).html('Tracking');
jQuery('#quick_remind'+id).css({'padding-top':'-20px'}).stop().animate({'padding-top':'0'}, 500);
jQuery.ajax({
type: "POST",
url: '/index.php?option=com_ncatalogues&controller=ajax&task=letterplugin',
beforeSend: function() { },
data: {'task': 'letterplugin', 'option': 'com_ncatalogues', 'controller': 'ajax', 'id':id },
success: function(r){
}
});
});
}
else
{
jQuery('#quick_remind'+id).stop().animate({'padding-top':'20px'}, 500, function(){
jQuery('#bookmark'+id).removeClass('icon-heart').toggleClass('icon-heart-empty');
jQuery('#track_text'+id).html('Track');
jQuery('#quick_remind'+id).css({'padding-top':'-20px'}).stop().animate({'padding-top':'0'}, 500);
jQuery.ajax({
type: "POST",
url: '/index.php?option=com_ncatalogues&controller=ajax&task=letterplugin',
beforeSend: function() { },
data: {'task': 'letterplugin', 'option': 'com_ncatalogues', 'controller': 'ajax', 'id':id },
success: function(r){
}
});
});
}
}
function btn_subscribe()
{
jQuery(".comments-form-subscribe, #label-comments-form-subscribe").bind('click',function(){
if(jQuery(".comments-form-subscribe").hasClass('icon-check-sign') == true)
{
jQuery(".comments-form-subscribe").removeClass('icon-check-sign').addClass('icon-check-empty');
jQuery('.checkbox-comments-form-subscribe').prop('checked', false);
}
else
{
jQuery(".comments-form-subscribe").addClass('icon-check-sign').removeClass('icon-check-empty');
jQuery('.checkbox-comments-form-subscribe').prop('checked', true);
}
});
jQuery(".comments-form-subscribe0, #label-comments-form-subscribe0").bind('click',function(){
if(jQuery(".comments-form-subscribe0").hasClass('icon-circle') == true)
{
jQuery(".comments-form-subscribe0").removeClass('icon-circle').addClass('icon-circle-blank');
jQuery(".comments-form-subscribe1").addClass('icon-circle').removeClass('icon-circle-blank');
jQuery('.radio-comments-form-subscribe0').prop('checked', false);
jQuery('.radio-comments-form-subscribe1').prop('checked', true);
}
else
{
jQuery(".comments-form-subscribe0").addClass('icon-circle').removeClass('icon-circle-blank');
jQuery(".comments-form-subscribe1").removeClass('icon-circle').addClass('icon-circle-blank');
jQuery('.radio-comments-form-subscribe0').prop('checked', true);
jQuery('.radio-comments-form-subscribe1').prop('checked', false);
}
});
jQuery(".comments-form-subscribe1, #label-comments-form-subscribe1").bind('click',function(){
if(jQuery(".comments-form-subscribe1").hasClass('icon-circle') == true)
{
jQuery(".comments-form-subscribe1").removeClass('icon-circle').addClass('icon-circle-blank');
jQuery(".comments-form-subscribe0").addClass('icon-circle').removeClass('icon-circle-blank');
jQuery('.radio-comments-form-subscribe1').prop('checked', false);
jQuery('.radio-comments-form-subscribe0').prop('checked', true);
}
else
{
jQuery(".comments-form-subscribe1").addClass('icon-circle').removeClass('icon-circle-blank');
jQuery(".comments-form-subscribe0").removeClass('icon-circle').addClass('icon-circle-blank');
jQuery('.radio-comments-form-subscribe1').prop('checked', true);
jQuery('.radio-comments-form-subscribe0').prop('checked', false);
}
});
}
function last_comment_border(){
var count_comments = jQuery(".comment-row").length; count_comments--;
jQuery(".comment-row").each(function(index, value){
jQuery(this).removeClass('comment-row-last');
if(count_comments == index) jQuery(this).addClass('comment-row-last');
});
}
function comment_fuction(){
btn_subscribe();
last_comment_border();
/**********************************************************************/
/*****************BEGIN select_order_by click****************************/
/**********************************************************************/
jQuery("#rt-main").append( jQuery(".order_by_list") );
jQuery(".order_by_list").each(function(index, value){
if(index > 0)jQuery(this).remove();
});
var top_order_by = 0;
var dir8 = 0, order_by_open = 0 ;
if(jQuery("button").is(".select_order_by") == true)
top_order_by = jQuery(".select_order_by").offset().top + 20;
var left_select_order_by = 0;
if(jQuery("button").is(".select_order_by") == true)
left_select_order_by = jQuery(".select_order_by").position().left;
jQuery(".order_by_list").css({"width":jQuery(".select_order_by").width()+"px", "left":left_select_order_by+"px"});
jQuery(".select_order_by").bind("click", function(){
if(jQuery("button").is(".select_order_by") == true)
{
top_order_by = jQuery(".select_order_by").offset().top - 30;
if(jQuery("div").is(".showimage") == true)
{
var height_showimage = jQuery(".showimage").height();
var height_showimage_ads = jQuery(".showimage-block-ads").innerHeight();
top_order_by = top_order_by - height_showimage - height_showimage_ads;
}
}
jQuery('.fade_filter8').each(function(index, value){
jQuery(this).remove();
}); jQuery('.fade_filter9').each(function(index, value){
jQuery(this).remove();
}); fade_filter9_close(); jQuery('.fade_filter10').each(function(index, value){
jQuery(this).remove();
}); fade_filter10_close();
jQuery('.fade_filter').each(function(index, value){
jQuery(this).remove();
});
per_page_open = 0; threads_open = 0;
dir8 = 1 - dir8 ;
if(order_by_open == 0)
{
order_by_open = 1;
jQuery("body").append('');
jQuery("#fade_filter8, .close_order_by, .order_by").bind("click", function(){
fade_filter8_close();
});
jQuery(".order_by_list").css({'transform': 'translateY(0px)', "top":top_order_by, "left":left_select_order_by+"px", "opacity":"1"});
jQuery(".tag_order_by").bind("click", function(){
fade_filter8_close(); fade_filter9_close(); fade_filter10_close(); jQuery(".tag_order_by").each(function( index ) {
jQuery( this ).removeClass('active_tag');
});
jQuery(".select_order_by").addClass("button_active");
jQuery(".cancel_filter_params").css({'display':'block'});
var title = jQuery(this).html();
id = jQuery(this).attr("id"); id = id.replace("order_by_", "");
jQuery( this ).addClass('active_tag');
if(jQuery(".filter_selected_order_by").length>0) {
//jQuery(".filter_selected_order_by").html(title);
}
else
{
jQuery(".order_by_title").html(title);
}
jQuery("#comments-order_by").val(id);
var object_id = jQuery("#object_id").val();
var comments_list_order = jQuery("#comments-order_by").val();
var comments_threads = jQuery("#comments-threads").val();
var comments_per_page = jQuery("#comments-per_page").val();
jcomments.set_order_by(object_id, 'com_content', id, comments_per_page, comments_threads);
});
}
else
{
jQuery(".order_by_list").css({'transform': 'translateY(10px)', "opacity":"0", "top":"-9999px"});
order_by_open = 0;
}
jQuery(".select_order_by_icon").css({'transform': 'rotate(' + rotate1 + 'deg)',
'-moz-transform': 'rotate(' + rotate1 + 'deg)',
'-ms-transform': 'rotate(' + rotate1 + 'deg)',
'-webkit-transform': 'rotate(' + rotate1 + 'deg)',
'-o-transform': 'rotate(' + rotate1 + 'deg)'
})
.animate({offset: dir8 * 180 }, {
duration: 200,
easing: 'linear',
step: function(offset) {
jQuery(".select_order_by_icon") .css({
'transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-moz-transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-ms-transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-webkit-transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-o-transform': 'rotate(' + ( rotate1 + offset) + 'deg)'
} );
}
});
});
function fade_filter8_close()
{
jQuery('.fade_filter8').each(function(index, value){
jQuery(this).remove();
});
jQuery("#fade_filter8").remove(); jQuery(".fade_filter8").remove();
dir8 = 0;
/*close order_by list*/
jQuery(".select_order_by_icon").css({'transform': 'rotate(' + rotate1 + 'deg)',
'-moz-transform': 'rotate(' + rotate1 + 'deg)',
'-ms-transform': 'rotate(' + rotate1 + 'deg)',
'-webkit-transform': 'rotate(' + rotate1 + 'deg)',
'-o-transform': 'rotate(' + rotate1 + 'deg)'
})
.animate({offset: 0 }, {
duration: 200,
easing: 'linear',
step: function(offset) {
jQuery(".select_order_by_icon") .css( {
'transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-moz-transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-ms-transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-webkit-transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-o-transform': 'rotate(' + ( rotate1 + offset) + 'deg)'
});
jQuery(".order_by_list").css({'transform': 'translateY(10px)', "opacity":"0"});
order_by_open = 0;
},
complete: function() {
jQuery(".order_by_list").css({"top":"-9999px"});
}
});
}
function filter_selected_order_by_close(el)
{
el.animate({'width': '0', 'opacity':'0' }, 200,
function() {
el.remove();
jQuery(".select_order_by").removeClass("button_active");
jQuery(".tag_order_by").each(function( index ) {
jQuery( this ).removeClass('active_tag');
});
jQuery("#order_by_param").val('0');
//var network_param = jQuery("#network_param").val();
//if(network_param == '0') jQuery(".cancel_filter_params").css({'display':'none'});
search_ajax();
}
);
}
/**********************************************************************/
/*****************END select_order_by click******************************/
/**********************************************************************/
/**********************************************************************/
/*****************BEGIN select_per_page click****************************/
/**********************************************************************/
jQuery("#rt-main").append( jQuery(".per_page_list") );
jQuery(".per_page_list").each(function(index, value){
if(index > 0)jQuery(this).remove();
});
var top_per_page = 0;
var dir9 = 0, per_page_open = 0 ;
if(jQuery("button").is(".select_per_page") == true)
top_per_page = jQuery(".select_per_page").offset().top + 20;
var left_select_per_page = 0;
if(jQuery("button").is(".select_per_page") == true)
left_select_per_page = jQuery(".select_per_page").position().left;
jQuery(".per_page_list").css({"width":jQuery(".select_per_page").width()+"px", "left":left_select_per_page+"px"});
jQuery(".select_per_page").bind("click", function(){
if(jQuery("button").is(".select_per_page") == true)
{
top_per_page = jQuery(".select_per_page").offset().top - 30;
if(jQuery("div").is(".showimage") == true)
{
var height_showimage = jQuery(".showimage").height();
var height_showimage_ads = jQuery(".showimage-block-ads").innerHeight();
top_per_page = top_per_page - height_showimage - height_showimage_ads;
}
}
jQuery('.fade_filter8').each(function(index, value){
jQuery(this).remove();
}); fade_filter8_close(); jQuery('.fade_filter9').each(function(index, value){
jQuery(this).remove();
}); jQuery('.fade_filter10').each(function(index, value){
jQuery(this).remove();
}); fade_filter10_close();
jQuery('.fade_filter').each(function(index, value){
jQuery(this).remove();
});
order_by_open = 0; threads_open = 0;
dir9 = 1 - dir9 ;
if(per_page_open == 0)
{
per_page_open = 1;
jQuery("body").append('');
jQuery("#fade_filter9, .close_per_page, .per_page").bind("click", function(){
fade_filter9_close();
});
jQuery(".per_page_list").css({'transform': 'translateY(0px)', "top":top_per_page, "left":left_select_per_page+"px", "opacity":"1"});
jQuery(".tag_per_page").bind("click", function(){
fade_filter8_close(); fade_filter9_close(); fade_filter10_close(); jQuery(".tag_per_page").each(function( index ) {
jQuery( this ).removeClass('active_tag');
});
jQuery(".select_per_page").addClass("button_active");
jQuery(".cancel_filter_params").css({'display':'block'});
var title = jQuery(this).html();
id = jQuery(this).attr("id"); id = id.replace("per_page_", "");
jQuery( this ).addClass('active_tag');
if(jQuery(".filter_selected_per_page").length>0) {
//jQuery(".filter_selected_per_page").html(title);
}
else
{
jQuery(".per_page_title").html(title);
}
jQuery("#comments-per_page").val(id);
var object_id = jQuery("#object_id").val();
var comments_list_order = jQuery("#comments-order_by").val();
var comments_threads = jQuery("#comments-threads").val();
var comments_per_page = jQuery("#comments-per_page").val();
jcomments.set_per_page(object_id, 'com_content', id, comments_list_order, comments_threads);
});
}
else
{
jQuery(".per_page_list").css({'transform': 'translateY(10px)', "opacity":"0", "top":"-9999px"});
per_page_open = 0;
}
jQuery(".select_per_page_icon").css({'transform': 'rotate(' + rotate1 + 'deg)',
'-moz-transform': 'rotate(' + rotate1 + 'deg)',
'-ms-transform': 'rotate(' + rotate1 + 'deg)',
'-webkit-transform': 'rotate(' + rotate1 + 'deg)',
'-o-transform': 'rotate(' + rotate1 + 'deg)'
})
.animate({offset: dir9 * 180 }, {
duration: 200,
easing: 'linear',
step: function(offset) {
jQuery(".select_per_page_icon") .css({
'transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-moz-transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-ms-transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-webkit-transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-o-transform': 'rotate(' + ( rotate1 + offset) + 'deg)'
} );
}
});
});
function fade_filter9_close()
{
jQuery('.fade_filter9').each(function(index, value){
jQuery(this).remove();
});
jQuery("#fade_filter9").remove(); jQuery(".fade_filter9").remove();
dir9 = 0;
/*close per_page list*/
jQuery(".select_per_page_icon").css({'transform': 'rotate(' + rotate1 + 'deg)',
'-moz-transform': 'rotate(' + rotate1 + 'deg)',
'-ms-transform': 'rotate(' + rotate1 + 'deg)',
'-webkit-transform': 'rotate(' + rotate1 + 'deg)',
'-o-transform': 'rotate(' + rotate1 + 'deg)'
})
.animate({offset: 0 }, {
duration: 200,
easing: 'linear',
step: function(offset) {
jQuery(".select_per_page_icon") .css( {
'transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-moz-transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-ms-transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-webkit-transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-o-transform': 'rotate(' + ( rotate1 + offset) + 'deg)'
});
jQuery(".per_page_list").css({'transform': 'translateY(10px)', "opacity":"0"});
per_page_open = 0;
},
complete: function() {
jQuery(".per_page_list").css({"top":"-9999px"});
}
});
}
function filter_selected_per_page_close(el)
{
el.animate({'width': '0', 'opacity':'0' }, 200,
function() {
el.remove();
jQuery(".select_per_page").removeClass("button_active");
jQuery(".tag_per_page").each(function( index ) {
jQuery( this ).removeClass('active_tag');
});
jQuery("#per_page_param").val('0');
//var network_param = jQuery("#network_param").val();
//if(network_param == '0') jQuery(".cancel_filter_params").css({'display':'none'});
search_ajax();
}
);
}
/**********************************************************************/
/*****************END select_per_page click******************************/
/**********************************************************************/
/**********************************************************************/
/*****************BEGIN select_threads click****************************/
/**********************************************************************/
jQuery("#rt-main").append( jQuery(".threads_list") );
jQuery(".threads_list").each(function(index, value){
if(index > 0)jQuery(this).remove();
});
var top_threads = 0;
var dir10 = 0, threads_open = 0 ;
if(jQuery("button").is(".select_threads") == true)
top_threads = jQuery(".select_threads").offset().top + 20;
var left_select_threads = 0;
if(jQuery("button").is(".select_threads") == true)
left_select_threads = jQuery(".select_threads").position().left;
jQuery(".threads_list").css({"width":jQuery(".select_threads").width()+"px", "left":left_select_threads+"px"});
jQuery(".select_threads").bind("click", function(){
if(jQuery("button").is(".select_threads") == true)
{
top_threads = jQuery(".select_threads").offset().top - 30;
if(jQuery("div").is(".showimage") == true)
{
var height_showimage = jQuery(".showimage").height();
var height_showimage_ads = jQuery(".showimage-block-ads").innerHeight();
top_threads = top_threads - height_showimage - height_showimage_ads;
}
}
jQuery('.fade_filter8').each(function(index, value){
jQuery(this).remove();
}); fade_filter8_close(); jQuery('.fade_filter9').each(function(index, value){
jQuery(this).remove();
}); fade_filter9_close(); jQuery('.fade_filter10').each(function(index, value){
jQuery(this).remove();
});
jQuery('.fade_filter').each(function(index, value){
jQuery(this).remove();
});
order_by_open = 0; per_page_open = 0;
dir10 = 1 - dir10 ;
if(threads_open == 0)
{
threads_open = 1;
jQuery("body").append('');
jQuery("#fade_filter10, .close_threads, .threads").bind("click", function(){
fade_filter10_close();
});
jQuery(".threads_list").css({'transform': 'translateY(0px)', "top":top_threads, "left":left_select_threads+"px", "opacity":"1"});
jQuery(".tag_threads").bind("click", function(){
fade_filter8_close(); fade_filter9_close(); fade_filter10_close(); jQuery(".tag_threads").each(function( index ) {
jQuery( this ).removeClass('active_tag');
});
jQuery(".select_threads").addClass("button_active");
jQuery(".cancel_filter_params").css({'display':'block'});
var title = jQuery(this).html();
id = jQuery(this).attr("id"); id = id.replace("threads_", "");
jQuery( this ).addClass('active_tag');
if(jQuery(".filter_selected_threads").length>0) {
//jQuery(".filter_selected_threads").html(title);
}
else
{
jQuery(".threads_title").html(title);
}
jQuery("#comments-threads").val(id);
var object_id = jQuery("#object_id").val();
var comments_list_order = jQuery("#comments-order_by").val();
var comments_threads = jQuery("#comments-threads").val();
var comments_per_page = jQuery("#comments-per_page").val();
jcomments.set_threads(object_id, 'com_content', id, comments_list_order, comments_per_page);
});
}
else
{
jQuery(".threads_list").css({'transform': 'translateY(10px)', "opacity":"0", "top":"-9999px"});
threads_open = 0;
}
jQuery(".select_threads_icon").css({'transform': 'rotate(' + rotate1 + 'deg)',
'-moz-transform': 'rotate(' + rotate1 + 'deg)',
'-ms-transform': 'rotate(' + rotate1 + 'deg)',
'-webkit-transform': 'rotate(' + rotate1 + 'deg)',
'-o-transform': 'rotate(' + rotate1 + 'deg)'
})
.animate({offset: dir10 * 180 }, {
duration: 200,
easing: 'linear',
step: function(offset) {
jQuery(".select_threads_icon") .css({
'transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-moz-transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-ms-transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-webkit-transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-o-transform': 'rotate(' + ( rotate1 + offset) + 'deg)'
} );
}
});
});
function fade_filter10_close()
{
jQuery('.fade_filter10').each(function(index, value){
jQuery(this).remove();
});
jQuery("#fade_filter10").remove(); jQuery(".fade_filter10").remove();
dir10 = 0;
/*close threads list*/
jQuery(".select_threads_icon").css({'transform': 'rotate(' + rotate1 + 'deg)',
'-moz-transform': 'rotate(' + rotate1 + 'deg)',
'-ms-transform': 'rotate(' + rotate1 + 'deg)',
'-webkit-transform': 'rotate(' + rotate1 + 'deg)',
'-o-transform': 'rotate(' + rotate1 + 'deg)'
})
.animate({offset: 0 }, {
duration: 200,
easing: 'linear',
step: function(offset) {
jQuery(".select_threads_icon") .css( {
'transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-moz-transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-ms-transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-webkit-transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-o-transform': 'rotate(' + ( rotate1 + offset) + 'deg)'
});
jQuery(".threads_list").css({'transform': 'translateY(10px)', "opacity":"0"});
threads_open = 0;
},
complete: function() {
jQuery(".threads_list").css({"top":"-9999px"});
}
});
}
function filter_selected_threads_close(el)
{
el.animate({'width': '0', 'opacity':'0' }, 200,
function() {
el.remove();
jQuery(".select_threads").removeClass("button_active");
jQuery(".tag_threads").each(function( index ) {
jQuery( this ).removeClass('active_tag');
});
jQuery("#threads_param").val('0');
//var network_param = jQuery("#network_param").val();
//if(network_param == '0') jQuery(".cancel_filter_params").css({'display':'none'});
search_ajax();
}
);
}
/**********************************************************************/
/*****************END select_threads click******************************/
/**********************************************************************/
}
jQuery(document).ready(function(){
/**********************************************************************/
/*****************BEGIN select_season click****************************/
/**********************************************************************/
jQuery("#rt-main").append( jQuery(".season_list") );
jQuery("#rt-main").append( jQuery(".summary-episode") );
jQuery(".season_list").each(function(index, value){
if(index > 0)jQuery(this).remove();
});
var top_season = 0;
var dir11 = 0, season_open = 0 ;
if(jQuery("button").is(".select_season") == true)
{
top_season = jQuery(".select_season").offset().top + 20;
}
var left_select_season = 0;
if(jQuery("button").is(".select_season") == true)
left_select_season = jQuery(".select_season").position().left;
jQuery(".season_list").css({"width":jQuery(".select_season").width()+"px", "left":left_select_season+"px"});
jQuery(".select_season").bind("click", function(){
fade_summary_episode_close();
if(jQuery("button").is(".select_season") == true)
{
top_season = jQuery(".select_season").offset().top - 30;
if(jQuery("div").is(".showimage") == true)
{
var height_showimage = jQuery(".showimage").height();
var height_showimage_ads = jQuery(".showimage-block-ads").innerHeight();
top_season = top_season - height_showimage - height_showimage_ads;
}
}
jQuery('.fade_filter11').each(function(index, value){
jQuery(this).remove();
}); jQuery('.fade_filter12').each(function(index, value){
jQuery(this).remove();
}); fade_filter12_close();
jQuery('.fade_filter').each(function(index, value){
jQuery(this).remove();
});
ratingsseason_open = 0;
dir11 = 1 - dir11 ;
if(season_open == 0)
{
season_open = 1;
jQuery("body").append('');
jQuery("#fade_filter11, .close_season, .season").bind("click", function(){
fade_filter11_close();
});
jQuery(".season_list").css({'transform': 'translateY(0px)', "top":top_season, "left":left_select_season+"px", "opacity":"1"});
jQuery(".tag_season").bind("click", function(){
fade_filter11_close(); fade_filter12_close(); jQuery(".tag_season").each(function( index ) {
jQuery( this ).removeClass('active_tag');
});
jQuery(".select_season").addClass("button_active");
jQuery(".cancel_filter_params").css({'display':'block'});
var title = jQuery(this).html();
id = jQuery(this).attr("id"); id = id.replace("season_", "");
jQuery(".season_title").html(title);
fade_summary_episode_close();
jQuery( this ).addClass('active_tag');
if(jQuery(".filter_selected_season").length>0) {
//jQuery(".filter_selected_season").html(title);
}
else
{
jQuery(".season_title").html(title);
}
jQuery(".list-episodes-season").each(function( index ) {
jQuery( this ).removeClass('active_list');
});
jQuery("#list-episodes-season-"+id).addClass('active_list');
});
}
else
{
jQuery(".season_list").css({'transform': 'translateY(10px)', "opacity":"0", "top":"-9999px"});
season_open = 0;
}
jQuery(".select_season_icon").css({'transform': 'rotate(' + rotate1 + 'deg)',
'-moz-transform': 'rotate(' + rotate1 + 'deg)',
'-ms-transform': 'rotate(' + rotate1 + 'deg)',
'-webkit-transform': 'rotate(' + rotate1 + 'deg)',
'-o-transform': 'rotate(' + rotate1 + 'deg)'
})
.animate({offset: dir11 * 180 }, {
duration: 200,
easing: 'linear',
step: function(offset) {
jQuery(".select_season_icon") .css({
'transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-moz-transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-ms-transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-webkit-transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-o-transform': 'rotate(' + ( rotate1 + offset) + 'deg)'
} );
}
});
});
function fade_filter11_close()
{
jQuery('.fade_filter11').each(function(index, value){
jQuery(this).remove();
});
jQuery("#fade_filter11").remove(); jQuery(".fade_filter11").remove();
dir11 = 0;
/*close season list*/
jQuery(".select_season_icon").css({'transform': 'rotate(' + rotate1 + 'deg)',
'-moz-transform': 'rotate(' + rotate1 + 'deg)',
'-ms-transform': 'rotate(' + rotate1 + 'deg)',
'-webkit-transform': 'rotate(' + rotate1 + 'deg)',
'-o-transform': 'rotate(' + rotate1 + 'deg)'
})
.animate({offset: 0 }, {
duration: 200,
easing: 'linear',
step: function(offset) {
jQuery(".select_season_icon") .css( {
'transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-moz-transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-ms-transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-webkit-transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-o-transform': 'rotate(' + ( rotate1 + offset) + 'deg)'
});
jQuery(".season_list").css({'transform': 'translateY(10px)', "opacity":"0"});
season_open = 0;
},
complete: function() {
jQuery(".season_list").css({"top":"-9999px"});
}
});
}
function filter_selected_season_close(el)
{
el.animate({'width': '0', 'opacity':'0' }, 200,
function() {
el.remove();
jQuery(".select_season").removeClass("button_active");
jQuery(".tag_season").each(function( index ) {
jQuery( this ).removeClass('active_tag');
});
jQuery("#season_param").val('0');
//var network_param = jQuery("#network_param").val();
//if(network_param == '0') jQuery(".cancel_filter_params").css({'display':'none'});
search_ajax();
}
);
}
/**********************************************************************/
/*****************END select_season click******************************/
/**********************************************************************/
/**********************************************************************/
/*****************BEGIN select_ratingsseason click****************************/
/**********************************************************************/
jQuery("#rt-main").append( jQuery(".ratingsseason_list") );
jQuery("#rt-main").append( jQuery(".summary-episode") );
jQuery(".ratingsseason_list").each(function(index, value){
if(index > 0)jQuery(this).remove();
});
var top_ratingsseason = 0;
var dir12 = 0, ratingsseason_open = 0 ;
if(jQuery("button").is(".select_ratingsseason") == true)
{
top_ratingsseason = jQuery(".select_ratingsseason").offset().top + 20;
}
var left_select_ratingsseason = 0;
if(jQuery("button").is(".select_ratingsseason") == true)
left_select_ratingsseason = jQuery(".select_ratingsseason").position().left;
jQuery(".ratingsseason_list").css({"width":jQuery(".select_ratingsseason").width()+"px", "left":left_select_ratingsseason+"px"});
jQuery(".select_ratingsseason").bind("click", function(){
fade_summary_episode_close();
if(jQuery("button").is(".select_ratingsseason") == true)
{
top_ratingsseason = jQuery(".select_ratingsseason").offset().top - 30;
if(jQuery("div").is(".showimage") == true)
{
var height_showimage = jQuery(".showimage").height();
var height_showimage_ads = jQuery(".showimage-block-ads").innerHeight();
top_ratingsseason = top_ratingsseason - height_showimage - height_showimage_ads;
}
}
jQuery('.fade_filter11').each(function(index, value){
jQuery(this).remove();
}); fade_filter11_close(); jQuery('.fade_filter12').each(function(index, value){
jQuery(this).remove();
});
jQuery('.fade_filter').each(function(index, value){
jQuery(this).remove();
});
season_open = 0;
dir12 = 1 - dir12 ;
if(ratingsseason_open == 0)
{
ratingsseason_open = 1;
jQuery("body").append('');
jQuery("#fade_filter12, .close_ratingsseason, .ratingsseason").bind("click", function(){
fade_filter12_close();
});
jQuery(".ratingsseason_list").css({'transform': 'translateY(0px)', "top":top_ratingsseason, "left":left_select_ratingsseason+"px", "opacity":"1"});
jQuery(".tag_ratingsseason").bind("click", function(){
fade_filter11_close(); fade_filter12_close(); jQuery(".tag_ratingsseason").each(function( index ) {
jQuery( this ).removeClass('active_tag');
});
jQuery(".select_ratingsseason").addClass("button_active");
jQuery(".cancel_filter_params").css({'display':'block'});
var title = jQuery(this).html();
id = jQuery(this).attr("id"); id = id.replace("ratingsseason_", "");
jQuery(".ratingsseason_title").html(title);
fade_summary_episode_close();
jQuery( this ).addClass('active_tag');
if(jQuery(".filter_selected_ratingsseason").length>0) {
//jQuery(".filter_selected_ratingsseason").html(title);
}
else
{
jQuery(".ratingsseason_title").html(title);
}
jQuery(".list-episodes-ratingsseason").each(function( index ) {
jQuery( this ).removeClass('active_list');
});
jQuery("#list-episodes-ratingsseason-"+id).addClass('active_list');
});
}
else
{
jQuery(".ratingsseason_list").css({'transform': 'translateY(10px)', "opacity":"0", "top":"-9999px"});
ratingsseason_open = 0;
}
jQuery(".select_ratingsseason_icon").css({'transform': 'rotate(' + rotate1 + 'deg)',
'-moz-transform': 'rotate(' + rotate1 + 'deg)',
'-ms-transform': 'rotate(' + rotate1 + 'deg)',
'-webkit-transform': 'rotate(' + rotate1 + 'deg)',
'-o-transform': 'rotate(' + rotate1 + 'deg)'
})
.animate({offset: dir12 * 180 }, {
duration: 200,
easing: 'linear',
step: function(offset) {
jQuery(".select_ratingsseason_icon") .css({
'transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-moz-transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-ms-transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-webkit-transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-o-transform': 'rotate(' + ( rotate1 + offset) + 'deg)'
} );
}
});
});
function fade_filter12_close()
{
jQuery('.fade_filter12').each(function(index, value){
jQuery(this).remove();
});
jQuery("#fade_filter12").remove(); jQuery(".fade_filter12").remove();
dir12 = 0;
/*close ratingsseason list*/
jQuery(".select_ratingsseason_icon").css({'transform': 'rotate(' + rotate1 + 'deg)',
'-moz-transform': 'rotate(' + rotate1 + 'deg)',
'-ms-transform': 'rotate(' + rotate1 + 'deg)',
'-webkit-transform': 'rotate(' + rotate1 + 'deg)',
'-o-transform': 'rotate(' + rotate1 + 'deg)'
})
.animate({offset: 0 }, {
duration: 200,
easing: 'linear',
step: function(offset) {
jQuery(".select_ratingsseason_icon") .css( {
'transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-moz-transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-ms-transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-webkit-transform': 'rotate(' + ( rotate1 + offset) + 'deg)',
'-o-transform': 'rotate(' + ( rotate1 + offset) + 'deg)'
});
jQuery(".ratingsseason_list").css({'transform': 'translateY(10px)', "opacity":"0"});
ratingsseason_open = 0;
},
complete: function() {
jQuery(".ratingsseason_list").css({"top":"-9999px"});
}
});
}
function filter_selected_ratingsseason_close(el)
{
el.animate({'width': '0', 'opacity':'0' }, 200,
function() {
el.remove();
jQuery(".select_ratingsseason").removeClass("button_active");
jQuery(".tag_ratingsseason").each(function( index ) {
jQuery( this ).removeClass('active_tag');
});
jQuery("#ratingsseason_param").val('0');
//var network_param = jQuery("#network_param").val();
//if(network_param == '0') jQuery(".cancel_filter_params").css({'display':'none'});
search_ajax();
}
);
}
/**********************************************************************/
/*****************END select_ratingsseason click******************************/
/**********************************************************************/
var width_open_summary_episode = jQuery(".table-list-episodes-season").width();
jQuery(".summary-episode").css({'width':width_open_summary_episode});
var ww = parseInt(document.body.clientWidth);
if(ww < 400)
{
jQuery(".open-summary-episode").bind("click", function(){
var open_summary_episode_open = 1 ;
var height_showimage = jQuery(".showimage").height();
var height_showimage_ads = jQuery(".showimage-block-ads").innerHeight();
var top_open_summary_episode = jQuery(this).offset().top - 31 - height_showimage - height_showimage_ads;
var left_open_summary_episode = jQuery(this).position().left;
var left_open_summary_episode_main = jQuery(".table-list-episodes-season").position().left;
var id = jQuery(this).attr("id");
id = id.replace("open-summary-episode-","");
var id_open = jQuery("#id-open-summary").val();
if(id_open == id){jQuery("#id-open-summary").val('0'); fade_summary_episode_close(); return false;}
jQuery.ajax({
type: "POST",
url: '/index.php?option=com_ncatalogues&controller=ajaxscript&task=open_summary_episode',
data: {'task': 'open_summary_episode', 'option': 'com_ncatalogues', 'controller': 'ajaxscript', 'id':id},
success: function(r){
jQuery("#id-open-summary").val(id);
jQuery(".summary-episode").html(r);
jQuery(".summary-episode").css({'top':top_open_summary_episode, 'left':left_open_summary_episode_main, 'display':'block'});
jQuery(".summary-episode-m").css({'top':(top_open_summary_episode-33), 'left':(left_open_summary_episode-2), 'display':'block'});
jQuery(".summary-episode-l").css({'top':(top_open_summary_episode-32), 'left':(left_open_summary_episode-2), 'display':'block'});
jQuery(".summary-repisode").css({'top':top_open_summary_episode-75, 'left':left_open_summary_episode_main, 'display':'block'});
jQuery(".summary-repisode-m").css({'top':(top_open_summary_episode-118), 'left':(left_open_summary_episode+1), 'display':'block'});
jQuery(".summary-repisode-l").css({'top':(top_open_summary_episode-117), 'left':(left_open_summary_episode+1), 'display':'block'});
jQuery("body").append('');
jQuery("#fade_summary_episode, .close_summary_episode").bind("click", function(){
fade_summary_episode_close();
});
}
});
});
}
else
{
jQuery(".open-summary-episode").bind("mouseenter", function(){
var open_summary_episode_open = 1 ;
var height_showimage = jQuery(".showimage").height();
var height_showimage_ads = jQuery(".showimage-block-ads").innerHeight();
var top_open_summary_episode = jQuery(this).offset().top - 31 - height_showimage - height_showimage_ads;
var left_open_summary_episode = jQuery(this).position().left;
var left_open_summary_episode_main = jQuery(".table-list-episodes-season").position().left;
var id = jQuery(this).attr("id");
id = id.replace("open-summary-episode-","");
var id_open = jQuery("#id-open-summary").val();
// if(id_open == id){jQuery("#id-open-summary").val('0'); fade_summary_episode_close(); return false;}
jQuery.ajax({
type: "POST",
url: '/index.php?option=com_ncatalogues&controller=ajaxscript&task=open_summary_episode',
data: {'task': 'open_summary_episode', 'option': 'com_ncatalogues', 'controller': 'ajaxscript', 'id':id},
success: function(r){
jQuery("#id-open-summary").val(id);
jQuery(".summary-episode").html(r);
jQuery(".summary-episode").css({'top':top_open_summary_episode, 'left':left_open_summary_episode_main, 'display':'block'});
jQuery(".summary-episode-m").css({'top':(top_open_summary_episode-33), 'left':(left_open_summary_episode-2), 'display':'block'});
jQuery(".summary-episode-l").css({'top':(top_open_summary_episode-32), 'left':(left_open_summary_episode-2), 'display':'block'});
jQuery(".summary-repisode").css({'top':top_open_summary_episode-45, 'left':left_open_summary_episode_main, 'display':'block'});
jQuery(".summary-repisode-m").css({'top':(top_open_summary_episode-88), 'left':(left_open_summary_episode+5), 'display':'block'});
jQuery(".summary-repisode-l").css({'top':(top_open_summary_episode-87), 'left':(left_open_summary_episode+5), 'display':'block'});
jQuery("body").append('');
jQuery("#fade_summary_episode, .close_summary_episode").bind("click", function(){
fade_summary_episode_close();
});
}
});
});
jQuery(".open-summary-episode").bind("mouseleave", function(){
fade_summary_episode_close();
});
}
function fade_summary_episode_close()
{
jQuery(".summary-episode").css({'display':'none'});
jQuery(".summary-episode-m").css({'display':'none'});
jQuery(".summary-episode-l").css({'display':'none'});
jQuery('.fade_summary_episode').each(function(index, value){
jQuery(this).remove();
});
jQuery("#fade_summary_episode").remove(); jQuery(".fade_summary_episode").remove();
}
});