(function($) { // Making $ accessible even in noConflict
  $(document).ready(function(){
    
	$('tr.deleterow').click( function(){
		if ($('input[name=delete]').prop('checked')==false) {
			$('input[name=delete]').prop('checked', true);
			$('tr.deleterow').css('background-color', '#CCC');
		} else {
			$('input[name=delete]').prop('checked', false);		
			$('tr.deleterow').css('background-color', '#EEE');				
		}

	});
		
	/*$('.fancybox, .highlside').fancybox({
		'hideOnContentClick': true
	});*/
		
    // Adding placeholders for form fields
    if($.fn.placeholder)
    {
      $("[placeholder]").placeholder();
    }
    if ($.fn.fancybox)
    {
      $('.fancybox, .highslide').fancybox({
        padding: 0,
        width: 640,
        height: 480,
        scrolling: 'no'
      });
    }   	
    
    if($.fn.cycle) {
      $('.billboard-container').cycle();
    }
  
    // Setting up contact form
    if($.fn.TFContactForm)
    {
      $('#contact-form').TFContactForm();
    }
	  if($.fn.slideshow)
  	{
	    $('#slideshow').slideshow({
	      timeout: 5000,
	      fadetime: 1000,
	      type: 'sequence'
	    });
  	}    
		
		$('.read-more').click(function () {
			$(this).remove();
			$('.read-more-text').slideDown();
			return false;
		});
  });
})(jQuery);
