<style>
.chat-box-overlay{
	display:none;
}
.chat-logs{
	display:none;
}
.chat-input{
	display:none;
}
.subcribe_chat{
	    padding: 6px 0px!important;
}
</style>


<div class="footer-wrapper">
  <div class="footer-top-area">
    <div class="container">
      <div class="row">
        <div class="col-md-4 col-sm-6">
          <div class="footer-about-info-area footer-top-content">
            <div class="footer-widget-heading">
              <h3>About Us</h3>
            </div>
            <div class="footer-widget-content">
              <p><span style="color:#007aff">theOnline</span><span style="color:#f47629">Gurukul</span> is a global marketplace for learning and teaching online where students are mastering new skills and achieving their goals by learning from an expert instructors.</p>

              <!-- <ul class="footer-social-menu list-inline">
                <li><a href="javascript:void(0)"><i class="fa fa-facebook"></i></a></li>
                <li><a href="javascript:void(0)"><i class="fa fa-twitter"></i></a></li>
                <li><a href="javascript:void(0)"><i class="fa fa-instagram"></i></a></li>
                <li><a href="javascript:void(0)"><i class="fa fa-linkedin-square"></i></a></li>
                <li><a href="javascript:void(0)"><i class="fa fa-skype"></i></a></li>
              </ul> -->
            </div>
          </div>
        </div>
        <div class="col-md-4 col-sm-6">
          <div class="footer-tags-widget">
            <div class="footer-widget-heading">
              <h3>Quick Links</h3>
            </div>
            <div class="footer-widget-content">
              <ul class="footer-widget-menu">
                <li> <a href="<?=site_url("home");?>">Home</a> </li>
                <li> <a href="<?=site_url("how-it-works");?>">How it works</a></li>
                <li> <a href="<?=site_url("courses");?>">Courses</a></li>
                <li> <a href="<?=site_url("faq");?>">Faq's</a> </li>
                <li> <a href="<?=site_url("contact-us");?>">Contact Us</a> </li>
			<li> <a href="<?=site_url("our-teachers");?>">Our Teachers</a> </li>
             <li><a href="" onclick="yes_js_login(); return false;" ><span style=""class="count233 label "><?php echo $this->hits;?></span> </a></li>

              </ul>

            </div>
          </div>
        </div>
        <div class="col-md-4 col-sm-6">
          <div class="footer-contact">
            <div class="footer-widget-heading">
              <h3>Contact Us</h3>
            </div>
            <div class="footer-widget-content">
               <ul class="footer-conatct-menu">
                <li> <a href="mailto:info@theonlinegurukul.com" style="font-size: 16px;"><i class="fa fa-envelope"></i><span>Email :</span> info@theonlinegurukul.com</a> </li>
                <li> <a href="tel:+919899416555"><i class="fa fa-phone"></i> <span>Phone : </span> +91-9899416555,9899406555</a> </li>
                <li> <a target="blank" href="https://maps.google.com/?q=116 Phase IV, Udyog Vihar, Sector 18 Gurugram, Haryana 122008"><i class="fa fa-map-o"></i><span>Address :</span> plot no : 116, First Floor,Near Atlas Chowk,
                Udyog Vihar, Phase – 4, 122015, Gurugram, Haryana, India</a> </li>
              </ul>
            </div>
          </div>
        </div>

      </div>
    </div>
  </div>
        <div class="copyright-wrapper">
              <div class="container">
                    <div class="col-md-6">
                   <!--<p>&copy; Copyright <span id="year"></span> theOnlineGurukul | All Rights Reserved.</p>-->
			   <p>&copy; Copyright <span id="year"></span> theOnlineGurukul | Powered by Decon Telecom Solutions Pvt. Ltd.</p>
                    </div>
                      <div class="col-md-6">
                            <ul class="footer-social-menu list-inline list-line_footer">
                            <li><a href="https://www.facebook.com/theOnlineGurukul"><i class="fa fa-facebook"></i></a></li>
                            <li><a href="javascript:void(0)"><i class="fa fa-twitter"></i></a></li>
                            <li><a href="javascript:void(0)"><i class="fa fa-instagram"></i></a></li>
                            <li><a href="javascript:void(0)"><i class="fa fa-linkedin-square"></i></a></li>
                            <li><a href="javascript:void(0)"><i class="fa fa-skype"></i></a></li>
                            </ul>
                      </div>
              </div>
        </div>
<?php?>
<div id="body1" style="">
<div id="chat-circle" class="btn btn-raised">
<div id="chat" class="animated-chat tada" onclick="loadChatbox()">Live Chat</div>
        <div id="chat-overlay"></div>
		    <i class="material-icons" style="margin-top:20px;">comments</i>
	</div>

  <div class="chat-box">
    <div class="chat-box-header">
     <!-- ChatBox-->
	<span style="font-size:20px;float:left;margin-left:5px;" id="sess_name">
	<?=ucfirst($this->session->userdata('user_name'));?><img src="<?=base_url('assets/web/images/img-icon/logout-2.png');?>" class="logout_chat" id="targetlogout">
	</span>


      <span class="chat-box-toggle"><i class="material-icons close_chat">close</i></span>

    </div>
  <!--<div class="chat-box-header">
      ChatBox
      <span class="chat-box-toggle"><i class="material-icons close_chat">close</i></span>
    </div>-->
    <div class="chat-box-body">
      <div class="chat-box-overlay">
      </div>
      <div class="chat-logs" id="appendchat">

      </div><!--chat-log -->
    </div>
	  <div class="modal-body text-center" id="subcribe_forms">
			<h4>Subscribe to our newsletter</h4>
			<p>Join our subscribers list to get the latest news, updates and special offers delivered directly in your inbox.</p>
			<form >
			<div class="input-group" style="margin-left:11px;">
				<input type="email" class="form-control" placeholder="Enter your Username" id="useremailer" required>
				<span class="input-group-btn">
					<input class="btn btn-primary subcribe_chat" id="userchatregister" value="Subscribe">
				</span>
			</div>
			</form>
		</div>
    <div class="chat-input">
      <form>
       <!-- <input type="text" id="chat-input" placeholder="Send a message..."/>-->
	   <input type="text" id="chat-input" placeholder="Send a message..."/>
		<button  type="button" class="chat-submit" id="sendchat"><i class="material-icons">send</i></button>
     <!-- <button type="submit" class="chat-submit" id="chat-submit" id="sendchat"><i class="material-icons">send</i></button>-->
      </form>
    </div>
  </div>

