

window.addEvent('domready', function() {

	var dxRounded = $$('#dx_col');
	dxRounded.each(function(item, index){
    	item.set('html','<div class="cd_1"><div class="cd_2"><div class="cd_3"><div class="cd_4">',item.get('html'),'</div></div></div></div>');
	});

	var aRounded = $$('a.thumb');
	aRounded.each(function(item, index){
    	item.set('html','<span>',item.get('html'),'</span>');
	});
	
	var video_player = $$('#video_player');
	video_player.each(function(item, index){
		var URL = item.get('html');
		video_player = new Swiff('swf/NonverBlaster.swf' , {
			width: 490,
			height: 310,
			params: { wmode: 'transparent', allowFullScreen : 'true' },
			vars: {
				videoURL: URL,
				autoplay: 'true',
				controlColor: '0xD20067',
				defaultVolume: '80'
			},
			container: item
		});
	});

});

/* ajax request */
function GetXmlHttpObject(handler) {
	var objXMLHttp=null
	if (window.XMLHttpRequest) {
		objXMLHttp=new XMLHttpRequest()
	} else if (window.ActiveXObject) {
		objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
	}
	return objXMLHttp
}

// Will populate data in txtid based on input
function htmlData(url, qStr, txtid) {
	if (url.length==0) {
		document.getElementById(txtid).innerHTML="";
		return;
	}
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null) {
		alert ("Browser does not support HTTP Request");
		return;
	}
	url=url+"?"+qStr;
	url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange=xmlHttp.onreadystatechange=function(){ 
        if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){
            document.getElementById(txtid).innerHTML=xmlHttp.responseText;
        }
    }
	xmlHttp.open("GET",url,true) ;
	xmlHttp.send(null);
}