/* Advanced Search Droupdown  */
$(document).ready(function() {
$('.more-detail p').click(function(){
$(this).text(function(i,old){
return old=='Close' ?  'Click Here for More Details' : 'Close';
$('.more-detail:after').css('display', 'none');
});
});
});

jQuery(document).ready(function () {
	jQuery("div #navbar ul:first").addClass("nav navbar-nav");
	var i = 0 ;
	//var sub;
	//to bring all submenus under Main menu
	jQuery("div #navbar ul li.expanded").each(function()
	{
		//sub = 'submenu'+i;
		jQuery(this).children("a").attr({'class':'dropdown-toggle dropdwn','role':'button','data-toggle':'dropdown'});	
		jQuery(this).children("a").removeAttr('href');
		jQuery(this).children("a").removeClass('active');
		jQuery(this).removeClass('active');
		jQuery(this).children("ul").attr({"class":"dropdown-menu animated"});
		jQuery(this).children("a").css('cursor','pointer');
		//i++;
	});
	
	

	//to have a collapisble for active sub menu
	jQuery("div.navbar ul li.expanded ul").each(function()
	{	
		if(jQuery(this).children("a").hasClass("active"))
		{
			jQuery(this).addClass("in");
			jQuery(this).parent().addClass("active");
		}
	});
	jQuery("ul.navbar-nav li").each(function()
	{

		if(jQuery(this).children("a").hasClass("active"))
		{
			jQuery(this).css("background-color","white");
			jQuery(this).children("a").css("color","#C44343");
		}
	});
	
	jQuery("ul.navbar-nav li.expanded ul li").each(function()
	{
		if(jQuery(this).children("a").hasClass("active"))
		{
			jQuery(this).parent().parent().css("background-color","white");
			jQuery(this).parent().parent().children("a").css("color","#C44343");
		}
		
						
	});
		
	jQuery("ul.navbar-nav li.expanded ul li.expanded").each(function()
	{
		jQuery(this).addClass("dropdown-submenu");
		jQuery(this).css("list-style","none");
		jQuery(this).css("list-style-image","none");

	});
	
	
	jQuery("div #block-block-1 div").removeClass("content");
	jQuery("div .site-map-box div").removeClass("content");
	
	jQuery(".block-item table").attr({'class':'table table-striped', 'style':'border-style:none'});
	jQuery("div .view-id-news_detail").addClass('block-item col-sm-12');
	jQuery("ul .dropdown-menu li").removeClass("leaf");
	jQuery("div #about-us-banner .even img").addClass('img-responsive');
	jQuery(".views-field-picture img").addClass('img-thumbnail');
	jQuery("div #research-overview .views-row-last img").addClass('img-responsive');
	jQuery("div #news-overview img").addClass('img-responsive');
	jQuery("div #peopleimage img").addClass('img-responsive img-rounded');
	jQuery("div #about_us img").addClass('img-responsive');
	jQuery("div #collaboration").addClass('img-responsive');


		
});



if(window.innerWidth >= 800)
    // very simple to use!
    $(document).ready(function() {
	
      $('.dropdwn').dropdownHover().dropdown();
    });
	 $(document).ready(function(){
        activaTab('pt');
    });
    function activaTab(tab){
        $('pt a[href="#' + tab + '"]').tab('show');
};




jQuery(function(){
jQuery('#camera_wrap_4').camera({
height: 'auto',
fx: 'mosaicRandom', 

pagination: false,
navigation: false,
thumbnails: false,
hover: false,
opacityOnGrid: false,
});
});