</div> <?php   ?>
<!--call back button-->

 <!--<div class="callback_new mainDemo-21" style="position: fixed; top:44%;">
			<div class="callback_new_wrap">
			</div>
	  		<button class="md-trigger" style="border:none;">
			<img class="callback-img" src="<?php //echo base_url('assets/web/images/new-images/online-quizs.png');?>" alt="Get a callback"></button>
		</div>-->
<div class="callback_new"  style="position: fixed;" data-toggle="modal" data-target="#myModalHorizontal" data-backdrop="static" data-keyboard="false">
			<div class="callback_new_wrap">
			</div>
	  		<button class="md-trigger" data-modal="modal-11" style="border:none;"><img  class="callback-img" src="<?php echo base_url('assets/web/images/login-here.png');?>" alt="Get a callback"></button>

		</div>
<!-- end call back button-->
<!--call back button form-->
   <div class="modal fade animated rotateIn" id="myModalHorizontal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog modal-smll modal-callback" role="document">
            <div class="modal-content border-content">


             <div class="modal-body body-callback">
             <div class="wrap demo-1">
<button type="button" class="close close-icon close-sign close-pop-nin" data-dismiss="modal" aria-label="Close" style="display:none;">
                        <span aria-hidden="true" class="fadeandscale_close fand-clase"><img src="<?php echo base_url('assets/web/images/close-pop.png');?>" alt="close-pop.png"></span>
                    </button>

         <div class="headder-main w3layouts">
			<div class="sap_tabs">
			<div id="horizontalTab" style="display: block; width: 100%; margin: 0px;">
				<ul class="resp-tabs-list w3">
					<li class="resp-tab-item" aria-controls="tab_item-0" role="tab"><img src="<?php echo base_url('assets/web/images/check-teachers.png');?>" alt="check-img" class="check-sign"><span>Student Login</span></li>
					<li class="resp-tab-item" id="create" aria-controls="tab_item-1" role="tab"><img src="<?php echo base_url('assets/web/images/check-teachers.png');?>" alt="check-img" class="check-sign"><span>Teacher Login</span></li>
					<div class="clearfix"></div>
				</ul>
	<div class="resp-tabs-container w3-agile">
		<div class="tab-1 resp-tab-content" aria-labelledby="tab_item-0">
			<div class="loginx agileits">
			              <?=form_open('student/signin')?>
								<label class="email-box-pops">Email</label>
								<?php //echo form_error('email','<p class="text-danger">','</p>'); ?>
									<?=form_input('email',set_value('email'),array('class'=>'email-slider','placeholder'=>'Student Email Address'));?>

								<label class="email-box-pops">Password</label>
								<?php //echo form_error('password','<p class="text-danger">','</p>'); ?>
									<?=form_password('password','',array('class'=>'email-slider','placeholder'=>'Password','maxlength'=>'15'));?>
								 <ul>
									<li>
										<input type="checkbox" id="brand2" value="">
										<label for="brand2" style="margin-top:17px;"><span></span>Remember me</label>
									</li>

								</ul>
								<a href="<?=site_url('student/password/forget');?>" style="float:right;margin-top:12px; ">Forgot password?</a>
								<div class="row">
									  <div class="text-center Login-ins">
										<button type="submit" id="submit-slider1" name="submit" class="btn btn-primary btn btn-default  send-btns logins-btn btn-block login-f">Login</button>
									  </div>
							   </div>
			             	<?php echo form_close();?>
                    <div class="reg agileits w3layouts">
    								     <span style="color: #000;font-size: 14px;font-weight: bold;">Not a member?</span>
    								<a class="popup-with-zoom-anim hvr-underline-from-left w3-login-popups" href="<?php echo site_url('student/signup');?>">
    								Register Here</a>
    								</div>
    								<div class="clear"></div>
			</div>
	 </div>
					<div class="tab-1 resp-tab-content" aria-labelledby="tab_item-1">
						<div class="loginx agileits">
								<?=form_open('teacher/signin')?>
									<label class="email-box-pops">Email</label>

									<?php //echo form_error('email','<p class="text-danger">','</p>'); ?>
									<?=form_input('email',set_value('email'),array('class'=>'email-slider','placeholder'=>'Teacher Email Address'));?>
									<label class="email-box-pops">Password</label>
									<?php //echo form_error('password','<p class="text-danger">','</p>'); ?>
									<?=form_password('password','',array('class'=>'email-slider ','placeholder'=>'Password','maxlength'=>'15'));?>
									<ul>
										<li>
											<input type="checkbox" id="brand3" value="">
											<label for="brand3" style="margin-top:17px;"><span></span>Remember me</label>
										</li>

									</ul>
									<a href="<?=site_url('teacher/password/forget');?>" style="float:right; margin-top:12px;">Forgot password?</a>
									<div class="row">
										  <div class="text-center Login-ins">

											<?=form_submit('Login','Login','class="btn btn-primary btn btn-default  send-btns logins-btn btn-block login-f"')?>
										  </div>
										</div>

			 					  <?php echo form_close();?>


                  <!--<div class="reg agileits w3layouts w3-login-popup">
                  <h3>Not a member?</h3>
                  </div>-->
                  <div class="reg agileits w3layouts">
                   <span style="color: #000;font-size: 14px;font-weight: bold;">Not a member?</span>
                  <a class="popup-with-zoom-anim hvr-underline-from-left w3-login-popups" href="<?=site_url('teacher/signup');?>">
                  <span>Register Here</a>
                  </div>
                  <div class="clear"></div>

					    </div>

				 </div>
	</div>
	   </div>
		</div>
	   </div>
        </div>
                <div class="cta demo-1">

                    <span class="icon"></span>
                <p> <span style="display: table-caption;">Welcome to <span style="color:#007aff">theOnline</span><span style="color:#f47629">Gurukul</span> </span></p>
					           <button type="button" class="close close-icon close-sign" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true" class="fadeandscale_close fand-clase"><img src="<?php echo base_url('assets/web/images/close-pop.png');?>" alt="close-pop.png"></span>
                    </button>
                </div>
            </div>
        </div>
    </div>
