//<![CDATA[ 
jQuery.noConflict();
jQuery(document).ready(function() { 
	// jQuery(document).pngFix(); 
	
	if(window.location.host != 'nonstopads.co.uk' && window.location.host != 'dev.nonstopads.co.uk') {
		path = window.location.host + '/nonstopads.co.uk' 
	} else {
		path = window.location.host;
	}
	
	if(jQuery('#sites').length) {
		jQuery('#sites').cycle({ fx: 'fade', speed: '3000', timeout: '4500' });
	}
	
	if(jQuery('#ContactForm').length) {
		jQuery('.jswarn').remove();
		jQuery.get('/contact/jsSecForm/', function(resp) {
			jQuery('#ContactForm').append('<input type="hidden" name="data[Contact][ts]" id="ContactTs" value="'+resp+'" />');
		});
	}
	
	if(jQuery('#LoginForm').length) {
		jQuery('.jswarn').remove();
		jQuery.get('/login/jsSecForm/', function(resp) {
			jQuery('#LoginForm').append('<input type="hidden" name="data[Login][ts]" id="LoginTs" value="'+resp+'" />');
		});
	}
	
	if(jQuery('#cancelButton').length) {
		jQuery('#cancelButton').click( function(){
			history.back();
		});
	}
	
	/* for fancy table highlighting */
	if(jQuery("#table").length) {
		
		jQuery("table tr:even").addClass("even");
		
		jQuery('table tr:not([th])').hover(function() {
  			jQuery(this).addClass('t_hover');
		}, function() {
  			jQuery(this).removeClass('t_hover');
		});

		jQuery('table tr.even').hover(function() {
			jQuery(this).removeClass('even');
  			jQuery(this).addClass('t_hover');
		}, function() {
  			jQuery(this).removeClass('t_hover');
  			jQuery(this).addClass('even');
		});
	}
	
	jQuery(document).pngFix(); 
});
//]]> 
