Drupal.behaviors.tableauProductVideos=function(context){var hash=location.hash.replace("#","");if(hash=='tour')if(Drupal.settings.tableauVideos.displayVideo){var url=$('a.video-tour-popup').attr('href');if(url)tb_show(null,url,false)}};
Drupal.behaviors.tableauMenu=function(){var hoverSettings={over:over,out:out,timeout:500};$('.megamenu-bin').hoverIntent(hoverSettings)
function over(event){$(this).parent("li").addClass("hovering").find('h2 a').addClass("hovering")}
function out(event){$(this).prev('h2').find('a').removeClass("hovering");$(this).parent("li").removeClass("hovering")}};
Drupal.behaviors.guest_users=function(context){if(!$('input#create-account-checkbox').attr('checked')){$('#create-account-optional').addClass('hide')}else{$('#create-account-optional').removeClass('collapsed');$('#guest_users_guest_submit_save').addClass('hide')};$('input#create-account-checkbox',context).click(function(){$('#create-account-optional').toggleClass('hide');$('#create-account-optional').toggleClass('collapsed');$('#guest_users_guest_submit_save').toggleClass('hide')})};$(document).ready(function(){Modernizr.addTest('mobiledevice',function(){return RegExp(" Mobile/").test(navigator.userAgent)});Modernizr.load({test:Modernizr.mobiledevice,nope:'/sites/all/themes/tableau/js/mobile-off.js',yep:'/sites/all/themes/tableau/js/mobile.js'})});Drupal.behaviors.bef_live_filter=function(){$('.page-solutions .view-solutions .views-exposed-form .views-exposed-widgets').prepend('<div class="filter-divider">Find Your Solution</div>');$('.page-learn-gallery .view-visualization .views-exposed-form .views-exposed-widgets').prepend('<div class="filter-divider">Filter Results</div>');$('.view-events.view-display-id-page_1 .views-exposed-widgets').prepend('<div class="filter-divider">Filter Results</div>');$('.view-customer-stories .views-exposed-form .views-exposed-widgets, .view-tutorials .views-exposed-form .views-exposed-widgets, .view-whitepapers-webinars .views-exposed-form .views-exposed-widgets, .view-webinars .views-exposed-form .views-exposed-widgets').prepend('<div class="filter-divider">Filter Results</div>');$('#views-exposed-form-visualization-page-1 #filter-tid_1 .views-widget .form-checkboxes').prepend('<input type="checkbox" id="filter-tid_1-select-all" class="bef-select-all-none-checkbox"> All Applications');$('#views-exposed-form-visualization-page-1 #filter-tid .views-widget .form-checkboxes').prepend('<input type="checkbox" id="filter-tid-select-all" class="bef-select-all-none-checkbox"> All Industries');$('#views-exposed-form-tutorials-page-1 #filter-type .views-widget .form-checkboxes').prepend('<input type="checkbox" id="filter-tid-select-all" class="bef-select-all-none-checkbox"> All Session Types');$('#views-exposed-form-tutorials-page-1 #filter-tid .views-widget .form-checkboxes').prepend('<input type="checkbox" id="filter-tid-select-all" class="bef-select-all-none-checkbox"> All Skill Levels');$('#views-exposed-form-whitepapers-webinars-page-1 #filter-tid_1 .views-widget .form-checkboxes').prepend('<input type="checkbox" id="filter-tid-select-all" class="bef-select-all-none-checkbox"> Application Focused');$('#views-exposed-form-whitepapers-webinars-page-1 #filter-tid_2 .views-widget .form-checkboxes').prepend('<input type="checkbox" id="filter-tid-select-all" class="bef-select-all-none-checkbox"> Product Focused');$('#views-exposed-form-whitepapers-webinars-page-1 #filter-tid .views-widget .form-checkboxes').prepend('<input type="checkbox" id="filter-tid-select-all" class="bef-select-all-none-checkbox"> All Roles');$('#views-exposed-form-whitepapers-webinars-page-1 #filter-tid_3 .views-widget .form-checkboxes').prepend('<input type="checkbox" id="filter-tid-select-all" class="bef-select-all-none-checkbox"> All Categories');$('#views-exposed-form-webinars-page-1 #filter-field_on_demand_value_many_to_one .views-widget .form-checkboxes').prepend('<input type="checkbox" id="filter-tid-select-all" class="bef-select-all-none-checkbox"> All Types');$('#views-exposed-form-webinars-page-1 #filter-tid_1 .views-widget .form-checkboxes').prepend('<input type="checkbox" id="filter-tid-select-all" class="bef-select-all-none-checkbox"> Application Focused');$('#views-exposed-form-webinars-page-1 #filter-tid_2 .views-widget .form-checkboxes').prepend('<input type="checkbox" id="filter-tid-select-all" class="bef-select-all-none-checkbox"> Product Focused');$('#views-exposed-form-webinars-page-1 #filter-tid .views-widget .form-checkboxes').prepend('<input type="checkbox" id="filter-tid-select-all" class="bef-select-all-none-checkbox"> All Roles');$('#views-exposed-form-webinars-page-1 #filter-tid_3 .views-widget .form-checkboxes').prepend('<input type="checkbox" id="filter-tid-select-all" class="bef-select-all-none-checkbox"> All Categories')};Drupal.behaviors.better_exposed_filters_tableau=function(){var selected=$('.bef-select-all-none-checkbox');if(selected.length){var link=$(selected);link.click(function(){var checked=$(this).hasClass('checked');if(!checked){$(this).addClass('checked');$(this).parent().children('.bef-checkboxes').find('.form-item input:checkbox').each(function(){$(this).attr('checked','checked')})}else{$(this).removeClass('checked');$(this).parent().children('.bef-checkboxes').find('.form-item input:checkbox').each(function(){$(this).attr('checked','')})};return true});selected.each(function(index){var newLink=link.clone(true);newLink.insertBefore($('.bef-checkboxes',this));if($('input:checkbox:checked',this).length==$('input:checkbox',this).length)newLink.click()})}};Drupal.behaviors.tableau_home_slider=function(){var thumb=$('.home-thumbnail');if(thumb.length)thumb.hover(function(){$(this).addClass("hover");$(this).parents('.views-row').siblings().find('.home-teaser').animate({marginLeft:"-225px"},500);$(this).siblings('.home-teaser').css('display','block').animate({marginLeft:"0px"},500)},function(){})};Drupal.behaviors.tabLinker=function(context){function parseQuery(p,v){var p=(!p)?window.location.search.substring(1):p,vars=p.split("&");for(var i=0;i<vars.length;i++){var pair=vars[i].split("=");if(pair[0]==v)return pair[1]}};$('.tablink').click(function(e){e.preventDefault();var hrefFrag=$(this).attr('href').split('#'),hrefQuery=hrefFrag[0].split('?'),tabNum=parseQuery(hrefQuery[1],hrefFrag[1].replace('-','_')),fragChunks=hrefFrag[1].split('-');$('#quicktabs-tab-'+fragChunks[1]+'-'+tabNum).click()});return false};Drupal.behaviors.collapser=function(context){$("#steps .collapsible .step-content").css("display","none");$("#showAll").attr("checked",false);$("#showAll").click(function(){if($("#showAll:checked").val()==null){$("#steps .collapsible .step-content").hide("slow");$("#steps .collapsible").removeClass("open")}else{$("#steps .collapsible .step-content").show("slow");$("#steps .collapsible").addClass("open")}});$("#steps .collapsible .header").click(function(){$(this).siblings(".step-content").toggle("slow");$(this).parent().toggleClass("open")})};
$(function(){productHero.init()});var productHero={overlay:$("<div/>").addClass("ph-overlay"),paneWidth:480,paneGutter:130,speedIn:500,speedOut:300,init:function(){$(".ph-pane1").bind("mouseenter.ph-pane1",function(e){productHero.slidePane((productHero.paneWidth*2)-productHero.paneGutter,productHero.speedIn,true,".ph-pane2")});$(".ph-pane2").bind("mouseenter.ph-pane1",function(e){productHero.slidePane(productHero.paneGutter,productHero.speedIn,true,".ph-pane1")});$(".ph-hoverable").bind("mouseleave.ph-hoverable",function(e){$(".ph-sidebar-hat").stop().fadeTo(1,1).show();productHero.slidePane(productHero.paneWidth,productHero.speedOut)});$(".ph-hoverable").each(function(){var $sidebar=$(".ph-sidebar",this).show(),xPos=$sidebar.position().left,yPos=$sidebar.position().top,width=$sidebar.width(),height=$sidebar.height(),$hat=$("<div/>").addClass("ph-sidebar-hat").css({width:width+"px",height:height+"px",left:xPos+"px",top:yPos+"px","background-position":(-xPos)+"px "+(-yPos)+"px"});$sidebar.hide();$(this).append($hat)})},showContent:function(){$(".ph-sidebar").show();$(".ph-sidebar-hat").fadeOut("slow")},slidePane:function(pos,speed,show,inactivePane){$(".ph-overlay").remove();$(".ph-pane2").stop().animate({left:pos+"px"},speed,"swing",function(){if(show)productHero.showContent();if(inactivePane)$(inactivePane).append(productHero.overlay.clone())})}};
(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY,track=function(ev){cX=ev.pageX;cY=ev.pageY},compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev])}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval)}},delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev])},handleHover=function(e){var p=(e.type=="mouseover"?e.fromElement:e.toElement)||e.relatedTarget;while(p&&p!=this)try{p=p.parentNode}catch(e){p=this};if(p==this)return false;var ev=jQuery.extend({},e),ob=this;if(ob.hoverIntent_t)ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if(e.type=="mouseover"){pX=ev.pageX;pY=ev.pageY;$(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1)ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval)}else{$(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1)ob.hoverIntent_t=setTimeout(function(){delay(ev,ob)},cfg.timeout)}};return this.mouseover(handleHover).mouseout(handleHover)}})(jQuery);