</div>

<!--online quiz-->

<div class="couponCode" data-sm-init="true">
    <div class="row">
      <div class="col-md-3 col-sm-12 col-xs-12">
        <div class="exit-popup-sprite exit-popup-sprite1"></div>
      </div>
      <div class="col-md-9 col-sm-12 col-xs-12" style="margin-top: 5px;">
        <h2 class="h1-responsive text-uppercase">Instruction</h2>

         <div class="row">

          <div class="col-md-10 col-sm-12 col-xs-12 text-uppercase p-l-0_ins_quiz">
            <img src="https://marketplace.canva.com/MAB_Od_qEcQ/1/thumbnail_large/canva-arrow-icon-direction-button-pointer-sign-MAB_Od_qEcQ.png"
			style="margin-top: 5px; width: 14px;">
            <p>Click the 'Submit Test' button given in the bottom of this page to Submit your answers.</p>
          </div>
        </div>
        <div class="row">

          <div class="col-md-10 col-sm-12 col-xs-12 text-uppercase p-l-0_ins_quiz">
            <img src="https://marketplace.canva.com/MAB_Od_qEcQ/1/thumbnail_large/canva-arrow-icon-direction-button-pointer-sign-MAB_Od_qEcQ.png"
			style="margin-top: 5px; width: 14px;">
            <p>Test will be submitted after time is Expired.</p>
          </div>
        </div>
         <div class="row">

          <div class="col-md-10 col-sm-12 col-xs-12 text-uppercase p-l-0_ins_quiz">
            <img src="https://marketplace.canva.com/MAB_Od_qEcQ/1/thumbnail_large/canva-arrow-icon-direction-button-pointer-sign-MAB_Od_qEcQ.png"
			style="margin-top: 5px; width: 14px;">
            <p>Do not refresh the Page.</p>
          </div>
        </div>
        </div>


      </div>


	<div class="row">
	 <div class="col-md-12 col-sm-12 col-xs-12 btn_quizs">
<div class="sm-couponCode btn_quiz" data-sm-couponCode-text="Start Test"></div>
   </div>
    </div>
</div>


<!-- JQUERY SCRIPTS -->

<script src="<?=base_url('assets/web/optimized_js/jquery-1.11.1.min.js');?>"></script>
<!-- <script src="<?php //echo base_url('assets/web/js-new/online-quiz.js');?>"></script> -->
<script src="<?=base_url('assets/web/optimized_js/tab.js');?>"></script>
<script type="text/javascript" src="<?=base_url('assets/web/optimized_js/jquery.easing.min.js');?>"></script>
<script type="text/javascript" src="<?=base_url('assets/web/optimized_js/jquery.validate.js');?>"></script>
<script type="text/javascript" src="<?=base_url('assets/web/optimized_js/modernizr.custom.04022.js');?>"></script>
<script src="<?=base_url('assets/web/optimized_js/particles.min.js');?>"></script>
<script type="text/javascript" src="<?=base_url('assets/web/optimized_js/jQuery.easyTabs.js');?>"></script>

<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/particlesjs/2.2.2/particles.min.js"></script>-->
<script  type="text/javascript" src="<?=base_url('assets/web/optimized_js/calendar.js');?>"></script>
<script  src="<?=base_url('assets/web/optimized_js/parallax.js');?>"></script>
<script  src="<?=base_url('assets/web/optimized_js/jquery.dd.js');?>"></script>
<script  src="<?=base_url('assets/web/optimized_js/calendar.js');?>"></script>
<script  src="<?=base_url('assets/web/optimized_js/bootstrap.min.js');?>"></script>
<script  src="<?=base_url('assets/web/optimized_js/jquery.flexslider.js');?>"></script>
<script  src="<?=base_url('assets/web/optimized_js/jquery.themepunch.tools.min.js');?>"></script>
<script  src="<?=base_url('assets/web/optimized_js/jquery.themepunch.revolution.min.js');?>"></script>
<script  src="<?=base_url('assets/web/optimized_js/jquery.selectbox-0.1.3.min.js');?>"></script>

