// JavaScript Document

(function( $ ) {
	$.fn.collapsible = function(options) {
		var config = {}
		config.collapseInit = false;
		$.extend(config, options);
		this.find('.collapsing').each(function(){
			var targets = $('.' + this.id)
			if (config.collapseInit){
				targets.hide();
			}
			$(this).click(function(){
				targets.toggle();
			});
		});
	};
	$.fn.emramSetup = function (options) {
		var config = {}
		config.initSegment = 1;
		$.extend(config, options);
		$('table.HPemram').hide();
		this.find('#segment' + config.initSegment).show();
		this.find('div#EmramButtons a').each(function (index, element) {
			var button = $(this);
			var segmentID = button.attr('data-segment');
			button.click(function () { $('.HPemram').hide(); $('#' + segmentID).show(); });
		});
	};
})( jQuery );


<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


// Functions to open and close Marketing Opportunities

function openOffer(theOffer) {
	if(document.getElementById(theOffer).style.display == 'block') {
		document.getElementById(theOffer).style.display = 'none'; 
	}else{
		document.getElementById(theOffer).style.display = 'block';
	}
}
function closeOffer(theOffer) {
	document.getElementById(theOffer).style.display = 'none'; 
}
//Create an array
var allPageTags = new Array();
function openAllOffers(theClass) {
//Populate the array with all the page tags
var allPageTags=document.getElementsByTagName("*");
//Cycle through the tags using a for loop
for (i=0; i<allPageTags.length; i++) {
//Pick out the tags with our class name
if (allPageTags[i].className=='offerContainer') {
//Manipulate this in whatever way you want
allPageTags[i].style.display='block';
}
}
document.getElementById('closeAll').style.display = 'block'; 
document.getElementById('expandAll').style.display = 'none'; 
} 
function closeAllOffers(theClass) {
//Populate the array with all the page tags
var allPageTags=document.getElementsByTagName("*");
//Cycle through the tags using a for loop
for (i=0; i<allPageTags.length; i++) {
//Pick out the tags with our class name
if (allPageTags[i].className=='offerContainer') {
//Manipulate this in whatever way you want
allPageTags[i].style.display='none';
}
}
document.getElementById('closeAll').style.display = 'none'; 
document.getElementById('expandAll').style.display = 'block'; 
} 


//-->

