 $(document).ready(function(){
	//	alert('JQUERY');


	//LINKEDIN
	$("#side-toolkit .toolkit-links a.linkedin").click(function(){
		$("#twitter-overlay, #facebook-overlay, #linkedin-overlay, #share-overlay, #blogs-overlay").hide();
		$("#linkedin-overlay").fadeIn(200);
	})
	$("#linkedin-overlay a.close").click(function(){
		$("#linkedin-overlay").fadeOut(200);
	})
	//Blogs
	$("#side-toolkit .toolkit-links a.blogs").click(function(){
		$("#twitter-overlay, #facebook-overlay, #linkedin-overlay, #share-overlay,").hide();
		$("#blogs-overlay").fadeIn(200);
	})
	$("#blogs-overlay a.close").click(function(){
		$("#blogs-overlay").fadeOut(200);
	})

	//FACEBOOK
	$("#side-toolkit .toolkit-links a.facebook").click(function(){
		$("#twitter-overlay, #linkedin-overlay, #share-overlay, #blogs-overlay").hide();
		$("#facebook-overlay").fadeIn(200);
	})
	$("#facebook-overlay a.close").click(function(){
		$("#facebook-overlay").fadeOut(200);
	})

	//TWITTER  
	$("#side-toolkit .toolkit-links a.twitter").click(function(){
		$("#facebook-overlay, #linkedin-overlay, #share-overlay, #blogs-overlay").hide();
		$("#twitter-overlay").fadeIn(200);
	})
	$("#twitter-overlay a.close").click(function(){
		$("#twitter-overlay").fadeOut(200);
	})

	//SHARE
	$("#side-toolkit .toolkit-links a.share").click(function(){
		$("#twitter-overlay, #facebook-overlay, #linkedin-overlay, #blogs-overlay").hide();
		$("#share-overlay").fadeIn(200);
	})
	$("#share-overlay a.close").click(function(){
		$("#share-overlay").fadeOut(200);
	})
	//SHARE - BOTTOM
	$("#footer .social-links a.share").click(function(){
		$("#twitter-overlay, #facebook-overlay, #linkedin-overlay, #blogs-overlay").hide();
		$("#share-overlay.bottom").fadeIn(200);
	})
	$("#share-overlay.bottom a.close").click(function(){
		$("#share-overlay.bottom").fadeOut(200);
	})



	
	
	//PLATFORM - DATA QUALITY
	$("#platform-diagram .platform-links a.data-quality,#data-quality-overlay").mouseover(function(){
		$("#data-quality-overlay, #complex-overlay, #mdm-overlay, #btob-overlay, #cloud-overlay, #ultra-overlay, #edi-overlay, #appilm-overlay" ).hide();
		$("#data-quality-overlay").fadeIn(0);
	})
	$("#data-quality-overlay,#platform-diagram .platform-links a.data-quality").mouseout(function(){
		$("#data-quality-overlay").fadeOut(0);
	})
	
	//PLATFORM - COMPLEX
	$("#platform-diagram .platform-links a.complex,#complex-overlay").mouseover(function(){
		$("#data-quality-overlay, #complex-overlay, #mdm-overlay, #btob-overlay, #cloud-overlay, #ultra-overlay, #edi-overlay, #appilm-overlay" ).hide();
		$("#complex-overlay").fadeIn(0);
	})
	$("#complex-overlay,#platform-diagram .platform-links a.complex").mouseout(function(){
		$("#complex-overlay").fadeOut(0);
	})
	
	//PLATFORM - MDM
	$("#platform-diagram .platform-links a.mdm,#mdm-overlay").mouseover(function(){
		$("#data-quality-overlay, #complex-overlay, #mdm-overlay, #btob-overlay, #cloud-overlay, #ultra-overlay, #edi-overlay, #appilm-overlay" ).hide();
		$("#mdm-overlay").fadeIn(0);
	})
	$("#mdm-overlay,#platform-diagram .platform-links a.mdm").mouseout(function(){
		$("#mdm-overlay").fadeOut(0);
	})
	
	//PLATFORM - B2B
	$("#platform-diagram .platform-links a.btob, #btob-overlay").mouseover(function(){
		$("#data-quality-overlay, #complex-overlay, #mdm-overlay, #btob-overlay, #cloud-overlay, #ultra-overlay, #edi-overlay, #appilm-overlay" ).hide();
		$("#btob-overlay").fadeIn(0);
	})
	$("#btob-overlay,#platform-diagram .platform-links a.btob").mouseout(function(){
		$("#btob-overlay").fadeOut(0);
	})
	
	//PLATFORM - CLOUD
	$("#platform-diagram .platform-links a.cloud, #cloud-overlay").mouseover(function(){
		$("#data-quality-overlay, #complex-overlay, #mdm-overlay, #btob-overlay, #cloud-overlay, #ultra-overlay, #edi-overlay, #appilm-overlay" ).hide();
		$("#cloud-overlay").fadeIn(0);
	})
	$("#cloud-overlay,#platform-diagram .platform-links a.cloud").mouseout(function(){
		$("#cloud-overlay").fadeOut(0);
	})
	
	//PLATFORM - ULTRA
	$("#platform-diagram .platform-links a.ultra, #ultra-overlay").mouseover(function(){
		$("#data-quality-overlay, #complex-overlay, #mdm-overlay, #btob-overlay, #cloud-overlay, #ultra-overlay, #edi-overlay, #appilm-overlay" ).hide();
		$("#ultra-overlay").fadeIn(0);
	})
	$("#ultra-overlay,#platform-diagram .platform-links a.ultra").mouseout(function(){
		$("#ultra-overlay").fadeOut(0);
	})
	
	//PLATFORM - EDI
	$("#platform-diagram .platform-links a.edi, #edi-overlay").mouseover(function(){
		$("#data-quality-overlay, #complex-overlay, #mdm-overlay, #btob-overlay, #cloud-overlay, #ultra-overlay, #edi-overlay, #appilm-overlay" ).hide();
		$("#edi-overlay").fadeIn(0);
	})
	$("#edi-overlay,#platform-diagram .platform-links a.edi").mouseout(function(){
		$("#edi-overlay").fadeOut(0);
	})
	
	//PLATFORM - APP ILM
	$("#platform-diagram .platform-links a.appilm, #appilm-overlay").mouseover(function(){
		$("#data-quality-overlay, #complex-overlay, #mdm-overlay, #btob-overlay, #cloud-overlay, #ultra-overlay, #edi-overlay, #appilm-overlay" ).hide();
		$("#appilm-overlay").fadeIn(0);
	})
	$("#appilm-overlay,#platform-diagram .platform-links a.appilm").mouseout(function(){
		$("#appilm-overlay").fadeOut(0);
	})
	
	
	


	//Check All and Uncheck All
	$("a.check-all-form").click(function(){
		var currentId = $(this).attr('id').substring(14);

		$("#form"+currentId+" .jqTransformCheckboxWrapper a.jqTransformCheckbox").addClass("jqTransformChecked");
		$("#form"+currentId+" input[type='checkbox']").attr('checked', true);
	})
	$("a.uncheck-all-form").click(function(){
		var currentId = $(this).attr('id').substring(16);

		$("#form"+currentId+" .jqTransformCheckboxWrapper a.jqTransformCheckbox").removeClass("jqTransformChecked");
		$("#form"+currentId+" input[type='checkbox']").attr('checked', false);
	})

	//Check All and Uncheck All - Sub boxes
	$("input.checkAllSubs").click(function(){

		if ($(this).hasClass("runningSub")) return;
		$(this).addClass("runningSub");
		var currentId = $(this).attr('id');
		var isChecked = !($(this).attr('checked') == "true" || $(this).attr('checked') == "checked");
		var subId = 0;

		if(currentId.indexOf("SelectProducts")>0 || currentId.indexOf("SelectSolutions")>0) {
		  var iterId = currentId.substring(currentId.lastIndexOf("_"));
		  var idArr = currentId.split("_checkAllSubs");
		  var newId = idArr[0] + "_RelatedItems" + iterId + "_checkAllSubs" + idArr[1].replace(iterId,"");
		  currentId = newId;
		}

		while (subBox = $("#"+currentId+"_"+subId)) {
			if (!subBox.attr || !subBox.attr("type") || subBox.attr("type") != "checkbox") break;
			var subIsChecked = (subBox.attr('checked') == "true" || subBox.attr('checked') == "checked");

			if (isChecked != subIsChecked && !subBox.hasClass("runningSub")) {
				subBox.addClass("runningSub");
				subBox.click();
				if($.browser.msie) {
					subBox.change();
				}
				subBox.removeClass("runningSub");
			}

			subId++;
		}

		$(this).removeClass("runningSub");
	})

	$("input.checkAllSub").click(function(){

		if ($(this).hasClass("runningSub")) return;
		$(this).addClass("runningSub");
		var currentId = $(this).attr('id');
		var isChecked = !($(this).attr('checked') == "true" || $(this).attr('checked') == "checked");
		var parentId = currentId.substring(0, currentId.lastIndexOf("_"));
		if(parentId.indexOf("SelectProducts")>0 || parentId.indexOf("SelectSolutions")>0) {
                  var iterArr = parentId.split("_RelatedItems_");
		  var iterId = "0";
                  if(iterArr.length > 0) {
			iterId = iterArr[1].substring(0,iterArr[1].indexOf("_"));
			parentId = iterArr[0] + iterArr[1].substring(iterArr[1].indexOf("_")) + "_" + iterId;
                  }
		}
		var parentBox = $("#"+parentId);
		if (parentBox.hasClass("runningSub")) {
			$(this).removeClass("runningSub");
			return;
		}
		var allSame = true;
		var subId = 0;
		if(parentId.indexOf("SelectProducts")>0 || parentId.indexOf("SelectSolutions")>0) {
		  parentId = currentId.substring(0, currentId.lastIndexOf("_"));
		}
		var subBoxId = parentId+"_"+subId;
		while (subBox = $("#"+subBoxId)) {
			if (!subBox.attr || !subBox.attr("type") || subBox.attr("type") != "checkbox") break;
			if (subBoxId != currentId) {
				var subIsChecked = (subBox.attr('checked') == "true" || subBox.attr('checked') == "checked");
				if (subIsChecked != isChecked) {
					allSame = false;
					break;
				}

			}
			subId++;
			subBoxId = parentId+"_"+subId;
		}

		if (!parentBox.attr || !parentBox.attr("type") || parentBox.attr("type") != "checkbox") {
			$(this).removeClass("runningSub");
			return;
		}
		var parentIsChecked = (parentBox.attr('checked') == "true" || parentBox.attr('checked') == "checked");
		if (parentIsChecked && !allSame || (isChecked && !parentIsChecked && allSame)) {
			parentBox.addClass("runningSub");
			parentBox.click();
			if($.browser.msie) {
				parentBox.change();
			}
			parentBox.removeClass("runningSub");
		}
		$(this).removeClass("runningSub");
	})

	
	//add click for right rail search
	$("#search-courses input[type=submit]").click(function (e){
		e.preventDefault();
	
		var orig_output = "http://inter.viewcentral.com/events/cust/search_results.aspx?";
		var output = orig_output;
		$(this).parents("fieldset").find("input:not([type=submit]),select").each(function(){
			if($(this).is("input[type=text]") && ($(this).val() == ""))
				return false;
			if ($(this).val() && $(this).val() != "")
			{
			var txtVal = $(this).val();
			if ($(this).attr("name") == "Keyword" && txtVal == "Keyword"){
			txtVal = "";
			}
			output += $(this).attr("name") + "=" + txtVal + "&";
			}
		});

		if(output != orig_output)
			window.open(output,'_blank');
			
		return false;
		
	});
	
	$("#search-courses input,#search-courses select").keypress(function(e) {
	
		if(e.keyCode == 13)
		{
			e.preventDefault();
			$("#search-courses input[type=submit]").trigger("click");
		}
	});
	
	//$(".radio-overlay input[type='radio']").hide();
	$(".radio-overlay input[type='radio'][checked='checked']").each(function(){
		$(this).attr("checked", "checked");
	})
	$(".radio-overlay input[type='radio']").each(function(){
		var isChecked = ($(this).attr("checked") == "true" || $(this).attr("checked") == "checked");
		if (isChecked) {
			$(this).siblings("label").addClass("selected");
		}
		else {
			$(this).siblings("label").removeClass("selected");
		}
	})
	$(".radio-overlay label").click(function(){
		var posLastUnderscore = $(this).attr("for").lastIndexOf("_");
		var tBaseId = $(this).attr("for").substring(0, posLastUnderscore+1);
		var radId = 0;
		var radioId = tBaseId+radId;
		while (tSibling = $("label[for='"+radioId+"']")) {
			if (!tSibling.attr || !tSibling.attr("for") || tSibling.attr("for") != radioId) break;
			if (radioId == $(this).attr("for")) {
				$(this).addClass("selected");
			}
			else {
				tSibling.removeClass("selected");
			}
			radId++;
			radioId = tBaseId+radId;

		}
	})
	/* moved to pageLoad
	//Search Filter
	$(".search-filter .select-col h3 a").click(function(){
		if($(this).hasClass("closed")){
			$(this).removeClass("closed")
		} else{
			$(this).addClass("closed")
		}
		if($(this).parent("h3").parent("div").attr('id').indexOf("Radio") > 0) {
			$(this).parent("h3").next(".select-col-data").slideToggle();
		}
		else {
			$(this).parent("h3").next(".select-col-header").slideToggle();
			$(this).parent("h3").next().next(".select-col-data").slideToggle();
		}
	})
	*/



	//Worldwide Dropdown
	$("li.worldwide").mouseover(function(){
		$(this).children("div.worldwide-dropdown-header").show();
		$(this).children("div.worldwide-dropdown").show();
	})
	$("li.worldwide").mouseout(function(){
		$(this).children("div.worldwide-dropdown-header").hide();
		$(this).children("div.worldwide-dropdown").hide();
	})

	//Menu Dropdown
	$("#menu ul li").mouseover(function(){
		$(this).children("div.dropdown").show();
	})
	$("#menu ul li").mouseout(function(){
		$(this).children("div.dropdown").hide();
	})


	//HOME HERO
	$('.home #slides').slides({
		preload: true,
		preloadImage: '/static/images/loading.gif',
		play: 8500,
		pause: 100,
		slideSpeed: 300,
		hoverPause: false
	});
	
	$('.home #slides').css('visibility', 'visible');
	
	//COMMUNITY PAGE SLIDESHOW
	$('#slideshow').slides({
		preload: true,
		play: 8500,
		pause: 100,
		slideSpeed: 800,
		hoverPause: false
	});


	//LATEST NEWS
	if($(".home .textdiv").find("li").length > 0){
		$(".home .textdiv").jCarouselLite({
				horizontal: true,
				hoverPause: true,
				btnNext: ".latestnews-area .next",
				btnPrev: ".latestnews-area .prev",
				visible: 1,
				auto: 10000000,
				speed: 1500
		});
	}

	$('.page #page-hero').slides({
		preload: true,
		effect: 'fade',
		crossfade: true,
		play: 8500,
		fadeSpeed: 500,
		generatePagination: false
	});
	
	$('.page #page-hero').css('visibility', 'visible');
	

	$('.featured-video-slider').slides({
		preload: true,
		effect: 'slide',
		crossfade: true,
		fadeSpeed: 500,
		prev: 'prev-null',
		next: 'next-null',
		generatePagination: false
	});


	//Recent PowerCenter Customers
	if($(".recent-powercenter-customers-slides li").length > 1){
		$(".recent-powercenter-customers-slides").jCarouselLite({
				horizontal: true,
				hoverPause: true,
				btnNext: ".recent-powercenter-customers .next",
				btnPrev: ".recent-powercenter-customers .prev",
				visible: 1,
				auto: 5000,
				speed: 2000
		});
	}


	if($(".featured-video-listing").find("li").length > 0){
		$(".featured-video-listing").jCarouselLite({
				vertical: true,
				btnNext: ".featured-videos-container .next",
				btnPrev: ".featured-videos-container .prev",
				visible: 3,
				circular:false,
				speed: 500
		});
	}
//*/

	//General Tab
	var url_parts = window.location.href.split("?");	
		
	if(url_parts.length <= 1){
		$(".tab-box .tab-contents").not(".tab-box .tab1-contents").hide();		
	} else {
		if(url_parts[1].indexOf("tab=") == -1){
			$(".tab-box .tab-contents").not(".tab-box .tab1-contents").hide();	
		} else {
			var selected_i = url_parts[1].split("tab=")[1][0];

			$(".tab-box .tabs a.tab" + selected_i).addClass("selected").parent().siblings().children(".tab").removeClass("selected");
			$(".tab-box .tab-contents").not(".tab-box .tab"+ selected_i +"-contents").hide();
		}
	}
	
	$(".tab-box .tabs a.tab1").click(function(){
		$(this).addClass("selected").parent().siblings().children(".tab").removeClass("selected");
		$(this).parents(".tabs").siblings(".tab-contents").hide();
		$(this).parents(".tabs").siblings(".tab1-contents").show();
	});
	$(".tab-box .tabs a.tab2").click(function(){
		$(this).addClass("selected").parent().siblings().children(".tab").removeClass("selected");
		$(this).parents(".tabs").siblings(".tab-contents").hide();
		$(this).parents(".tabs").siblings(".tab2-contents").show();
	});
	$(".tab-box .tabs a.tab3").click(function(){
		$(this).addClass("selected").parent().siblings().children(".tab").removeClass("selected");
		$(this).parents(".tabs").siblings(".tab-contents").hide();
		$(this).parents(".tabs").siblings(".tab3-contents").show();
	});
	$(".tab-box .tabs a.tab4").click(function(){
		$(this).addClass("selected").parent().siblings().children(".tab").removeClass("selected");
		$(this).parents(".tabs").siblings(".tab-contents").hide();
		$(this).parents(".tabs").siblings(".tab4-contents").show();
	});
	$(".tab-box .tabs a.tab5").click(function(){
		$(this).addClass("selected").parent().siblings().children(".tab").removeClass("selected");
		$(this).parents(".tabs").siblings(".tab-contents").hide();
		$(this).parents(".tabs").siblings(".tab5-contents").show();
	});
	$(".tab-box .tabs a.tab6").click(function(){
		$(this).addClass("selected").parent().siblings().children(".tab").removeClass("selected");
		$(this).parents(".tabs").siblings(".tab-contents").hide();
		$(this).parents(".tabs").siblings(".tab6-contents").show();
	});
	$(".tab-box .tabs a.tab7").click(function(){
		$(this).addClass("selected").parent().siblings().children(".tab").removeClass("selected");
		$(this).parents(".tabs").siblings(".tab-contents").hide();
		$(this).parents(".tabs").siblings(".tab7-contents").show();
	});

	//If there are more than 3 tabs, repeat these codes.
	
 // Second level General Tab
	//$(".tab-box .tab-contents").not(".tab-box .tab1-contents").hide();
//	$(".tab-box .Alph-tab a.tab1").click(function(){
//		$(this).addClass("selected").parent().siblings().children(".tab").removeClass("selected");
//		$(this).parents(".Alph-tab").siblings(".tab-contents").hide();
//		$(this).parents(".Alph-tab").siblings(".tab1-contents").show();
//	});
//	$(".tab-box .Alph-tab a.tab2").click(function(){
//		$(this).addClass("selected").parent().siblings().children(".tab").removeClass("selected");
//		$(this).parents(".Alph-tab").siblings(".tab-contents").hide();
//		$(this).parents(".Alph-tab").siblings(".tab2-contents").show();
//	});
//	$(".tab-box .Alph-tab a.tab3").click(function(){
//		$(this).addClass("selected").parent().siblings().children(".tab").removeClass("selected");
//		$(this).parents(".Alph-tab").siblings(".tab-contents").hide();
//		$(this).parents(".Alph-tab").siblings(".tab3-contents").show();
//	});
//	$(".tab-box .Alph-tab a.tab4").click(function(){
//		$(this).addClass("selected").parent().siblings().children(".tab").removeClass("selected");
//		$(this).parents(".Alph-tab").siblings(".tab-contents").hide();
//		$(this).parents(".Alph-tab").siblings(".tab4-contents").show();
//	});
//	$(".tab-box .Alph-tab a.tab5").click(function(){
//		$(this).addClass("selected").parent().siblings().children(".tab").removeClass("selected");
//		$(this).parents(".Alph-tab").siblings(".tab-contents").hide();
//		$(this).parents(".Alph-tab").siblings(".tab5-contents").show();
//	});
//	$(".tab-box .Alph-tab a.tab6").click(function(){
//		$(this).addClass("selected").parent().siblings().children(".tab").removeClass("selected");
//		$(this).parents(".Alph-tab").siblings(".tab-contents").hide();
//		$(this).parents(".Alph-tab").siblings(".tab6-contents").show();
//	});
//	$(".tab-box .Alph-tab a.tab7").click(function(){
//		$(this).addClass("selected").parent().siblings().children(".tab").removeClass("selected");
//		$(this).parents(".Alph-tab").siblings(".tab-contents").hide();
//		$(this).parents(".Alph-tab").siblings(".tab7-contents").show();
//	});
//	$(".tab-box .Alph-tab a.tab8").click(function(){
//		$(this).addClass("selected").parent().siblings().children(".tab").removeClass("selected");
//		$(this).parents(".Alph-tab").siblings(".tab-contents").hide();
//		$(this).parents(".Alph-tab").siblings(".tab8-contents").show();
//	});
//	$(".tab-box .Alph-tab a.tab9").click(function(){
//		$(this).addClass("selected").parent().siblings().children(".tab").removeClass("selected");
//		$(this).parents(".Alph-tab").siblings(".tab-contents").hide();
//		$(this).parents(".Alph-tab").siblings(".tab9-contents").show();
//	});
// Second General Tab End
	
	//Color box
	//$("#side-toolkit .contact-us").colorbox({opacity:0,innerWidth:650, innerHeight:550});


	//Search box
	$("#search").blur(function(){
    if (this.defaultValue == this.value) this.value = '';
    else if (this.value == '') this.value = this.defaultValue;
	})
	$("#search").focus(function(){
    if (this.defaultValue == this.value) this.value = '';
    else if (this.value == '') this.value = this.defaultValue;
	})

	//Find Resource
	$("#find-resource").blur(function(){
    if (this.defaultValue == this.value) this.value = '';
    else if (this.value == '') this.value = this.defaultValue;
	})
	$("#find-resource").focus(function(){
    if (this.defaultValue == this.value) this.value = '';
    else if (this.value == '') this.value = this.defaultValue;
	})

	//Course Keywords box
	$("#course-keywords").blur(function(){
    if (this.defaultValue == this.value) this.value = '';
    else if (this.value == '') this.value = this.defaultValue;
	})
	$("#course-keywords").focus(function(){
    if (this.defaultValue == this.value) this.value = '';
    else if (this.value == '') this.value = this.defaultValue;
	})

	//Form Uniform
	$("#menu input, #menu textarea, #menu select, #menu button").uniform();
	$("fieldset#search-courses input, fieldset#search-courses select, form#search-body input,form#search-body select").uniform();
	$("select.make-selection").uniform();
	
	
	//Customer tabs	
	var tabContainers = $('.customer-slider > div');
	tabContainers.filter(':first').css({'visibility':'visible','z-index':'10'});
	$('ul.customer-tabs li a').click(function (){
		var currHref = $(this).attr('href');
		tabContainers.css({'visibility':'hidden','z-index':'0'});
		
		tabContainers.each(function(){
			
			if(currHref.indexOf($(this).attr('id')) == -1){
				$(this).find('div:first-child').css('visibility','hidden');
			} else {
				$(this).find('div:first-child').css('visibility','visible');
			}			
		})		
		
		tabContainers.filter(this.hash).css({'visibility':'visible','z-index':'10'});
		
		$('ul.customer-tabs li a').removeClass('active');
		$(this).addClass('active');
		return false;
	});
	
	if($('.customer-slider').length > 0)
	{	
		if($('.industry-customers').length > 0)
		{
			$('.industry-customers').jCarouselLite({
				horizontal: true,
				hoverPause: true,
				btnNext: "#industry .next",
				btnPrev: "#industry .prev",
				visible: 1,
				auto: 5000,
				speed: 2000
			});
		}
		
		if($('.product-customers').length > 0)
		{
			$('.product-customers').jCarouselLite({
				horizontal: true,
				hoverPause: true,
				btnNext: "#products .next",
				btnPrev: "#products .prev",
				visible: 1,
				auto: 5000,
				speed: 2000
			});
			
			$('.product-customers').css('visibility','hidden');
		}
		
		if($('.solution-customers').length > 0)
		{
			$('.solution-customers').jCarouselLite({
				horizontal: true,
				hoverPause: true,
				btnNext: "#solutions .next",
				btnPrev: "#solutions .prev",
				visible: 1,
				auto: 5000,
				speed: 2000
			});
			
			$('.solution-customers').css('visibility','hidden');
		}
	}


	$("#solution_category.form select").change(function(e){
		e.preventDefault();
		
		if($(this).find(":selected")[0].getAttribute("value") != null)
			window.location = "http://" + document.domain + $(this).val();
		
		return false;
	});
});   // JQuery END.