<script  src="<?=base_url('assets/web/optimized_js/jquery.magnific-popup.js');?>"></script>
<script  src="<?=base_url('assets/web/optimized_js/waypoints.min.js');?>"></script>
<script  src="<?=base_url('assets/web/optimized_js/jquery.counterup.js');?>"></script>
<script  src="<?=base_url('assets/web/optimized_js/wow.min.js');?>"></script>
<script  src="<?=base_url('assets/web/optimized_js/moment.min.js');?>"></script>
<script  src="<?=base_url('assets/web/optimized_js/fullcalendar.min.js');?>"></script>
<script  src="<?=base_url('assets/web/optimized_js/owl.carousel.js');?>"></script>
<script  src="<?=base_url('assets/web/optimized_js/jquery.syotimer.js');?>"></script>
<script  src="<?=base_url('assets/web/optimized_js/SmoothScroll.js');?>"></script>
<script  src="<?=base_url('assets/web/optimized_js/custom.js');?>"></script>
<script  src="<?=base_url('assets/web/optimized_js/easyResponsiveTabs.js');?>" type="text/javascript"></script>

<!-- <script src="<?=base_url('assets/web/optimized_js/videopopup.js');?>"></script> -->
<!--<script src="<?=base_url('assets/web/optimized_js/owl.carousel-mob.min.js');?>"></script>-->
<script  src="<?=base_url('assets/web/optimized_js/video_pop.js');?>"></script>
<script  src="https://js.pusher.com/4.0/pusher.min.js"></script>
<!-- <script type="text/javascript">
            $(function () {
               $('#vidBox').VideoPopUp({
                  backgroundColor: "#17212a",
                  opener: "video1",
                    maxweight: "340",
                    idvideo: "v1"
                });
            });
    </script> -->
  <script>$(".play-4").yu2fvl({ vid: "y4K8hsFN0Zk?rel=0", ratio: 16/9 });</script>
    <script>$(".play-3").yu2fvl({ vid: "PgZ11_INF88?rel=0", ratio: 16/9 });</script>
  <!-- <script>$(".play-3").yu2fvl({ vid: "y4K8hsFN0Zk", ratio: 16/9, minPaddingY:1000, minPaddingX:1000 });</script> -->
  
<script>

$('.button_collapse_nonmedical').on('click', function(){

       $('.wrap_search, .button_collapse_nonmedical').toggleClass('active');

       return false;
     });
     $(".sub_close").on("click", function(e){

         $('.wrap_search, .button_collapse_nonmedical').removeClass('active');
});
$(".body-wrapper").on("click", function(e){

       $('.wrap_search, .button_collapse_nonmedical').removeClass('active');
});
 $('.button_collapse_medical').on('click', function(){

       $('.wrap_search_medical, .button_collapse_medical').toggleClass('active');

       return false;
     });

  $('.button_collapse_commerce').on('click', function(){

  $('.wrap_search_commerce, .button_collapse_commerce').toggleClass('active');

  return false;
});
$('.button_collapse_arts').on('click', function(){

       $('.wrap_search_arts, .button_collapse_arts').toggleClass('active');

       return false;
     });



</script>
<script >
$(function() {
  /* var INDEX = 0;
  $("#chat-submit").click(function(e) {
    e.preventDefault();
    var msg = $("#chat-input").val();
    if(msg.trim() == ''){
      return false;
    }
    generate_message(msg, 'self');
    var buttons = [
        {
          name: 'Existing User',
          value: 'existing'
        },
        {
          name: 'New User',
          value: 'new'
        }
      ];
    setTimeout(function() {
      generate_message(msg, 'user');
    }, 1000)

  }) */

  /* function generate_message(msg, type) {
    INDEX++;
    var str="";
    str += "<div id='cm-msg-"+INDEX+"' class=\"chat-msg "+type+"\">";
    str += "          <span class=\"msg-avatar\">";
    str += "            <img src=\"https:\/\/image.crisp.im\/avatar\/operator\/196af8cc-f6ad-4ef7-afd1-c45d5231387c\/240\/?1483361727745\">";
    str += "          <\/span>";
    str += "          <div class=\"cm-msg-text\">";
    str += msg;
    str += "          <\/div>";
    str += "        <\/div>";
    $(".chat-logs").append(str);
    $("#cm-msg-"+INDEX).hide().fadeIn(300);
    if(type == 'self'){
     $("#chat-input").val('');
    }
    $(".chat-logs").stop().animate({ scrollTop: $(".chat-logs")[0].scrollHeight}, 1000);
  } */

  /* function generate_button_message(msg, buttons){
   Buttons should be object array
    [
      {
        name: 'Existing User',
        value: 'existing'
      },
      {
        name: 'New User',
        value: 'new'
      }
    ]

    INDEX++;
    var btn_obj = buttons.map(function(button) {
       return  "              <li class=\"button\"><a href=\"javascript:;\" class=\"btn btn-primary chat-btn\" chat-value=\""+button.value+"\">"+button.name+"<\/a><\/li>";
    }).join('');
    var str="";
    str += "<div id='cm-msg-"+INDEX+"' class=\"chat-msg user\">";
    str += "          <span class=\"msg-avatar\">";
    str += "            <img src=\"https:\/\/image.crisp.im\/avatar\/operator\/196af8cc-f6ad-4ef7-afd1-c45d5231387c\/240\/?1483361727745\">";
    str += "          <\/span>";
    str += "          <div class=\"cm-msg-text\">";
    str += msg;
    str += "          <\/div>";
    str += "          <div class=\"cm-msg-button\">";
    str += "            <ul>";
    str += btn_obj;
    str += "            <\/ul>";
    str += "          <\/div>";
    str += "        <\/div>";
    $(".chat-logs").append(str);
    $("#cm-msg-"+INDEX).hide().fadeIn(300);
    $(".chat-logs").stop().animate({ scrollTop: $(".chat-logs")[0].scrollHeight}, 1000);
    $("#chat-input").attr("disabled", true);
  } */

  $(document).delegate(".chat-btn", "click", function() {
    var value = $(this).attr("chat-value");
    var name = $(this).html();
    $("#chat-input").attr("disabled", false);
    generate_message(name, 'self');
  })

  $("#chat-circle").click(function() {
    $("#chat-circle").toggle('scale');
    $(".chat-box").toggle('scale');
  })

  $(".chat-box-toggle").click(function() {
    $("#chat-circle").toggle('scale');
    $(".chat-box").toggle('scale');
  })
  });
  $(document).ready(function(){
	$('.chat-box-toggle').click(function(){
     $("#cm-msg-1,#cm-msg-2").hide().fadeOut();
	});
});
$(document).ready(function(){
	 var ses_id = ("<?php echo $this->session->userdata('chatter_id');?>")?("<?php echo $this->session->userdata('chatter_id');?>"):"";
	if(ses_id==""){
		$('.chat-logs,.chat-input,.chat-box-overlay').css("display","none");
		$('#targetlogout').hide();
	}else{
		$('.chat-input,.chat-logs,chat-box-overlay').css("display","block");
		$('#subcribe_forms').css("display","none");
		$('#targetlogout').show();

	}

	$('.subcribe_chat').click(function(){
		//$('#targetlogout').show();
		  var userval = $('#useremailer').val();
		  if(userval==""){
			$('.chat-input,.chat-logs,chat-box-overlay').css("display","none");
			 $('#targetlogout').hide();
		  }else{
			 $('.chat-input,.chat-logs,chat-box-overlay').css("display","block");
			 $('#subcribe_forms').css("display","none");

		  }
		  //$('span#sess_name').text(userval);
	});
});

