var $j = jQuery.noConflict();
$j(function(){
   	/******** widtet HTML manipulations *******/
	$j("input.Buttons").attr("value","Vote");
	
	$j("#polls_form_1 p").css({'text-align' : 'left'});
   	$j(".Buttons").attr({value: "Submit"});
	
	/***** wp cal hacks ****/
	/********* position *******/
	$j("#wp-calendar").wrap('<ul class="CalHolderWidget"><li></li></ul>');
	/********* reset *******/
	var secondEl = $j("#wp-calendar table.nav tr").children()[1];
	//$j(secondEl).children().remove();
	$j("#wp-calendar table:last-child caption").hide();
	/***** find firs text from the caption ********/
	var captionCal = $j("#wp-calendar table:last-child caption");
	var captionCalTxt = $j("#wp-calendar table:last-child caption a").text();
	$j(secondEl).append(captionCalTxt);
	/******* next ********/
	$j(".nav #next").click(function () { 
		 /*var captionCalTxt = $j("#wp-calendar table:last-child").find("caption a").text();
		 $j(secondEl).html(captionCalTxt);*/
	});
	/******* prev ********/
	$j(".nav #prev").click(function () { 
		   /*var captionCalDisplay = $j("#wp-calendar table:first-child").prev().css("display");
		   var captionTextDisplay = $j(captionCalDisplay).find("caption a").text();
			if(captionCalDisplay == "table"){
				$j(secondEl).html(captionTextDisplay);
			}else if(captionCalDisplay == "none"){
				var captionTextDisplay = " ";
				$j(secondEl).html(captionTextDisplay);
			}*/
	});
	/******* style ********/
	$j("#wp-calendar table.nav tr").children();
	$j("#wp-calendar table.nav").attr("width","100%")
	$j(secondEl).css({'width' : '100%'});
	$j("#today").css({'border' : '0', 'background-color' : '#ffffff'});
	$j(".pad a").hide();
	if ( $j.browser.chrome || $j.browser.safari || $j.browser.msie ) {
				
				$j('.sub-futured-home h4').css({'margin-top':'11px'})
			
			}
		
	//$j('body').attr('oncontextmenu', 'return false;');

});
function OpenAWin(url,targ) {
var height=0; var width=0;
if (self.screen) {     // for NN4 and IE4
width = screen.width;
height = screen.height}
else
if (self.java) {   // for NN3 with enabled Java
var jkit = java.awt.Toolkit.getDefaultToolkit();
var scrsize = jkit.getScreenSize();
width = scrsize.width;
height = scrsize.height; }
if (width > 0 && height > 0) {
var popleft = width - 670 }
else {
var popleft = 100
}
var features = 'toolbar=false,width=650,height=450,top=5,right=' + popleft +
',scrollbars'
  window.open(url, targ, features);
}


