

$(window).load(function() {
    $('#mainCarousel').jCarouselLite({
        btnNext: "#btnCarouselNext",
        btnPrev: "#btnCarouselPrev",
        visible: 4,
        scroll: 1

    });
    
    $('#featureSlideshow, #itemSlideshow, #detailSlideshow').cycle();
    
    $('#magazineSlideshow').cycle({
    	prev:   '.prevSlide', 
        next:   '.nextSlide', 
        timeout: 0
    });
    
    
    $('a[rel=external]').attr('target', '_blank');
    
   /* $('.featureBlock li a img').hover(function() {
    	var img = this.src
    	img = img.split('.jpg').join('_hover.jpg');
        this.src = img;
    	}, function () {
       	var img = this.src
    	img = img.split('_hover.jpg').join('.jpg');
           this.src = img;
     }); */
    
   
	 // find all the input elements with title attributes
		$('input[title!=""]').hint();
		
		
		
}); 


$(document).ready(function() {

	
	if ($.browser.msie) {
		$('select#field_quiz')
		.bind('focus mouseover', function() { $(this).addClass('expand').removeClass('clicked'); })
		.bind('click', function() { $(this).toggleClass('clicked'); })
		.bind('mouseout', function() { if (!$(this).hasClass('clicked')) { $(this).removeClass('expand'); }})
		.bind('blur', function() { $(this).removeClass('expand clicked'); });
	}
	
		  $(".faqMenu .link .accordionContent").hide();
				  
			  $('.faqMenu .link a').click( function(e) {			
					  var x = $(this).parent(".link").siblings(".link"); 		
					  						  
					  x.children("a").removeClass("on");				
					  x.children(".accordionContent").slideUp();					  
					  $(this).toggleClass("on");				
					  $(this).siblings(".accordionContent").slideToggle();
					  e.preventDefault();
							 
			  });

			  
/*****************Bicester breaks item page***************/			  
			  
			  
			  $("#bbIframe, #bbListing").hide();
				
				
				
				 $('#buyNow, .buyNow').click( function() {
					
					$(".txtArea, .bannerDetail, .buyNow").fadeOut();
					
					$("#bbIframe").fadeIn();
					$("#buyNow, .backToMain").hide();
					$("#bbListing").show();
					return false;
					
				 });
				
					$("#bbListing").click(function(){
						$(".txtArea, #buyNow, .bannerDetail, .buyNow").fadeIn();
						$("#bbListing").hide();
						$("#bbIframe").fadeOut();
						
						return false;
					});
});


/***************new LightBox********************/

$(document).ready(function() {
	$(".various").fancybox({
		width		: 450,
		height		: 600,
		padding		: 0,
		scrolling	: 'no'
	});
});