$( "#targetlogout" ).click(function() {
  //alert( "Handler for .click() called." );
  var ses_id = ("<?php echo $this->session->userdata('chatter_id');?>")?("<?php echo $this->session->userdata('chatter_id');?>"):"";
	 $.ajax({
	          url: "<?php echo site_url('Chat/logout'); ?>",
	          type: 'POST',
	          data:{
	          ses_id : ses_id,
	           },
	          success:function()
	          {
				/* $('.chat-logs,.chat-input,.chat-box-overlay').css("display","none");
				$('#targetlogout').hide();
				$('#subcribe_forms').css("display","block"); */
				location.reload();
	          }
          	});

});
</script>
  <script >
 /*  $(function(){
	  $('#userchatregister').on('click',function(){
		  var userval = $('#useremailer').val();
		  $('span#sess_name').text(userval);


	  });
  }); */
  </script>

<script type="text/javascript" >
$(document).ready(function()
    {
        // Stop user to press enter in textbox
        $("input:text").keypress(function(event) {
            if (event.keyCode == 13) {
                event.preventDefault();
                return false;
            }
        });
});
	// Enable pusher logging - don't include this in production
	$(window).on('load',function(){
		     var ses_id = ("<?php echo $this->session->userdata('chatter_id');?>")?("<?php echo $this->session->userdata('chatter_id');?>"):"";
			// alert(ses_id);
	        $.ajax({
	          url: "<?php echo site_url('Chat/fetch_message_on_reload'); ?>",
	          type: 'POST',
	          data:{
	          userid    : ses_id,
	           },
	          success:function(response)
	          { //alert(response);
			    //$(".chat-logs").stop().animate({ scrollTop: $(".chat-logs")[0].scrollHeight}, 1000);
				//alert(response);
				var height = 0;
			$('.chat-logs div').each(function(i, value){
				height += parseInt($(this).height());
			});
			height += '';
			$(".chat-logs").animate({ scrollTop: height });

				$('#appendchat').append(response);
					//$('#chat-input').val("");

	          }
          	});
	});
	$(document).ready(function(){
		Pusher.log = function(message) {
			if (window.console && window.console.log) {
				window.console.log(message);
			}
		};

		var pusher = new Pusher('191dbef1780135573650');
		var channel = pusher.subscribe('chatglobal');

		channel.bind('my_event', function(data) {

			sendmessage(data);
		});
		channel.bind('appendponline', function(data) {
			appendponline(data);
		});
		function appendponline(data){

			html = '';
			html += '<div id="cm-msg" class="chat-msg user">';
			html += ' <span class="msg-avatar">';
			html += ' <img src="<?=base_url('assets/web/char-icons/icon2.png');?>">';
			html += ' </span>';
			html += '<div class="cm-msg-text">';
			html += '<div class="header_sec">';
			html += ' <strong class="primary-font">'+data.username+'</strong>';
			html += '</div>';
			html += '</div>';
			html += '</div>';
			//$(".chat-logs").stop().animate({ scrollTop: $(".chat-logs")[0].scrollHeight}, 1000);
			var height = 0;
			$('.chat-logs div').each(function(i, value){
				height += parseInt($(this).height());
			});
			height += '';
			$(".chat-logs").animate({ scrollTop: height });
			$('#appendponline').append(html);
				//$('#chat-input').val("");

		}
		function sendmessage(data){
			//var ses_id = <?php //echo $this->session->userdata('chatter_id');?>;
			var height = 0;
				$('.chat-logs div').each(function(i, value){
					height += parseInt($(this).height());
				});
				height += '';

			var ses_id = ("<?php echo $this->session->userdata('chatter_id');?>")?("<?php echo $this->session->userdata('chatter_id');?>"):"";
			//alert(ses_id);
			///alert(data.id);
			if(data.id == ses_id){
				html = '';
				html += '<div id="cm-msg" class="chat-msg user">';
				html += ' <span class="msg-avatar">';
				html += '<img src="<?=base_url('assets/web/char-icons/icon2.png');?>">';
				html += '</span>';
				html += '<div class="chat-body1 clearfix">';
				html += '<p class="cm-msg-text">'+data.message+'</p>';
				html += '<div class="chat_time">'+data.date+'</div>';
				html += '</div>';
				html += '</div>';
				//$(".chat-logs").animate({ scrollTop: $(document).height() },  document.body.scrollTop);
				//$(".chat-logs").animate({ scrollTop: $(document).height() },  document.body.scrollTop);
				$(".chat-logs").animate({ scrollTop: height });
				$('#appendchat').append(html);
				$('#chat-input').val("");

			}else{
				html = '';
				html += '<div id="cm-msg" class="chat-msg user">';
				html += ' <span class="msg-avatar">';
				html += '<img src="<?=base_url('assets/web/char-icons/f125_11-512.png');?>" class="chat_img_right">';
				html += '</span>';
				html += '<div class="chat-body1 chat_right clearfix">';
				html += '<p class="cm-msg-text cm-msg-text-me">'+data.message+'</p>';
				html += '<div class="chat_time">'+data.date+'</div>';
				html += '</div>';
				html +=  '</div>';
				 //$(".chat-logs").stop().animate({ scrollTop: $(".chat-logs")[0].scrollHeight}, 1000);
				 $(".chat-logs").animate({ scrollTop: height });
				$('#appendchat').append(html);
				$('#chat-input').val("");
			}
		}

		$('#sendchat').click(function(){
	        message = $('#chat-input').val();
			var ses_id = ("<?php echo $this->session->userdata('chatter_id');?>")?("<?php echo $this->session->userdata('chatter_id');?>"):"";
			//alert(message);alert(ses_id);
	        $.ajax({
	          url: "<?php echo site_url('Chat/chatsend'); ?>",
	          type: 'POST',
	          data:{
	          message : message,
	           },
	          success:function()
	          {
	          }
          	});
		});
		$('#updateuser').click(function(){
	        email    = $('#email').val();
	        password = $('#password').val();
	        username = $('#username').val();
	        $.ajax({
	          url: "<?php echo site_url('Chat/update_user'); ?>",
	          type: 'POST',
	          data:{
	          email    : email,
	          password : password,
	          username : username,
	           },
	          success:function()
	          {
	          	location.reload();
	          }
          	});
		});
		$('#userchatregister').click(function(){
			var emailer = $('#useremailer').val();
			if(emailer==""){
				 alert("username cant be blank");
			}
	        else{
				$('span#sess_name').text(emailer);
			//alert(emailer);
				$.ajax({
				  url: "<?php echo site_url('Chat/chatregister'); ?>",
				  type: 'POST',
				  data:{
				  emailer:emailer,
				   },
				  success:function(response)
				  {
				  location.reload();
				  //alert(response);
				  //console.log(response);
				  }
				});
			}
		});
	});

