//write in js effects stylesheet before ad code
document.write ("<style type='text/css'>.js-hdn{display:none}</style>")

tabPromoBox = function(){
	$("#promo_Area1 ul li:first").addClass('selected');
	$("div[@id^='promo_Area1promo']").hide();
	$("div[@id^='promo_Area1promo']:first").show();
	
	$("#promo_Area1 ul li").click(function(){
		$("#promo_Area1 ul li").removeClass('selected');							   
		$(this).addClass('selected');					   
		var idtoget = $(this).attr('id');
		idtoget=idtoget.split('promo_Area1tab');
		
		$("div[@id^='promo_Area1promo']").hide();
		$("#promo_Area1promo"+idtoget[1]).show();
										   
		})
	
	}
	
function domReady(){	

// 365 media  concertina
	$('#ss-365network li h4:first').addClass('ss-minus');
	
	$('#ss-365network li h4').css('background-color','#eee')
	$('#ss-365network li h4').click(function(){
	
		
		if($(this).siblings('ul').css('display')=='block'){
		
		$(this).siblings('ul').hide();
		$(this).removeClass('ss-minus');
		}
		
		else{
		
		$('#ss-365network li ul').hide();
		$(this).siblings('ul').show();
		$('#ss-365network li h4').removeClass('ss-minus');
		$(this).addClass('ss-minus');
		
		
		}
		
		
	
	})
	
$("#ss-bookmark").hover(function(){$(this).find("ul").show().css('z-index','4');$(this).find('a').addClass('ss-bookmarks')},function(){$(this).find("ul").hide();$(this).find('a').removeClass('ss-bookmarks')});
// set print article button
	$('#ss-print').css('display', 'block').click(function(){window.print();});
	

	tabPromoBox();
	

}


// this function is to expand/collapse the dropdown function in previews, reports & reaction section

function showHideDiv(dropdownid,eventInfo,n) {
	
	for(i = 0; i < n; i++) {
			
			var drop = "dropDown_"+i;
			var event = "eventInfo_"+i;
		
		if (dropdownid == drop) {
		
					if (document.getElementById(dropdownid).style.display =='block') {
			
							document.getElementById(dropdownid).style.display="none";
							document.getElementById(eventInfo).className='promoTabPlus';
					} else {
		
							document.getElementById(dropdownid).style.display="block";
							document.getElementById(eventInfo).className='promoTabMinus';
					}
			
		} else {
			var dropid = "dropDown_"+i;
			var eventid = "eventInfo_"+i;
			
			document.getElementById(dropid).style.display="none";
			document.getElementById(eventid).className='promoTabPlus';
			
		}
		
	}
	
}
function sniffBodyTag(){

	document.getElementById('ss-365network') ? domReady() : setTimeout("sniffBodyTag()",100);
}

sniffBodyTag();