﻿/// <reference path="../js/jquery-vsdoc.js" />
$(function() {
	var option = {
		left: 0,
		top: 1,
		blur: 1,
		opacity: 0.9
	}
	$("#tbtopmenu a").dropShadow(option);
	$(".shadow").dropShadow(option);
	//$(".NewsButtons a").dropShadow(option);
	$(".divDate").each(function() {
		if (/^\s*$/.test($(this).text())) {
			$(this).hide();
		}
	});
	if ($("div.center").length > 0) $("#rightarrow").css("background-position", ($("div.center").position().left + 499) + 'px');
	$(".ButtonSearch").hover(function() { $(this).attr("src", "files/sitedesign/btsearch_hover.gif"); },
	function() { $(this).attr("src", "files/sitedesign/btsearch.gif"); })
	.click(function() { $(this).attr("src", "files/sitedesign/btsearch_pressed.gif"); return true; });
	$(window).resize(function() { if ($("div.center").length > 0) $("#rightarrow").css("background-position", ($("div.center").position().left + 499) + 'px'); });
	$(".breadcrumbs a:last").addClass("bselected");
	var resizeConent = function() {
		var lh = $("#leftcontent").height();
		var rh = $("#rightcontent").height();
		if (lh > rh) {
			$("#rightcontent").height(lh);
		} else if (lh < rh) {
			$("#leftcontent").height(rh);
			$(".map").css("position", "absolute").css("bottom", "0px");
		}
		if ($(".topmenuselected > a").length > 0) $("div.MenuText").text('').append($(".topmenuselected > a").text() + ":");
		if ($(".bgband4").length > 0) {
                        
			$(".bgband4").height(parseFloat($(".center").height()) - 400);
		}
	        $(".content").labeled_image();
	        $("#leftcontent.White").labeled_image();
        }
	$(window).bind("load", resizeConent);
	

})
var popUpW = function(Uri, w, h) {
	w = (w) ? w : 500;
	h = (h) ? h : 400;
	var l = $(window).width() / 2 - w / 2;
	var t = $(window).height() / 2 - h / 2 - 50;
	var opt = "left=" + l + ",top=" + t + ",height=" + h + ",width=" + w + ",status=yes,resizable=yes,scrollbars=yes,toolbar=no,menubar=no,location=no";
	window.open(Uri, "", opt);
	return false;
}