</script>
<?php //session_destroy(); ?>
<script type="text/javascript" >
$(document).ready(function () {
    $('#horizontalTab').easyResponsiveTabs({
        type: 'default', //Types: default, vertical, accordion
        width: 'auto', //auto or any width like 600px
        fit: true   // 100% fit in a container
    });
});

</script>
<script >
  $(document).ready(function () {
$(window).scroll(function() {
    var scroll = $(window).scrollTop();
     //console.log(scroll);
    if (scroll >= 1) {

        //console.log('a');
        $(".header-wrapper").addClass("bb-fixed-header");
		 $(".header-wrapper").removeClass("main-navigation");
    } else {
        //console.log('a');
        $(".header-wrapper").addClass("main-navigation");
		$(".header-wrapper").removeClass("bb-fixed-header");
    }
});
});
</script>
<script >
$(function () {
    $(".simple-tab").tabs({
        type: "click",
        speed: 300,
        animation: "slide"
    });
})
</script>
<script >
$(document).ready(function() {
    $('#Carousel1').carousel({
        interval: 6000
    })
});
</script>
<!-- <script type="text/javascript" src="<?=base_url('assets/web/optimized_js/bootstrap-multiselect.js');?>"></script>-->
<script type="text/javascript" >
    $(document).ready(function() {
    /*    $('#example-getting-started1').multiselect();
$('#8th-primary').multiselect();
$('#8th-secondary').multiselect();
$('#9th-primary').multiselect();
$('#9th-secondary').multiselect();
$('#10th-primary').multiselect();
$('#10th-secondary').multiselect();
$('#11th-primary').multiselect();
$('#11th-secondary').multiselect();
$('#12th-primary').multiselect();
$('#12th-secondary').multiselect();
$('#days-available').multiselect();
$('#available-timings').multiselect();

$('#example-getting-started1-timing').multiselect();
$('#example-getting-started-weekdays').multiselect();

	 $(".btn-default").mouseout(function(){
        $(".btn-default").css("background-color", "#fff");
		     $(".btn-default").css("border-color", "#dcdfe3");

    });
*/


			     $('#count').change(function()
{
    if (this.value == 'phds')
    {

         $('#select-popup1').modal('show');
    }else{
         $('#select-popup').modal('show');
    }
});

		 $("#selectgp").change(function(){
        $(this).find("option:selected").each(function(){
            var optionValue = $(this).attr("value");
            if(optionValue){
                $(".boxes").not("." + optionValue).hide();
                $("." + optionValue).show();
            } else{
                $(".boxes").hide();
            }
        });
    }).change();

		$("#choose_loc").click(function(){
    $('#select-popup-location').modal('show');
});







    var current_fs, next_fs, previous_fs;
    var left, opacity, scale;
    var animating;
    $(".steps").validate({
        errorClass: 'invalid',
        errorElement: 'span',
        errorPlacement: function(error, element) {
            error.insertAfter(element.next('span').children());
        },
        highlight: function(element) {
            $(element).next('span').show();
        },
        unhighlight: function(element) {
            $(element).next('span').hide();
        }
    });
    $(".next").click(function() {
        $(".steps").validate({
            errorClass: 'invalid',
            errorElement: 'span',
            errorPlacement: function(error, element) {
                error.insertAfter(element.next('span').children());
            },
            highlight: function(element) {
                $(element).next('span').show();
            },
            unhighlight: function(element) {
                $(element).next('span').hide();
            }
        });
        if ((!$('.steps').valid())) {
            return true;
        }
        if (animating) return false;
        animating = true;
        current_fs = $(this).parent();
        next_fs = $(this).parent().next();
        $("#progressbar li").eq($("fieldset").index(next_fs)).addClass("active");
        next_fs.show();
        current_fs.animate({
            opacity: 0
        }, {
            step: function(now, mx) {
                scale = 1 - (1 - now) * 0.2;
                left = (now * 50) + "%";
                opacity = 1 - now;
                current_fs.css({
                    'transform': 'scale(' + scale + ')'
                });
                next_fs.css({
                    'left': left,
                    'opacity': opacity
                });
            },
            duration: 800,
            complete: function() {
                current_fs.hide();
                animating = false;
            },
            easing: 'easeInOutExpo'
        });
    });
    $(".submit").click(function() {
        $(".steps").validate({
            errorClass: 'invalid',
            errorElement: 'span',
            errorPlacement: function(error, element) {
                error.insertAfter(element.next('span').children());
            },
            highlight: function(element) {
                $(element).next('span').show();
            },
            unhighlight: function(element) {
                $(element).next('span').hide();
            }
        });
        if ((!$('.steps').valid())) {
            return false;
        }
        if (animating) return false;
        animating = true;
        current_fs = $(this).parent();
        next_fs = $(this).parent().next();
        $("#progressbar li").eq($("fieldset").index(next_fs)).addClass("active");
        next_fs.show();
        current_fs.animate({
            opacity: 0
        }, {
            step: function(now, mx) {
                scale = 1 - (1 - now) * 0.2;
                left = (now * 50) + "%";
                opacity = 1 - now;
                current_fs.css({
                    'transform': 'scale(' + scale + ')'
                });
                next_fs.css({
                    'left': left,
                    'opacity': opacity
                });
            },
            duration: 800,
            complete: function() {
                current_fs.hide();
                animating = false;
            },
            easing: 'easeInOutExpo'
        });
    });
    $(".previous").click(function() {
        if (animating) return false;
        animating = true;
        current_fs = $(this).parent();
        previous_fs = $(this).parent().prev();
        $("#progressbar li").eq($("fieldset").index(current_fs)).removeClass("active");
        previous_fs.show();
        current_fs.animate({
            opacity: 0
        }, {
            step: function(now, mx) {
                scale = 0.8 + (1 - now) * 0.2;
                left = ((1 - now) * 50) + "%";
                opacity = 1 - now;
                current_fs.css({
                    'left': left
                });
                previous_fs.css({
                    'transform': 'scale(' + scale + ')',
                    'opacity': opacity
                });
            },
            duration: 800,
            complete: function() {
                current_fs.hide();
                animating = false;
            },
            easing: 'easeInOutExpo'
        });
    });
	 });

