/***************************************
****************************************
    GENERAL SCRIPTS
****************************************
***************************************/


/***************************************
    ON DOCUMENT LOAD
    ------------------------------------
    Any code between this function
    executs when the page had loaded
    fully.
***************************************/

$(document).ready(function()
{     

	/*****************************/
	/******   accordian      *****/
	/*****************************/

	jQuery('#accordion').accordion({ 
		autoheight: true,
		active: ".current",
		//animated: 'easeslide',
		header: ".accordion-toggle"

	});   

	
     
     
  //   jQuery("table tr:odd").addClass("odd");
   
   
   
   
	/*****************************/
	/******  preload images  *****/
	/*****************************/
	/*if (document.images)
	{
		pic1= new Image();
		pic1.src="/images/image.gif";
		pic2= new Image();
		pic2.src="/images/image.gif";
	}*/

   
   



	/*****************************/
	/******   Media Icons     ****/
	/**************************   

    jQuery("#media  a[href$='.jpg']").parent().css("background-image", "url(../images/icons/simple.gif)");
    jQuery("#media  a[href$='.html']").parent().css("background-image", "url(../images/html.jpg)");
    jQuery("#media  a[href$='.htm']").parent().css("background-image", "url(../images/html.jpg)");
    jQuery("#media  a[href$='.zip']").parent().css("background-image", "url(../images/zip.jpg)");
	jQuery("#media  a[href$='.mp3']").parent().css("background-image", "url(../images/mp3.jpg)");
	jQuery("#media  a[href$='.pdf']").parent().css("background-image", "url(../images/press.jpg)");
	jQuery("#media  a[href$='.doc']").parent().css("background-image", "url(../images/doc.jpg)");

	
    jQuery("#media .LSTMeAttachment:odd").css("background-color", "#ececec");
***/ 

	/*****************************/
	/******   image zoom     *****/
	/*****************************/    
    /*clicking an image loads a larger version into the 
    div left of it ready for magnifi
    jQuery(".image1 a, .image2 a, .image3 a, .image4 a").click(function(e)
    {
		// disable the normal link click behaviour
		e.preventDefault(); 
		
		// swap the image using the a tags href
		jQuery(".hoverimage img").attr("src", jQuery(this).attr("href"));    
    });
    cation*/
    
    /*zoom code  
    
    
    jQuery(".jqzoom ").jqueryzoom( {
		xzoom: 300, //zooming div default width(default width value is 200)
		yzoom: 300, //zooming div default width(default height value is 200)
		offset:8 //zooming div default offset(default offset value is 10)
		//position: "right" //zooming div position(default position value is "right")
	});

*/  

	
	

    
	
	/*****************************/
	/******   signup rhs     *****/
	/****************************
	jQuery('#magnecast_name').example('Name',{class_name:"jqueryexample"});
	jQuery('#magnecast_email').example('Email',{class_name:"jqueryexample"});	
	jQuery('#ctl00_cphMain_searchBox').example('Search',{class_name:"jqueryexample"});	

*/

	
	/*****************************************/
	/******   Press release thickbox     *****/
	/*****************************************/
	
	/*
	
	
	jQuery('.LSTNeImage a').each(function(i) {
		
		var largeImgUrl = jQuery(this).find("img").attr("src");			
		
		//post fix _large to the image
		var lastIndexOfDot = largeImgUrl.lastIndexOf(".");		
		
		largeImgUrl = largeImgUrl.substring(0, lastIndexOfDot)+"_large"+largeImgUrl.substr(lastIndexOfDot);		
				
				
				
		//would be simpler just to remove -1
				
		
		jQuery(this).click(function(e) {
			e.preventDefault();
			
			var title = jQuery(".LSTNeTitle a").eq(i).text();
			
			//tb_show(caption, url, imageGroup)		//show in thickbox
			tb_show(title, largeImgUrl, "News");		
		});
		
	
	});
	
	*/
	
	


});