$(document).ready(function() {
var tabContainers = $('.discussion-container .inner-tabs-data > div');
        tabContainers.hide().filter(':first').show();			
			$('.discussion-container ul.inner-tabs li a').click(function (){
            tabContainers.hide();
            tabContainers.filter(this.hash).show();
			$('.discussion-container ul.inner-tabs li a').removeClass('active');
           $(this).addClass('active');
            return false;
	});
});

$(document).ready(function() {
var tabContainers = $('.documents-container .inner-tabs-data > div');
        tabContainers.hide().filter(':first').show();			
			$('.documents-container ul.inner-tabs li a').click(function (){
            tabContainers.hide();
            tabContainers.filter(this.hash).show();
			$('.documents-container ul.inner-tabs li a').removeClass('active');
           $(this).addClass('active');
            return false;
	});
});

$(document).ready(function() {
var tabContainers = $('.face-com-container .inner-tabs-data > div');
        tabContainers.hide().filter(':first').show();			
			$('.face-com-container ul.inner-tabs li a').click(function (){
            tabContainers.hide();
            tabContainers.filter(this.hash).show();
			$('.face-com-container ul.inner-tabs li a').removeClass('active');
           $(this).addClass('active');
            return false;
	});
});


$(function(){ 
$(".Alph-tab li").click(function(){ 
$i = $(".Alph-tab li").index(this);

$(".Alph-tab li a").removeClass('selected');
$(this).find("a").addClass('selected');

$(".tabber .tabberin").hide();
$(".tabber .tabberin:eq("+$i+")").fadeIn(300);



   });$(".Alph-tab li:first").click();
});


$(function(){ 
  $(".Allview a:first").addClass('active');
  $(".Allview a").click(function(){ 
  
  $(".Allview a").removeClass('active');
    $(this).addClass('active');
  
  
  $in = $(".Allview a").index(this);
    if ($in==0)
		{ 
		  
		
		 $(".thumbview").css("display","block");
 		 $(".listview").css("display","none");
		 $("#Items_container li").removeClass("selected");
		 $("#Items_container li:eq("+$in+")").addClass("selected");
  $text = 		 $("#Items_container li:eq("+$in+")").html();
  
		
		 
		}
else 
   	    { 
		 $(".thumbview").css("display","none");
 		 $(".listview").css("display","block");
		 $("#Items_container li").removeClass("selected");
		 $("#Items_container li:eq("+$in+")").addClass("selected");
  $text = 		 $("#Items_container li:eq("+$in+")").html();
		 
		
	
		}
	
 });
});