</script>

	<script type="text/javascript" >
        $(document).ready(function () {
            window.asd = $('.SlectBox').SumoSelect({ csvDispCount: 3, selectAll:true, captionFormatAllSelected: "Yeah, OK, so everything." });
			  window.asd = $('.SlectBox1a').SumoSelect({ csvDispCount: 3, selectAll:true, captionFormatAllSelected: "Yeah, OK, so everything." });
			   });
	</script>
<script src="<?=base_url('assets/web/optimized_js/jquery-ui.js');?>"></script>


  <script >
  $( function() {
    $( "#datepicker" ).datepicker({
      changeMonth: true,
      changeYear: true,
      yearRange: "1960:2018"
    });
  } );
  </script>


          <script type='text/javascript' >
            // baseURL variable
            var baseURL= "<?php echo base_url();?>";

            $(document).ready(function(){

                // City change
                $('#sel_city').change(function(){
                    var city = $(this).val();

                    // AJAX request
                    $.ajax({
                        url:'<?=base_url()?>Web/getCityDepartment',
                        method: 'post',
                        data: {city: city},
                        dataType: 'json',
                        success: function(response){

                            // Remove options
                            $('#sel_user').find('option').not(':first').remove();
                            $('#sel_depart').find('option').not(':first').remove();

                            // Add options
                            $.each(response,function(index,data){
                                $('#sel_depart').append('<option value="'+data['id']+'">'+data['depart_name']+'</option>');
                            });
                        }
                    });
                });

                // Department change
                $('#sel_depart').change(function(){
                    var department = $(this).val();

                    // AJAX request
                    $.ajax({
                        url:'<?=base_url()?>Web/getDepartmentUsers',
                        method: 'post',
                        data: {department: department},
                        dataType: 'json',
                        success: function(response){

                            // Remove options
                            $('#sel_user').find('option').not(':first').remove();

                            // Add options
                            $.each(response,function(index,data){
                                $('#sel_user').append('<option value="'+data['id']+'">'+data['name']+'</option>');
                            });
                        }
                    });
                });

            });
        </script>

