Jquery tabs customization

Jquery tabs customization

Link :  http://amrockytechnologies.com/1/process.html

The red bullets should be clickable and it should work same the all 6 tabs (Strategy Plan.. ). when u click to red bullets it should display corresponding section  
Below is the the current working code

and reffering css:


  1. /* Navigation */
  2. nav li:first-child:after{
  3. content:'';
  4. color:red !important;
  5. }

  6. nav {
  7. margin-bottom: 5%;
  8. position: relative;
  9. border-bottom: 1px solid #bbb;
  10. }

  11. nav ul {
  12. overflow: hidden;
  13. padding-bottom: 3%;
  14. padding-top:3%;
  15. margin:0% 5%;
  16. border-bottom: 0px solid #bbb;
  17. list-style-type:none;
  18. }

  19. nav li {
  20. width:13%;
  21. float: left;
  22. margin-right: 4.35% !important;
  23. /*color:#5fb8e4 !important;*/
  24. }
  25. nav li:last-child{
  26. margin-right:0px !important;

  27. }
  28. nav li a {
  29. color: #5fb8e4;
  30. font-weight: bold;
  31. }
  32. #tabs li a.active:after,#tabs li a.active:before{
  33. color:#666 !important;
  34. content:"";
  35. }
  36. nav li a:hover,
  37. nav li a:focus,
  38. nav li a.current {
  39. color: white;
  40. }

  41. nav #indicator {
  42. position: absolute;
  43. left: 0px;
  44. bottom: -5px;
  45. width: 12px;
  46. height:12px;
  47. z-index:2;
  48. background-color: red;
  49. border-radius:40px;
  50. }

  51. #tab{
  52. margin:0% 5%;
  53. }

  54. /* Content */

  55. #content section {
  56. display: none;
  57. margin:0% 7%;
  58. }

  59. #content p {
  60. margin-bottom: 1em;
  61. max-width: 50em;
  62. line-height: 1.6;
  63. }


  64. .indicators{position: absolute;left: 0px;bottom: -5px;width: 12px;height: 12px;z-index: 1;background-color: #ffffff;border-radius: 40px;}

  1. <script type="text/javascript">
  2. var previousIndex = -1;
  3. $(function() {
  4. var left1=0;
  5. var indicator = $('#indicator'),
  6. indicatorHalfWidth = indicator.width()/2,
  7. lis = $('#tabs').children('li');
  8. $("#tabs").tabs("#content section", {
  9. effect: 'fade',
  10. fadeOutSpeed: 0,
  11. fadeInSpeed: 400,
  12. onBeforeClick: function(event, index) {
  13. var li = lis.eq(index),
  14.    newPos = li.position().left + (li.width()/2) - indicatorHalfWidth;
  15. HandleOnCLick(index);
  16.            newPos = newPos-63;
  17.   indicator.stop(true).animate({ left: newPos }, 600, 'easeInOutExpo');
  18.   $('.indicators').eq(index).stop(true).animate({ opacity:'0' }, 600, 'easeInOutExpo');
  19.   
  20.   if(previousIndex != -1)
  21.   {
  22. $('.indicators').eq(previousIndex).stop(true).animate({ opacity:'1' }, 600, 'easeInOutExpo');
  23.   }
  24.   previousIndex = index;
  25. }
  26. });
  27. InitializeIndicators(indicatorHalfWidth);
  28. });
  29. function InitializeIndicators(indicatorHalfWidth)
  30. {
  31. for(var i=0;i<$('#tabs').children("li").length;i++)
  32. {
  33. var liObj = $('#tabs').children("li").eq(i);
  34. var newPos = liObj.position().left + (liObj.width()/2) - indicatorHalfWidth;
  35. newPos = newPos-63;
  36. $('.indicators').eq(i).css("left",(newPos)+"px");
  37. }
  38. }

  39. function HandleOnCLick(index)
  40. {
  41. var modifedCss = "#B3B3B3";
  42. for(var i=0;i<$('#tabs').find('a').length;i++)
  43. {
  44. if($('#tabs').find('a')[i].className != 'current')
  45. {
  46. $('#tabs').find('a')[i].style.color = "";
  47. }
  48. }
  49. if(index >0 )
  50. {
  51. $('#tabs').find('a')[index-1].style.color = modifedCss;
  52. }
  53. if(index<$('#tabs').find('a').length-1)
  54. {
  55. $('#tabs').find('a')[index+1].style.color = modifedCss;
  56. }
  57. }
  58. /* $( "#indicator" ).click(function() {
  59.   $("#tabs").tabs("#content section", {
  60. effect: 'fade',
  61. fadeOutSpeed: 0,
  62. fadeInSpeed: 400,
  63. onBeforeClick: function(event, index) {
  64. var li = lis.eq(index),
  65.   
  66.   newPos = li.position().left + (li.width()/2) - indicatorHalfWidth;
  67. newPos = newPos - 40;
  68.   indicator.stop(true).animate({ left: newPos }, 600, 'easeInOutExpo');
  69.   
  70. }
  71. });
  72. });
  73. */
  74. </script>

  75. <nav>
  76. <ul id="tabs" id="tabs-1">
  77. <li><a class="current" href="#"><span style="font-size:24pt;">Strategy</span><br/> Your plan</a></li>
  78. <li><a href="#"><span style="font-size:24pt;">Develop</span> <br/> Your story</a></li>
  79. <li><a href="#"><span style="font-size:24pt;">Stylize</span><br/>Your voice</a></li>
  80. <li><a href="#"><span style="font-size:24pt;">Capture <br/></span>Your vision</a></li>
  81. <li><a href="#"><span style="font-size:24pt;">Create <br/> </span>Your experience </a></li>
  82. <li><a href="#"><span style="font-size:24pt;">Deliver <br/> </span>Your Clients </a></li>
  83. </ul>
  84. <span id="indicator"></span>
  85. <span class="indicators"></span>
  86. <span class="indicators"></span>
  87. <span class="indicators"></span>
  88. <span class="indicators"></span>
  89. <span class="indicators"></span>
  90. <span class="indicators"></span>
  91. </nav>
  92. <div id="content" style="padding-bottom:63px;margin-bottom:-11px">
  93. <section>
  94. <div class="pure-g">
  95. <div class="pure-u-1-2" style="background:#ffffff;width:61%;padding:20px;margin-right:4.2em;min-width:500px;margin-bottom:20px;">
  96. <img src="images/process/stratergy_final.gif" alt="" width="100%" style="margin-bottom:1.5em"/>
  97. <span style="text-transform:uppercase;font-family:Helvetica Neue;font-size:1.3em;">concept development</span>
  98. <p>The first phase of the project is probably the most important, and in our opinion the most fun too. During the concept development phase, we work with guidlines specified for the project and try to develop a strong core idea. Usually this is done through brainstorming sessions and workshops, In short, this stage in the process usually include:</p>
  99. <p style="margin-left:10px">Research <br/>Idea<br/>Development</p>
  100. </div>
  101. <div class="pure-u-1-2" style="background:#ffffff; width:26%;padding: 10px 10px 48px 10px;min-width:250px">
  102. <div style="text-transform:uppercase;">
  103. <p style="font-family:Helvetica Neue LT;font-size:1.4em;margin:0px !important;text-align:center">testimonials</p>
  104. <img src="images/test/sanjeev_th.jpg" alt=""  style="display:block;margin-left:auto;margin-right:auto;"/>
  105. <p style="margin:0px;text-align:center">Sanjeev Kapoor</p>
  106. <p style="margin:0px;font-size:.9em;text-transform:none;text-align:center">Owner of Scorpio Events Pvt. Ltd.</p>
  107. <p style="margin:0px;text-transform:none;padding:10px">Himayath is a Great Guy, we have used his services in past which come very Creative and out of the Box ideas from his side, we're currently using him only for all our creative and video movie need and strongly recommend other also for the same.</p>
  108. </div>
  109. </div>
  110. </div><!--pure-g-->
  111. </section>