var loadEvents = function()
{
	tables=document.getElementsByTagName("table");
	for(table=0; table<tables.length;table++)
	{
		trs=tables[table].getElementsByTagName("tr");
		if(trs.length>0)
		{
			trs[0].className=trs[0].className.replace(new RegExp(" first-child\\b"), "")+' first-child';
			trs[trs.length-1].className=trs[trs.length-1].className.replace(new RegExp(" last-child\\b"), "")+' last-child';
			for(tr=0; tr<trs.length;tr++)
			{
				tds=trs[tr].getElementsByTagName("td");
				if(tds.length>0)
				{
					tds[0].className=tds[0].className.replace(new RegExp(" first-child\\b"), "")+' first-child';
					tds[tds.length-1].className=tds[tds.length-1].className.replace(new RegExp(" last-child\\b"), "")+' last-child';
				}
				tds=trs[tr].getElementsByTagName("th");
				if(tds.length>0)
				{
					tds[0].className=tds[0].className.replace(new RegExp(" first-child\\b"), "")+' first-child';
					tds[tds.length-1].className=tds[tds.length-1].className.replace(new RegExp(" last-child\\b"), "")+' last-child';
				}
			}	
		}
	}
	$('.tab-boby > div').each(function (){
		if(this.offsetHeight<271)
			$(this).css('height','270px');
	})
	$('#inner_content div.cdiv > .text').each(function (){
		if(this.offsetHeight<301)
			$(this).css('height','300px');
	})
}
if (window.attachEvent)
	window.attachEvent('onload', loadEvents);
//else if (window.addEventListener)
//	window.addEventListener('load', loadEvents, false);
//else
//	window.onload=loadEvents;
/*
$(document).ready(function () {
	$('.table_s img').click(function() {
		if($('.s_table').is(":hidden")){
			$('.s_table').css('display','table'); 
		}else{
			$('.s_table').css('display','none'); 
		}
	});
});
*/
$(function () {
	$('#compareButton').click(function() {
		//var thisElement = $(this);
		var compareTable = $("#compareTableInfo");
		if(compareTable.hasClass("afterClicked")) {
			compareTable.fadeOut("normal").removeClass("afterClicked");
		}
		else {
			compareTable.fadeIn("normal").addClass("afterClicked");
			scrollTo(0,910);
		}
	});
    
    $('#tab-Demos').click(function(){
        
        $('#tab-Demos-body').css('height', '1000px');
        
    });
    
});



							$(document).ready(function(){
								$(".ui-widget").css("width", "320px");
								$("#choise-region-cross").css("margin-left", "295px");
							});
				
