');}else if($type=="document"){$widthD=$widthD-50;$heightD=$heightD-40;jQuery($body).html('');}else{jQuery($body).load($href,function(response,status,xhr){if(status=="success"){}});}});});jQuery(function($){SqueezeBox.initialize({});initSqueezeBox();$(document).on('subform-row-add',initSqueezeBox);function initSqueezeBox(event,container) {SqueezeBox.assign($(container||document).find('a.pd-modal-button').get(),{parse:'rel'});}});window.jModalClose=function(){SqueezeBox.close();};document.onreadystatechange=function(){if(document.readyState=='interactive'&&typeof tinyMCE!='undefined'&&tinyMCE) {if(typeof window.jModalClose_no_tinyMCE==='undefined') {window.jModalClose_no_tinyMCE=typeof(jModalClose)=='function'?jModalClose:false;jModalClose=function(){if(window.jModalClose_no_tinyMCE)window.jModalClose_no_tinyMCE.apply(this,arguments);tinyMCE.activeEditor.windowManager.close();};} if(typeof window.SqueezeBoxClose_no_tinyMCE==='undefined') {if(typeof(SqueezeBox)=='undefined')SqueezeBox={};window.SqueezeBoxClose_no_tinyMCE=typeof(SqueezeBox.close)=='function'?SqueezeBox.close:false;SqueezeBox.close=function(){if(window.SqueezeBoxClose_no_tinyMCE)window.SqueezeBoxClose_no_tinyMCE.apply(this,arguments);tinyMCE.activeEditor.windowManager.close();};}}};jQuery(function($){initChosen();$("body").on("subform-row-add",initChosen);function initChosen(event,container) {container=container||document;$(container).find("select").chosen({"disable_search_threshold":10,"search_contains":true,"allow_single_deselect":true,"placeholder_text_multiple":"\u062a\u0627\u06cc\u067e \u06a9\u0646\u06cc\u062f \u06cc\u0627 \u0628\u0631\u062e\u06cc \u06af\u0632\u06cc\u0646\u0647 \u0647\u0627 \u0631\u0627 \u0627\u0646\u062a\u062e\u0627\u0628 \u06a9\u0646\u06cc\u062f","placeholder_text_single":"\u06cc\u06a9 \u06af\u0632\u06cc\u0646\u0647 \u0631\u0627 \u0627\u0646\u062a\u062e\u0627\u0628 \u06a9\u0646\u06cc\u062f","no_results_text":"\u0647\u06cc\u0686 \u0646\u062a\u06cc\u062c\u0647 \u0627\u06cc \u0646\u062f\u0627\u0634\u062a"});}});jQuery(function($){initTooltips();$("body").on("subform-row-add",initTooltips);function initTooltips(event,container){container=container||document;$(container).find(".hasTooltip").tooltip({"html":true,"container":"body"});}});jQuery(document).ready(function(){var value,searchword=jQuery('.mod-finder-searchword');value=searchword.val();searchword.on('focus',function() {var el=jQuery(this);if(el.val()==='جستجو...') {el.val('');}});searchword.on('blur',function() {var el=jQuery(this);if(!el.val()) {el.val(value);}});jQuery('.mod-finder-searchform').on('submit',function(e) {e.stopPropagation();var advanced=jQuery('#mod-finder-advanced');if(advanced.length) {advanced.find('select').each(function(index,el) {var el=jQuery(el);if(!el.val()) {el.attr('disabled','disabled');}});}});var suggest=jQuery('.mod-finder-searchword').autocomplete({serviceUrl:'/component/finder/?task=suggestions.suggest&format=json&tmpl=component',paramName:'q',minChars:1,maxHeight:400,width:300,zIndex:99,deferRequestBy:500});});