   $('#readyTest').corner();
   
    //$(".shadow").dropShadow({left: 8, top:18, opacity: 0.8, blur: 4});
   // $(".shadow").dropShadow({left: -7, top: 18, opacity: 0.8, blur: 4});
    $(function(){

            $('a.showCards').hover(function(){
               $('img.showCards').show();
            },function(){
                $('img.showCards').hide();
            })

		$('.corner').corner( "top 3px cc:#FFFFFF");
		$('.corner').corner( "bottom 3px");
		$('#foot').corner('bottom');
		$('#nav').corner("4px cc:#FFFFFF");
		$('.ddmnu').corner("bottom 4px");
		$('.ddmnu ul').corner("bottom 6px");
		/*$('#home_news').corner( "4px");
		$('#home_featured').corner( "4px");
		$('#home_cart').corner( "4px");*/

                $('#breadcrumb > ul > li:last').css('color','black');

                /*For the summary and Specification on the products page */

                $('#spec').hide();//Hidden using JS for accessibility
                $('#spec_link > a').click(function(e){
                    $('.specsum').removeClass('specsum_sum');
                    $('.specsum').addClass('specsum_spec');
                    $('#summary').hide();
                    $('#spec').show();
                     $('.links').hide();
                    e.preventDefault();
                })

                $('#summary_link > a').click(function(e){
                    $('.specsum').removeClass('specsum_spec');
                    $('.specsum').addClass('specsum_sum');
                    $('#spec').hide();
                    $('#summary').show();
                    $('.links').show();
                    e.preventDefault();
                })



                /* End of Summary and Specification */

                //Credit Card help
                $('#cvv2').dialog({
					autoOpen: false,
					width: 450,
                                        height:180,
                                        modal: true,
					buttons: {
						"Ok": function() {
							$(this).dialog("close");
						}

					}
				});
                 $('#cc').dialog({
					autoOpen: false,
					width: 300,
                                        height:150,
                                        modal: true,
					buttons: {
						"Ok": function() {
							$(this).dialog("close");
						}

					}
				});
                  $('#issue').dialog({
					autoOpen: false,
					width: 450,
                                        height:180,
                                        modal: true,
					buttons: {
						"Ok": function() {
							$(this).dialog("close");
						}

					}
				});
                $('#issueno').dialog({
					autoOpen: false,
					width: 450,
                                        height:180,
                                        modal: true,
					buttons: {
						"Ok": function() {
							$(this).dialog("close");
						}

					}
				});

                 $('.window').dialog({
					autoOpen: false,
					width: 600,
                                        height:420,
                                        modal: true
				});

                $('#cvv2_help').click(function(e){
                    $('#cvv2').dialog('open')
                    e.preventDefault();
                })

                 $('#cc_help').click(function(e){
                    $('#cc').dialog('open')
                    e.preventDefault();
                })

                 $('#issue_help').click(function(e){
                    $('#issue').dialog('open')
                    e.preventDefault();
                })

                 $('#issueno_help').click(function(e){
                    $('#issueno').dialog('open')
                    e.preventDefault();
                })

                $('.address').click(function(e){
                    url=$(this).attr('href');
                    $.get(url, function(data){
                        $('.window').html(data);
                        $( ".window" ).dialog( "option", "title", "Add or Edit Address");
                        $('.window').dialog('open');

                        $('.window').find('form').submit(function(e){
                            valid=true;
                            if($('#ship_state',this).val()=='0' && $('#ship_country',this).val()=='225' ){valid=false;$('#ship_state',this).addClass('highlight_error');}else{$('#ship_state',this).removeClass('highlight_error');}
                            if(valid!=true)
                               e.preventDefault();
                        })

                     });
                    
                    e.preventDefault();
                })

                $('.modal_search_link').click(function(e){
                    $('#modal_search').dialog({
                        title:'Advanced Search',
                        height:500,
                        width:800,
                        buttons: {
				"Search": function() {
					$('form',this).submit();
				},
                                "Cancel":function(){
                                    $(this).dialog('close');
                                }
                        }
                    });
                    e.preventDefault();
                })
                

    });
    
    fst=$('div','#features li:first');
    $('#view').html($(fst).html());/* On page load get the first one in the list and put it in the content view */
    $('#features > li > div').hide();/*For accessibililty, if JS is disabled it will show them all expanded*/
    $('#view').show();/*For when Js is disabled, it hides the view div as it wont be used. When js is enabled it shows it*/

   $('#features > li > a').click(function(e){
			e.preventDefault();
                        clicked=$(this).parent();
			$('#view').fadeOut("fast",function(){
				$(this).html($('div',clicked).html()).fadeIn("fast");
			});

		})

 //   $('.feat_img > a >img').cjObjectScaler({
 //    method: "fit"
 //   });

