//tab effects var tcount=0; var TabbedContent = { init: function() { jQuery(".tab_item").click(function() { var background = jQuery(this).parent().find(".moving_bg"); jQuery(background).stop().animate({ left: jQuery(this).position()['left'] }, { duration: 300 }); TabbedContent.slideContent(jQuery(this)); jQuery(this).css("color","#fff"); }); }, slideContent: function(obj) { jQuery(obj).parent().parent().find(".tab_item").css("color","#888") jQuery('.tab_item').each(function(index) { }); var margin = jQuery(obj).parent().parent().find(".slide_content").width(); margin = margin * (jQuery(obj).prevAll().size() - 1); margin = margin * -1; index=(-1*margin/jQuery(obj).parent().parent().find(".slide_content").width()); if (index> 3) { jQuery("#RegisterSendButton").hide() }else{ jQuery("#RegisterSendButton").show() } jQuery(obj).parent().parent().find(".tabslider").stop().animate({ marginLeft: margin + "px" }, { duration: 300 }); } } jQuery(document).ready(function() { TabbedContent.init(); });