$(document).ready(function(){
	$.fn.emptySelect = function(optionsDataArray){
		return this.each(function(){
			if(this.tagName =='SELECT') this.options.length = 0;							
		});
	};
	
	$.fn.loadSelect = function(optionsDataArray){
		return this.emptySelect().each(function(){
			if(this.tagName == "SELECT") 
			{
				var selectElement = this;
				$.each(optionsDataArray, function(index, optionData) {
					var option = new Option(optionData.caption,optionData.value, optionData.selected);
					if($.browser.msie)
						selectElement.add(option);
					else
						selectElement.add(option, null);
				});
			}
		});
	};	
	
		$(window).resize(function(){
		curWidth = $(window).width();
		if(curWidth < 1050)
			$("#contentConatiner").css({'margin-left':'-18px'});
		else
			$("#contentConatiner").css({'margin':'0 auto'});
	});
	$(window).resize();
});

function debug($msg) {
	if (window.console && window.console.log)
		window.console.log($msg);
}
