<?php
/**
 * @name          : Joomla Social Pinboard
 * @version		  : 1.5.0
 * @package       : apptha
 * @since         : Joomla 1.5
 * @author        : Apptha - http://www.apptha.com
 * @copyright     : Copyright (C) 2011 Powered by Apptha
 * @license       : http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
 * @abstract      : Social Pinboard Module Checkiday Widget
 * @Creation Date : August 2013
 * @Modified Date : March 2014
 * */

defined ('_JEXEC') or die ('Direct Access to this location is not allowed.');

    echo '<div id="changeAnchorTagTarget">' . $params->get('checkidayscript', '') . '</div>';
?>

<script type="text/javascript">
window.onload = function(){
	// function to change the all checkiday widget anchor tags target to "_blank"
	var anchors = document.getElementById('changeAnchorTagTarget').getElementsByTagName('a');
	for (var i=0; i<anchors.length; i++){
	  anchors[i].setAttribute('target', '_blank');
	}
}
</script>