var xaraSwidgets_easyAccordionTemplates = { entry: '
{heading}
' + '
' + '

{title}

' + '

{text}
{link_title}

' + '
', main: '
' + '
' + '{entryhtml}' + '
' + '
' }; function xsw_ea_htmlbr(str) { if (str == undefined) return ''; var lines = str.split("\n"); for (var t = 0; t < lines.length; t++) { lines[t] = $("

").text(lines[t]).html(); } return lines.join("
"); } // this is the constructor for a component // it loops through each 'entry' in the array of data and compiles the entry template for it // it then applies the resulting HTML to the main template before writing the whole lot to the div on the page // it then initialises the actual jquery plugin for the div (that now contains the required HTML as a result of writing the template to it) function xaraSwidgets_easyAccordionConstructor(divID, data) { var entryHTML = ''; // loop through each entry in the array and compile the entry template for it for(var i=0; i