Untitled diff
64 lines
/*!
/*!
* jQuery Cookie Plugin v1.3.1
* jQuery Cookie Plugin v1.3.1
* https://github.com/carhartl/jquery-cookie
* https://github.com/carhartl/jquery-cookie
*
*
* Copyright 2013 Klaus Hartl
* Copyright 2013 Klaus Hartl
* Released under the MIT license
* Released under the MIT license
*/
*/
(function(factory){if(typeof define==='function'&&define.amd){define(['jquery'],factory)}else{factory(jQuery)}}(function($){var pluses=/\+/g;function raw(s){return s}
(function(factory){if(typeof define==='function'&&define.amd){define(['jquery'],factory)}else{factory(jQuery)}}(function($){var pluses=/\+/g;function raw(s){return s}
function decoded(s){return decodeURIComponent(s.replace(pluses,' '))}
function decoded(s){return decodeURIComponent(s.replace(pluses,' '))}
function converted(s){if(s.indexOf('"')===0){s=s.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,'\\')}
function converted(s){if(s.indexOf('"')===0){s=s.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,'\\')}
try{return config.json?JSON.parse(s):s}catch(er){}}
try{return config.json?JSON.parse(s):s}catch(er){}}
var config=$.cookie=function(key,value,options){if(value!==undefined){options=$.extend({},config.defaults,options);if(typeof options.expires==='number'){var days=options.expires,t=options.expires=new Date();t.setDate(t.getDate()+days)}
var config=$.cookie=function(key,value,options){if(value!==undefined){options=$.extend({},config.defaults,options);if(typeof options.expires==='number'){var days=options.expires,t=options.expires=new Date();t.setDate(t.getDate()+days)}
value=config.json?JSON.stringify(value):String(value);return(document.cookie=[config.raw?key:encodeURIComponent(key),'=',config.raw?value:encodeURIComponent(value),options.expires?'; expires='+options.expires.toUTCString():'',options.path?'; path='+options.path:'',options.domain?'; domain='+options.domain:'',options.secure?'; secure':''].join(''))}
value=config.json?JSON.stringify(value):String(value);return(document.cookie=[config.raw?key:encodeURIComponent(key),'=',config.raw?value:encodeURIComponent(value),options.expires?'; expires='+options.expires.toUTCString():'',options.path?'; path='+options.path:'',options.domain?'; domain='+options.domain:'',options.secure?'; secure':''].join(''))}
var decode=config.raw?raw:decoded;var cookies=document.cookie.split('; ');var result=key?undefined:{};for(var i=0,l=cookies.length;i<l;i++){var parts=cookies[i].split('=');var name=decode(parts.shift());var cookie=decode(parts.join('='));if(key&&key===name){result=converted(cookie);break}
var decode=config.raw?raw:decoded;var cookies=document.cookie.split('; ');var result=key?undefined:{};for(var i=0,l=cookies.length;i<l;i++){var parts=cookies[i].split('=');var name=decode(parts.shift());var cookie=decode(parts.join('='));if(key&&key===name){result=converted(cookie);break}
if(!key){result[name]=converted(cookie)}}
if(!key){result[name]=converted(cookie)}}
return result};config.defaults={};$.removeCookie=function(key,options){if($.cookie(key)!==undefined){$.cookie(key,'',$.extend({},options,{expires:-1}));return!0}
return result};config.defaults={};$.removeCookie=function(key,options){if($.cookie(key)!==undefined){$.cookie(key,'',$.extend({},options,{expires:-1}));return!0}
return!1}}));var wpml_cookies={"_icl_current_language":{"value":"de","expires":1,"path":"\/"}};var wpml_cookies={"_icl_current_language":{"value":"de","expires":1,"path":"\/"}};jQuery('document').ready(function(){jQuery.each(wpml_cookies,function(cookieName,cookieData){jQuery.cookie(cookieName,cookieData.value,{'expires':cookieData.expires,'path':cookieData.path})})});"function"==typeof jQuery&&jQuery(document).ready(function(a){a("body").on("post-load",function(){window.a2a&&a2a.init_all()})});(function(d,e,s){if(typeof(likebtn_wl)=="undefined"){a=d.createElement(e);m=d.getElementsByTagName(e)[0];a.async=1;a.src=s;m.parentNode.insertBefore(a,m)}
return!1}}));var wpml_cookies={"_icl_current_language":{"value":"de","expires":1,"path":"\/"}};var wpml_cookies={"_icl_current_language":{"value":"de","expires":1,"path":"\/"}};jQuery('document').ready(function(){jQuery.each(wpml_cookies,function(cookieName,cookieData){jQuery.cookie(cookieName,cookieData.value,{'expires':cookieData.expires,'path':cookieData.path})})});"function"==typeof jQuery&&jQuery(document).ready(function(a){a("body").on("post-load",function(){window.a2a&&a2a.init_all()})});(function(d,e,s){if(typeof(likebtn_wl)=="undefined"){a=d.createElement(e);m=d.getElementsByTagName(e)[0];a.async=1;a.src=s;m.parentNode.insertBefore(a,m)}
likebtn_init()})(document,'script','//w.likebtn.com/js/w/widget.js');function likebtn_init(){if(typeof(LikeBtn)!="undefined"){LikeBtn.init()}
likebtn_init()})(document,'script','//w.likebtn.com/js/w/widget.js');function likebtn_init(){if(typeof(LikeBtn)!="undefined"){LikeBtn.init()}
setTimeout(likebtn_init,250)}
setTimeout(likebtn_init,250)}
function likebtn_eh(event){var old_type=0;if(event.wrapper){var custom_eh=event.wrapper.getAttribute('data-custom_eh');if(custom_eh){var callback=window[custom_eh];if(typeof(callback)==='function'){try{callback(event)}catch(e){likebtn_log("Error occured calling event handler function '"+custom_eh+"': "+e.message)}}}}
function likebtn_eh(event){var old_type=0;if(event.wrapper){var custom_eh=event.wrapper.getAttribute('data-custom_eh');if(custom_eh){var callback=window[custom_eh];if(typeof(callback)==='function'){try{callback(event)}catch(e){likebtn_log("Error occured calling event handler function '"+custom_eh+"': "+e.message)}}}}
var modal_content=event.wrapper.getAttribute('data-clk_modal');if(event.type==="likebtn.click"&&modal_content){likebtn_modal(modal_content);return}
var modal_content=event.wrapper.getAttribute('data-clk_modal');if(event.type==="likebtn.click"&&modal_content){likebtn_modal(modal_content);return}
if(typeof(event.settings.prx)!=="undefined"&&event.settings.prx){return}
if(typeof(event.settings.prx)!=="undefined"&&event.settings.prx){return}
var type=0;if(event.type==="likebtn.like"){type=1}else if(event.type==="likebtn.dislike"){type=-1}else if(event.type==="likebtn.unlike"){old_type=1;type=0}else if(event.type==="likebtn.undislike"){old_type=-1;type=0}else{return}
var type=0;if(event.type==="likebtn.like"){type=1}else if(event.type==="likebtn.dislike"){type=-1}else if(event.type==="likebtn.unlike"){old_type=1;type=0}else if(event.type==="likebtn.undislike"){old_type=-1;type=0}else{return}
if(typeof(likebtn_eh_data)==="undefined"){likebtn_log('likebtn_eh_data not set');return}
if(typeof(likebtn_eh_data)==="undefined"){likebtn_log('likebtn_eh_data not set');return}
var data={action:'likebtn_event_handler',old_type:old_type,type:type,identifier:event.settings.identifier,security:likebtn_eh_data.security};likebtn_ajax(likebtn_eh_data.ajaxurl,data,function(){if(this.readyState==XMLHttpRequest.DONE){if(this.status==200){var response=JSON.parse(this.responseText);if(response){if(response.result&&response.result=='success'){}else{var msg='Error sending ajax request';if(response.message){msg+=': '+response.message}
var data={action:'likebtn_event_handler',old_type:old_type,type:type,identifier:event.settings.identifier,security:likebtn_eh_data.security};likebtn_ajax(likebtn_eh_data.ajaxurl,data,function(){if(this.readyState==XMLHttpRequest.DONE){if(this.status==200){var response=JSON.parse(this.responseText);if(response){if(response.result&&response.result=='success'){}else{var msg='Error sending ajax request';if(response.message){msg+=': '+response.message}
likebtn_log(msg)}}else{likebtn_log('Error parsing ajax response')}}else{likebtn_log('Error sending ajax request')}}})}
likebtn_log(msg)}}else{likebtn_log('Error parsing ajax response')}}else{likebtn_log('Error sending ajax request')}}})}
function likebtn_ajax(url,data,callback,method){var xmlhttp;if(typeof(method)==="undefined"){method="POST"}
function likebtn_ajax(url,data,callback,method){var xmlhttp;if(typeof(method)==="undefined"){method="POST"}
if(window.XMLHttpRequest){xmlhttp=new XMLHttpRequest()}else{xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")}
if(window.XMLHttpRequest){xmlhttp=new XMLHttpRequest()}else{xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")}
xmlhttp.onreadystatechange=callback;xmlhttp.open(method,url,!0);xmlhttp.setRequestHeader('Content-type','application/x-www-form-urlencoded');xmlhttp.send(likebtn_http_build_query(data))}
xmlhttp.onreadystatechange=callback;xmlhttp.open(method,url,!0);xmlhttp.setRequestHeader('Content-type','application/x-www-form-urlencoded');xmlhttp.send(likebtn_http_build_query(data))}
function likebtn_log(msg){if(typeof(console)!=="undefined"){console.log(msg)}}
function likebtn_log(msg){if(typeof(console)!=="undefined"){console.log(msg)}}
function likebtn_http_build_query(params){var lst=[];for(var key in params){if(params.hasOwnProperty(key)){lst.push(encodeURIComponent(key)+"="+encodeURIComponent(params[key]))}}
function likebtn_http_build_query(params){var lst=[];for(var key in params){if(params.hasOwnProperty(key)){lst.push(encodeURIComponent(key)+"="+encodeURIComponent(params[key]))}}
return lst.join("&")}
return lst.join("&")}
function likebtn_modal(content){if(typeof(window.likebtn_modal_popup)!=="undefined"){window.likebtn_modal_popup.open();return}
function likebtn_modal(content){if(typeof(window.likebtn_modal_popup)!=="undefined"){window.likebtn_modal_popup.open();return}
var html='<div class="likebtn-mdl-wrapper">'+'<div class="likebtn-mdl-content">'+'<div class="likebtn-mdl-title">'+'<button type="button" class="likebtn-mdl-close">×</button>'+'</div>'+'<div class="likebtn-mdl-body">'+'<p>'+content+'</p>'+'</div>'+'</div>'+'</div>';var popup_el=document.createElement('div');popup_el.innerHTML=html;if(popup_el.childNodes[0]){popup_el=popup_el.childNodes[0]}
var html='<div class="likebtn-mdl-wrapper">'+'<div class="likebtn-mdl-content">'+'<div class="likebtn-mdl-title">'+'<button type="button" class="likebtn-mdl-close">×</button>'+'</div>'+'<div class="likebtn-mdl-body">'+'<p>'+content+'</p>'+'</div>'+'</div>'+'</div>';var popup_el=document.createElement('div');popup_el.innerHTML=html;if(popup_el.childNodes[0]){popup_el=popup_el.childNodes[0]}
document.body.appendChild(popup_el);window.likebtn_modal_popup=new Popup(popup_el,{width:400,height:300,closeBtnClass:'likebtn-mdl-close'});window.likebtn_modal_popup.open()}
document.body.appendChild(popup_el);window.likebtn_modal_popup=new Popup(popup_el,{width:400,height:300,closeBtnClass:'likebtn-mdl-close'});window.likebtn_modal_popup.open()}
!function(t,e){e(0,t)}(this,function(t,e){"use strict";function n(t,e){return this instanceof n?(this.opts=f({},f(c,e)),this.el=t,void this.init()):new n(t,e)}var i=window,o=document,s=o.documentElement,c={width:500,height:400,offsetX:0,offsetY:0,zIndex:999,closeBtnClass:"popup-close"},f=function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},u=function(){return i.innerWidth||s.clientWidth},r=function(){return i.innerHeight||s.clientHeight},h=function(){return i.pageXOffset||s.scrollLeft},l=function(){return i.pageYOffset||s.scrollTop},a=function(t,e){if(e=e||o,e.getElementsByClassName)return e.getElementsByClassName(t);for(var n=[],i=new RegExp("^|\\s+"+t+"\\s+|$"),s=e.getElementsByTagName("*"),c=0,f=s.length;f>c;c++)i.test(s[c].className)&&n.push(s[c]);return n},p=function(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent("on"+e,n)};return f(n.prototype,{init:function(){var t=this.opts;f(this.el.style,{position:"absolute",width:t.width+"px",height:'auto',zIndex:t.zIndex}),this.bindEvent()},bindEvent:function(){var t=a(this.opts.closeBtnClass)[0],e=this;p(t,"click",function(){e.close()}),p(o,"keydown",function(t){t=t||window.event;var n=t.which||t.keyCode;27===n&&e.close()}),p(i,"resize",function(){e.setPosition()})},open:function(){this.el.style.display="block",this.setPosition()},close:function(){this.el.style.display="none"},setPosition:function(){var t=this.opts,e=l()+Math.max(0,(r()-t.height)/2),n=h()+Math.max(0,(u()-t.width)/2);f(this.el.style,{top:e+t.offsetY+"px",left:n+t.offsetX+"px"})}}),t&&t.fn?t.fn.popup=function(e){var i=[];return this.each(function(t,o){i.push(new n(o,e))}),{open:function(){t.each(i,function(t,e){e.open()})},close:function(){t.each(i,function(t,e){e.close()})}}}:e&&(e.Popup=n),n});window.a2a_config=window.a2a_config||{};a2a_config.callbacks=[];a2a_config.overlays=[];a2a_config.templates={};a2a_localize={Share:"Empfehlen",Save:"Speichern",Subscribe:"Abonnieren",Email:"E-Mail",Bookmark:"Bookmark",ShowAll:"zeige alle",ShowLess:"Zeige weniger",FindServices:"Finden Dienstleistung(en)",FindAnyServiceToAddTo:"Um weitere Dienste ergänzen",PoweredBy:"Powered by",ShareViaEmail:"Teilen via E-Mail",SubscribeViaEmail:"Via E-Mail abonnieren",BookmarkInYourBrowser:"Seite den Bookmarks hinzufügen",BookmarkInstructions:"Drücke Ctrl+D oder \u2318+D um diese Seite bei den Lesenzeichen zu speichern.",AddToYourFavorites:"Zu Ihren Favoriten hinzufügen",SendFromWebOrProgram:"Senden von jeder E-Mail Adresse oder E-Mail-Programm",EmailProgram:"E-Mail-Programm",More:"Mehr…",ThanksForSharing:"Thanks for sharing!",ThanksForFollowing:"Thanks for following!"};(function(d,s,a,b){a=d.createElement(s);b=d.getElementsByTagName(s)[0];a.async=1;a.src="https://static.addtoany.com/menu/page.js";b.parentNode.insertBefore(a,b)})(document,"script");if(navigator.userAgent.indexOf("Speed Insights")==-1){!function(e,t,n,s,u,a){e.twq||(s=e.twq=function(){s.exe?s.exe.apply(s,arguments):s.queue.push(arguments)},s.version='1.1',s.queue=[],u=t.createElement(n),u.async=!0,u.src='//static.ads-twitter.com/uwt.js',a=t.getElementsByTagName(n)[0],a.parentNode.insertBefore(u,a))}(window,document,'script');twq('init','nz05n');twq('init','nz5ap');twq('init','nuzcx');twq('track','PageView')};jQuery(document).bind('gform_post_render',function(event,formId,currentPage){if(formId==449879236){}});jQuery(document).bind('gform_post_conditional_logic',function(event,formId,fields,isInit){});jQuery(document).ready(function(){jQuery(document).trigger('gform_post_render',[449879236,1])});jQuery(document).bind('gform_post_render',function(event,formId,currentPage){if(formId==437104918){if(typeof Placeholders!='undefined'){Placeholders.enable()}}});jQuery(document).bind('gform_post_conditional_logic',function(event,formId,fields,isInit){});jQuery(document).ready(function(){jQuery(document).trigger('gform_post_render',[437104918,1])});jQuery(document).bind('gform_post_render',function(event,formId,currentPage){if(formId==1555273981){if(typeof Placeholders!='undefined'){Placeholders.enable()}}});jQuery(document).bind('gform_post_conditional_logic',function(event,formId,fields,isInit){});jQuery(document).ready(function(){jQuery(document).trigger('gform_post_render',[1555273981,1])});jQuery(document).bind('gform_post_render',function(event,formId,currentPage){if(formId==1861510978){}});jQuery(document).bind('gform_post_conditional_logic',function(event,formId,fields,isInit){});jQuery(document).ready(function(){jQuery(document).trigger('gform_post_render',[1861510978,1])});if(navigator.userAgent.indexOf("Speed Insights")==-1){var tag=document.createElement('script');tag.src="https://www.youtube.com/iframe_api";var firstScriptTag=document.getElementsByTagName('script')[0];firstScriptTag.parentNode.insertBefore(tag,firstScriptTag)}
!function(t,e){e(0,t)}(this,function(t,e){"use strict";function n(t,e){return this instanceof n?(this.opts=f({},f(c,e)),this.el=t,void this.init()):new n(t,e)}var i=window,o=document,s=o.documentElement,c={width:500,height:400,offsetX:0,offsetY:0,zIndex:999,closeBtnClass:"popup-close"},f=function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},u=function(){return i.innerWidth||s.clientWidth},r=function(){return i.innerHeight||s.clientHeight},h=function(){return i.pageXOffset||s.scrollLeft},l=function(){return i.pageYOffset||s.scrollTop},a=function(t,e){if(e=e||o,e.getElementsByClassName)return e.getElementsByClassName(t);for(var n=[],i=new RegExp("^|\\s+"+t+"\\s+|$"),s=e.getElementsByTagName("*"),c=0,f=s.length;f>c;c++)i.test(s[c].className)&&n.push(s[c]);return n},p=function(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent("on"+e,n)};return f(n.prototype,{init:function(){var t=this.opts;f(this.el.style,{position:"absolute",width:t.width+"px",height:'auto',zIndex:t.zIndex}),this.bindEvent()},bindEvent:function(){var t=a(this.opts.closeBtnClass)[0],e=this;p(t,"click",function(){e.close()}),p(o,"keydown",function(t){t=t||window.event;var n=t.which||t.keyCode;27===n&&e.close()}),p(i,"resize",function(){e.setPosition()})},open:function(){this.el.style.display="block",this.setPosition()},close:function(){this.el.style.display="none"},setPosition:function(){var t=this.opts,e=l()+Math.max(0,(r()-t.height)/2),n=h()+Math.max(0,(u()-t.width)/2);f(this.el.style,{top:e+t.offsetY+"px",left:n+t.offsetX+"px"})}}),t&&t.fn?t.fn.popup=function(e){var i=[];return this.each(function(t,o){i.push(new n(o,e))}),{open:function(){t.each(i,function(t,e){e.open()})},close:function(){t.each(i,function(t,e){e.close()})}}}:e&&(e.Popup=n),n});window.a2a_config=window.a2a_config||{};a2a_config.callbacks=[];a2a_config.overlays=[];a2a_config.templates={};a2a_localize={Share:"Empfehlen",Save:"Speichern",Subscribe:"Abonnieren",Email:"E-Mail",Bookmark:"Bookmark",ShowAll:"zeige alle",ShowLess:"Zeige weniger",FindServices:"Finden Dienstleistung(en)",FindAnyServiceToAddTo:"Um weitere Dienste ergänzen",PoweredBy:"Powered by",ShareViaEmail:"Teilen via E-Mail",SubscribeViaEmail:"Via E-Mail abonnieren",BookmarkInYourBrowser:"Seite den Bookmarks hinzufügen",BookmarkInstructions:"Drücke Ctrl+D oder \u2318+D um diese Seite bei den Lesenzeichen zu speichern.",AddToYourFavorites:"Zu Ihren Favoriten hinzufügen",SendFromWebOrProgram:"Senden von jeder E-Mail Adresse oder E-Mail-Programm",EmailProgram:"E-Mail-Programm",More:"Mehr…",ThanksForSharing:"Thanks for sharing!",ThanksForFollowing:"Thanks for following!"};(function(d,s,a,b){a=d.createElement(s);b=d.getElementsByTagName(s)[0];a.async=1;a.src="https://static.addtoany.com/menu/page.js";b.parentNode.insertBefore(a,b)})(document,"script");if(navigator.userAgent.indexOf("Speed Insights")==-1){!function(e,t,n,s,u,a){e.twq||(s=e.twq=function(){s.exe?s.exe.apply(s,arguments):s.queue.push(arguments)},s.version='1.1',s.queue=[],u=t.createElement(n),u.async=!0,u.src='//static.ads-twitter.com/uwt.js',a=t.getElementsByTagName(n)[0],a.parentNode.insertBefore(u,a))}(window,document,'script');twq('init','nz05n');twq('init','nz5ap');twq('init','nuzcx');twq('track','PageView')};jQuery(document).bind('gform_post_render',function(event,formId,currentPage){if(formId==380201113){}});jQuery(document).bind('gform_post_conditional_logic',function(event,formId,fields,isInit){});jQuery(document).ready(function(){jQuery(document).trigger('gform_post_render',[380201113,1])});jQuery(document).bind('gform_post_render',function(event,formId,currentPage){if(formId==922589418){if(typeof Placeholders!='undefined'){Placeholders.enable()}}});jQuery(document).bind('gform_post_conditional_logic',function(event,formId,fields,isInit){});jQuery(document).ready(function(){jQuery(document).trigger('gform_post_render',[922589418,1])});jQuery(document).bind('gform_post_render',function(event,formId,currentPage){if(formId==695154542){if(typeof Placeholders!='undefined'){Placeholders.enable()}}});jQuery(document).bind('gform_post_conditional_logic',function(event,formId,fields,isInit){});jQuery(document).ready(function(){jQuery(document).trigger('gform_post_render',[695154542,1])});jQuery(document).bind('gform_post_render',function(event,formId,currentPage){if(formId==488351542){}});jQuery(document).bind('gform_post_conditional_logic',function(event,formId,fields,isInit){});jQuery(document).ready(function(){jQuery(document).trigger('gform_post_render',[488351542,1])});if(navigator.userAgent.indexOf("Speed Insights")==-1){var tag=document.createElement('script');tag.src="https://www.youtube.com/iframe_api";var firstScriptTag=document.getElementsByTagName('script')[0];firstScriptTag.parentNode.insertBefore(tag,firstScriptTag)}
var playing='';var players={};function onYouTubeIframeAPIReady(){jQuery('.yt-player-if').each(function(){var el=jQuery(this).attr('id');var vid=jQuery(this).data('id');if(!("player_"+vid in players))players["player_"+vid]=new YT.Player(el,{videoId:vid,playerVars:{'hd':1,'autohide':1,'showinfo':0,'rel':0},events:{'onReady':function(event){jQuery('.'+el).unbind('click').bind('click',function(e){e.preventDefault();jQuery(this).fadeOut();if(playing!='')playing.stopVideo();players["player_"+vid].playVideo();jQuery(this).parents('.video_trailer').find('.title').fadeOut();playing=players["player_"+vid]})},'onStateChange':function(event){if(event.data==YT.PlayerState.ENDED){if(playing!='')playing.stopVideo();stopVideo(vid);$('.'+el).fadeIn();$('.'+el).parents('.video_trailer').find('.title').fadeIn()}
var playing='';var players={};function onYouTubeIframeAPIReady(){jQuery('.yt-player-if').each(function(){var el=jQuery(this).attr('id');var vid=jQuery(this).data('id');if(!("player_"+vid in players))players["player_"+vid]=new YT.Player(el,{videoId:vid,playerVars:{'hd':1,'autohide':1,'showinfo':0,'rel':0},events:{'onReady':function(event){jQuery('.'+el).unbind('click').bind('click',function(e){e.preventDefault();jQuery(this).fadeOut();if(playing!='')playing.stopVideo();players["player_"+vid].playVideo();jQuery(this).parents('.video_trailer').find('.title').fadeOut();playing=players["player_"+vid]})},'onStateChange':function(event){if(event.data==YT.PlayerState.ENDED){if(playing!='')playing.stopVideo();stopVideo(vid);$('.'+el).fadeIn();$('.'+el).parents('.video_trailer').find('.title').fadeIn()}
if(event.data==YT.PlayerState.PLAYING){var old=playing;if(old!=''&&old!=players["player_"+vid]){old.stopVideo()}
if(event.data==YT.PlayerState.PLAYING){var old=playing;if(old!=''&&old!=players["player_"+vid]){old.stopVideo()}
playing=players["player_"+vid]}}}})})}
playing=players["player_"+vid]}}}})})}
function stopVideo(vid){players["player_"+vid].stopVideo();playing=''};var likebtn_wl=1;(function(d,e,s){a=d.createElement(e);m=d.getElementsByTagName(e)[0];a.async=1;a.src=s;m.parentNode.insertBefore(a,m)})(document,'script','//w.likebtn.com/js/w/widget.js');if(typeof(LikeBtn)!="undefined"){LikeBtn.init()};jQuery(document).ready(function($){$(this).find(':submit').removeAttr("disabled");SAIC={ajaxurl:SAIC_WP.ajaxurl,nonce:SAIC_WP.saicNonce,textCounter:SAIC_WP.textCounter,textCounterNum:(SAIC_WP.textCounterNum!=='')?SAIC_WP.textCounterNum:300,jpages:SAIC_WP.jpages,numPerPage:(SAIC_WP.jPagesNum!=='')?SAIC_WP.jPagesNum:10,widthWrap:(SAIC_WP.widthWrap!=='')?SAIC_WP.widthWrap:'',autoLoad:SAIC_WP.autoLoad,thanksComment:SAIC_WP.thanksComment,thanksReplyComment:SAIC_WP.thanksReplyComment,duplicateComment:SAIC_WP.duplicateComment,insertImage:SAIC_WP.insertImage,insertVideo:SAIC_WP.insertVideo,insertLink:SAIC_WP.insertLink,accept:SAIC_WP.accept,cancel:SAIC_WP.cancel,checkVideo:SAIC_WP.checkVideo,};if(typeof jQuery.fn.textareaCount=='function'&&SAIC.textCounter=='true'){$('.saic-textarea').each(function(){var textCount={'maxCharacterSize':SAIC.textCounterNum,'originalStyle':'saic-counter-info','warningStyle':'saic-counter-warn','warningNumber':20,'displayFormat':'#left'};$(this).textareaCount(textCount)})}
function stopVideo(vid){players["player_"+vid].stopVideo();playing=''};var likebtn_wl=1;(function(d,e,s){a=d.createElement(e);m=d.getElementsByTagName(e)[0];a.async=1;a.src=s;m.parentNode.insertBefore(a,m)})(document,'script','//w.likebtn.com/js/w/widget.js');if(typeof(LikeBtn)!="undefined"){LikeBtn.init()};jQuery(document).ready(function($){$(this).find(':submit').removeAttr("disabled");SAIC={ajaxurl:SAIC_WP.ajaxurl,nonce:SAIC_WP.saicNonce,textCounter:SAIC_WP.textCounter,textCounterNum:(SAIC_WP.textCounterNum!=='')?SAIC_WP.textCounterNum:300,jpages:SAIC_WP.jpages,numPerPage:(SAIC_WP.jPagesNum!=='')?SAIC_WP.jPagesNum:10,widthWrap:(SAIC_WP.widthWrap!=='')?SAIC_WP.widthWrap:'',autoLoad:SAIC_WP.autoLoad,thanksComment:SAIC_WP.thanksComment,thanksReplyComment:SAIC_WP.thanksReplyComment,duplicateComment:SAIC_WP.duplicateComment,insertImage:SAIC_WP.insertImage,insertVideo:SAIC_WP.insertVideo,insertLink:SAIC_WP.insertLink,accept:SAIC_WP.accept,cancel:SAIC_WP.cancel,checkVideo:SAIC_WP.checkVideo,};if(typeof jQuery.fn.textareaCount=='function'&&SAIC.textCounter=='true'){$('.saic-textarea').each(function(){var textCount={'maxCharacterSize':SAIC.textCounterNum,'originalStyle':'saic-counter-info','warningStyle':'saic-counter-warn','warningNumber':20,'displayFormat':'#left'};$(this).textareaCount(textCount)})}
if(typeof jQuery.fn.placeholder=='function'){$('.saic-wrap-form input, .saic-wrap-form textarea, #saic-modal input, #saic-modal textarea').placeholder()}
if(typeof jQuery.fn.placeholder=='function'){$('.saic-wrap-form input, .saic-wrap-form textarea, #saic-modal input, #saic-modal textarea').placeholder()}
if(typeof autosize=='function'){autosize($('textarea.saic-textarea'))}
if(typeof autosize=='function'){autosize($('textarea.saic-textarea'))}
$('.saic-wrapper').each(function(){rezizeBoxComments_SAIC($(this));restoreIframeHeight($(this))});$(window).resize(function(){$('.saic-wrapper').each(function(){rezizeBoxComments_SAIC($(this));restoreIframeHeight($(this))})});if($('.saic-captcha').length){captchaValues=captcha_SAIC(9);$('.saic-captcha-text').html(captchaValues.n1+' + '+captchaValues.n2+' = ')}
$('.saic-wrapper').each(function(){rezizeBoxComments_SAIC($(this));restoreIframeHeight($(this))});$(window).resize(function(){$('.saic-wrapper').each(function(){rezizeBoxComments_SAIC($(this));restoreIframeHeight($(this))})});if($('.saic-captcha').length){captchaValues=captcha_SAIC(9);$('.saic-captcha-text').html(captchaValues.n1+' + '+captchaValues.n2+' = ')}
$(document).delegate('a.saic-link','click',function(e){e.preventDefault();var linkVars=getUrlVars_SAIC($(this).attr('href'));var post_id=linkVars.post_id;var num_comments=linkVars.comments;var num_get_comments=linkVars.get;var order_comments=linkVars.order;$("#saic-wrap-commnent-"+post_id).slideToggle(200);if($('#saic-container-comment-'+post_id).html().length===0){getComments_SAIC(post_id,num_comments,num_get_comments,order_comments)}
$(document).delegate('a.saic-link','click',function(e){e.preventDefault();var linkVars=getUrlVars_SAIC($(this).attr('href'));var post_id=linkVars.post_id;var num_comments=linkVars.comments;var num_get_comments=linkVars.get;var order_comments=linkVars.order;$("#saic-wrap-commnent-"+post_id).slideToggle(200);if($('#saic-container-comment-'+post_id).html().length===0){getComments_SAIC(post_id,num_comments,num_get_comments,order_comments)}
return!1});if($('a.saic-link').length){$('a.saic-link.auto-load-true').each(function(){$(this).click()})}
return!1});if($('a.saic-link').length){$('a.saic-link.auto-load-true').each(function(){$(this).click()})}
$(document).delegate('li.saic-item-comment','mouseover mouseout',function(event){event.stopPropagation();if(event.type==='mouseover'){$(this).find('.saic-comment-actions:first').show()}else{$(this).find('.saic-comment-actions').hide()}});$(document).find('.saic-container-form').keyup(function(tecla){post_id=$(this).find('form').attr('id').replace('commentform-','');if(tecla.which==27){cancelCommentAction_SAIC(post_id)}});$(document).delegate('input.saic-cancel-btn','click',function(event){event.stopPropagation();post_id=$(this).closest('form').attr('id').replace('commentform-','');cancelCommentAction_SAIC(post_id)});$(document).delegate('.saic-reply-link','click',function(e){e.preventDefault();var linkVars=getUrlVars_SAIC($(this).attr('href'));var comment_id=linkVars.comment_id;var post_id=linkVars.post_id;cancelCommentAction_SAIC(post_id);var form=$('#commentform-'+post_id);form.find('#comment_parent').val(comment_id);form.find('.saic-textarea').val('').attr('placeholder','Reply comment, Press ESC to cancel').focus();form.find('input[name="submit"]').addClass('saic-reply-action');$('#commentform-'+post_id).find('input.saic-cancel-btn').show();scrollThis_SAIC(form);return!1});$(document).delegate('.saic-edit-link','click',function(e){e.preventDefault();var linkVars=getUrlVars_SAIC($(this).attr('href'));var comment_id=linkVars.comment_id;var post_id=linkVars.post_id;cancelCommentAction_SAIC(post_id);var form=$('#commentform-'+post_id);form.find('#comment_parent').val(comment_id);form.find('.saic-textarea').val('').focus();form.find('input[name="submit"]').addClass('saic-edit-action');scrollThis_SAIC(form);getCommentText_SAIC(post_id,comment_id)});$(document).delegate('.saic-delete-link','click',function(e){e.preventDefault();var linkVars=getUrlVars_SAIC($(this).attr('href'));var comment_id=linkVars.comment_id;var post_id=linkVars.post_id;if(confirm("Do you want delete this comment?")){deleteComment_SAIC(post_id,comment_id)}});$('input, textarea').focus(function(event){$(this).removeClass('saic-error');$(this).siblings('.saic-error-info').hide()});$(document).on('submit','.saic-container-form form',function(event){event.preventDefault();$(this).find(':submit').attr("disabled","disabled");$('input, textarea').removeClass('saic-error');var formID=$(this).attr('id');var post_id=formID.replace('commentform-','');var form=$('#commentform-'+post_id);var link_show_comments=$('#saic-link-'+post_id);var num_comments=link_show_comments.attr('href').split('=')[2];var form_ok=!0;var $content=form.find('textarea').val().replace(/\s+/g,' ');if($content.length<2){form.find('.saic-textarea').addClass('saic-error');form.find('.saic-error-info-text').show();setTimeout(function(){form.find('.saic-error-info-text').fadeOut(500)},2500);$(this).find(':submit').removeAttr('disabled');return!1}else{if($(this).find('input#author').length){var $author=$(this).find('input#author');var $authorVal=$author.val().replace(/\s+/g,' ');var $authorRegEx=/^[^?&%$=\/]{1,30}$/i;if($authorVal==' '||!$authorRegEx.test($authorVal)){$author.addClass('saic-error');form.find('.saic-error-info-name').show();setTimeout(function(){form.find('.saic-error-info-name').fadeOut(500)},3000);form_ok=!1}}
$(document).delegate('li.saic-item-comment','mouseover mouseout',function(event){event.stopPropagation();if(event.type==='mouseover'){$(this).find('.saic-comment-actions:first').show()}else{$(this).find('.saic-comment-actions').hide()}});$(document).find('.saic-container-form').keyup(function(tecla){post_id=$(this).find('form').attr('id').replace('commentform-','');if(tecla.which==27){cancelCommentAction_SAIC(post_id)}});$(document).delegate('input.saic-cancel-btn','click',function(event){event.stopPropagation();post_id=$(this).closest('form').attr('id').replace('commentform-','');cancelCommentAction_SAIC(post_id)});$(document).delegate('.saic-reply-link','click',function(e){e.preventDefault();var linkVars=getUrlVars_SAIC($(this).attr('href'));var comment_id=linkVars.comment_id;var post_id=linkVars.post_id;cancelCommentAction_SAIC(post_id);var form=$('#commentform-'+post_id);form.find('#comment_parent').val(comment_id);form.find('.saic-textarea').val('').attr('placeholder','Reply comment, Press ESC to cancel').focus();form.find('input[name="submit"]').addClass('saic-reply-action');$('#commentform-'+post_id).find('input.saic-cancel-btn').show();scrollThis_SAIC(form);return!1});$(document).delegate('.saic-edit-link','click',function(e){e.preventDefault();var linkVars=getUrlVars_SAIC($(this).attr('href'));var comment_id=linkVars.comment_id;var post_id=linkVars.post_id;cancelCommentAction_SAIC(post_id);var form=$('#commentform-'+post_id);form.find('#comment_parent').val(comment_id);form.find('.saic-textarea').val('').focus();form.find('input[name="submit"]').addClass('saic-edit-action');scrollThis_SAIC(form);getCommentText_SAIC(post_id,comment_id)});$(document).delegate('.saic-delete-link','click',function(e){e.preventDefault();var linkVars=getUrlVars_SAIC($(this).attr('href'));var comment_id=linkVars.comment_id;var post_id=linkVars.post_id;if(confirm("Do you want delete this comment?")){deleteComment_SAIC(post_id,comment_id)}});$('input, textarea').focus(function(event){$(this).removeClass('saic-error');$(this).siblings('.saic-error-info').hide()});$(document).on('submit','.saic-container-form form',function(event){event.preventDefault();$(this).find(':submit').attr("disabled","disabled");$('input, textarea').removeClass('saic-error');var formID=$(this).attr('id');var post_id=formID.replace('commentform-','');var form=$('#commentform-'+post_id);var link_show_comments=$('#saic-link-'+post_id);var num_comments=link_show_comments.attr('href').split('=')[2];var form_ok=!0;var $content=form.find('textarea').val().replace(/\s+/g,' ');if($content.length<2){form.find('.saic-textarea').addClass('saic-error');form.find('.saic-error-info-text').show();setTimeout(function(){form.find('.saic-error-info-text').fadeOut(500)},2500);$(this).find(':submit').removeAttr('disabled');return!1}else{if($(this).find('input#author').length){var $author=$(this).find('input#author');var $authorVal=$author.val().replace(/\s+/g,' ');var $authorRegEx=/^[^?&%$=\/]{1,30}$/i;if($authorVal==' '||!$authorRegEx.test($authorVal)){$author.addClass('saic-error');form.find('.saic-error-info-name').show();setTimeout(function(){form.find('.saic-error-info-name').fadeOut(500)},3000);form_ok=!1}}
if($(this).find('input#email').length){var $emailRegEx=/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,6}$/i;var $email=$(this).find('input#email');var $emailVal=$email.val().replace(/\s+/g,'');$email.val($emailVal);if(!$emailRegEx.test($emailVal)){$email.addClass('saic-error');form.find('.saic-error-info-email').show();setTimeout(function(){form.find('.saic-error-info-email').fadeOut(500)},3000);form_ok=!1}}
if($(this).find('input#email').length){var $emailRegEx=/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,6}$/i;var $email=$(this).find('input#email');var $emailVal=$email.val().replace(/\s+/g,'');$email.val($emailVal);if(!$emailRegEx.test($emailVal)){$email.addClass('saic-error');form.find('.saic-error-info-email').show();setTimeout(function(){form.find('.saic-error-info-email').fadeOut(500)},3000);form_ok=!1}}
if(!form_ok){$(this).find(':submit').removeAttr('disabled');return!1}
if(!form_ok){$(this).find(':submit').removeAttr('disabled');return!1}
if($('.saic-captcha').length){var captcha=$('#saic-captcha-value-'+post_id);form_ok=!0;if(captcha.val()!=(captchaValues.n1+captchaValues.n2)){form_ok=!1;captcha.addClass('saic-error')}
if($('.saic-captcha').length){var captcha=$('#saic-captcha-value-'+post_id);form_ok=!0;if(captcha.val()!=(captchaValues.n1+captchaValues.n2)){form_ok=!1;captcha.addClass('saic-error')}
captchaValues=captcha_SAIC(9);$('.saic-captcha-text').html(captchaValues.n1+' + '+captchaValues.n2+' = ');captcha.val('')}
captchaValues=captcha_SAIC(9);$('.saic-captcha-text').html(captchaValues.n1+' + '+captchaValues.n2+' = ');captcha.val('')}
if(form_ok){comment_id=form.find('input#comment_parent').val();if(form.find('input[name="submit"]').hasClass('saic-edit-action')){editComment_SAIC(post_id,comment_id)}else if(form.find('input[name="submit"]').hasClass('saic-reply-action')){insertCommentReply_SAIC(post_id,comment_id,num_comments)}else{insertComment_SAIC(post_id,num_comments)}
if(form_ok){comment_id=form.find('input#comment_parent').val();if(form.find('input[name="submit"]').hasClass('saic-edit-action')){editComment_SAIC(post_id,comment_id)}else if(form.find('input[name="submit"]').hasClass('saic-reply-action')){insertCommentReply_SAIC(post_id,comment_id,num_comments)}else{insertComment_SAIC(post_id,num_comments)}
cancelCommentAction_SAIC(post_id)}
cancelCommentAction_SAIC(post_id)}
$(this).find(':submit').removeAttr('disabled')}
$(this).find(':submit').removeAttr('disabled')}
return!1});function getComments_SAIC(post_id,num_comments,num_get_comments,order_comments){var status=$('#saic-comment-status-'+post_id);jQuery.ajax({type:"POST",dataType:"html",url:SAIC.ajaxurl,data:{action:'get_comments',post_id:post_id,get:num_get_comments,order:order_comments,nonce:SAIC.nonce},beforeSend:function(){status.addClass('saic-loading').html('<span class="saico-loading"></span>').show()},success:function(data){status.removeClass('saic-loading').html('').hide();$("ul#saic-container-comment-"+post_id).html(data).show();jPages_SAIC(post_id,SAIC.numPerPage);toggleMoreComments()}});return!1}
return!1});function getComments_SAIC(post_id,num_comments,num_get_comments,order_comments){var status=$('#saic-comment-status-'+post_id);jQuery.ajax({type:"POST",dataType:"html",url:SAIC.ajaxurl,data:{action:'get_comments',post_id:post_id,get:num_get_comments,order:order_comments,nonce:SAIC.nonce},beforeSend:function(){status.addClass('saic-loading').html('<span class="saico-loading"></span>').show()},success:function(data){status.removeClass('saic-loading').html('').hide();$("ul#saic-container-comment-"+post_id).html(data).show();jPages_SAIC(post_id,SAIC.numPerPage);toggleMoreComments()}});return!1}
function insertComment_SAIC(post_id,num_comments){var link_show_comments=$('#saic-link-'+post_id);var comment_form=$('#commentform-'+post_id);var status=$('#saic-comment-status-'+post_id);var form_data=comment_form.serialize();$.ajax({type:'post',method:'post',url:comment_form.attr('action'),data:form_data,beforeSend:function(){status.addClass('saic-loading').html('<span class="saico-loading"></span>').show()},success:function(data,textStatus){status.removeClass('saic-loading').html('');if(data!="error"){status.html('<p class="saic-ajax-success">'+SAIC.thanksComment+'</p>');if(link_show_comments.find('span').length){num_comments=String(parseInt(num_comments,10)+1);link_show_comments.find('span').html(num_comments)}}else{status.html('<p class="saic-ajax-error">Error processing your form</p>')}
function insertComment_SAIC(post_id,num_comments){var link_show_comments=$('#saic-link-'+post_id);var comment_form=$('#commentform-'+post_id);var status=$('#saic-comment-status-'+post_id);var form_data=comment_form.serialize();$.ajax({type:'post',method:'post',url:comment_form.attr('action'),data:form_data,beforeSend:function(){status.addClass('saic-loading').html('<span class="saico-loading"></span>').show()},success:function(data,textStatus){status.removeClass('saic-loading').html('');if(data!="error"){status.html('<p class="saic-ajax-success">'+SAIC.thanksComment+'</p>');if(link_show_comments.find('span').length){num_comments=String(parseInt(num_comments,10)+1);link_show_comments.find('span').html(num_comments)}}else{status.html('<p class="saic-ajax-error">Error processing your form</p>')}
$('ul#saic-container-comment-'+post_id).prepend(data).show();jPages_SAIC(post_id,SAIC.numPerPage,!0)},error:function(XMLHttpRequest,textStatus,errorThrown){status.removeClass('saic-loading').html('<p class="saic-ajax-error" >'+SAIC.duplicateComment+'</p>')},complete:function(jqXHR,textStatus){setTimeout(function(){status.removeClass('saic-loading').fadeOut(600)},2500)}});return!1}
$('ul#saic-container-comment-'+post_id).prepend(data).show();jPages_SAIC(post_id,SAIC.numPerPage,!0)},error:function(XMLHttpRequest,textStatus,errorThrown){status.removeClass('saic-loading').html('<p class="saic-ajax-error" >'+SAIC.duplicateComment+'</p>')},complete:function(jqXHR,textStatus){setTimeout(function(){status.removeClass('saic-loading').fadeOut(600)},2500)}});return!1}
function insertCommentReply_SAIC(post_id,comment_id,num_comments){var link_show_comments=$('#saic-link-'+post_id);var comment_form=$('#commentform-'+post_id);var status=$('#saic-comment-status-'+post_id);var item_comment=$('#saic-item-comment-'+comment_id);var form_data=comment_form.serialize();$.ajax({type:'post',method:'post',url:comment_form.attr('action'),data:form_data,beforeSend:function(){status.addClass('saic-loading').html('<span class="saico-loading"></span>').show()},success:function(data,textStatus){status.removeClass('saic-loading').html('');if(data!="error"){status.html('<p class="saic-ajax-success">'+SAIC.thanksReplyComment+'</p>');if(link_show_comments.find('span').length){num_comments=parseInt(num_comments,10)+1;link_show_comments.find('span').html(num_comments)}
function insertCommentReply_SAIC(post_id,comment_id,num_comments){var link_show_comments=$('#saic-link-'+post_id);var comment_form=$('#commentform-'+post_id);var status=$('#saic-comment-status-'+post_id);var item_comment=$('#saic-item-comment-'+comment_id);var form_data=comment_form.serialize();$.ajax({type:'post',method:'post',url:comment_form.attr('action'),data:form_data,beforeSend:function(){status.addClass('saic-loading').html('<span class="saico-loading"></span>').show()},success:function(data,textStatus){status.removeClass('saic-loading').html('');if(data!="error"){status.html('<p class="saic-ajax-success">'+SAIC.thanksReplyComment+'</p>');if(link_show_comments.find('span').length){num_comments=parseInt(num_comments,10)+1;link_show_comments.find('span').html(num_comments)}
if(!item_comment.find('ul').length){item_comment.append('<ul class="children"></ul>')}
if(!item_comment.find('ul').length){item_comment.append('<ul class="children"></ul>')}
item_comment.find('ul').append(data);setTimeout(function(){scrollThis_SAIC(item_comment.find('ul li').last())},1000)}else{status.html('<p class="saic-ajax-error">Error in processing your form.</p>')}},error:function(XMLHttpRequest,textStatus,errorThrown){status.html('<p class="saic-ajax-error" >'+SAIC.duplicateComment+'</p>')},complete:function(jqXHR,textStatus){setTimeout(function(){status.removeClass('saic-loading').fadeOut(600)},2500)}});return!1}
item_comment.find('ul').append(data);setTimeout(function(){scrollThis_SAIC(item_comment.find('ul li').last())},1000)}else{status.html('<p class="saic-ajax-error">Error in processing your form.</p>')}},error:function(XMLHttpRequest,textStatus,errorThrown){status.html('<p class="saic-ajax-error" >'+SAIC.duplicateComment+'</p>')},complete:function(jqXHR,textStatus){setTimeout(function(){status.removeClass('saic-loading').fadeOut(600)},2500)}});return!1}
function editComment_SAIC(post_id,comment_id){var form=$("#commentform-"+post_id);var status=$('#saic-comment-status-'+post_id);jQuery.ajax({type:"POST",url:SAIC.ajaxurl,data:{action:'edit_comment_saic',post_id:post_id,comment_id:comment_id,comment_content:form.find('.saic-textarea').val(),nonce:SAIC.nonce},beforeSend:function(){status.addClass('saic-loading').html('<span class="saico-loading"></span>').show()},success:function(result){status.removeClass('saic-loading').html('');var data=jQuery.parseJSON(result);if(data.ok===!0){$('#saic-comment-'+comment_id).find('.saic-comment-text').html(data.comment_text);setTimeout(function(){scrollThis_SAIC($('#saic-comment-'+comment_id))},1000)}else{console.log("Errors: "+data.error)}},complete:function(jqXHR,textStatus){setTimeout(function(){status.removeClass('saic-loading').fadeOut(600)},2500)}});return!1}
function editComment_SAIC(post_id,comment_id){var form=$("#commentform-"+post_id);var status=$('#saic-comment-status-'+post_id);jQuery.ajax({type:"POST",url:SAIC.ajaxurl,data:{action:'edit_comment_saic',post_id:post_id,comment_id:comment_id,comment_content:form.find('.saic-textarea').val(),nonce:SAIC.nonce},beforeSend:function(){status.addClass('saic-loading').html('<span class="saico-loading"></span>').show()},success:function(result){status.removeClass('saic-loading').html('');var data=jQuery.parseJSON(result);if(data.ok===!0){$('#saic-comment-'+comment_id).find('.saic-comment-text').html(data.comment_text);setTimeout(function(){scrollThis_SAIC($('#saic-comment-'+comment_id))},1000)}else{console.log("Errors: "+data.error)}},complete:function(jqXHR,textStatus){setTimeout(function(){status.removeClass('saic-loading').fadeOut(600)},2500)}});return!1}
function getCommentText_SAIC(post_id,comment_id){var form=$("#commentform-"+post_id);var status=$('#saic-comment-status-'+post_id);jQuery.ajax({type:"POST",dataType:"html",url:SAIC.ajaxurl,data:{action:'get_comment_text_saic',post_id:post_id,comment_id:comment_id,nonce:SAIC.nonce},beforeSend:function(){},success:function(data){if(data!=='saic-error'){$('#saic-textarea-'+post_id).val(data);autosize.update($('#saic-textarea-'+post_id));$('#commentform-'+post_id).find('input.saic-cancel-btn').show()}else{}},complete:function(jqXHR,textStatus){}});return!1}
function getCommentText_SAIC(post_id,comment_id){var form=$("#commentform-"+post_id);var status=$('#saic-comment-status-'+post_id);jQuery.ajax({type:"POST",dataType:"html",url:SAIC.ajaxurl,data:{action:'get_comment_text_saic',post_id:post_id,comment_id:comment_id,nonce:SAIC.nonce},beforeSend:function(){},success:function(data){if(data!=='saic-error'){$('#saic-textarea-'+post_id).val(data);autosize.update($('#saic-textarea-'+post_id));$('#commentform-'+post_id).find('input.saic-cancel-btn').show()}else{}},complete:function(jqXHR,textStatus){}});return!1}
function deleteComment_SAIC(post_id,comment_id){jQuery.ajax({type:"POST",dataType:"html",url:SAIC.ajaxurl,data:{action:'delete_comment_saic',post_id:post_id,comment_id:comment_id,nonce:SAIC.nonce},beforeSend:function(){},success:function(data){if(data==='ok'){$('#saic-item-comment-'+comment_id).remove()}}});return!1}
function deleteComment_SAIC(post_id,comment_id){jQuery.ajax({type:"POST",dataType:"html",url:SAIC.ajaxurl,data:{action:'delete_comment_saic',post_id:post_id,comment_id:comment_id,nonce:SAIC.nonce},beforeSend:function(){},success:function(data){if(data==='ok'){$('#saic-item-comment-'+comment_id).remove()}}});return!1}
function toggleMoreComments(){var containerComments=$('ul.saic-container-comments');var liComments=containerComments.find('>li.depth-1.saic-item-comment');liComments.each(function(index,element){var ulChildren=$(this).find('> ul.children');if($(this).find('> ul.children').length&&ulChildren.find('li').length>3){ulChildren.find(' li:gt(2)').css('display','none');ulChildren.append('<a href="#" class="saic-load-more-comments">Load more</a>')}})}
function toggleMoreComments(){var containerComments=$('ul.saic-container-comments');var liComments=containerComments.find('>li.depth-1.saic-item-comment');liComments.each(function(index,element){var ulChildren=$(this).find('> ul.children');if($(this).find('> ul.children').length&&ulChildren.find('li').length>3){ulChildren.find(' li:gt(2)').css('display','none');ulChildren.append('<a href="#" class="saic-load-more-comments">Load more</a>')}})}
$(document).delegate('a.saic-load-more-comments','click',function(e){e.preventDefault();$(this).parent().find('li.saic-item-comment').fadeIn("slow");$(this).remove()});$(document).delegate('.saic-media-btns a','click',function(e){e.preventDefault();var post_id=$(this).attr('href').split('=')[1].replace('&action','');var $action=$(this).attr('href').split('=')[2];$('body').append('<div id="saic-overlay"></div>');$("#saic-overlay").css({'opacity':0.2,'z-index':900000});$('body').append('<div id="saic-modal"></div>');$modalHtml='<div id="saic-modal-wrap"><span id="saic-modal-close"></span><div id="saic-modal-header"><h3 id="saic-modal-title">Título</h3></div><div id="saic-modal-content"><p>Hola</p></div><div id="saic-modal-footer"><a id="saic-modal-ok-'+post_id+'" class="saic-modal-ok saic-modal-btn" href="#">'+SAIC.accept+'</a><a class="saic-modal-cancel saic-modal-btn" href="#">'+SAIC.cancel+'</a></div></div>';$("#saic-modal").append($modalHtml).fadeIn(250);switch($action){case 'url':$('#saic-modal').removeClass().addClass('saic-modal-url');$('#saic-modal-title').html(SAIC.insertLink);$('#saic-modal-content').html('<input type="text" id="saic-modal-url-link" class="saic-modal-input" placeholder="Url link"/><input type="text" id="saic-modal-text-link" class="saic-modal-input" placeholder="Text to display"/>');break;case 'image':$('#saic-modal').removeClass().addClass('saic-modal-image');$('#saic-modal-title').html(SAIC.insertImage);$('#saic-modal-content').html('<input type="text" id="saic-modal-url-image" class="saic-modal-input" placeholder="Url image"/><div id="saic-modal-preview"></div>');break;case 'video':$('#saic-modal').removeClass().addClass('saic-modal-video');$('#saic-modal-title').html(SAIC.insertVideo);$('#saic-modal-content').ht
$(document).delegate('a.saic-load-more-comments','click',function(e){e.preventDefault();$(this).parent().find('li.saic-item-comment').fadeIn("slow");$(this).remove()});$(document).delegate('.saic-media-btns a','click',function(e){e.preventDefault();var post_id=$(this).attr('href').split('=')[1].replace('&action','');var $action=$(this).attr('href').split('=')[2];$('body').append('<div id="saic-overlay"></div>');$("#saic-overlay").css({'opacity':0.2,'z-index':900000});$('body').append('<div id="saic-modal"></div>');$modalHtml='<div id="saic-modal-wrap"><span id="saic-modal-close"></span><div id="saic-modal-header"><h3 id="saic-modal-title">Título</h3></div><div id="saic-modal-content"><p>Hola</p></div><div id="saic-modal-footer"><a id="saic-modal-ok-'+post_id+'" class="saic-modal-ok saic-modal-btn" href="#">'+SAIC.accept+'</a><a class="saic-modal-cancel saic-modal-btn" href="#">'+SAIC.cancel+'</a></div></div>';$("#saic-modal").append($modalHtml).fadeIn(250);switch($action){case 'url':$('#saic-modal').removeClass().addClass('saic-modal-url');$('#saic-modal-title').html(SAIC.insertLink);$('#saic-modal-content').html('<input type="text" id="saic-modal-url-link" class="saic-modal-input" placeholder="Url link"/><input type="text" id="saic-modal-text-link" class="saic-modal-input" placeholder="Text to display"/>');break;case 'image':$('#saic-modal').removeClass().addClass('saic-modal-image');$('#saic-modal-title').html(SAIC.insertImage);$('#saic-modal-content').html('<input type="text" id="saic-modal-url-image" class="saic-modal-input" placeholder="Url image"/><div id="saic-modal-preview"></div>');break;case 'video':$('#saic-modal').removeClass().addClass('saic-modal-video');$('#saic-modal-title').html(SAIC.insertVideo);$('#saic-modal-content').html('