/*********************************************************************
* Copyright 2008 Amblique :: www.amblique.com :: All Rights Reserved *
**********************************************************************
* JAVASCRIPT AND OTHER SCRIPTING
*********************************************************************/

/**********************************
* jQuery scripts
**********************************/
jQuery(document).ready(function(){
	// noConflict :: http://docs.jquery.com/Core/jQuery.noConflict
	jQuery.noConflict();
	
	// IE PNG Fix :: http://plugins.jquery.com/project/iepngfix
	//jQuery("img[@src$=png], #id, .class").pngfix();
	
	// PopupWindow :: http://plugins.jquery.com/node/1314
	//var profiles = {popupTools:{height:400,width:500,center:1,scrollbars:1,status:0,resizable:1}};
	//jQuery(".tool").popupwindow(profiles);
	
	// Preload Images Automatically from CSS :: http://plugins.jquery.com/project/automated_image_preloader
	jQuery.preloadCssImages('images');
	
	// Your code goes here

});

/**********************************
* Prototype scripts
**********************************/


/**********************************
* Custom scripts
**********************************/
	// Popup windows
	function PopUpSend(URL) {
		window.open(URL,"Send","height=400,width=500,scrollbars=yes,menubar=no,statusbar=no,personalbar=no,locationbar=no");
	}

	function PopUpPrint(URL) {
		window.open(URL,"Print","height=500,width=500,scrollbars=yes,menubar=no,statusbar=no,personalbar=no,locationbar=no"); 
	}

	// Google toolbar yellow fields Fix
	if(window.attachEvent)
	window.attachEvent("onload",setListeners);

	function setListeners(){
	inputList = document.getElementsByTagName("INPUT");
	for(i=0;i<inputList.length;i++){
		inputList[i].attachEvent("onpropertychange",restoreStyles);
		inputList[i].style.backgroundColor = "";
	}
	selectList = document.getElementsByTagName("SELECT");
	for(i=0;i<selectList.length;i++){
		selectList[i].attachEvent("onpropertychange",restoreStyles);
		selectList[i].style.backgroundColor = "";
	}
	}

	function restoreStyles(){
	if(event.srcElement.style.backgroundColor != "" && event.srcElement.style.backgroundColor != "#a0d0ff"){
		event.srcElement.style.backgroundColor = "#a0d0ff"; /* color of choice for AutoFill */
		document.all['googleblurb'].style.display = "block";
	}
	}