$(document).ready(function(){ 
        $(document).pngFix(); 
    }); 


$(function() {
	$(".views-field-field-currency-value span.field-content:empty").addClass("empty");
	//$('.views-field-field-currency-value span.field-content').prepend('<span class="price">Price quoted in </span>');
	$('.indented .forum-post-wrapper').prepend('<div class="child_arrow"></div>');
	$(".indented:gt(8)").addClass('no_indent');
	
});

	//jcarousel cycle

$(function() {
    if ($('.jcarousel-skin-default').length > 0) {
        $('.view-homepage-carousel ul.jcarousel').after('<div id="slideshowpager">');

        $('.view-homepage-carousel ul.jcarousel').cycle({
            fx: 'fade',
            pager: '#slideshowpager'
            //speed: 1000,
            //timeout: 7000,
            //animation: 'slow'
            //slideExpr: 'li'
        });

    }
 
    $("li a:empty").addClass("empty");
    $("input#edit-searchstring").addClass("cleardefault");
    $("input#edit-member-number-1").addClass("cleardefault");
    $("input#edit-surname-1").addClass("cleardefault");
    $("input#edit-first-name").addClass("cleardefault");
    $("input#edit-last-name").addClass("cleardefault");

    if ($('li').hasClass('active-trail')) {
        $('li.active-trail').addClass('active');
    }

    $('p').removeClass('myClass yourClass')


    $('.reply-count:contains(replies)').each(function() {
        $(this).html(
    $(this).html().replace('replies', '<span>replies</span>')
  );
    });

    $('.reply-count:contains(reply)').each(function() {
        $(this).html(
    $(this).html().replace('reply', '<span>reply</span>')
  );
    });

    $('.reply-count:contains(No)').each(function() {
        $(this).html(
    $(this).html().replace('No', '0')
    
      );
      	 });
    
    $('.view-conference-list h3:contains(Parent Session:)').each(function() {
        $(this).html(
        	$(this).html().replace('Parent Session:', '')
  );
    });
    //annual conference
    if ($('.view-conference-list h3:contains("29th Jun")').length > 0) {
		$(".view-conference-list h3").addClass("day_one");
	}
	
	if ($('.view-conference-list h3:contains("30th Jun")').length > 0) {
		$(".view-conference-list h3").addClass("day_two");
	}
	
	if ($('.view-conference-list h3:contains("1st Jul")').length > 0) {
		$(".view-conference-list h3").addClass("day_three");
	}

 $("form#iris-user-manage-register-form").addClass("niceform");
    $("form#views-exposed-form-Job-list-default").addClass("niceform");
    $("form#views-exposed-form-events-list-default").addClass("niceform");
    $("form#library-literature-search-form").addClass("niceform");
    $("form#library-literature-search-form").addClass("niceform");
    $("form#contactus-enquire-myform").addClass("niceform");
    $("form#views-exposed-form-conference-list-default").addClass("niceform");
    //$("form#views-exposed-form-all-faqs-default").addClass("niceform");
    $('ul.menu').attr('id', 'menu');
});




sfHover = function() {
	var sfEls = document.getElementById("menu").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

$(function() {
       var zIndexNumber = 1000;
      
       $("ul").each(function() {
               $(this).css('zIndex', zIndexNumber);
               zIndexNumber -= 10;
       });
       
        $("li").each(function() {
               $(this).css('zIndex', zIndexNumber);
               zIndexNumber -= 10;
       });

	

});