$('.expanding_menu > li > ul').hide();
$('#month_selected > ul').show();
$('.expanding_menu > li').click(function(e){
    $('ul',this).slideToggle();
    $(this).siblings().find('ul').slideUp();
});


//inbox JQuery

$('.middle','.AccountMessageList').hide();

$('.toggleMessage').click(function(e){
    e.preventDefault();
    $(this).parent().parent().parent().find('.middle').slideToggle(1000);
})

$('.send_message').hide();
$('.send_message_link').click(function(e){
    $('.send_message').slideToggle(1000);
    $('.send_message_link').toggle(800);
    e.preventDefault();
});

$('.hide').hide();
$('.show').show();
$('.signup').click(function(e){
    $(".SideNewsletterBox").toggle(800);
    e.preventDefault();
})

$('.accordion').accordion({
    collapsible: true,
    autoHeight: false,
    active: false
});

$(document).ready(function() {
            $('.slideshow').cycle({
                        fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
                });
            $('a','.ticker_links').click(function(e){
                 no=$(this).attr('id');
                 $('.slideshow').cycle((no-1));
                 e.preventDefault();
             })
        });

        /* Account Details page */
        $('#account_email_link').click(function(e){
            e.preventDefault();
            $(this).toggle();
            $('#account_email').toggle();
            $('#account_detail_submit').show();
        })

        $('#account_firstname_link').click(function(e){
            e.preventDefault();
            $(this).toggle();
            $('#account_firstname').toggle();
            $('#account_detail_submit').show();
        })


        $('#account_lastname_link').click(function(e){
            e.preventDefault();
            $(this).toggle();
            $('#account_lastname').toggle();
            $('#account_detail_submit').show();
        })
        
        $('#account_companyname_link').click(function(e){
            e.preventDefault();
            $(this).toggle();
            $('#account_companyname').toggle();
            $('#account_detail_submit').show();
        })

        $('#account_phone_link').click(function(e){
            e.preventDefault();
            $(this).toggle();
            $('#account_phone').toggle();
            $('#account_detail_submit').show();
        })

         $('#change_pw_link').click(function(e){
            e.preventDefault();
            $(this).toggle();
            $('.change_pw').toggle();
            $('#account_detail_submit').show();
        })

        $("tbody >tr:even",'.striped').css("background-color", "#dbe5f1");


$('div','#faqs').hide()
$('a','#faqs').click(function(e){
	e.preventDefault();
	li=$(this).parent();
	sibs=$(this).parent().siblings();
	$('div',li).slideToggle(1000);
	$('div',sibs).slideUp(1000);
});


$('#teaser_link').click(function(e){
    e.preventDefault();
    $('#full_link').show(300);
    $(this).hide(300);
    $('#teaser').slideDown(300);
    $('#full').slideUp(300);
    $('a','#summary_link').text('Summary');
})
$('#full_link').click(function(e){
    e.preventDefault();
    $('#teaser_link').show(300);
    $(this).hide(300);
    $('#full').slideDown(300);
    $('#teaser').slideUp(300);
     $('a','#summary_link').text('Description');
})
$('#teaser_link').hide();


$('.bulletlist li:even').css('background-color','#E7EDF5');
$('.bulletlist li:odd').css('background-color','#F3F6FA');
$('.bulletlist li').hover(
  function () {
    $(this).addClass("enbolden");
  },
  function () {
    $(this).removeClass("enbolden");
  }
);


/* 21st October */
function showLots(action){

            hidden=$('#hiddens').html();
            $('#hiddens').hide();

            start=hidden.toLowerCase().search('<br />');
            if(start==-1)
                    start=hidden.toLowerCase().search('</p>');
            if(start==-1)
                    start=hidden.toLowerCase().search('</p>');
            end=hidden.length-1;

            shortened=hidden.substring(0, start);//Summarised version

                    if(action){
                            $('#fullsummary').html(hidden).append('<a href="#" onClick="showLots(false);return false;">Read Less</a>');
                    }else{
                     $('#fullsummary').html(shortened).append('<a href="#" onClick="showLots(true);return false;">Read More</a>');
                     }


}


/* End of 21st October */
