// This has been autogenerated by \lib\JSMin\jsmin.exe, do not modify manually

function TabBrowser(options){var that=this;that.defaults={tabsParentId:'#share-options',divsParentId:'#see-options',closeButton:'.close-button'};that.opts=$.extend(that.defaults,options);that.$tabs=$(that.opts.tabsParentId+' a');if($(that.opts.divsParentId+' > div').length<1){var container=that.opts.divsParentId+'-cont';$(that.opts.divsParentId).wrap('<div id="'+container.replace('#','')+'"></div>');that.opts.divsParentId=container;}
that.$divs=$(that.opts.divsParentId+' > div');that.$closeButton=$(that.opts.divsParentId+' '+that.opts.closeButton);that.$divs.addClass('js');that.active=false;that.checkTabs=function(){var $close=null;var $open=null;if(that.active)return false;that.$divs.each(function(i){if($(this).is(':visible')&&$(this).is('.clicked')){$close=$(this);}else if($(this).is(':visible')&&$(this).is(':not(.clicked)')){$close=$(this);}else if($(this).is(':not(:visible)')&&$(this).is('.clicked')){$open=$(this);}});that.closeOpen($close,$open);return false;}
that.closeOpen=function($close,$open){if(that.active)
return;that.active=true;that.$closeButton.css('visibility','hidden');if($close){that.hideDiv($close,$open);}else if($open){that.showDiv($open);}else{that.$divs.each(function(i){$(this).removeClass('clicked');that.$closeButton.css('visibility','visible');});}
that.active=false;}
that.hideDiv=function($close,$open){$close.slideUp("slow",function(){that.closeOpen(null,$open);});}
that.showDiv=function($open){$open.slideDown("slow",function(){that.closeOpen(null,null);});}
that.$tabs.click(function(){$($(this).attr('href')).addClass('clicked');return that.checkTabs();});that.$closeButton.click(function(){$(this).parents('div.js').addClass('clicked');return that.checkTabs();});$('.error, .confirm').each(function(i){$(this).parents('div.js').addClass('clicked');return that.checkTabs();});$('input#embededCode').focus(function(){$(this).select();});$('input#embededCode').click(function(){$(this).select();});}