/* Source and licensing information for the line(s) below can be found at https://en.huji.ac.il/profiles/openscholar/modules/os/modules/os_sv_list/os_sv_list_display.js. */
(function($){var data={};Drupal.behaviors.os_sv_list={attach:function(ctx){$('.block-boxes-os_sv_list_file .os_sv_list_file .file').each(function(i){var width_parent=$(this).width();if(width_parent<$(this).find('iframe').attr('width'))$(this).find('iframe').attr('width',width_parent)});$('.os-sv-list',ctx).closest('.boxes-box-content').once('os-sv-list-pager').click(click_handler).each(function(){var page_elem=$(this).find('[data-page]'),page=page_elem.attr('data-page'),delta=page_elem.attr('data-delta');data[delta]=data[delta]||{};data[delta][page]=page_elem.parent().html()})
function click_handler(e){if($(e.target).parents('.pager').length==0||e.target.nodeName!='A')return;e.stopPropagation();e.preventDefault();var args=query_args(e.target.href),delta=args.sv_list_box_delta,block_boxes_selector="#context-block-boxes-"+delta;if(!$(block_boxes_selector).length)block_boxes_selector="#block-boxes-"+delta;$("html, body").animate({scrollTop:$("#block-boxes-"+delta.replace(/\_/g,'-')).offset().top},"slow");if(typeof args.page=='undefined')args.page=0;var searchbox="";if(args.searchbox)searchbox=args.searchbox;if(searchbox==""&&typeof data[delta][args.page]!='undefined'){var parent=$(e.target).closest('.boxes-box-content').html(data[delta][args.page]);Drupal.attachBehaviors(parent)}else{var s=Drupal.settings,page=decodeURIComponent(args.page).split(',');page=page[args.pager_id];destination=args.destination;$.ajax({url:window.location.protocol+'//'+window.location.hostname+'/'+(typeof s.pathPrefix!='undefined'?s.pathPrefix:'')+'os_sv_list/page/'+delta,data:{page:page,destination:destination,searchbox:decodeURIComponent(searchbox)},beforeSend:function(xhr,settings){$(e.currentTarget).append('<div class="ajax-progress ajax-progress-throbber"><div class="throbber">&nbsp;</div></div>')},success:function(commands,status,xhr){var html,i,parent=$(e.currentTarget);for(i in commands)if(commands[i].command=='insert'&&commands[i].method==null&&commands[i].selector==null&&commands[i].data!=""){html=commands[i].data;break};parent.html(html);Drupal.attachBehaviors(parent);if(searchbox==""){var page=parseInt(parent.find('[data-page]').attr('data-page'));data[delta][page]=html};$(e.currentTarget).find('.ajax-progress').remove()}})}}}}
function query_args(url){var frags=url.split('?'),args={};frags=frags[1].split('&');for(var i=0;i<frags.length;i++){var arg=frags[i].split('=');args[arg[0]]=arg[1]};return args}
function get_delta(elem){return elem.id.replace('block-boxes-','')}})(jQuery);;
/* Source and licensing information for the above line(s) can be found at https://en.huji.ac.il/profiles/openscholar/modules/os/modules/os_sv_list/os_sv_list_display.js. */;/*})'"*/
/* Source and licensing information for the line(s) below can be found at https://en.huji.ac.il/profiles/openscholar/modules/os/modules/os_boxes/plugins/os_boxes_tabs/os_boxes_tabs_display.js. */
Drupal.behaviors.os_boxes_tabs={attach:function(ctx){var $=jQuery;if($.widget)$.widget('os_boxes.tabsBox',$.ui.tabs,{_getList:function(){var list=this.element.find('.tab-links');return list.eq(0)}});$('.os-boxes-tabbed',ctx).once('tab-links',function(){var id=$(this).closest('.boxes-box').attr('id');$(this).not('.os-boxes-tabbed .os-boxes-tabbed').tabsBox({show:clickHandle,selected:(typeof window.sessionStorage!='undefined'&&typeof sessionStorage[id]!='undefined')?sessionStorage[id]:0})});$('.ui-tabs-anchor').on("click",function(event,ui){var container_id=$(this).parent().attr('aria-controls'),container_id_src=$('#'+container_id+' iframe:not([id^="trumba.spud"])').attr("src");if(/www.google.com\/calendar/.exec(container_id_src)===null)$('#'+container_id+' iframe:not([id^="trumba.spud"])').attr("src",$('#'+container_id+' iframe').attr("src"))})
function clickHandle(e){var $this=$(this),id=$this.closest('.boxes-box').attr('id'),val=$(this).tabs('option','selected');if(typeof window.sessionStorage!='undefined')window.sessionStorage[id]=val}}};;
/* Source and licensing information for the above line(s) can be found at https://en.huji.ac.il/profiles/openscholar/modules/os/modules/os_boxes/plugins/os_boxes_tabs/os_boxes_tabs_display.js. */;/*})'"*/
