/**
	Clickable script: makes 2 clickable columns between the specified
	container. Used for sponsored pages.

	Demo usage in code widget:
	<script type='text/javascript' src='http://ece5:8080/rc1/resources/js/clickable.js' ></script>
	<script type='text/javascript'>
		$(document).ready(function(){
       			init("#daddy","http://www.contra.gr" , "absolute", 140, 800, true);
		});
</script>
	<style type='text/css'>
	body{background:#000 none;}
	div#daddy{background:#000 url(http://www.enternseek.com/images/pg75588banner.jpg) no-repeat center -450px;}
	div#pageH2{background:#000 url(http://www.enternseek.com/images/pg75588banner.jpg) no-repeat center 25% ;}
	</style>
**/
function initClickable(containerID, clickURL, position, width, height, debug){
    container = $(containerID);
    coords = container.offset();
    position = (position == undefined) ? "absolute" : position;
    width = (width == undefined) ? 130 : width;
    height = (height == undefined) ? 130 : height;
    leftArea = $("<div class='leftClickable'>").css({
        "position" : position,
        "left" : coords.left - width,
        "top" : coords.top,
        "width" : width+"px",
        "cursor" : "pointer",
        "height" : height+"px"
    });
    var rightArea = $("<div class='rightClickable'>").css({
        "position" : position,
        "left" : coords.left + container.outerWidth(),
        "top" : coords.top,
        "width" : width+"px",
        "cursor" : "pointer",
        "height" : height+"px"
    });
    $(rightArea).click(function(){
        window.open(clickURL);
    });
    $(leftArea).click(function(){
        window.open(clickURL);
    });
    $('body').append(leftArea);
    $('body').append(rightArea);
    if(debug){
        leftArea.css("background-color","#990");
        rightArea.css("background-color","#990");
    }
}