<script >
$(document).ready(function(){
$("#screenshot_speed").on("change", function(){
  // Name of file and placeholder
  var file = this.files[0].name;
  var dflt = $(this).attr("placeholder");
  if($(this).val()!=""){
    $(this).next().text(file);
  } else {
    $(this).next().text(dflt);
  }
});

$("#upload_profile_pic").on("change", function(){
  // Name of file and placeholder
  var file = this.files[0].name;
  var dflt = $(this).attr("placeholder");
  if($(this).val()!=""){
    $(this).next().text(file);
  } else {
    $(this).next().text(dflt);
  }
});


$("#upload_resume").on("change", function(){
  // Name of file and placeholder
  var file = this.files[0].name;
  var dflt = $(this).attr("placeholder");
  if($(this).val()!=""){
    $(this).next().text(file);
  } else {
    $(this).next().text(dflt);
  }
});

});
</script>
<script type="text/javascript" >
    $(function () {
        $("#first_form").click(function () {
            var password = $("#password").val();
            var confirmPassword = $("#confirm_password").val();
            if (password != confirmPassword) {
                alert("Passwords do not match.");
                return false;
            }
            return true;
        });
    });

$(document).ready(function(){
    $("#testimonial-slider").owlCarousel({
        items:1,
        itemsDesktop:[1000,2],
        itemsDesktopSmall:[979,2],
        itemsTablet:[768,1],
        pagination:false,
        navigation:true,
        navigationText:["",""],
        autoPlay:true
    });
});

</script>
<script  src="<?=base_url('assets/web/optimized_js/jquery.sumoselect.js');?>"></script>

<script  src="<?=base_url('assets/web/optimized_js/px-video.js');?>"></script>
<!--<link href="<?=base_url('assets/web/optimized_js/optionswitch.css');?>" rel="stylesheet">
<script src="<?=base_url('assets/web/optimized_js/optionswitcher.js');?>"></script>-->
<script  src="<?=base_url('assets/web/optimized_js/cssrelpreload.js');?>"></script>
<script  src="<?=base_url('assets/web/optimized_js/loadCSS.js');?>"></script>
<script>
      /*!
      loadCSS: load a CSS file asynchronously.
      */
      function loadCSS(href){
        var ss = window.document.createElement('link'),
            ref = window.document.getElementsByTagName('head')[0];

        ss.rel = 'stylesheet';
        ss.href = href;

        // temporarily, set media to something non-matching to ensure it'll
        // fetch without blocking render
        ss.media = 'only x';

        ref.parentNode.insertBefore(ss, ref);

        setTimeout( function(){
          // set media back to `all` so that the stylesheet applies once it loads
          ss.media = 'all';
        },0);
      }
      loadCSS('styles.css');
    </script>
    <noscript>
      <!-- Let's not assume anything -->
 <link rel="stylesheet" href="<?=base_url('assets/web/css/style.css');?>">
    </noscript>
<script >
yes_js_login = function() {
         // Your code here
         return false;
    }
</script>
<!-- Global site tag (gtag.js) - Google Analytics -->

<script  src="https://www.googletagmanager.com/gtag/js?id=UA-130185472-1"></script>
<script >
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-130185472-1');
</script>

<script>
$(window).load(function(){
	window.setTimeout(function(){
		$('#myModalHorizontal').modal('show');
	},6000);
	$('.close-sign').click(function(){
		$('#myModalHorizontal').modal('hide');
	});
});
</script>

<?php 
$b= array(base_url('assets/web/optimized_js/strings.js'),
base_url('assets/web/optimized_js/onloadCSS.js'),
base_url('assets/web/optimized_js/particles_2.js'),
base_url('assets/web/optimized_js/jQuery.easyTabs.js'),
base_url('assets/web/optimized_js/cssrelpreload.js'),
base_url('assets/web/optimized_js/loadCSS.js'),
base_url('assets/web/optimized_js/jquery.counterup.js'),
base_url('assets/web/optimized_js/easyResponsiveTabs.js'),
base_url('assets/web/optimized_js/calendar.js'),
base_url('assets/web/optimized_js/video_pop.js'),
base_url('assets/web/optimized_js/jquery.syotimer.js')
);

?>
<script type="text/javascript">
function parseJSAtOnload() {
var links = ["<?php echo implode('","', $b);?>"] ,
//var links   = ["ass","aaaaa"],
headElement = document.getElementsByTagName("head")[0],
linkElement, i;
for (i = 0; i < links.length; i++) {
linkElement = document.createElement("script");
linkElement.src = links[i];
headElement.appendChild(linkElement);
}
}
if (window.addEventListener)
window.addEventListener("load", parseJSAtOnload, false);
else if (window.attachEvent)
window.attachEvent("onload", parseJSAtOnload);
else window.onload = parseJSAtOnload;
</script>
</body>

</html>
