var wW; var wH;
var mwW; var mwH; var swpH;
var cwH; var ncbW; var ncbH;
// summary:When DOM is ready loads scripts
$(document).ready(function(){
	SetLayout();
	jQuery.event.add(window, "load", SetLayout);
	jQuery.event.add(window, "resize",SetLayout);
});
//summary:sets width & height of elements in page according to window size
function SetLayout()
{
	wW = jQuery(window).width();
	wH = jQuery(window).height();//600
	mwSpH=(wH >500) ? wH : 500; mwH=(wH >620) ? wH-40 : 620;	
	swpH = (mwH-360)/2+"px";
	jQuery("#startPageWrap").css("padding-top",swpH);
	
	jQuery("#mainWrap").height(mwH);	
	cwH = mwH - 300;
	jQuery("#content").height(cwH);
    jQuery("#newsBoxWrap").height(cwH-100);
	jQuery("#leftContent").height(cwH);
	jQuery("#rightContent").height(cwH);
	ncbW = jQuery(".newsBox").width()-70;
	jQuery(".newsContentBox").width(ncbW);
}

function SetGalleryThumbs()
{
    jQuery("#thumbGallery td:nth-child(3) img").css('max-width','95px');
    jQuery("#thumbGallery td:nth-child(2) img").css('width','54px');
    jQuery("#thumbGallery td:nth-child(2) img").css('height','71px');
    jQuery("#thumbGallery td:nth-child(1) img").css('max-width','95px');
    
}
